Avalanche
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Avalanche
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getFilterChanges returns everything that matched a previously installed filter since your last call, so you poll for fresh activity on the Avalanche C-Chain without re-sending the filter criteria each time. What you get back depends on the filter type: log objects for a log filter, block hashes for a block filter, or transaction hashes for a pending-transaction filter. The C-Chain settles transactions (paid for in AVAX) under Snowman consensus with roughly 1–2 second finality, so the windows between polls are short. Call it against https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a) using the filter ID you got at creation time.
eth_newBlockFilter, then poll eth_getFilterChanges repeatedly to react to each new Avalanche block as it finalizes.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | filterId | string | Sí | The filter ID to poll. |
| Tipo | Descripción |
|---|---|
| array | For log filters: array of log objects. For block filters: array of block hash strings. For pending-tx filters: array of transaction hash strings. Empty array if no new events. |
Try it live in the Avalanche playground.
| Código | Mensaje | Causa |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
filter not found error and recreate the filter rather than assuming the ID stays valid forever.removed field — a short reorg can mark previously delivered C-Chain logs as removed even with fast finality.Parámetros
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter