Ethereum
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Pass a transaction hash to trace_transaction and you get back the OpenEthereum/Nethermind-style call tree for that one mined transaction: every internal CALL, every CREATE, and every SELFDESTRUCT, flattened into an array where traceAddress encodes each entry's path through the tree. Unlike the replay methods, it doesn't re-execute anything against arbitrary state or hand you opcode-level detail; it reports the call structure as recorded for a transaction that already executed on Ethereum mainnet (chain ID 1). That makes it the lightest way to surface internal ETH transfers, the kind that never appear as ERC-20 logs. Send the hash to https://ethereum.therpc.io/YOUR_API_KEY, served by a trace-enabled archive node.
traceAddress path down to the failing branch.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | transactionHash | string | 是 | Hash of the transaction to retrieve traces for. |
| 类型 | 描述 |
|---|---|
| array | Flat array of trace objects, each with `{action, result, subtraces, traceAddress, transactionHash, transactionPosition, blockHash, blockNumber, type}`. `traceAddress` encodes the path through the call tree. |
Try it live in the Ethereum playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | trace namespace not enabled; node requires --gcmode=archive and trace API enabled (Geth), or equivalent flag on Nethermind/Erigon. |
-32602 | Invalid params | Transaction hash is missing or malformed. |
-32000 | transaction not found | Transaction does not exist or archive trace data is unavailable for that block. |
--gcmode=archive and tracing on). A public light node won't answer.debug_traceTransaction. There's no opcode-level data here, only call, create, and suicide actions, so don't reach for it when you actually need a struct/opcode log.参数
0x-prefixed 32-byte hash