Skip to main content

FoundryTransaction

Trait FoundryTransaction 

pub trait FoundryTransaction: Transaction {
Show 28 methods // Required methods fn set_tx_type(&mut self, tx_type: u8); fn set_caller(&mut self, caller: Address); fn set_gas_limit(&mut self, gas_limit: u64); fn set_gas_price(&mut self, gas_price: u128); fn set_kind(&mut self, kind: TxKind); fn set_value(&mut self, value: Uint<256, 4>); fn set_data(&mut self, data: Bytes); fn set_nonce(&mut self, nonce: u64); fn set_chain_id(&mut self, chain_id: Option<u64>); fn set_access_list(&mut self, access_list: AccessList); fn authorization_list_mut( &mut self, ) -> &mut Vec<Either<SignedAuthorization, RecoveredAuthorization>>; fn set_gas_priority_fee(&mut self, gas_priority_fee: Option<u128>); fn set_blob_hashes(&mut self, blob_hashes: Vec<FixedBytes<32>>); fn set_max_fee_per_blob_gas(&mut self, max_fee_per_blob_gas: u128); // Provided methods fn set_signed_authorization(&mut self, auth: Vec<SignedAuthorization>) { ... } fn enveloped_tx(&self) -> Option<&Bytes> { ... } fn set_enveloped_tx(&mut self, _bytes: Bytes) { ... } fn source_hash(&self) -> Option<FixedBytes<32>> { ... } fn set_source_hash(&mut self, _source_hash: FixedBytes<32>) { ... } fn mint(&self) -> Option<u128> { ... } fn set_mint(&mut self, _mint: u128) { ... } fn is_system_transaction(&self) -> bool { ... } fn set_system_transaction(&mut self, _is_system_transaction: bool) { ... } fn is_deposit(&self) -> bool { ... } fn fee_token(&self) -> Option<Address> { ... } fn set_fee_token(&mut self, _token: Option<Address>) { ... } fn fee_payer(&self) -> Option<Option<Address>> { ... } fn set_fee_payer(&mut self, _payer: Option<Option<Address>>) { ... }
}
Expand description

Extension of Transaction with mutable setters, allowing EVM-agnostic mutation of transaction fields.

Required Methods§

fn set_tx_type(&mut self, tx_type: u8)

Sets the transaction type.

fn set_caller(&mut self, caller: Address)

Sets the caller (sender) address.

fn set_gas_limit(&mut self, gas_limit: u64)

Sets the gas limit.

fn set_gas_price(&mut self, gas_price: u128)

Sets the gas price (or max fee per gas for EIP-1559).

fn set_kind(&mut self, kind: TxKind)

Sets the transaction kind (call or create).

fn set_value(&mut self, value: Uint<256, 4>)

Sets the value sent with the transaction.

fn set_data(&mut self, data: Bytes)

Sets the transaction input data.

fn set_nonce(&mut self, nonce: u64)

Sets the nonce.

fn set_chain_id(&mut self, chain_id: Option<u64>)

Sets the chain ID.

fn set_access_list(&mut self, access_list: AccessList)

Sets the access list.

fn authorization_list_mut( &mut self, ) -> &mut Vec<Either<SignedAuthorization, RecoveredAuthorization>>

Returns a mutable reference to the EIP-7702 authorization list.

fn set_gas_priority_fee(&mut self, gas_priority_fee: Option<u128>)

Sets the max priority fee per gas.

fn set_blob_hashes(&mut self, blob_hashes: Vec<FixedBytes<32>>)

Sets the blob versioned hashes.

fn set_max_fee_per_blob_gas(&mut self, max_fee_per_blob_gas: u128)

Sets the max fee per blob gas.

Provided Methods§

fn set_signed_authorization(&mut self, auth: Vec<SignedAuthorization>)

Sets the EIP-7702 signed authorization list.

fn enveloped_tx(&self) -> Option<&Bytes>

Enveloped transaction bytes.

fn set_enveloped_tx(&mut self, _bytes: Bytes)

Set Enveloped transaction bytes.

fn source_hash(&self) -> Option<FixedBytes<32>>

Source hash of the deposit transaction.

fn set_source_hash(&mut self, _source_hash: FixedBytes<32>)

Sets source hash of the deposit transaction.

fn mint(&self) -> Option<u128>

Mint of the deposit transaction

fn set_mint(&mut self, _mint: u128)

Sets mint of the deposit transaction.

fn is_system_transaction(&self) -> bool

Whether the transaction is a system transaction

fn set_system_transaction(&mut self, _is_system_transaction: bool)

Sets whether the transaction is a system transaction

fn is_deposit(&self) -> bool

Returns true if transaction is an Optimism deposit transaction.

fn fee_token(&self) -> Option<Address>

Returns the fee token address for this transaction.

fn set_fee_token(&mut self, _token: Option<Address>)

Sets the fee token address for this transaction.

