Arbitrum One
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.
Arbitrum One
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
eth_getLogs returns every event log matching a filter object — an address, a set of topics, and a block range — across Arbitrum One. On this Optimistic Rollup (chain ID 42161, gas paid in ETH, batches settled to Ethereum L1), it is the primary method for one-shot log queries and backfill indexing of busy contracts like GMX, Aave, and Camelot. Send the filter to https://arbitrum.therpc.io/YOUR_API_KEY and you get back all event logs matching the filter object in a single response.
Transfer events for a token contract over a historical Arbitrum One block range.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | filter | object | Sim | Filter object. Fields: `fromBlock` (string, default "latest"), `toBlock` (string, default "latest"), `address` (string | string[]), `topics` ((string | string[] | null)[]), `blockHash` (string — mutually exclusive with fromBlock/toBlock). |
| Tipo | Descrição |
|---|---|
| array | Array of log objects. Each log: `address`, `blockHash`, `blockNumber`, `data`, `logIndex`, `removed` (bool — true on reorg), `topics`, `transactionHash`, `transactionIndex`. |
Try it live in the Arbitrum One playground.
| Código | Mensagem | Causa |
|---|---|---|
-32005 | query exceeds max block range | The fromBlock–toBlock window exceeds the provider's block-range cap. |
-32005 | query returned more than 10000 results | Too many matching logs; narrow the filter or paginate. |
-32602 | invalid argument | blockHash combined with fromBlock/toBlock, or malformed topic format. |
removed field and re-query once the block reaches the finalized tag.eth_getLogs with fromBlock: "latest" is wasteful — use eth_newFilter + eth_getFilterChanges or eth_subscribe for live tailing instead.Parâmetros
Filter object. Fields: `fromBlock` (string, default "latest"), `toBlock` (string, default "latest"), `address` (string | string[]), `topics` ((string | string[] | null)[]), `blockHash` (string — mutually exclusive with fromBlock/toBlock).