Base
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Base
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | filter | object | Oui | Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]). |
| Type | Description |
|---|---|
| string | Hex filter ID. Pass this to eth_getFilterChanges, eth_getFilterLogs, or eth_uninstallFilter. |
Try it live in the Base playground.
| Code | Message | Cause |
|---|---|---|
-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.Paramètres
Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]).