debug_traceCall: parameters, returns and CU
Run an eth_call on top of a given block state and produce an execution trace.
Summary
Run an eth_call on top of a given block state and generate an execution trace. Official documentation
Compute units (CU) and pricing
100 CU
$10.00
Parameters
| Parameter | Type | Description |
|---|---|---|
call | object | Transaction call object, containing from, to, data, gas, gasPrice, value. |
block | QUANTITY|TAG|HASH | Block number (0x-prefixed hexadecimal quantity), block hash, or the 'latest' / 'pending' tag to trace against; safe, finalized and earliest return -32011. |
options | object | Trace options object (optional): tracer is callTracer, flatCallTracer, prestateTracer, 4byteTracer or noopTracer, omitted uses the default struct logger, and any other value returns -32602 tracer not allowed; tracerConfig passes tracer-specific options (such as onlyTopCall and withLog for callTracer, diffMode for prestateTracer); timeout is at most 30s; reexec is a Geth-compatible option (non-negative integer, 0 is valid): the maximum number of blocks to walk back and re-execute when rebuilding historical state, not a target block number, and it does not change the trace target; accepting the parameter does not mean any re-execution occurred, and support depends on the chain node implementation; stateOverrides, blockOverrides and txIndex are also supported. |
Returns
- Type:
ARRAY (flatCallTracer); OBJECT (callTracer, prestateTracer, 4byteTracer, noopTracer, default struct logger) - Description: The tracer determines the return shape: flatCallTracer returns an array of flat trace entries, each containing action, type, an integer-array traceAddress, subtraces, and result on success or error on failure; block and transaction context fields depend on the node and call mode, blockHash and transactionHash may be null for simulated calls, and Arbitrum entries may also include beforeEVMTransfers and afterEVMTransfers. callTracer returns a CallFrame tree object; prestateTracer returns an address-keyed account-state object by default, or a state-diff object with pre and post in diffMode; 4byteTracer returns an object mapping signature and calldata size to occurrence count; noopTracer returns an empty object; omitting tracer returns the default struct logger object with gas, failed, returnValue and structLogs.
Notes
The target block must be within the chain's state window (state_window_blocks); out-of-window requests return -32011 (not billed). The gateway accepts the pending tag, but node support depends on the chain: on arb_mainnet, debug_traceCall with block=pending may return node error -32000 with message tracing on top of pending is not supported; this error is passed through unchanged, not rewritten to -32010 or -32011. Use latest, or an explicit block number or hash, instead.
Request example
export BLOCKVECTRA_API_KEY=rgw_your_api_key
curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H "x-api-key: $BLOCKVECTRA_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceCall",
"params": [
{
"to": "<toAddress>",
"data": "<callData>"
},
"latest",
{
"tracer": "callTracer"
}
],
"id": 1
}'Supported chains
Available on all supported chains except: Arbitrum Nova (arbnova_mainnet), Arc (arc_mainnet), Base (base_mainnet), Berachain (berachain_mainnet), Boba (boba_mainnet), BNB Smart Chain (bsc_mainnet), Celo (celo_mainnet), Ethereum Sepolia (eth_sepolia), Fraxtal (fraxtal_mainnet), Gnosis (gnosis_mainnet), HyperEVM (hyperevm_mainnet), Ink (ink_mainnet), Katana (katana_mainnet), Linea (linea_mainnet), Metal L2 (metall2_mainnet), Mode (mode_mainnet), OP Mainnet (op_mainnet), Rootstock (rootstock_mainnet), Soneium (soneium_mainnet), Unichain (unichain_mainnet), World Chain (world_mainnet), Zora (zora_mainnet).
Related references
Last updated: