debug_traceBlockByNumber

Accepts a block number and will replay the block that is already present in the database.

Parameters

  • blockNumber[REQUIRED] - The block number (HEX string format)

  • tracer [REQUIRED] - The tracer type

Returns:

Object - Full trace of the block.

  • result- Trace Object, which has the following fields:

    • from - The address the transaction is sent from

    • to - The address the transaction is directed to

    • gas - The gas provided for the transaction execution

    • gasUsed - The gasPrice used for each paid gas

    • input - The data sent along with the transaction

    • output - The output data

    • type - Type of the transaction

    • value - The value transferred in Wei, encoded as a hexadecimal

ClientMethod invocation

Go

debug.TraceBlockByNumber(number uint64, config. *vm.Config) BlockTraceResult

Console

debug.traceBlockByNumber(number, [options])

RPC

{"method": "debug_traceBlockByNumber", "params": [number, {}]}

Example

Request

curl https://eth-mainnet.blastapi.io/<project-id> \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceBlockByNumber","params":["0xccde12", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}'

Last updated