Skip to main content

ExecutableTxParts

Trait ExecutableTxParts 

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

    // Required method
    fn into_parts(self) -> (TxEnv, Self::Recovered);
}
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, such as revm’s TxEnv
  • 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 into the executable transaction environment (TxEnv) and the original recovered transaction.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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<T, TxEnv> ExecutableTxParts<TxEnv, T> for Recovered<&T>
where TxEnv: FromRecoveredTx<T>,

§

type Recovered = Recovered<&T>

§

fn into_parts(self) -> (TxEnv, Recovered<&T>)

§

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

§

type Recovered = Recovered<T>

§

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

§

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

§

type Recovered = WithEncoded<&Recovered<T>>

§

fn into_parts(self) -> (TxEnv, WithEncoded<&Recovered<T>>)

§

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

§

type Recovered = WithEncoded<Recovered<T>>

§

fn into_parts(self) -> (TxEnv, WithEncoded<Recovered<T>>)

§

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>

Source§

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