Avalanche
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
debug_traceCall runs a call against a chosen block's state on the Avalanche C-Chain and returns a full opcode-level trace, all without ever submitting a transaction or spending any AVAX. The C-Chain is Avalanche's EVM chain, where gas is denominated in AVAX and Snowman consensus finalizes blocks in roughly one to two seconds. Because nothing is broadcast, you can probe how a call would behave — its execution path, revert reason, and gas profile — entirely off-chain. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, hex 0xa86a), optionally with state and block overrides, and the response mirrors debug_traceTransaction for the tracer you pick.
stateOverrides to inject modified bytecode.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | transaction | object | 是 | Call object — same fields as eth_call: `from?`, `to`, `gas?`, `gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`, `value?`, `data?`. |
| 2 | blockParameter | string | 否 | Block number or tag defining the state against which the call is simulated.默认值: latest |
| 3 | options | object | 否 | Same tracer configuration object as debug_traceTransaction (tracer, tracerConfig, timeout, reexec, enableMemory, enableReturnData, disableStack, disableStorage, limit, debug). |
| 4 | stateOverrides | object | 否 | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. |
| 5 | blockOverrides | object | 否 | Optional map of block-context fields to override (e.g. `number`, `time`, `gasLimit`, `coinbase`, `random`, `baseFee`) for the simulated call. |
| 类型 | 描述 |
|---|---|
| object | Same shape as debug_traceTransaction: structLog array with default tracer, or tracer-specific object (callTracer, prestateTracer, etc.). |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Transaction object is missing required fields or blockParameter is unrecognized. |
-32000 | execution reverted | Simulated call reverted; trace is still returned up to the revert point. |
block.timestamp or the C-Chain coinbase — use blockOverrides to control these.callTracer, or disable stack, memory, and storage capture in the options.参数
Call object — same fields as eth_call: `from?`, `to`, `gas?`, `gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`, `value?`, `data?`.
hex block number or "latest" | "earliest" | "pending"
Same tracer configuration object as debug_traceTransaction (tracer, tracerConfig, timeout, reexec, enableMemory, enableReturnData, disableStack, disableStorage, limit, debug).
Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call.
Optional map of block-context fields to override (e.g. `number`, `time`, `gasLimit`, `coinbase`, `random`, `baseFee`) for the simulated call.