All packages

mantra_all

BigtoMantraDev
v0.3.1/4 downloads/Repository

Package ref

mantra-all@v0.3.1

Run package

CLI

Run explorer_blocks from the command line.

substreams run mantra-all@v0.3.1 explorer_blocks -e mantra-mainnet --start-block -1
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

A substreams package for MANTRA Chain blocks, transactions and events

Build and release package

Inherit all modules from mantra_common, plus all_transactions, which is a module that includes events and transaction body. If you need memo, messages, please use all_transactions.

Usage

substreams build
substreams auth
substreams gui       			  # Get streaming!
substreams registry login         # Login to substreams.dev
substreams registry publish       # Publish your Substreams to substreams.dev

Build protobuf bin file

Put protobuf files in proto folder (directory is defined in buf.work.yaml)

1. Install tools

brew install bufbuild/buf/buf

2. Download dependencies

# Install deps in proto module
buf dep update proto

3. Build protobuf bin file

buf build --as-file-descriptor-set -o generated-mantra-all-buf.binpb

4. Generate Rust structs from protobuf

substreams protogen substreams.yaml --exclude-paths sf/substreams,google

Develop

Add more streams

  1. Add a handler in src/lib.rs.
  2. Add the handler in substreams.yaml under modules section.

Sample codes: https://github.com/streamingfast/substreams-foundational-modules/blob/develop/cosmos-common/src/lib.rs

Create release for mantra-all spkg

  1. Update version in Cargo.toml and substreams.yaml
  2. Create a git tag

It's better to align the version number with the one in substreams.yaml

git tag v0.1.x
  1. Push the tag
git push origin v0.1.x

Modules

Execution graph

9 modules
map

all_events

`all_events` reads from the `sf.cosmos.type.v2.Block` source and outputs a list of all events in the block. Some events are at the block level, others appear inside the transactions.

Output

mantra.all.custom.v1.EventList

map

filtered_event_groups

Output

mantra.all.custom.v1.EventList

Inputs

map

filtered_event_groups_by_attribute_value

Output

mantra.all.custom.v1.EventList

Inputs

map

filtered_events

Output

mantra.all.custom.v1.EventList

Inputs

map

filtered_events_by_attribute_value

Output

mantra.all.custom.v1.EventList

Inputs

blockIndex

index_events

Output

sf.substreams.index.v1.Keys