Skip to main content
Parse and decode ERC-20 Transfer and Approval events from raw log data.

How Event Logs Work

  • topic0: Event signature hash (keccak256 of event signature)
  • topic1-3: Indexed parameters (max 3, each 32 bytes)
  • data: Non-indexed parameters (ABI encoded)
This is a fully executable example. View the complete source with test assertions at examples/contracts/decode-logs.ts.