Polygon
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Polygon
Free tier covers personal projects. Pay-as-you-go scales without a card.
eth_getFilterLogs returns the full set of logs matching a log filter you already created on Polygon PoS (chain ID 137), independent of how many times you have polled it. Where eth_getFilterChanges hands back only the delta since your last call, this method ignores poll state and replays everything the filter's address and topic criteria match. On Polygon — the EVM-equivalent, MATIC-fee network behind QuickSwap, Aave, and the bulk of on-chain USDT/USDC activity — that makes it the right call to seed an indexer with a filter's complete event history. Send it to https://polygon.therpc.io/YOUR_API_KEY with the filter ID and you get an array of every matching log object.
Transfer from a Polygon token contract — before switching to incremental eth_getFilterChanges polling.eth_getFilterLogs once, then resume the delta loop with eth_getFilterChanges so nothing emitted during the downtime is missed.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | filterId | string | Yes | The log filter ID. Only log filters (eth_newFilter) are valid — block and pending-tx filters are not supported. |
| Type | Description |
|---|---|
| array | Array of all log objects matching the filter's criteria. |
Try it live in the Polygon playground.
| Code | Message | Cause |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired, or the filter was already uninstalled. |
-32005 | query returned more than 10000 results | The filter matches too many logs; narrow the block range or add topic filters. |
eth_getFilterChanges, this returns every matching log, not just new ones — on a busy Polygon contract a wide filter can return a very large result set and may hit the 10000-result cap.eth_newFilter; passing a block filter or pending-transaction filter ID returns an error.eth_getFilterLogs promptly after creating the filter rather than letting it sit idle.Parameters
Hex filter ID from eth_newFilter