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, andblockglobal variables - Cross-Contract Calls: Function calls and state access on different addresses
§Pre-compiled Functions (EDB-Version)
edb_sload(address, slot)- Read storage slotedb_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 slicekeccak256(bytes)- Compute keccak256 hashedb_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§
- EdbBlock
Handler - EDB implementation of
BlockHandler. - EdbFunction
Call Handler - EDB implementation of
FunctionCallHandler. - EdbHandler
- EDB-specific handler that uses EdbContext to resolve values
- EdbMapping
Array Handler - EDB implementation of
MappingArrayHandler. - EdbMember
Access Handler - EDB implementation of
MemberAccessHandler. - EdbMsg
Handler - EDB implementation of
MsgHandler. - EdbTx
Handler - EDB implementation of
TxHandler. - EdbValidation
Handler - EDB implementation of
ValidationHandler. - EdbVariable
Handler - EDB implementation of
VariableHandler.