Try it Live
Run EventLog examples in the interactive playground
Type Definition
Branded type representing an Ethereum event log with contract address, indexed topics, and event data.API Methods
Constructors
EventLog(params)- Primary constructor for event logsfrom(params)- Alias for EventLog() constructorcreate(params)- Alias for EventLog() constructorclone(log)- Clone existing log
Accessors
getTopic0(log)- Get event signature (topic0)getSignature(log)- Alias for getTopic0getIndexedTopics(log)- Get all indexed topic parameters (topic1-3)getIndexed(log, index)- Get specific indexed parameter
Filtering
matchesAddress(log, address)- Check if log matches contract addressmatchesTopics(log, topics)- Check if log matches topic filtermatchesFilter(log, filter)- Check if log matches complete filter criteriafilterLogs(logs, filter)- Filter array of logs by criteria
Utilities
isRemoved(log)- Check if log was removed due to reorgwasRemoved(log)- Alias for isRemovedsortLogs(logs)- Sort logs chronologically by block and log index
Types
- EventLogType
- Filter
- EventLogParams
Usage Patterns
Effect Schema
ERC-20 Transfer Event Filtering
Multi-Contract Log Parsing
Chain Reorganization Handling
Block Range Analysis
Bundle Size
EventLog uses optimized APIs for efficient imports and tree-shaking support.Related
Core Documentation
- Fundamentals - Learn event structure, topics, and bloom filters
Related Primitives
- Abi - ABI encoding/decoding for event data
- Transaction - Transaction logs and receipts
- BloomFilter - Bloom filter for efficient log filtering
- Address - Ethereum address handling
- Keccak256 - Keccak256 hashing for event signatures
Specification
- Ethereum Yellow Paper - Section 4.3 (The Transaction Receipt)
- EIP-155 - Log format specification
- Solidity Events - Event declaration and emission
- eth_getLogs RPC - JSON-RPC log retrieval

