Skip to main content
See the Handling contract events guide for usage examples and event specification routes.

evmEventDecoder

Returns a query-transformer combo that instructs the source to fetch and decode smart contract event logs.
Parameters:
  • range: Block range { from: number | 'latest', to?: number } (required)
  • contracts: Array of contract addresses or a contractFactory (optional; omit to receive events from all contracts)
  • events: Map of event names to ABI event objects or { event, params } filter objects (required)
  • profiler: Profiler config shard for labeling the transformer in profiling data { name: string } (optional)
  • onError: Error handler (optional)
A log goes to one entry of events only. If two entries can match the same log, the decoder fails at start with E0004 instead of silently dropping the log for one of them. Entries of one event are fine when their filters share no value ({ from: ALICE } and { from: BOB }), or when the topic count differs, as with ERC-20 and ERC-721 Transfer. To get overlapping filters, put each in its own evmEventDecoder(): every output then receives all the logs its filter matches. A decoder emits only the logs its own entries ask for, not logs that another output requested. Example:

Decoded event structure

Each entry in the output arrays is a DecodedEvent object:

commonAbis

commonAbis is a built-in collection of typed ABI modules. See the Handling contract events guide for usage examples.

commonAbis.erc20

Events: Functions: