Base
Base
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.
Base
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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 não aceita parâmetros. Passe um array vazio [].
| Tipo | Descrição |
|---|---|
| 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 | Mensagem | 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.