This module contains various inspectors that can be used to execute and monitor transactions on the Ethereum Virtual Machine (EVM) through the revm
library.
There are four built-in inspectors in this module:
NoOpInspector
- A basic inspector that does nothing, which can be used when you don't need to monitor transactions.GasInspector
- Monitors the gas usage of transactions.CustomPrintTracer
- Traces and prints custom messages during EVM execution. Available only when the "std" feature is enabled.TracerEip3155
- An inspector that conforms to the EIP-3155 standard for tracing Ethereum transactions. This is only available when both "std" and "serde" features are enabled.INSPECTOR TRAIT
The Inspector
trait defines a set of methods that are called during various stages of EVM execution. You can implement this trait to create your own custom inspectors.
Each of these methods is called at different stages of the execution of a transaction, and they can be used to monitor, debug, or modify the execution of the EVM.
initialize_interp
: called before the interpreter is initialized.step
: called on each step of the interpreter.log
: called when a log is emitted.step_end
: called after step
when the instruction has been executed.call
: called whenever a call to a contract is about to start.call_end
: called when a call to a contract has concluded.create
: called when a contract is about to be created.create_end
: called when a contract has been created.selfdestruct
: called when a contract has been self-destructed with funds transferred to target.