Skip to main content

TryIntoTxEnv

Trait TryIntoTxEnv 

pub trait TryIntoTxEnv<T, Spec = SpecId, BlockEnv = BlockEnv> {
    type Err;

    // Required method
    fn try_into_tx_env(
        self,
        evm_env: &EvmEnv<Spec, BlockEnv>,
    ) -> Result<T, Self::Err>;
}
Expand description

Converts self into T.

Should create an executable transaction environment using [TransactionRequest].

Required Associated Types§

type Err

An associated error that can occur during the conversion.

Required Methods§

fn try_into_tx_env( self, evm_env: &EvmEnv<Spec, BlockEnv>, ) -> Result<T, Self::Err>

Performs the conversion.

Implementations on Foreign Types§

§

impl<Spec, Block> TryIntoTxEnv<OpTransaction<TxEnv>, Spec, Block> for OpTransactionRequest
where Block: BlockEnvironment,

§

type Err = EthTxEnvError

§

fn try_into_tx_env( self, evm_env: &EvmEnv<Spec, Block>, ) -> Result<OpTransaction<TxEnv>, <OpTransactionRequest as TryIntoTxEnv<OpTransaction<TxEnv>, Spec, Block>>::Err>

§

impl<Spec, Block> TryIntoTxEnv<TxEnv, Spec, Block> for TransactionRequest
where Block: BlockEnvironment,

§

type Err = EthTxEnvError

§

fn try_into_tx_env( self, evm_env: &EvmEnv<Spec, Block>, ) -> Result<TxEnv, <TransactionRequest as TryIntoTxEnv<TxEnv, Spec, Block>>::Err>

Implementors§