debug_traceBlockByHash - SEI

Example code for the debug_traceBlockByHash JSON-RPC method. Complete guide on how to use debug_traceBlockByHash JSON-RPC in GetBlock Web3 documentation.

Traces all transactions in a block on the Sei network by block hash, returning detailed execution information.

Parameters

Parameter
Type
Description

blockHash

string

The hash of the block to trace

options

object

Tracing options including 'tracer', 'timeout', etc. (optional)

Request

curl --location 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByHash",
    "params": ["0x9a5e2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a", {"tracer": "callTracer"}],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": [
        {
            "result": {
                "type": "CALL",
                "from": "0x...",
                "to": "0x...",
                "gasUsed": "0x5208"
            }
        }
    ]
}

Response Parameters

Field
Type
Description

result

array

Array of trace result objects for each transaction

Use Case

The debug_traceBlockByHash method is essential for:

  • Blockchain developers building applications on Sei

  • Wallet applications requiring network data

  • Analytics platforms tracking Sei network activity

  • DeFi protocols integrating with Sei's parallelized EVM

Error Handling

Error Code
Message
Description

-32700

Parse error

Invalid JSON

-32600

Invalid Request

JSON is not a valid request object

-32601

Method not found

Method does not exist

-32602

Invalid params

Invalid method parameters

-32603

Internal error

Internal JSON-RPC error

-32000

Invalid input

Generic input error

-32500

Cross-VM error

Error in cross-VM operation (Sei-specific)

Web3 Integration

Last updated

Was this helpful?