Base
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Base
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_newBlockFilter creates a server-side filter that tracks new block arrivals on Base — Coinbase's OP Stack rollup that uses ETH for gas — and returns a hex filter ID. You then poll that ID with eth_getFilterChanges, and each poll hands back the hashes of blocks that have appeared since your last call. Because the Base sequencer seals a block roughly every 2 seconds, polling at a similar cadence keeps you close to the chain head. Create the filter against https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105); the call takes no parameters.
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 Base playground.
| Código | Mensaje | Causa |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
eth_getBlockByHash with each hash to pull the full block, including its transactions.eth_getFilterChanges raises a filter-not-found error, recreate the filter with eth_newBlockFilter and resume polling.finalized tag before treating block data as irreversible.