Pre-alphaWork in progress
Skip to content

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.

ParameterTypeRequiredDescription
transactionTransaction objectYesCall fields such as from, to, data, value, and gas.
blockBlock number or tagYesState against which to simulate the call.
optionsTrace optionsYesDirect requires an explicit supported named tracer.

Transaction fields ​

FieldMeaning
fromSender address used during execution
toDestination address; omit for contract creation where supported
data or inputEncoded call data or contract creation code; use one field
valueValue transferred in wei, as a hexadecimal quantity
gasGas allowance for the simulation, as a hexadecimal quantity
gasPriceLegacy gas price in wei; use instead of EIP-1559 fee fields
maxFeePerGas, maxPriorityFeePerGasEIP-1559 fee limits in wei, where applicable
accessListAddresses and storage keys supplied for execution

Tracing options ​

FieldSupported values
tracercallTracer or prestateTracer; explicitly required by Direct
tracerConfig.onlyTopCallBoolean for callTracer; omit or use false to include nested calls
tracerConfig.diffModeBoolean for prestateTracer; use true for state changes, otherwise return accessed pre-state
timeoutDuration 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.

Unstoppable Infrastructure.