debug_traceBlockByHash - Immutable RPC Method
Trace all transactions in a block by hash on Immutable. Requires archive node.
Traces all transactions in a block on Immutable by block hash.
Archive Node Required
This method requires an archive node. It is not available on full nodes.
Request Parameters
32-byte block hash
Tracer configuration
Response Body
Code Examples
curl -X POST https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": ["0xdc3499901b5e089b0f67baeb512939f2949bf62cf1158e69bb458e7e43397136", {"tracer": "callTracer"}],
"id": 1
}'import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY');
const blockHash = '0xdc3499901b5e089b0f67baeb512939f2949bf62cf1158e69bb458e7e43397136';
const traces = await provider.send('debug_traceBlockByHash', [blockHash, { tracer: 'callTracer' }]);
console.log('Transaction traces:', traces.length);Related Methods
debug_traceBlockByNumber- Trace by numberdebug_traceTransaction- Trace single transaction
debug_traceBlock
Trace all transactions in a block on Immutable. Requires archive node for Web3 gaming (Gods Unchained, RavenQuest), gaming NFTs with enforced royalties, and cross-chain game assets.
debug_traceBlockByNumber
Trace all transactions in a block by number on Immutable. Requires archive node.