EvmExt

Trait EvmExt 

pub trait EvmExt: Evm {
    // Provided methods
    fn replay_transactions_until<I, T>(
        &mut self,
        transactions: I,
        target_tx_hash: FixedBytes<32>,
    ) -> Result<usize, Self::Error>
       where Self::DB: DatabaseCommit,
             I: IntoIterator<Item = T>,
             T: IntoTxEnv<Self::Tx> + TxHashRef { ... }
    fn replay_transaction<I, T>(
        &mut self,
        transactions: I,
        target_tx_hash: FixedBytes<32>,
    ) -> Result<Option<ExecResultAndState<ExecutionResult<Self::HaltReason>>>, Self::Error>
       where Self::DB: DatabaseCommit,
             I: IntoIterator<Item = T>,
             T: IntoTxEnv<Self::Tx> + TxHashRef { ... }
}
Expand description

An extension trait for Evm providing additional functionality.

Provided Methods§

fn replay_transactions_until<I, T>( &mut self, transactions: I, target_tx_hash: FixedBytes<32>, ) -> Result<usize, Self::Error>
where Self::DB: DatabaseCommit, I: IntoIterator<Item = T>, T: IntoTxEnv<Self::Tx> + TxHashRef,

Replays all the transactions until the target transaction is found.

This stops before transacting the target hash and commits all previous changes.

Returns the index of the target transaction in the iterator.

fn replay_transaction<I, T>( &mut self, transactions: I, target_tx_hash: FixedBytes<32>, ) -> Result<Option<ExecResultAndState<ExecutionResult<Self::HaltReason>>>, Self::Error>
where Self::DB: DatabaseCommit, I: IntoIterator<Item = T>, T: IntoTxEnv<Self::Tx> + TxHashRef,

Replays all the previous transactions and returns the ResultAndState of the target transaction.

Returns None if the target transaction was not found.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<T> EvmExt for T
where T: Evm,

Automatic implementation of EvmExt for all types that implement Evm.