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_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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | filterId | string | Sí | The filter ID to poll. |
| Tipo | Descripción |
|---|---|
| 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 | Mensaje | 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