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.
debug_traceTransaction is the workhorse debugger for Polygon PoS: give it a transaction hash and the Bor node re-runs that transaction instruction by instruction, capturing every opcode, stack frame, and gas charge. Polygon's Bor client is Geth-based, so the callTracer, prestateTracer, and default struct-log tracers behave exactly as on Ethereum, only here they apply to MATIC-fee transactions. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89). It replays the historical transaction at opcode level, reproducing the exact EVM state at the block where it was mined.
REVERT instruction.callTracer.prestateTracer for security post-mortems on Polymarket, Aave, or QuickSwap incidents.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string | Sim | Hash of the transaction to trace. |
| 2 | options | object | Não | Tracer configuration object. |
| Tipo | Descrição |
|---|---|
| object | With the default tracer: `{gas, failed, returnValue, structLogs[]}` where each structLog entry contains `{pc, op, gas, gasCost, depth, stack?, memory?, storage?}`. With callTracer: a nested call-tree object. With prestateTracer: a pre-execution account/storage map. |
Try it live in the Polygon playground.
| Código | Mensagem | Causa |
|---|---|---|
-32601 | Method not found | debug namespace is not enabled on the node (requires --http.api=debug or equivalent). |
-32602 | Invalid params | Transaction hash is missing, malformed, or the options object contains unknown fields. |
-32000 | transaction not found | The transaction hash does not exist on the chain or the node lacks archive state for that block. |
callTracer or disable stack and storage in the options to keep responses small.Parâmetros
0x-prefixed 32-byte hash
omit for default struct-log tracer