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.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | transactionHash | string | Sí | Hash of the transaction to trace. |
| 2 | options | object | No | Tracer configuration object. |
| Tipo | Descripción |
|---|---|
| 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 | Mensaje | 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