eth_getLogs - Scroll RPC Method
Query event logs on Scroll. Essential for indexing zero-migration DeFi protocols, zkEVM-native dApps, and 100+ ecosystem projects with native Ethereum tooling on the largest zkEVM by market share with $750M+ TVL and bytecode-level Ethereum equivalence.
Returns an array of all logs matching a given filter object on Scroll.
Why Scroll? Build on the largest zkEVM by market share with $750M+ TVL and bytecode-level Ethereum equivalence with bytecode-level EVM equivalence, native Hardhat/Remix/MetaMask support, decentralized proof validation, and Scroll SDK for L2/L3 deployment.
Use Cases
The eth_getLogs method is essential for:
- Event indexing - Track contract events for zero-migration DeFi protocols, zkEVM-native dApps, and 100+ ecosystem projects with native Ethereum tooling
- Token transfers - Monitor ERC20/ERC721 transfers
- DeFi analytics - Track swaps, liquidity events, and more
- Notification systems - Alert on specific on-chain events
Code Examples
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32005 | Query returned more than 10000 results | Reduce block range |
| -32602 | Invalid params | Invalid filter parameters |
Related Methods
eth_newFilter- Create a filter for logseth_getFilterChanges- Poll filter for new logs
eth_call
Execute smart contract calls without creating transactions on Scroll. Essential for reading contract state for zero-migration DeFi protocols, zkEVM-native dApps, and 100+ ecosystem projects with native Ethereum tooling.
eth_newFilter
Create an event log filter on Scroll. Essential for event monitoring, contract activity tracking, and DeFi event streaming for zero-migration DeFi protocols, zkEVM-native dApps, and 100+ ecosystem projects with native Ethereum tooling.