Ethereum
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Ethereum
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
trace_block takes a single Ethereum block and hands back the call-tree traces for every transaction it contains, flattened into one array. This is the Parity/OpenEthereum-style trace namespace, served on Ethereum mainnet (chain ID 1) by Erigon-class archive nodes. Where trace_transaction gives you one transaction, this gives you the whole block in a single round trip: every internal ETH transfer, every nested contract call, every CREATE and SELFDESTRUCT, each tagged with a transactionPosition so you know which transaction it came from. Point it at https://ethereum.therpc.io/YOUR_API_KEY and pass either a hex block number or one of the usual tags (latest, earliest, pending).
| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockParameter | string | 是 | Block whose transactions to trace. |
| 类型 | 描述 |
|---|---|
| array | Flat array of all trace objects across all transactions in the block. Each object has the same shape as individual entries from trace_transaction, with `transactionPosition` indicating which transaction it belongs to. |
Try it live in the Ethereum playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client. |
-32602 | Invalid params | blockParameter is malformed or not a recognized tag. |
-32000 | block not found | Block does not exist or trace archive data is unavailable. |
trace namespace is not part of a default Geth full node, and most public RPC endpoints leave it off.pending for anything you'll persist. Under proof-of-stake a head block can still reorg before justification, so read a block you've confirmed is finalized (roughly 12.8 minutes deep) when the data has to be durable.参数
hex block number or "latest" | "earliest" | "pending"