Polygon
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockParameter | string | Sí | Block whose transactions to replay. |
| 2 | traceTypes | array | Sí | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
hex block number or "latest" | "earliest" | "pending"
["trace"] | ["trace","vmTrace","stateDiff"]