Appearance
trace_call
served · same as reth
Runs a call on the state of a block and returns the trace types that you ask for. Nothing changes on the chain.
When to use
Use it to see the calls or the state changes that a transaction would make, before you send it.
Example
bash
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "trace_call", "params": [{"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "data": "0x18160ddd"}, ["trace"], "0x18facad"]}' \
http://127.0.0.1:8547json
{
"jsonrpc": "2.0",
"id": 1,
"method": "trace_call",
"params": [
{
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"data": "0x18160ddd"
},
[
"trace"
],
"0x18facad"
]
}Response
Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"output": "0x00000000000000000000000000000000000000000000000000ab38d270bbc858",
"stateDiff": null,
"trace": [
{
"type": "call",
"action": {
"from": "0x0000000000000000000000000000000000000000",
"callType": "call",
"gas": "0x1dcd12b8",
"input": "0x18160ddd",
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"value": "0x0"
},
"result": {
"gasUsed": "0x25df",
"output": "0x00000000000000000000000000000000000000000000000000ab38d270bbc858"
},
"subtraces": 1,
"traceAddress": []
},
{
"type": "call",
"action": {
"from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"callType": "delegatecall",
"gas": "0x1d55c298",
"input": "0x18160ddd",
"to": "0x43506849d7c04f9138d1a2050bbf3a0c054402dd",
"value": "0x0"
},
"result": {
"gasUsed": "0x96c",
"output": "0x00000000000000000000000000000000000000000000000000ab38d270bbc858"
},
"subtraces": 0,
"traceAddress": [
0
]
}
],
"vmTrace": null
}
}Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
call | object, see Transaction call object | yes | The call to run, as for eth_call. |
traceTypes | list of strings, see Trace (trace_*) | yes | Any of trace, vmTrace and stateDiff. |
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. |
stateOverrides | object, see State override | no | Changes to the state before the call. |
blockOverrides | object, see Block override | no | Changes to the block fields that the call sees. |
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. |
Returns
An object with output, trace, vmTrace and stateDiff. The traces have no block or transaction fields. See Trace (trace_*).
Notes and limits
- The gas cap and the fee rules of
eth_callapply.
Errors
| Code | Message | When |
|---|---|---|
| -32602 | Invalid params | A trace type is unknown. data names the valid types. |
| -32003 | insufficient funds for gas * price + value: have X want Y | The value is above the balance. The call has a gas price and no gas. |
| -32000 | max fee per gas less than block base fee | A fee field is not valid. The fee errors of eth_call apply. |
| -32001 | block not found: 0x... | The block is above the head or the hash is unknown. |
| 4444 | pruned history unavailable: requested N, earliest available M | The block is more than 128 blocks below the head. |
Compared with reth
The live example above gives the same answer on Cinder and on reth 2.7.
Related methods
eth_call, debug_traceCall, trace_callMany.
Schema (OpenRPC)
More: trace_call.
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 traceTypes: ParityTraceTypes
json
{
"title": "Trace types",
"description": "Which parts of the result to return.",
"type": "array",
"items": {
"type": "string",
"enum": [
"trace",
"stateDiff",
"vmTrace"
]
}
}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 stateOverrides: StateOverrides
json
{
"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"
}
]
}Parameter blockOverrides: BlockOverrides
json
{
"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"
}
]
}Result: ParityReplay
json
{
"title": "Parity replay result",
"description": "The parts that the trace types asked for. A part not asked for is null.",
"type": "object",
"properties": {
"output": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"trace": {
"oneOf": [
{
"type": "array",
"items": {
"title": "Parity call trace",
"type": "object",
"properties": {
"action": {
"title": "Parity trace action",
"type": "object",
"description": "A call, create or self-destruct action. The fields depend on the type.",
"properties": {
"callType": {
"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}$"
},
"gas": {
"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]*$"
},
"value": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"init": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"balance": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"refundAddress": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
}
},
"result": {
"oneOf": [
{
"type": "object",
"properties": {
"gasUsed": {
"title": "hex encoded unsigned integer",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"output": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"code": {
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
}
}
},
{
"type": "null"
}
]
},
"error": {
"type": "string"
},
"subtraces": {
"type": "integer"
},
"traceAddress": {
"type": "array",
"items": {
"type": "integer"
}
},
"type": {
"type": "string",
"enum": [
"call",
"create",
"suicide",
"reward"
]
}
}
}
},
{
"type": "null"
}
]
},
"stateDiff": {
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"description": "An object that maps an address to the change of its balance, nonce, code and storage."
},
"vmTrace": {
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
}
}