Parameters
filterobjectrequired- fromBlock and toBlock (hex or tag), address (one address or a list), topics (up to four positions; each a topic, a list of alternatives or null), or blockHash instead of the range.
Returns
array Matching log objects.
addressstring- Contract that emitted the log.
topicsarray- Up to four indexed topics; topic 0 is the event signature hash.
datastring- Non-indexed event arguments, ABI-encoded.
blockNumberstring- Block number, hex.
transactionHashstring- Hash of the transaction that emitted the log.
logIndexstring- Position of the log in the block, hex.
removedboolean- true if the log was removed by a reorg.
When to use it
Fetch events emitted by contracts over a block range: token transfers, swaps, mints, governance votes.
This is the backbone of indexers and backfills: scan history once, then follow new blocks.
How to read the result
Each log has the emitting address, up to four topics and data. topics[0] is keccak256 of the event signature; indexed arguments follow in topics[1..3]; the rest is ABI-encoded in data.
Decode with the event ABI: viem decodeEventLog, ethers Interface.parseLog, web3.py contract.events.Transfer().process_log.
Tips
- Always filter by address and topics[0]. Unfiltered ranges return huge payloads.
- Walk long histories in chunks of about 1,000 blocks, and halve the chunk when you get error -32005 (too many results). The free test key allows 10 blocks per request; paid plans don't have this limit.
- Run chunks in parallel up to your RPS cap; on L0vd you pay a flat price, so a full backfill costs nothing extra.
- Use blockHash instead of a range to read one block's logs consistently during reorgs.