Trait ExecutableTx

Source
pub trait ExecutableTx<E: BlockExecutor + ?Sized>: ToTxEnv<<E::Evm as Evm>::Tx> + RecoveredTx<E::Transaction> { }
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:

The trait ensures that the block executor can both execute the transaction in the EVM and access the original transaction data for receipt generation.

Implementors§

Source§

impl<E: BlockExecutor + ?Sized, T> ExecutableTx<E> for T
where T: ToTxEnv<<E::Evm as Evm>::Tx> + RecoveredTx<E::Transaction>,