Polygon
Polygon
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
trace_replayBlockTransactions re-runs every transaction in a Polygon PoS block and returns, for each one, whichever combination of trace types you ask for. It is the block-wide counterpart of trace_replayTransaction, well suited to building a complete state-diff record of an entire MATIC-fee block in a single call. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89), passing the block and the traceTypes you need. It replays all transactions in the block and returns a selectable combination of call-tree trace, VM trace, and state diff for each.
stateDiff audit for every transaction in a Polygon block, feeding a chain analytics pipeline.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockParameter | string | 是 | Block whose transactions to replay. |
| 2 | traceTypes | array | 是 | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| 类型 | 描述 |
|---|---|
| array | Array of per-transaction replay results in block order. Each element has the same shape as trace_replayTransaction output, plus `transactionHash`. |
Try it live in the Polygon playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client. |
-32602 | Invalid params | blockParameter is malformed or traceTypes is empty or contains unknown values. |
-32000 | block not found | Block does not exist or archive trace data is unavailable for that block. |
traceTypes minimal.stateDiff or trace alone unless you genuinely need the opcode-level vmTrace.参数
hex block number or "latest" | "earliest" | "pending"
["trace"] | ["trace","vmTrace","stateDiff"]