Trait InspectEvm

pub trait InspectEvm: ExecuteEvm {
    type Inspector;

    // Required methods
    fn set_inspector(&mut self, inspector: Self::Inspector);
    fn inspect_replay(&mut self) -> Self::Output;

    // Provided methods
    fn inspect(
        &mut self,
        tx: Self::Tx,
        inspector: Self::Inspector,
    ) -> Self::Output { ... }
    fn inspect_replay_with_inspector(
        &mut self,
        inspector: Self::Inspector,
    ) -> Self::Output { ... }
    fn inspect_with_tx(&mut self, tx: Self::Tx) -> Self::Output { ... }
}
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§

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.

fn inspect_replay(&mut self) -> Self::Output

Inspect the EVM with the current inspector and previous transaction.

Provided Methods§

fn inspect(&mut self, tx: Self::Tx, inspector: Self::Inspector) -> Self::Output

Inspect the EVM with the given inspector and transaction.

fn inspect_replay_with_inspector( &mut self, inspector: Self::Inspector, ) -> Self::Output

Inspect the EVM with the current inspector and previous transaction by replaying it.

fn inspect_with_tx(&mut self, tx: Self::Tx) -> Self::Output

Inspect the EVM with the given transaction.

Implementations on Foreign Types§

§

impl<CTX, INSP, PRECOMPILE> InspectEvm for OpEvm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, PRECOMPILE>
where CTX: OpContextTr + ContextSetters, <CTX as ContextTr>::Journal: JournalExt, INSP: Inspector<CTX>, PRECOMPILE: PrecompileProvider<CTX, Output = InterpreterResult>,

§

type Inspector = INSP

§

fn set_inspector( &mut self, inspector: <OpEvm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, PRECOMPILE> as InspectEvm>::Inspector, )

§

fn inspect_replay( &mut self, ) -> <OpEvm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, PRECOMPILE> as ExecuteEvm>::Output

Implementors§

§

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

§

type Inspector = INSP