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_getFilterChanges returns everything that has matched a previously installed filter since you last polled it, so each call yields only the delta. What you get back depends on the filter type: a log filter returns log objects, a block filter returns new block hashes, and a pending-transaction filter returns transaction hashes. On Base — Coinbase's OP Stack rollup that settles to Ethereum L1 and meters gas in ETH — the ~2s sequencer cadence means new blocks and logs arrive quickly, so this is the lightweight way to keep a stream current. Send polls to https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105); an empty array means nothing new since the last call.
eth_newBlockFilter once, then poll eth_getFilterChanges repeatedly to learn each new Base block hash as the sequencer seals it.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | filterId | string | Sim | The filter ID to poll. |
| Tipo | Descrição |
|---|---|
| array | For log filters: array of log objects. For block filters: array of block hash strings. For pending-tx filters: array of transaction hash strings. Empty array if no new events. |
Try it live in the Base playground.
| Código | Mensagem | Causa |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
filter not found error and recreate the filter rather than assuming it lives forever.removed field — a Base block can be reorged before finalization, and removed: true marks a log that was rolled back.Parâmetros
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter