Skip to main content

Crate soldb_ethdebug

Crate soldb_ethdebug 

Source
Expand description

Loading and interpreting compiler-generated Solidity debug information.

This is the metadata half of an ETHDebug-first debugger: it turns solc artifacts into the program-counter, source-location, variable, and ABI lookups the rest of the workspace needs. Nothing here touches the network.

  • metadata models ETHDebug artifacts: instructions, their source spans, live variable locations, and the address:name:dir contract specs used on the command line.
  • source_map reads the legacy srcmap format for compiler and tooling interoperability when ETHDebug programs are unavailable.
  • abi encodes calldata and parses function signatures, including tuples and arrays, and carries the keccak-256 implementation used to derive selectors.
  • events decodes logs against event ABIs.

Everything decoded here comes from files or from chain data, so it is untrusted: offsets and lengths read out of an artifact or a log payload are validated rather than trusted to be in range.

Re-exports§

pub use abi::canonical_abi_input_type;
pub use abi::encode_abi_arguments;
pub use abi::encode_function_call;
pub use abi::function_selector;
pub use abi::keccak256;
pub use abi::match_abi_types;
pub use abi::match_single_type;
pub use abi::parse_signature;
pub use abi::parse_tuple_arg;
pub use abi::AbiInput;
pub use abi::FunctionSignature;
pub use events::event_signature;
pub use events::event_topic;
pub use events::parse_event_abis;
pub use events::DecodedEvent;
pub use events::DecodedEventArg;
pub use events::EventAbi;
pub use events::EventParam;
pub use events::EventRegistry;
pub use events::EventRegistryEntry;
pub use metadata::parse_ethdebug_spec;
pub use metadata::parse_multi_contract_spec;
pub use metadata::parse_single_contract_spec;
pub use metadata::parse_variable_locations;
pub use metadata::EthdebugInfo;
pub use metadata::EthdebugSpec;
pub use metadata::FunctionExit;
pub use metadata::FunctionIdentity;
pub use metadata::Instruction;
pub use metadata::SourceLocation;
pub use metadata::VariableLocation;
pub use source_map::build_pc_to_instruction_map;
pub use source_map::is_legacy_compiler;
pub use source_map::load_source_map_program;
pub use source_map::parse_srcmap;
pub use source_map::SourceMapEntry;
pub use source_map::SourceMapEnvironment;
pub use source_map::SourceMapInfo;
pub use source_map::SourceMapProgram;

Modules§

abi
ABI encoding and function-signature parsing.
events
Decoding transaction logs against event ABIs.
metadata
ETHDebug artifact model: instructions, source spans, and variable locations.
source_map
The legacy srcmap debug format.