StreamingFast Substreams module inputs

Data Inputs

Modules come in two varieties: map and store and can define one or multiple inputs. The possible inputs are map, store, and source.


An Input of type source represents a chain-specific, firehose-provisioned protobuf object.
Note: Find the supported protocols and their corresponding message types in the Chains & Inputs documentation.
To illustrate, Substreams on Ethereum would specify sf.ethereum.type.v2.Block.
- source: sf.ethereum.type.v2.Block
Another source type available on any chains is the sf.substreams.v1.Clock object. This object represents the block number, a block ID, and a block timestamp.


An Input of type map represents the output of another map module. The object's type is defined in the output.type attribute of the map module. Note, map modules cannot depend on themselves.
- map: my_map
Find additional information about maps in the modules documentation.


An Input of type store is the state of another store.
- store: my_store
mode: deltas
- store: my_store # defaults to mode: get


There are two possible modes that can be defined for modules.


Get mode provides a key/value store that is guaranteed to be synced up to the block being processed, and readily queryable. Note, this is the default value.


Delta mode provides a protobuf object containing all the changes that occurred in the store module in the same block.
Constraints for stores:
  • Stores received as inputs are read-only.
  • A store cannot depend on itself!
Find additional information for stores in the main Modules documentation.
Copy link
On this page
Data Inputs