Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(primitives): OptimismFields Docs Cleanup #778

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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