Skip to content

Commit

Permalink
chore(primitives): OptimismFields Docs Cleanup (#778)
Browse files Browse the repository at this point in the history
* Clean up optimism fields documentation

* Lint fixes
  • Loading branch information
refcell authored Oct 6, 2023
1 parent 4a5598e commit dc8efd3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion crates/primitives/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,24 @@ impl BlobExcessGasAndPrice {
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct OptimismFields {
/// The source hash is used to make sure that deposit transactions do
/// not have identical hashes.
///
/// L1 originated deposit transaction source hashes are computed using
/// the hash of the l1 block hash and the l1 log index.
/// L1 attributes deposit source hashes are computed with the l1 block
/// hash and the sequence number = l2 block number - l2 epoch start
/// block number.
///
/// These two deposit transaction sources specify a domain in the outer
/// hash so there are no collisions.
pub source_hash: Option<B256>,
/// The amount to increase the balance of the `from` account as part of
/// a deposit transaction. This is unconditional and is applied to the
/// `from` account even if the deposit transaction fails since
/// the deposit is pre-paid on L1.
pub mint: Option<u128>,
/// Whether or not the transaction is a system transaction
/// Whether or not the transaction is a system transaction.
pub is_system_transaction: Option<bool>,
/// An enveloped EIP-2718 typed transaction. This is used
/// to compute the L1 tx cost using the L1 block info, as
Expand Down

0 comments on commit dc8efd3

Please sign in to comment.