Skip to main content

load_debug_program

Function load_debug_program 

Source
pub fn load_debug_program(
    root: &Path,
    contract_name: &str,
    environment: SourceMapEnvironment,
) -> SoldbResult<Option<DebugProgram>>
Expand description

Loads a contract’s debug program from root: the ETHDebug artifacts when present, otherwise the legacy source map in combined.json.

Ok(None) means the directory holds neither for this contract. A present but unreadable artifact is an error, so a caller never silently loses source attribution. An empty contract_name loads the only program in the directory and takes its name from the file.