Returns an array of all logs matching a given filter object. Particularly useful for indexing on-chain events.
Queries spanning large block ranges or high-activity contracts can time out or be rejected. Keep fromBlock-to-toBlock ranges under 2,000 blocks for reliable results. Node providers may enforce their own limits.
Since Denim, Base produces a canonical block every 200ms and Flashblocks are retired. The "pending" tag is still accepted, but it no longer returns Flashblocks preconfirmation state. Query logs from canonical blocks, or stream them with eth_subscribe("logs"). See Migrate From Flashblocks.
Array of 32-byte topic filters. Each position can be null (match any), a single topic hex string, or an array of hex strings (match any in the array). Position 0 is typically the keccak256 hash of the event signature. Optional.