Polygon
Polygon
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_newBlockFilter creates a server-side filter that watches for new block arrivals and returns a hex filter ID. You then poll that ID with eth_getFilterChanges to receive the hashes of blocks added since your last poll. On Polygon — the MATIC-fueled PoS chain at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89) — blocks are produced roughly every two seconds, so a steady polling loop is a lightweight way to keep an HTTP client in step with the chain head without holding a WebSocket connection open.
0xc2132D05D31c914a87C6611C10748AEb04B58e8F) never lag more than one block behind.Este método no acepta parámetros. Pasa un array vacío [].
| Tipo | Descripción |
|---|---|
| string | Hex filter ID. When polled with eth_getFilterChanges, yields an array of new block hashes since the last poll. |
Try it live in the Polygon playground.
| Código | Mensaje | Causa |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
eth_getFilterChanges yields only block hashes — fetch the full block with eth_getBlockByHash when you need transactions or header fields.filter not found error.finalized tag rather than acting irreversibly on a freshly seen block hash.