Try it Live
Run ABI examples in the interactive playground
Overview
Abi.parseLogs decodes a list of log entries using a full ABI. It matches non-anonymous events by topic0 and decodes indexed and non-indexed parameters. Logs that do not match any event are skipped.
Quick Start
Hex or Bytes Input
parseLogs accepts both hex strings and byte arrays:
Anonymous Events
Anonymous events omittopic0. parseLogs can decode them only when there is a unique anonymous event with the same number of indexed parameters.
parseLogs cannot disambiguate and will skip them.
Decode a Single Event
If you already know the event definition, decode directly:Dynamic Indexed Parameters
Dynamic indexed parameters (likestring or bytes) are stored as keccak256 hashes in topics. You can compare them, but you cannot recover the original value from the topic alone.
See Also
- Event.decodeLog - Decode a single log
- Event.encodeTopics - Build topics for filters
- getItem - Find event definitions in an ABI

