🔵 Base
debug_traceCall

🛠️ debug_traceCall RPC Method (Base Chain)

The debug_traceCall method simulates a transaction without sending it, then returns a detailed trace of what would happen if it were executed on-chain — all within the context of a specific block.

This is especially useful for debugging contract calls, testing edge cases, and exploring how gas, storage, and logic behave — before actually executing the transaction.

Parameters

1. Transaction Call Object [required]

This is the same structure as an eth_call. You describe the transaction you want to simulate:

  • from (optional) — The sender address
  • to (required) — Target contract or recipient
  • gas (optional) — Gas limit (not charged, but may affect simulation)
  • gasPrice (optional) — Gas price in hex
  • value (optional) — ETH or token value to send
  • data (optional) — Encoded function call (ABI). Learn ABI basics (opens in a new tab)

2. Block Parameter [required]

Pick which block context the simulation should run in:

  • Hex block number (e.g. "0xA12BC")
  • "latest", "earliest", "pending"
  • "safe" / "finalized" (only supported on Ethereum + Arbitrum)

đź“– More about block tags (opens in a new tab)

đź’ˇ

Confused about input formatting? Ask in the Chainnodes Telegram Chat (opens in a new tab)

3. Trace Type & Options [optional]

You can specify a custom tracer for deeper debugging.

  • tracer (string) — Choose one:
    • callTracer: Tracks internal calls, inputs, outputs, reverts
    • prestateTracer: Shows balance, nonce, and storage touched
  • tracerConfig (object) — Optional advanced options:
    • onlyTopCall — Skip sub-calls and only trace the main one

Extra config for advanced tracing (optional):

OptionDescription
disableStorageSkip storage tracing (faster)
disableStackSkip EVM stack changes
disableMemorySkip memory tracking
disableReturnDataDon’t trace return value
timeoutSet a timeout (default: 5s) for complex traces
đź’ˇ

If you specify a tracer like callTracer, options like disableMemory, disableStack, etc. will be ignored.

If you don’t set a tracer, the method will fall back to Geth's built-in opcode logger (opens in a new tab).

Need RPC API keys?

Get 12.5M archival requests for free today.

Returns

If using callTracer

FieldDescription
typeType of call (CALL, DELEGATECALL, etc.)
fromSender
toRecipient
gasGas supplied
gasUsedGas used
valueTransferred amount
inputCalldata
outputReturn value
errorError message (if any)
callsInternal sub-calls
revertReasonIf reverted, the revert message

If using prestateTracer

  • Shows contract state touched by the simulation:

    • balance — Current ETH balance
    • code — Bytecode
    • nonce — Transaction count
    • storage — Mapped storage slots

If using no tracer (Struct/opcode default)

Returns an EVM step-by-step trace:

  • gas — Total gas used
  • failed — Whether execution failed
  • returnValue — What the contract returned
  • structLogs — Execution log for each opcode step:
    • pc, op, gas, gasCost
    • stack, memory, storage
    • depth — Call depth
    • refund, error

Request

POST https://base-mainnet.chainnodes.org/YOUR-API-KEY

Example

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your CHAINNODES Dashboard (opens in a new tab)
  • You can use a different supported network by replacing base-mainnet
curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"method":"debug_traceCall","params":[{"to": "0x6d2e03b7effeae98bd302a9f836d0d6ab0002766", "gasPrice": "0x174876E800"} ,"latest" ],"id":1,"jsonrpc":"2.0"}'

Body

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structLogs": [],
    "gas": 21000,
    "failed": false,
    "returnValue": ""
  }
}

JSON-RPC Base API Documentation by CHAINNODES is based on Erigon node client. Contact us if you are interested in specific methods that are only available on geth, besu, Nethermind or reth