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_newFilter creates a server-side log filter on Base — Coinbase's ETH-gas OP Stack rollup — from a filter object describing the fromBlock/toBlock range, one or more contract address values, and topics to match. It returns a hex filter ID you then poll incrementally with eth_getFilterChanges, so each poll returns only the logs that have appeared since your previous call instead of re-scanning the whole range. Register the filter against https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105). It pairs naturally with the busy Base log stream from apps like Aerodrome and Uniswap.
Transfer events on a Base token on a fixed interval (a few seconds suits Base's ~2s blocks) without re-specifying the full filter object on every request.Swap events from a long-running indexer or bot process.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | filter | object | Sí | Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]). |
| Tipo | Descripción |
|---|---|
| string | Hex filter ID. Pass this to eth_getFilterChanges, eth_getFilterLogs, or eth_uninstallFilter. |
Try it live in the Base playground.
| Código | Mensaje | Causa |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation, or filter limit per connection was reached. |
-32602 | invalid argument | Malformed filter object or invalid topic format. |
eth_getFilterChanges returns a filter-not-found error you call eth_newFilter again and continue.eth_subscribe("logs", ...) is more efficient than repeatedly polling a filter on Base; reserve eth_newFilter for HTTP-only or batch-style consumers.Parámetros
Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]).