ExecutableTxParts

Trait ExecutableTxParts 

pub trait ExecutableTxParts<TxEnv, T> {
    type Recovered: RecoveredTx<T>;

    // Required method
    fn into_parts(self) -> (TxEnv, Self::Recovered);
}
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
  • Must provide access to the transaction and signer via RecoveredTx

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

§Implementations

The following implementations are provided:

  • Recovered<T> and Recovered<&T> - owned recovered transactions
  • WithEncoded<Recovered<T>> and WithEncoded<&Recovered<T>> - encoded transactions
  • Either<L, R> where both L and R implement this trait
  • &S where S: ToTxEnv + RecoveredTx - covers &Recovered<T>, &WithEncoded<...>, etc.

Required Associated Types§

type Recovered: RecoveredTx<T>

The recovered transaction accessor type.

Required Methods§

fn into_parts(self) -> (TxEnv, Self::Recovered)

Converts the transaction to an executable environment and a recovered transaction itself.

Implementations on Foreign Types§

§

impl<'a, S, TxEnv, T> ExecutableTxParts<TxEnv, T> for &'a S
where S: ToTxEnv<TxEnv> + RecoveredTx<T>,

Blanket implementation for references to types implementing both ToTxEnv and RecoveredTx.

This covers:

  • &Recovered<T> and &Recovered<&T>
  • &WithEncoded<Recovered<T>> and similar wrappers
  • Any &S where S: ToTxEnv<TxEnv> + RecoveredTx<T>
§

type Recovered = &'a S

§

fn into_parts(self) -> (TxEnv, &'a S)

§

impl<TxEnv, T, Tx> ExecutableTxParts<TxEnv, Tx> for (TxEnv, T)
where T: RecoveredTx<Tx>,

§

type Recovered = T

§

fn into_parts(self) -> (TxEnv, T)

Implementors§

§

impl<L, R, TxEnv, T> ExecutableTxParts<TxEnv, T> for Either<L, R>
where L: ExecutableTxParts<TxEnv, T>, R: ExecutableTxParts<TxEnv, T>,

§

type Recovered = Either<<L as ExecutableTxParts<TxEnv, T>>::Recovered, <R as ExecutableTxParts<TxEnv, T>>::Recovered>

§

impl<T, TxEnv> ExecutableTxParts<TxEnv, T> for Recovered<&T>
where TxEnv: FromRecoveredTx<T>,

§

impl<T, TxEnv> ExecutableTxParts<TxEnv, T> for Recovered<T>
where TxEnv: FromRecoveredTx<T>,

§

impl<T, TxEnv> ExecutableTxParts<TxEnv, T> for WithEncoded<&Recovered<T>>
where TxEnv: FromTxWithEncoded<T>,

§

impl<T, TxEnv> ExecutableTxParts<TxEnv, T> for WithEncoded<Recovered<T>>
where TxEnv: FromTxWithEncoded<T>,

Source§

impl<TxEnv, T, Tx> ExecutableTxParts<TxEnv, Tx> for WithTxEnv<TxEnv, T>
where T: RecoveredTx<Tx>,