All packages

mantra_advanced

mantra-finance-bot
This is not the latest version — go to v1.1.17
v1.1.5/32 downloads/Repository

Package ref

mantra-advanced@v1.1.5

Run package

CLI

Run all_events from the command line.

substreams run mantra-advanced@v1.1.5 all_events -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 Cargo Tests

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-advanced-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-advanced 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

10 modules
map

filtered_event_groups

Output

sf.substreams.cosmos.v1.EventList

Inputs

map

filtered_event_groups_by_attribute_value

Output

sf.substreams.cosmos.v1.EventList

Inputs

map

filtered_events

Output

sf.substreams.cosmos.v1.EventList

Inputs

map

filtered_events_by_attribute_value

Output

sf.substreams.cosmos.v1.EventList

Inputs

Show 1 dependency
map

cosmos: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

sf.substreams.cosmos.v1.EventList