Trait InspectEvm

Source
pub trait InspectEvm: ExecuteEvm {
    type Inspector;

    // Required methods
    fn set_inspector(&mut self, inspector: Self::Inspector);
    fn inspect_tx(
        &mut self,
        tx: Self::Tx,
    ) -> Result<Self::ExecutionResult, Self::Error>;

    // Provided methods
    fn inspect_tx_finalize(
        &mut self,
        tx: Self::Tx,
    ) -> Result<ResultAndState<Self::ExecutionResult, Self::State>, Self::Error> { ... }
    fn inspect(
        &mut self,
        tx: Self::Tx,
        inspector: Self::Inspector,
    ) -> Result<Self::ExecutionResult, Self::Error> { ... }
}
Expand description

InspectEvm is a API that allows inspecting the EVM.

It extends the ExecuteEvm trait and enabled setting inspector

Required Associated Types§

Required Methods§

Source

fn set_inspector(&mut self, inspector: Self::Inspector)

Set the inspector for the EVM.

this function is used to change inspector during execution. This function can’t change Inspector type, changing inspector type can be done in Evm with with_inspector function.

Source

fn inspect_tx( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>

Inspect the EVM with the given transaction.

Provided Methods§

Source

fn inspect_tx_finalize( &mut self, tx: Self::Tx, ) -> Result<ResultAndState<Self::ExecutionResult, Self::State>, Self::Error>

Inspect the EVM and finalize the state.

Source

fn inspect( &mut self, tx: Self::Tx, inspector: Self::Inspector, ) -> Result<Self::ExecutionResult, Self::Error>

Inspect the EVM with the given inspector and transaction.

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.

Implementations on Foreign Types§

Source§

impl<CTX, INSP, INST, PRECOMPILES> InspectEvm for Evm<CTX, INSP, INST, PRECOMPILES>
where CTX: ContextSetters + ContextTr<Journal: JournalTr<State = EvmState> + JournalExt>, INSP: Inspector<CTX, EthInterpreter>, INST: InstructionProvider<Context = CTX, InterpreterTypes = EthInterpreter>, PRECOMPILES: PrecompileProvider<CTX, Output = InterpreterResult>,

Source§

type Inspector = INSP

Source§

fn set_inspector(&mut self, inspector: Self::Inspector)

Source§

fn inspect_tx( &mut self, tx: Self::Tx, ) -> Result<Self::ExecutionResult, Self::Error>

Implementors§