substreams-sink-kv

This is a command line tool to quickly sync a substreams with a kv database.

Quickstart

  1. Install substreams-sink-kv (Installation from source required for now):

    bash go install ./cmd/substreams-sink-kv

  2. Add a 'map' module to your substreams.yaml with an output type of proto:substreams.kv.v1.KVOperations:

    modules:

  3. Run the sink to a local 'badger' database

    To connect to substreams you will need an authentication token, follow this guide to obtain one,

    shell substreams-sink-kv run \ "badger3:///home/user/sf-data/my-badger.db" \ "mainnet.eth.streamingfast.io:443" \ "substreams.yaml" \ kv_out

Even quicker iteration

Protobuf generation

Example integration