Arbitrum One
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Arbitrum One
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_newFilter creates a server-side log filter on Arbitrum One and returns a hex filter ID. You define which logs you care about — a block range, one or more contract addresses, and topic patterns — and then poll the ID with eth_getFilterChanges to fetch only the matching logs emitted since your last poll, without re-sending the filter each time. On Arbitrum One, the ETH-fee Optimistic Rollup running Nitro/ArbOS, this is the standard way to watch contract events such as ERC-20 transfers or DEX swaps over plain HTTP. The endpoint is https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161, 0xa4b1).
Transfer events on a regular interval without re-specifying the full filter each time; on Arbitrum One's sub-second blocks you can poll more frequently than the ~12-second cadence typical of Ethereum L1.Swap events in a long-running indexer process by keeping one filter alive and reading incremental changes.| # | 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 Arbitrum One 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.eth_subscribe over WebSocket is more efficient than repeatedly polling a filter, especially given the chain's fast sequencer blocks.Parámetros
Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]).