Polygon
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Polygon
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockParameter | string | Oui | Block whose transactions to replay. |
| 2 | traceTypes | array | Oui | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| Type | Description |
|---|---|
| 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.
| Code | Message | Cause |
|---|---|---|
-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.Paramètres
hex block number or "latest" | "earliest" | "pending"
["trace"] | ["trace","vmTrace","stateDiff"]