Trait ExecutableTx
pub trait ExecutableTx<E>: ToTxEnv<<<E as BlockExecutor>::Evm as Evm>::Tx> + RecoveredTx<<E as BlockExecutor>::Transaction>where
E: BlockExecutor + ?Sized,{ }
Available on crate feature
evm
only.Expand description
Helper trait to encapsulate requirements for a type to be used as input for BlockExecutor
.
This trait combines the requirements for a transaction to be executable by a block executor:
- Must be convertible to the EVM’s transaction environment via
ToTxEnv
- Must provide access to the transaction and signer via
RecoveredTx
- Must be
Copy
for efficient handling during block execution (the expectation here is that this always passed as & reference)
This trait is automatically implemented for any type that meets these requirements. Common implementations include:
Recovered<T>
whereT
is a transaction typeWithEncoded<Recovered<T>>
for transactions with encoded bytes
The trait ensures that the block executor can both execute the transaction in the EVM and access the original transaction data for receipt generation.