Expand description
soldb frontend.
Converts a recorded call trace into a soldb transaction trace and the local artifactsβ source maps into soldb debug info, then runs a soldb session over them or writes them as a bundle that soldbβs own tools read.
Re-exportsΒ§
use alloy_primitives::Address;πuse alloy_primitives::B256;πuse alloy_primitives::Bytes;πuse alloy_primitives::hex;πuse alloy_primitives::hex;πuse alloy_primitives::keccak256;πuse alloy_primitives::map::HashSet;πuse eyre::OptionExt;πuse eyre::Result;πuse foundry_common::ContractsByArtifact;πuse foundry_common::Shell;πuse foundry_common::fs;πuse foundry_common::fs::write_json_file;πuse foundry_compilers::artifacts::sourcemap::Jump;πuse foundry_compilers::artifacts::sourcemap::SourceElement;πuse foundry_compilers::artifacts::sourcemap::SourceMap;πuse foundry_compilers::multi::MultiCompilerLanguage;πuse foundry_evm_core::Breakpoints;πuse foundry_evm_core::ic::PcIcMap;πuse foundry_evm_traces::CallTrace;πuse foundry_evm_traces::CallTraceArena;πuse foundry_evm_traces::CallTraceNode;πuse foundry_evm_traces::CallTraceStep;πuse foundry_evm_traces::TraceMemberOrder;πuse foundry_evm_traces::debug::ArtifactData;πuse foundry_evm_traces::debug::ContractSources;πuse foundry_evm_traces::debug::DebugRecording;πuse foundry_evm_traces::debug::RecordedFrame;πuse foundry_evm_traces::debug::SourceData;πuse foundry_evm_traces::debug::StepConverter;πuse foundry_evm_traces::debug::quantity;πuse revm::bytecode::opcode::OpCode;πuse revm::interpreter::InstructionResult;πuse serde_json::Map;πuse serde_json::Value;πuse serde_json::json;πuse soldb_core::ContractCreation;πuse soldb_core::EvmWord;πuse soldb_core::ExecutionCall;πuse soldb_core::StepRecord;πuse soldb_core::StepTable;πuse soldb_core::TraceArtifacts;πuse soldb_core::TraceCapabilities;πuse soldb_core::TransactionTrace;πuse soldb_debugger::CodeGenerator;πuse soldb_debugger::ContractDebugInfo;πuse soldb_debugger::SourceCache;πuse soldb_debugger::StorageLayout;πuse soldb_ethdebug::EthdebugInfo;πuse soldb_ethdebug::Instruction;πuse soldb_ethdebug::SourceLocation;πuse soldb_ethdebug::SourceMapContext;πuse soldb_ethdebug::SourceMapJump;πuse soldb_repl::BreakpointTarget;πuse soldb_repl::DebuggerCommand;πuse soldb_repl::DebuggerState;πuse soldb_repl::Output;πuse soldb_repl::Renderer;πuse soldb_repl::Session;πuse soldb_tui::Exit;πuse std::borrow::Cow;πuse std::collections::BTreeMap;πuse std::collections::BTreeSet;πuse std::collections::HashMap;πuse std::io;πuse std::io::IsTerminal;πuse std::io::Write;πuse std::ops::Range;πuse std::path::Component;πuse std::path::Path;πuse std::path::PathBuf;πuse std::sync::Arc;π
StructsΒ§
- Combined
Json π - One contract of a bundleβs
combined.json. - Executed
Program π - A program the trace executes and the local artifact that describes it.
- Soldb
Debugger π - A soldb session over the recorded call traces.
- Trace
Builder π - Collects the soldb steps, calls, and creations of a trace in execution order.
EnumsΒ§
- Flow π
- What the session asks the frontend to do after a command.
FunctionsΒ§
- contract_
debug_ πinfo - Adapts the source map of
programto its instructions, in the ETHDebug shape soldb reads. - emit π
- Prints the sessionβs answers.
- executed_
programs π - The programs
arenasrun that local artifacts describe, once per address and environment. - instruction_
context π - The ETHDebug context of one source map element: its source range, if the build has the
source, and the
invokeorreturnmarker of a jump into or out of a function. - open_
tui π - Opens the full-screen view until the user leaves it.
- recorded_
steps π - The step table that holds the steps of
recordings, and where each recordingβs steps start in it. - status_
error π - The error a failed step or call ended with.
- transaction_
trace π - Converts
arenasinto a soldb trace: their steps in execution order, with each call and creation recorded at the steps it spans. - write_
bundle π - Writes a bundle that soldbβs own tools read, for example
soldb profile --trace-file <dir>/trace.json --contracts <dir>/contracts.json.
Type AliasesΒ§
- Breakpoint
Frames π - The frames that run a breakpoint location, as the steps they span and their depth.
- Breakpoint
Steps π - The frames that run each breakpointβs code address and program counter.