Skip to main content

Crate example_custom_opcodes

Crate example_custom_opcodes 

Source
Expand description

Custom opcodes example

Re-exportsยง

pub(crate) use bytecode::opcode; ๐Ÿ”’
pub(crate) use Evm; ๐Ÿ”’
pub(crate) use TxEnv; ๐Ÿ”’
pub(crate) use BenchmarkDB; ๐Ÿ”’
pub(crate) use BENCH_TARGET; ๐Ÿ”’
pub(crate) use instructions::EthInstructions; ๐Ÿ”’
pub(crate) use EthPrecompiles; ๐Ÿ”’
pub(crate) use inspector::inspectors::TracerEip3155; ๐Ÿ”’
pub(crate) use interpreter::EthInterpreter; ๐Ÿ”’
pub(crate) use Immediates; ๐Ÿ”’
pub(crate) use Jumps; ๐Ÿ”’
pub(crate) use Instruction; ๐Ÿ”’
pub(crate) use InstructionContext; ๐Ÿ”’
pub(crate) use primitives::hardfork::SpecId; ๐Ÿ”’
pub(crate) use primitives::TxKind; ๐Ÿ”’
pub(crate) use state::Bytecode; ๐Ÿ”’
pub(crate) use Context; ๐Ÿ”’
pub(crate) use InspectEvm; ๐Ÿ”’
pub(crate) use MainContext; ๐Ÿ”’

Constantsยง

MY_STATIC_JUMP ๐Ÿ”’
Opcode hex value

Functionsยง

main
Demonstrates how to implement and use custom opcodes in REVM. This example shows how to create a custom static jump opcode that reads a 16-bit offset from the bytecode and performs a relative jump.