debug_traceCall
Simulates a call and returns the output of a named tracer.
Geth reference · All supported methods
Parameters
Parameters are positional, in the order below.
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction | Transaction object | Yes | Call fields such as from, to, data, value, and gas. |
block | Block number or tag | Yes | State against which to simulate the call. |
options | Trace options | Yes | Direct requires an explicit supported named tracer. |
Transaction fields
| Field | Meaning |
|---|---|
from | Sender address used during execution |
to | Destination address; omit for contract creation where supported |
data or input | Encoded call data or contract creation code; use one field |
value | Value transferred in wei, as a hexadecimal quantity |
gas | Gas allowance for the simulation, as a hexadecimal quantity |
gasPrice | Legacy gas price in wei; use instead of EIP-1559 fee fields |
maxFeePerGas, maxPriorityFeePerGas | EIP-1559 fee limits in wei, where applicable |
accessList | Addresses and storage keys supplied for execution |
Tracing options
| Field | Supported values |
|---|---|
tracer | callTracer or prestateTracer; explicitly required by Direct |
tracerConfig.onlyTopCall | Boolean for callTracer; omit or use false to include nested calls |
tracerConfig.diffMode | Boolean for prestateTracer; use true for state changes, otherwise return accessed pre-state |
timeout | Duration string such as 5s; cannot extend the gateway waiting deadline |
Return value
The selected tracer’s result: a call-frame tree for callTracer, or account/state data for prestateTracer. diffMode returns pre- and post-execution changes.
Example
Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.
sh
curl -X POST "<gateway-url>/<service-url>" \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"debug_traceCall","params":[{"to":"0x2222222222222222222222222222222222222222","data":"0x"},"latest",{"tracer":"callTracer"}]}'Illustrative response; values depend on the selected network and request:
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "CALL",
"from": "0x0000000000000000000000000000000000000000",
"to": "0x2222222222222222222222222222222222222222",
"value": "0x0",
"gas": "0x1c9c380",
"gasUsed": "0x0",
"input": "0x",
"output": "0x"
}
}Direct behavior
The gateway selects providers supporting the requested tracing group and format. Unsupported formats are rejected rather than replaced.
Specify tracer: "callTracer" with optional tracerConfig.onlyTopCall, or tracer: "prestateTracer" with optional tracerConfig.diffMode. Default opcode logging and arbitrary JavaScript tracers are not supported. An omitted tracer does not select a default output.
Historical simulations require archive state. Requests whose execution point is determined by latest follow the reference-block rules.
Limits
Simulations allow up to 30 million gas per call. Omitted gas uses that ceiling; an explicit higher allowance is rejected rather than silently reduced. State and block overrides are not included in the supported contract.
A debug timeout can request a shorter execution budget, but cannot extend the shared gateway deadline.
For providers
Qualify for the entire applicable tracing group, including required formats and options. Historical combinations are verified separately; recent success alone does not establish historical coverage.
See provider qualification for checks and continued eligibility.