fn fee_payer(&self) -> Option<Option<Address>>

Returns the fee payer for this transaction.

fn set_fee_payer(&mut self, _payer: Option<Option<Address>>)

Sets the fee payer for this transaction.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl FoundryTransaction for OpTx

§

fn set_tx_type(&mut self, tx_type: u8)

§

fn set_caller(&mut self, caller: Address)

§

fn set_gas_limit(&mut self, gas_limit: u64)

§

fn set_gas_price(&mut self, gas_price: u128)

§

fn set_kind(&mut self, kind: TxKind)

§

fn set_value(&mut self, value: Uint<256, 4>)

§

fn set_data(&mut self, data: Bytes)

§

fn set_nonce(&mut self, nonce: u64)

§

fn set_chain_id(&mut self, chain_id: Option<u64>)

§

fn set_access_list(&mut self, access_list: AccessList)

§

fn authorization_list_mut( &mut self, ) -> &mut Vec<Either<SignedAuthorization, RecoveredAuthorization>>

§

fn set_gas_priority_fee(&mut self, gas_priority_fee: Option<u128>)

§

fn set_blob_hashes(&mut self, _blob_hashes: Vec<FixedBytes<32>>)

§

fn set_max_fee_per_blob_gas(&mut self, _max_fee_per_blob_gas: u128)

§

fn enveloped_tx(&self) -> Option<&Bytes>

§

fn set_enveloped_tx(&mut self, bytes: Bytes)

§

fn source_hash(&self) -> Option<FixedBytes<32>>

§

fn set_source_hash(&mut self, source_hash: FixedBytes<32>)

§

fn mint(&self) -> Option<u128>

§

fn set_mint(&mut self, mint: u128)

§

fn is_system_transaction(&self) -> bool

§

fn set_system_transaction(&mut self, is_system_transaction: bool)

§

impl FoundryTransaction for TempoTxEnv

§

fn set_tx_type(&mut self, tx_type: u8)

§

fn set_caller(&mut self, caller: Address)

§

fn set_gas_limit(&mut self, gas_limit: u64)

§

fn set_gas_price(&mut self, gas_price: u128)

§

fn set_kind(&mut self, kind: TxKind)

§

fn set_value(&mut self, value: Uint<256, 4>)

§

fn set_data(&mut self, data: Bytes)

§

fn set_nonce(&mut self, nonce: u64)

§

fn set_chain_id(&mut self, chain_id: Option<u64>)

§

fn set_access_list(&mut self, access_list: AccessList)

§

fn authorization_list_mut( &mut self, ) -> &mut Vec<Either<SignedAuthorization, RecoveredAuthorization>>

§

fn set_gas_priority_fee(&mut self, gas_priority_fee: Option<u128>)

§

fn set_blob_hashes(&mut self, _blob_hashes: Vec<FixedBytes<32>>)

§

fn set_max_fee_per_blob_gas(&mut self, _max_fee_per_blob_gas: u128)

§

fn fee_token(&self) -> Option<Address>

§

fn set_fee_token(&mut self, token: Option<Address>)

§

fn fee_payer(&self) -> Option<Option<Address>>

§

fn set_fee_payer(&mut self, payer: Option<Option<Address>>)

§

impl<TX> FoundryTransaction for OpTransaction<TX>

§

fn set_tx_type(&mut self, tx_type: u8)

§

fn set_caller(&mut self, caller: Address)

§

fn set_gas_limit(&mut self, gas_limit: u64)

§

fn set_gas_price(&mut self, gas_price: u128)

§

fn set_kind(&mut self, kind: TxKind)

§

fn set_value(&mut self, value: Uint<256, 4>)

§

fn set_data(&mut self, data: Bytes)

§

fn set_nonce(&mut self, nonce: u64)

§

fn set_chain_id(&mut self, chain_id: Option<u64>)

§

fn set_access_list(&mut self, access_list: AccessList)

§

fn authorization_list_mut( &mut self, ) -> &mut Vec<Either<SignedAuthorization, RecoveredAuthorization>>

§

fn set_gas_priority_fee(&mut self, gas_priority_fee: Option<u128>)

§

fn set_blob_hashes(&mut self, _blob_hashes: Vec<FixedBytes<32>>)

§

fn set_max_fee_per_blob_gas(&mut self, _max_fee_per_blob_gas: u128)

§

fn enveloped_tx(&self) -> Option<&Bytes>

§

fn set_enveloped_tx(&mut self, bytes: Bytes)

§

fn source_hash(&self) -> Option<FixedBytes<32>>

§

fn set_source_hash(&mut self, source_hash: FixedBytes<32>)

§

fn mint(&self) -> Option<u128>

§

fn set_mint(&mut self, mint: u128)

§

fn is_system_transaction(&self) -> bool

§

fn set_system_transaction(&mut self, is_system_transaction: bool)

Implementors§