Emitting events in Solidity
Querying events with ethers.js
Filtering by indexed parameters
Indexed event parameters can be used as topics for efficient filtering:null to match any value:
Raw eth_getLogs
For lower-level access or when you don’t have the ABI:Real-time event subscription
WebSocket connections are required for real-time subscriptions. Use
wss://rpc1.autheo.com:8546 instead of the HTTP endpoint.Decoding raw log data
If you have raw log data without the ABI:Best practices
- Index only parameters you need to filter on — indexed parameters cost more gas
- Keep event payloads minimal; emit only what consumers need
- Do not use events as the primary storage mechanism — use them for off-chain notification
- Paginate
eth_getLogsqueries in blocks of 1,000–10,000 to avoid timeout errors
Next steps
- Indexing and analytics — build a persistent event index