Appearance
debug_traceCall
served · same as reth
Runs a call on the state of a block and returns a trace of its execution. Nothing changes on the chain.
When to use
Use it to debug a call before you send it as a transaction, or to see the inner calls of a view function.
Example
bash
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "debug_traceCall", "params": [{"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "data": "0x18160ddd"}, "0x18facad", {}]}' \
http://127.0.0.1:8547json
{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_traceCall",
"params": [
{
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"data": "0x18160ddd"
},
"0x18facad",
{}
]
}Response
Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"failed": false,
"gas": 30759,
"returnValue": "0x00000000000000000000000000000000000000000000000000ab38d270bbc858",
"structLogs": [
{
"pc": 0,
"op": "PUSH1",
"gas": 499978936,
"gasCost": 3,
"depth": 1,
"stack": [],
"refund": 0
},
{
"pc": 2,
"op": "PUSH1",
"gas": 499978933,
"gasCost": 3,
"depth": 1,
"stack": [
"0x80"
],
"refund": 0
},
{
"pc": 4,
"op": "MSTORE",
"gas": 499978930,
"gasCost": 12,
"depth": 1,
"stack": [
"0x80",
"0x40"
],
"refund": 0
},
"... 215 more items"
]
}
}Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
call | object, see Transaction call object | yes | The call to run, as for eth_call. |
block | block number in hex, or a tag, see Block parameter | no | The block whose state the call uses. The head or one of the 128 blocks before it. Default: latest. |
options | object, see Tracer options | no | The tracer, its options, and optional state and block overrides. |
The main fields of call. The Transaction call object page has all of them.
| Field | Type | Meaning |
|---|---|---|
from | address | The sender. Default: the zero address. |
to | address | The contract or account to call. Leave it out to deploy the code in input. |
gas | hex number | The gas limit. Default: the gas cap of the node (--rpc-gascap, 50 000 000). A larger value gets the gas cap. |
value | hex number, wei | The ether to send with the call. Default: 0. |
input | hex data | The call data: the function selector and the arguments. data is also accepted. If both are present and not equal, the call gives -32602, as in reth. eth_simulateV1 then uses input. |
The main fields of options. The Tracer options page has all of them.
| Field | Type | Meaning |
|---|---|---|
tracer | string | callTracer, flatCallTracer, prestateTracer, 4byteTracer, noopTracer, muxTracer or erc7562Tracer. Default: the struct logger. |
tracerConfig | object | The options of the chosen tracer. The rows below list them. |
stateOverrides | State override | debug_traceCall and debug_traceCallMany: change the state before the calls. |
blockOverrides | Block override | debug_traceCall only: change the block fields for the call. |
txIndex | hex number | debug_traceCall only: run the call on the state of the parent block after the transactions of the block before this index. |
Returns
The trace, in the form of the chosen tracer. See debug_traceTransaction.
Notes and limits
- With
txIndex, the call runs on the state of the parent block after the transactions of the block before that index. - The gas cap and the fee rules of
eth_callapply.
Errors
| Code | Message | When |
|---|---|---|
| -32602 | tx_index N out of bounds for block with M transactions | txIndex is not a position in the block. |
| -32000 | block 0x... not found | The block is above the head or the hash is unknown. A tag that has no block gives its name, for example block safe not found. |
| 4444 | pruned history unavailable: requested N, earliest available M | The block is more than 128 blocks below the head. |
| -32008 | Response is too big | The answer is larger than 160 MiB. |
Compared with reth
The struct logger gives the same steps as reth, with refund in each step.
The live example above gives the same answer on Cinder and on reth 2.7.
Speed against reth
callTracer2.9x faster
Cinder4.4 ms
reth13 ms
Related methods
eth_call, debug_traceTransaction, debug_traceCallMany, trace_call.
Schema (OpenRPC)
Parameter call: CallObject
json
{
"title": "Call object",
"description": "The transaction fields that Cinder reads for a call. Other fields are ignored. Either data or input holds the call data.",
"type": "object",
"properties": {
"from": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"to": {
"oneOf": [
{
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
{
"type": "null"
}
]
},
"gas": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasPrice": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxFeePerGas": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxPriorityFeePerGas": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"maxFeePerBlobGas": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"nonce": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"data": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"input": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"accessList": {
"title": "Access list",
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"storageKeys"
],
"properties": {
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}
},
"authorizationList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"chainId": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"nonce": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"yParity": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"v": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
}
},
"blobVersionedHashes": {
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}Parameter block: BlockSelector
json
{
"title": "Block number, tag or block identifier",
"description": "A block number, a tag, or an object with blockHash or blockNumber. Null means latest.",
"oneOf": [
{
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
{
"title": "Block tag",
"type": "string",
"enum": [
"earliest",
"finalized",
"safe",
"latest",
"pending"
],
"description": "latest is the head of the last forkchoice update, as reth. pending is the block that Cinder builds from its transaction pool after latest, as reth. safe and finalized are the blocks of the last forkchoice update, as reth. Before the first update, they name no block. earliest is the first block that the node stored, as reth."
},
{
"type": "object",
"properties": {
"blockHash": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"blockNumber": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}Parameter options: TraceCallConfig
json
{
"title": "Trace call config",
"description": "A trace config with the state context of a call.",
"allOf": [
{
"title": "Trace config",
"description": "Options of debug_trace methods. The struct logger reads disableStack, enableMemory and disableStorage. The tracers read tracerConfig. callTracer reads onlyTopCall and withLog. prestateTracer reads diffMode, disableCode and disableStorage. muxTracer reads one key for each tracer to run.",
"type": "object",
"properties": {
"tracer": {
"title": "Tracer name",
"type": "string",
"description": "No tracer gives the struct logger. Cinder runs these built-in tracers. A JavaScript tracer is not supported.",
"enum": [
"callTracer",
"flatCallTracer",
"prestateTracer",
"4byteTracer",
"muxTracer",
"noopTracer"
]
},
"tracerConfig": {
"type": "object"
},
"disableStack": {
"type": "boolean"
},
"enableMemory": {
"type": "boolean"
},
"disableStorage": {
"type": "boolean"
}
}
},
{
"type": "object",
"properties": {
"stateOverrides": {
"title": "State overrides",
"description": "An object that maps an address to the account fields to replace before the call. Use state to replace the whole storage, and stateDiff to change single slots.",
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"balance": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"nonce": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"code": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"state": {
"type": "object",
"additionalProperties": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"stateDiff": {
"type": "object",
"additionalProperties": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"movePrecompileToAddress": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
}
}
},
{
"type": "null"
}
]
},
"blockOverrides": {
"title": "Block overrides",
"description": "Fields of the block environment to replace for the call.",
"oneOf": [
{
"type": "object",
"properties": {
"number": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"time": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"timestamp": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasLimit": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"coinbase": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"feeRecipient": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"prevRandao": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"random": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"baseFee": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"baseFeePerGas": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"blockHash": {
"type": "object",
"additionalProperties": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
},
{
"type": "null"
}
]
},
"txIndex": {
"oneOf": [
{
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "When set, the call runs on the state before this transaction of the block."
}
}
}
]
}Result: TracerResult
json
{
"title": "Tracer result",
"description": "The shape depends on the tracer. No tracer: a struct logger result. callTracer: a call frame. flatCallTracer: an array of Parity-style flat frames. prestateTracer: an object that maps an address to its state, or an object with pre and post in diff mode. 4byteTracer: an object that maps a selector and call data size to a count. muxTracer: an object with one result for each tracer. noopTracer: an empty object.",
"oneOf": [
{
"title": "Struct logger result",
"type": "object",
"properties": {
"gas": {
"type": "integer"
},
"failed": {
"type": "boolean"
},
"returnValue": {
"type": "string"
},
"structLogs": {
"type": "array",
"items": {
"title": "Struct log step",
"type": "object",
"properties": {
"pc": {
"type": "integer"
},
"op": {
"type": "string"
},
"gas": {
"type": "integer"
},
"gasCost": {
"type": "integer"
},
"depth": {
"type": "integer"
},
"error": {
"type": "string"
},
"stack": {
"type": "array",
"items": {
"type": "string"
}
},
"memory": {
"type": "array",
"items": {
"type": "string"
}
},
"storage": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
{
"title": "Call frame",
"description": "The result of callTracer: one frame, with its sub-calls in calls.",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"from": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"to": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"value": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gas": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasUsed": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"output": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"error": {
"type": "string"
},
"revertReason": {
"type": "string"
},
"calls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CallFrame"
}
},
"logs": {
"type": "array",
"items": {
"type": "object"
}
}
}
},
{
"type": "array",
"items": {
"type": "object"
}
},
{
"type": "object"
}
]
}