Foundational Modules
Before You Begin
The Foundational Modules
...output omitted...
modules:
- name: all_transactions # 1.
kind: map
initialBlock: 0
inputs:
- source: sf.cosmos.type.v2.Block
output:
type: proto:sf.substreams.cosmos.v1.TransactionList
- name: all_events # 2.
kind: map
initialBlock: 0
inputs:
- source: sf.cosmos.type.v2.Block
output:
type: proto:sf.substreams.cosmos.v1.EventList
- name: index_events # 3.
kind: blockIndex
inputs:
- map: all_events
output:
type: proto:sf.substreams.index.v1.Keys
doc: |
`index_events` sets the keys corresponding to every event 'type'
ex: `coin_received`, `message` or `injective.peggy.v1.EventDepositClaim`
- name: filtered_events # 4.
kind: map
blockFilter:
module: index_events
query:
params: true
inputs:
- params: string
- map: all_events
output:
type: proto:sf.substreams.cosmos.v1.EventList
doc: |
`filtered_events` reads from `all_events` and applies a filter on the event types, only outputting the events that match the filter.
The only operator that you should need to use this filter is the logical or `||`, because each event can only match one type.Use The Foundational Modules
Use in a Substreams
Last updated
Was this helpful?

