Skip to main content

FoundryTransaction

Trait FoundryTransaction 

Source
pub trait FoundryTransaction: Transaction {
Show 13 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: U256); 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 set_gas_priority_fee(&mut self, gas_priority_fee: Option<u128>); fn set_blob_hashes(&mut self, blob_hashes: Vec<B256>); fn set_max_fee_per_blob_gas(&mut self, max_fee_per_blob_gas: u128);
}
Expand description

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

Required Methods§

Source

fn set_tx_type(&mut self, tx_type: u8)

Sets the transaction type.

Source

fn set_caller(&mut self, caller: Address)

Sets the caller (sender) address.

Source

fn set_gas_limit(&mut self, gas_limit: u64)

Sets the gas limit.

Source

fn set_gas_price(&mut self, gas_price: u128)

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

Source

fn set_kind(&mut self, kind: TxKind)

Sets the transaction kind (call or create).

Source

fn set_value(&mut self, value: U256)

Sets the value sent with the transaction.

Source

fn set_data(&mut self, data: Bytes)

Sets the transaction input data.

Source

fn set_nonce(&mut self, nonce: u64)

Sets the nonce.

Source

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

Sets the chain ID.

Source

fn set_access_list(&mut self, access_list: AccessList)

Sets the access list.

Source

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

Sets the max priority fee per gas.

Source

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

Sets the blob versioned hashes.

Source

fn set_max_fee_per_blob_gas(&mut self, max_fee_per_blob_gas: u128)

Sets the max fee per blob gas.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FoundryTransaction for TxEnv

Source§

fn set_tx_type(&mut self, tx_type: u8)

Source§

fn set_caller(&mut self, caller: Address)

Source§

fn set_gas_limit(&mut self, gas_limit: u64)

Source§

fn set_gas_price(&mut self, gas_price: u128)

Source§

fn set_kind(&mut self, kind: TxKind)

Source§

fn set_value(&mut self, value: U256)

Source§

fn set_data(&mut self, data: Bytes)

Source§

fn set_nonce(&mut self, nonce: u64)

Source§

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

Source§

fn set_access_list(&mut self, access_list: AccessList)

Source§

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

Source§

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

Source§

fn set_max_fee_per_blob_gas(&mut self, max_fee_per_blob_gas: u128)

Implementors§