debug_traceBlock - Taiko Mainnet
Summary
Returns a full stack trace of all invoked opcodes of all transactions that were included in a block.Parameters
1. Block Number Quantity or Tag
The RLP encoded block. Hex block number, or the tag
latest
, earliest
or pending
Example:
latest or pending
2. Tracer Object
Tracer String
Type of tracer, either
callTracer
or prestateTracer
Example:
{"tracer": "callTracer"}
Only Top Call Boolean
When true, only top level call will be traced and no sub-calls.
Example:
{"tracer": "callTracer", "tracerConfig": {"onlyTopCall": true}}
Code Examples
debug_traceBlock request
curl https://taiko-mainnet.gateway.tenderly.co/$TENDERLY_NODE_ACCESS_KEY \ -X POST \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 0, "method": "debug_traceBlock", "params": [ "latest", { "tracer": "callTracer" } ] }'
debug_traceBlock response
{ "id": 0, "jsonrpc": "2.0", "result": [ { "result": { "type": "CALL", "from": "0x77ad3a15b78101883af36ad4a875e17c86ac65d1", "to": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "value": "0x0", "gas": "0x1779e", "gasUsed": "0xb89c", "input": "0xabdd00008c1b561004815b1259c18329f87794b9985cb3acc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2171e249cac5263bf88dc09c3f9f5fc5546583bf4000000000000000000000000000003e800000000000000000046fbaaeda618fa", "output": "0x0000000000000000000000000000000000000000000000000046fbaaeda618fa", "calls": [ { "type": "STATICCALL", "from": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "gas": "0x170bb", "gasUsed": "0x216", "input": "0x70a0823100000000000000000000000000000000a991c429ee2ec6df19d40fe0c80088b8", "output": "0x000000000000000000000000000000000000000000000001a1ea1ea2327628c2" }, { "type": "CALL", "from": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "to": "0x8c1b561004815b1259c18329f87794b9985cb3ac", "value": "0x0", "gas": "0x16dfd", "gasUsed": "0x2dc1", "input": "0xa9059cbb000000000000000000000000171e249cac5263bf88dc09c3f9f5fc5546583bf400000000000000000000000000000000000000000000000000000000000003e8", "output": "0x0000000000000000000000000000000000000000000000000000000000000001" }, { "type": "STATICCALL", "from": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "to": "0x171e249cac5263bf88dc09c3f9f5fc5546583bf4", "gas": "0x1405c", "gasUsed": "0x1f8", "input": "0x0902f1ac", "output": "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000470de4df820f3f0000000000000000000000000000000000000000000000000000000065d5f6cf" }, { "type": "STATICCALL", "from": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "to": "0x8c1b561004815b1259c18329f87794b9985cb3ac", "gas": "0x13dbf", "gasUsed": "0x3ac", "input": "0x70a08231000000000000000000000000171e249cac5263bf88dc09c3f9f5fc5546583bf4", "output": "0x00000000000000000000000000000000000000000000000000000000000003e9" }, { "type": "CALL", "from": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "to": "0x171e249cac5263bf88dc09c3f9f5fc5546583bf4", "value": "0x0", "gas": "0x138df", "gasUsed": "0x7bab", "input": "0x022c0d9f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046fbaaeda618fa00000000000000000000000000000000a991c429ee2ec6df19d40fe0c80088b800000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000", "calls": [ { "type": "CALL", "from": "0x171e249cac5263bf88dc09c3f9f5fc5546583bf4", "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "value": "0x0", "gas": "0x1211f", "gasUsed": "0x229e", "input": "0xa9059cbb00000000000000000000000000000000a991c429ee2ec6df19d40fe0c80088b80000000000000000000000000000000000000000000000000046fbaaeda618fa", "output": "0x0000000000000000000000000000000000000000000000000000000000000001" }, { "type": "STATICCALL", "from": "0x171e249cac5263bf88dc09c3f9f5fc5546583bf4", "to": "0x8c1b561004815b1259c18329f87794b9985cb3ac", "gas": "0xfcb2", "gasUsed": "0x3ac", "input": "0x70a08231000000000000000000000000171e249cac5263bf88dc09c3f9f5fc5546583bf4", "output": "0x00000000000000000000000000000000000000000000000000000000000003e9" }, { "type": "STATICCALL", "from": "0x171e249cac5263bf88dc09c3f9f5fc5546583bf4", "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "gas": "0xf77f", "gasUsed": "0x216", "input": "0x70a08231000000000000000000000000171e249cac5263bf88dc09c3f9f5fc5546583bf4", "output": "0x00000000000000000000000000000000000000000000000000001239f1dbf645" } ] }, { "type": "STATICCALL", "from": "0x00000000a991c429ee2ec6df19d40fe0c80088b8", "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "gas": "0xbe80", "gasUsed": "0x216", "input": "0x70a0823100000000000000000000000000000000a991c429ee2ec6df19d40fe0c80088b8", "output": "0x000000000000000000000000000000000000000000000001a2311a4d201c41bc" } ] }, "txHash": "0x6e98a8fc984481377cdccc4b941aab8a18526fe18ba9b071ada87cddedf6dfee" } ] }
Last updated on