pub trait InspectorEvmTr: EvmTr {
type Inspector;
// Required methods
fn inspector(&mut self) -> &mut Self::Inspector;
fn ctx_inspector(&mut self) -> (&mut Self::Context, &mut Self::Inspector);
fn run_inspect_interpreter(
&mut self,
interpreter: &mut Interpreter<<Self::Instructions as InstructionProvider>::InterpreterTypes>,
) -> <<Self::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output;
}
Expand description
Inspector EVM trait. Extends the EvmTr
trait with inspector related methods.
It contains execution of interpreter with crate::Inspector
calls crate::Inspector::step
and crate::Inspector::step_end
calls.
It is used inside crate::InspectorHandler
to extend evm with support for inspection.
Required Associated Types§
Required Methods§
Sourcefn ctx_inspector(&mut self) -> (&mut Self::Context, &mut Self::Inspector)
fn ctx_inspector(&mut self) -> (&mut Self::Context, &mut Self::Inspector)
Returns a tuple of mutable references to the context and the inspector.
Useful when you want to allow inspector to modify the context.
Sourcefn run_inspect_interpreter(
&mut self,
interpreter: &mut Interpreter<<Self::Instructions as InstructionProvider>::InterpreterTypes>,
) -> <<Self::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output
fn run_inspect_interpreter( &mut self, interpreter: &mut Interpreter<<Self::Instructions as InstructionProvider>::InterpreterTypes>, ) -> <<Self::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output
Runs the inspector on the interpreter.
This function is called by the EVM when it needs to inspect the Interpreter loop. It is responsible for calling the inspector’s methods and instructions from table.