Polygon
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Polygon
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockParameter | string | Sim | Block whose transactions to replay. |
| 2 | traceTypes | array | Sim | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| Tipo | Descrição |
|---|---|
| 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 | Mensagem | 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"]