Base
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Base
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
debug_traceTransaction replays a transaction that has already been mined on Base and returns its execution at opcode level, reproducing the exact EVM state at the block where it landed. Base is Coinbase's OP Stack optimistic rollup that meters gas in ETH and settles to Ethereum L1, so a trace here walks the same struct-log or tracer output you would expect from a Geth-based client. Give the call the transaction hash and an optional tracer config at https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105); the node re-executes the transaction against the historical state and reports every step. The default tracer yields a struct-log array, while callTracer and prestateTracer give a call tree or a pre-execution account map instead.
REVERT instruction — for example a failed swap on Aerodrome or Uniswap.callTracer to see exactly how the bundle moved value between contracts.prestateTracer for a security post-mortem after an exploit on a Base protocol.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | transactionHash | string | 是 | Hash of the transaction to trace. |
| 2 | options | object | 否 | Tracer configuration object. |
| 类型 | 描述 |
|---|---|
| object | With the default tracer: `{gas, failed, returnValue, structLogs[]}` where each structLog entry contains `{pc, op, gas, gasCost, depth, stack?, memory?, storage?}`. With callTracer: a nested call-tree object. With prestateTracer: a pre-execution account/storage map. |
Try it live in the Base playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | debug namespace is not enabled on the node (requires --http.api=debug or equivalent). |
-32602 | Invalid params | Transaction hash is missing, malformed, or the options object contains unknown fields. |
-32000 | transaction not found | The transaction hash does not exist on the chain or the node lacks archive state for that block. |
callTracer or disable stack and storage in the options object.参数
0x-prefixed 32-byte hash
omit for default struct-log tracer