Module edb

Module edb 

Source
Expand description

EDB handler implementations for real debug snapshots EDB handler implementations for the expression evaluator.

This module provides concrete implementations of all handler traits that work with EDB’s debug snapshot and execution context. The handlers enable real-time expression evaluation over debug modes (opcode mode and source mode).

§Key Features

  • Variable Resolution: Access local variables, state variables, and this
  • Function Calls: Execute contract functions and EDB pre-compiled functions
  • Storage Access: Read from contract storage, transient storage, memory, and stack
  • Blockchain Context: Access msg, tx, and block global variables
  • Cross-Contract Calls: Function calls and state access on different addresses

§Pre-compiled Functions (EDB-Version)

  • edb_sload(address, slot) - Read storage slot
  • edb_tsload(address, slot) - Read transient storage (opcode mode only)
  • edb_stack(index) - Read EVM stack (opcode mode only)
  • edb_memory(offset, size) - Read EVM memory (opcode mode only)
  • edb_calldata(offset, size) - Read call data slice
  • keccak256(bytes) - Compute keccak256 hash
  • edb_help() - Show help information

§Usage

let handlers = EdbHandler::create_handlers(engine_context);
let evaluator = ExpressionEvaluator::new(handlers);
let result = evaluator.eval("balances[msg.sender]", snapshot_id)?;

Structs§

EdbBlockHandler
EDB implementation of BlockHandler.
EdbFunctionCallHandler
EDB implementation of FunctionCallHandler.
EdbHandler
EDB-specific handler that uses EdbContext to resolve values
EdbMappingArrayHandler
EDB implementation of MappingArrayHandler.
EdbMemberAccessHandler
EDB implementation of MemberAccessHandler.
EdbMsgHandler
EDB implementation of MsgHandler.
EdbTxHandler
EDB implementation of TxHandler.
EdbValidationHandler
EDB implementation of ValidationHandler.
EdbVariableHandler
EDB implementation of VariableHandler.