Jon-Becker / heimdall-rs

Heimdall is an advanced EVM smart contract toolkit specializing in bytecode analysis and extracting information from unverified contracts.
http://heimdall.rs
MIT License
1.19k stars 125 forks source link

dump support via `debug_traceBlockByNumber` w/ prestateTracer as another option #490

Open github-actions[bot] opened 2 months ago

github-actions[bot] commented 2 months ago

New Codebase TODO

dump support via debug_traceBlockByNumber w/ prestateTracer as another option

Location

https://github.com/Jon-Becker/heimdall-rs/blob/81736fb9e81f19c955e923f80b1d93906d7d1d74/crates/dump/src/core/mod.rs#L37


    let block_count = block_range.end() - block_range.start() + 1;
    debug!("dumping storage from block range: {:?}", block_range);

    // a quick check to see if the rpc supports trace_ namespace
    // TODO: dump support via `debug_traceBlockByNumber` w/ prestateTracer as another option
    let _ = get_block_state_diff(
        (*block_range.start()).try_into().expect("block number overflow"),
        &args.rpc_url,
    )
    .await
    .map_err(|_| eyre!("failed to `trace_replayBlockTransactions`. does your rpc support it?"))?;

    // create a semaphore with the correct number of permits
    let semaphore = Arc::new(Semaphore::new(args.threads));
    let handles = block_range.map(|block_number| {