Skip to main content

Module tx

Module tx 

Source
Expand description

Network-native transactions.

Transactions stay in their network’s Alloy form until execution: tools keep the selected TransactionRequest or signed TxEnvelope, mutate common fields through Alloy’s [TransactionBuilder], and convert once, right before execution, into the family’s evm2 transaction with FoundryTxConversion. Signed, resumed and replayed transactions convert from exactly the payload that was signed; nothing is rebuilt from Ethereum-shaped fields.

Re-exportsΒ§

use super::ChainFor; πŸ”’
use super::FoundryEvmExt; πŸ”’
use super::FoundryEvmNetwork; πŸ”’
use super::TxFor; πŸ”’
use super::TypesFor; πŸ”’
use alloy_chains::NamedChain; πŸ”’
use alloy_consensus::BlockHeader; πŸ”’
use alloy_consensus::EthereumTxEnvelope; πŸ”’
use alloy_consensus::EthereumTypedTransaction; πŸ”’
use alloy_consensus::SignableTransaction; πŸ”’
use alloy_consensus::Signed; πŸ”’
use alloy_consensus::Transaction; πŸ”’
use alloy_consensus::TxEip1559; πŸ”’
use alloy_consensus::TxEip4844Variant; πŸ”’
use alloy_consensus::Typed2718; πŸ”’
use alloy_consensus::transaction::Recovered; πŸ”’
use alloy_consensus::transaction::SignerRecoverable; πŸ”’
use alloy_eips::Decodable2718; πŸ”’
use alloy_network::AnyNetwork; πŸ”’
use alloy_network::AnyRpcBlock; πŸ”’
use alloy_network::AnyRpcTransaction; πŸ”’
use alloy_network::AnyTxEnvelope; πŸ”’
use alloy_network::Network; πŸ”’
use alloy_network::NetworkTransactionBuilder; πŸ”’
use alloy_network::TransactionBuilder; πŸ”’
use alloy_network::TransactionResponse; πŸ”’
use alloy_primitives::Address; πŸ”’
use alloy_primitives::Signature; πŸ”’
use alloy_provider::Provider; πŸ”’
use alloy_rpc_types::BlockTransactions; πŸ”’
use alloy_rpc_types::TransactionRequest; πŸ”’
use evm2::ethereum::LazyTxEip7702; πŸ”’
use evm2::ethereum::TxEnvelope; πŸ”’
use eyre::WrapErr; πŸ”’
use foundry_evm_networks::celo::CELO_DYNAMIC_FEE_TX_TYPE; πŸ”’

StructsΒ§

BlockContext
Transactions of a block and its two ancestors, for network state that depends on the block position of a transaction (see FoundryEvmExt::for_block).

EnumsΒ§

TxPayload
What an execution-time transaction is priced and validated as.

TraitsΒ§

FoundryTxConversion
Converts an Alloy network’s native transactions into an evm2 execution family’s transactions.

FunctionsΒ§

block_txs
Converts every transaction of a full RPC block.
eth_envelope_from_any_rpc
Returns the Ethereum envelope of a transaction fetched over RPC.
eth_tx
Converts a signed Ethereum envelope into evm2’s Ethereum transaction.
eth_tx_from_request
Converts a complete unsigned Ethereum request into a simulated evm2 transaction.
eth_unsigned_tx πŸ”’
Converts an unsigned Ethereum transaction into evm2’s Ethereum transaction.
fetch_parent πŸ”’
Fetches the parent of block, or None for genesis.
full_transactions πŸ”’
Returns the transactions of block, which must contain full transactions.
placeholder_signature
Placeholder signature used to put an unsigned request into its network’s envelope.
unknown_transaction_type πŸ”’
Returns the error for an RPC transaction whose envelope target cannot represent.