Module disasm

Module disasm 

Source
Expand description

EVM bytecode disassembly utilities

This module provides functionality to disassemble EVM bytecode into a structured representation that includes opcodes and their associated data (particularly for PUSHX instructions that include immediate values).

The disassembly process handles:

  • All standard EVM opcodes
  • PUSH instructions with their immediate values (PUSH1 through PUSH32)
  • Proper instruction boundary detection
  • Invalid opcodes identification

Structs§

DisassemblyInstruction
A single disassembled instruction with its associated data
DisassemblyResult
Complete disassembly result for a piece of bytecode

Functions§

disassemble
Disassemble EVM bytecode into a structured representation
extract_push_value
Extract immediate value from a PUSH instruction as a big-endian integer
format_instruction
Format a disassembly instruction as a human-readable string