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

struct DepositTransaction replace by struct TxDeposit #8943 #8944

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
31 changes: 22 additions & 9 deletions crates/anvil/core/src/eth/transaction/optimism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,28 @@ impl Encodable for DepositTransactionRequest {
/// See <https://github.com/ethereum-optimism/optimism/blob/develop/specs/deposits.md#the-deposited-transaction-type>
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct DepositTransaction {
pub nonce: u64,
pub source_hash: B256,
pub from: Address,
pub kind: TxKind,
pub mint: U256,
pub value: U256,
pub gas_limit: u128,
pub is_system_tx: bool,
pub input: Bytes,
/// Hash that uniquely identifies the source of the deposit.
pub source_hash: B256,
/// The address of the sender account.
pub from: Address,
/// The address of the recipient account, or the null (zero-length) address if the deposited
/// transaction is a contract creation.
#[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "TxKind::is_create"))]
pub to: TxKind,
/// The ETH value to mint on L2.
#[cfg_attr(feature = "serde", serde(default, with = "alloy_serde::quantity::opt"))]
pub mint: Option<u128>,
/// The ETH value to send to the recipient account.
pub value: U256,
/// The gas limit for the L2 transaction.
#[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))]
pub gas_limit: u128,
/// Field indicating if this transaction is exempt from the L2 gas limit.
#[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "isSystemTx"))]
pub is_system_transaction: bool,
/// Input has two uses depending if transaction is Create or Call (if `to` field is None or
/// Some).
pub input: Bytes,
}

impl DepositTransaction {
Expand Down