Avalanche
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Avalanche
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
eth_getLogs returns every event log on the Avalanche C-Chain that matches a filter object — a block range (or a single blockHash), one or more contract addresses, and indexed topic filters. It is the primary method for one-shot log queries and for backfilling an indexer over historical blocks, which is how most analytics and DeFi dashboards reconstruct activity from Aave, Trader Joe, or GMX, all of which spend AVAX on gas. Unlike the stateful filter calls, it needs no prior eth_newFilter registration. Send it to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a) and the node returns the full array of matching logs.
Transfer events for a C-Chain token over a historical block range to seed balances or holder lists.blockHash and topics.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | filter | object | Oui | 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). |
| Type | Description |
|---|---|
| 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 Avalanche playground.
| Code | Message | Cause |
|---|---|---|
-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 is finalized before trusting the data.eth_getLogs with fromBlock: "latest" to watch for new events is wasteful given the C-Chain's fast blocks; use eth_newFilter + eth_getFilterChanges or eth_subscribe for live tailing instead.Paramètres
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).