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.
metadatamodels ETHDebug artifacts: instructions, their source spans, live variable locations, and theaddress:name:dircontract specs used on the command line.source_mapreads the legacysrcmapformat for compiler and tooling interoperability when ETHDebug programs are unavailable, naming its instructions throughopcodes.abiencodes calldata and parses function signatures, including tuples and arrays, and carries the keccak-256 implementation used to derive selectors.eventsdecodes 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 artifacts::contract_name_from_program_path;pub use artifacts::ethdebug_resources_from_metadata;pub use artifacts::find_ethdebug_metadata;pub use artifacts::find_program_ethdebug;pub use artifacts::load_contract_mapping;pub use artifacts::load_debug_program;pub use artifacts::load_debug_program_with_sources;pub use artifacts::load_storage_layout;pub use artifacts::load_transient_storage_layout;pub use artifacts::parse_contract_mapping;pub use artifacts::read_debug_source;pub use artifacts::read_json_file;pub use artifacts::source_candidates;pub use artifacts::CodeGenerator;pub use artifacts::ContractMapping;pub use artifacts::DebugProgram;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_compilation_sources;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::read_compilation_source;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::load_source_map_program_with_sources;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;pub use storage_layout::add_word;pub use storage_layout::decode_value;pub use storage_layout::element_place;pub use storage_layout::mapping_slot;pub use storage_layout::parse_path;pub use storage_layout::parse_word;pub use storage_layout::word_hex;pub use storage_layout::word_to_decimal;pub use storage_layout::DecodedStorage;pub use storage_layout::PathSegment;pub use storage_layout::StorageEncoding;pub use storage_layout::StorageLayout;pub use storage_layout::StorageMember;pub use storage_layout::StorageRef;pub use storage_layout::StorageType;pub use storage_layout::StorageVariable;pub use storage_layout::Word;
Modules§
- abi
- ABI encoding and function-signature parsing.
- artifacts
- Finding and loading one contract’s debug artifacts from a directory.
- events
- Decoding transaction logs against event ABIs.
- metadata
- ETHDebug artifact model: instructions, source spans, and variable locations.
- opcodes
- EVM opcode mnemonics, for naming the instructions of legacy bytecode.
- source_
map - The legacy
srcmapdebug format. - storage_
layout - solc’s storage layout: where every state variable lives and how it is encoded.