Package Logo
mantra_advanced
mantra_advanced@v1.0.0-rc1
Total Downloads
133
Published
1 weeks ago

Readme

A substreams package for MANTRA Chain blocks, transactions and events

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

Documentation

Modules

Maps icon
Maps

map
all_events

72f54a834c5abef65539f66648c21061154dc7b9
map all_events (
blocksf.cosmos.type.v2.Block
)  -> mantra.all.custom.v1.EventList

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.

substreams gui mantra-advanced@v1.0.0-rc1 all_events

map
all_detailed_blocks

364292f7306747e4f6ca4e7521b3fb1574a853d2
map all_detailed_blocks (
)  -> mantra.all.custom.DetailedBlock
substreams gui mantra-advanced@v1.0.0-rc1 all_detailed_blocks

map
explorer_blocks

b390aad583b3c93b42f384c5ab3cd46f28aaad0a
substreams gui mantra-advanced@v1.0.0-rc1 explorer_blocks

map
all_transactions

baa4df24a812bb9a8d103e5151d7037207510389
substreams gui mantra-advanced@v1.0.0-rc1 all_transactions

map
filtered_events

1e87cbfe9007a8c5a08719a31f55fd353131bec5
Default param : (type:message && attr:action) || (type:wasm && attr:_contract_address)
substreams gui mantra-advanced@v1.0.0-rc1 filtered_events

map
filtered_event_groups

17b4ee1773bde980bf51a38be736d5097cd41737
map filtered_event_groups (
paramsstring
)  -> mantra.all.custom.v1.EventList
Default param : type:wasm && attr:_contract_address
substreams gui mantra-advanced@v1.0.0-rc1 filtered_event_groups

map
filtered_events_by_attribute_value

d4c4f7d9b8da5a811ad8b80b0952f9533f0cdd23
map filtered_events_by_attribute_value (
paramsstring
)  -> mantra.all.custom.v1.EventList
Default param : type:wasm && attr:_contract_address:mantra
substreams gui mantra-advanced@v1.0.0-rc1 filtered_events_by_attribute_value

map
filtered_event_groups_by_attribute_value

f7ad026b9f8f7c999514abdc7273cbe4e2ca3d9d
map filtered_event_groups_by_attribute_value (
paramsstring
)  -> mantra.all.custom.v1.EventList
Default param : type:wasm && attr:_contract_address:mantra
substreams gui mantra-advanced@v1.0.0-rc1 filtered_event_groups_by_attribute_value
Block Indexes icon
Block Indexes

blockIndex
index_events

22c85430777b2585a75cd44e491d539b3949e87c
substreams gui mantra-advanced@v1.0.0-rc1 index_events
Protobuf

Protobuf Docs Explorer

cosmos.crisis.v1beta1
connect.marketmap.v2
cosmos.vesting.v1beta1
cosmos.feegrant.v1beta1
cosmos.tx.config.v1
osmosis.tokenfactory.v1beta1
ibc.lightclients.solomachine.v3
cosmos.msg.textual.v1
cosmos.slashing.v1beta1
cosmos.app.v1alpha1
cosmos.mint.v1beta1
cosmos.base.tendermint.v1beta1
ibc.lightclients.tendermint.v1
ibc.lightclients.solomachine.v2
cosmos.evm.erc20.v1
cosmos.crypto.keyring.v1
mantra.all.custom
osmosis.tokenfactory
cosmos.crypto.multisig.v1beta1
tendermint.abci
cosmos.gov.v1
cosmos.crypto.secp256r1
cosmos.store.v1beta1
tendermint.types
ibc.core.client.v1
cosmos.msg.v1
cosmos.crypto.secp256k1
cosmos.ics23.v1
cosmos.evm.vm.v1
cosmos.crypto.ed25519
cosmos.distribution.v1beta1
gogoproto
cosmwasm.wasm.v1
ibc.core.commitment.v1
tendermint.libs.bits
cosmos.bank.v1beta1
cosmos.tx.signing.v1beta1
cosmos.nft.v1beta1
connect.types.v2
cosmos_proto
mantrachain.sanction.v1
mantrachain.tax.v1
cosmos.circuit.v1
ibc.core.connection.v1
ibc.core.channel.v1
cosmos.crypto.multisig
tendermint.p2p
cosmos.group.v1
cosmos.evm.types.v1
connect.oracle.v2
cosmos.params.v1beta1
ibc.applications.transfer.v2
cosmos.staking.v1beta1
ibc.applications.interchain_accounts.host.v1
tendermint.version
cosmos.evidence.v1beta1
cosmos.store.streaming.abci
tendermint.crypto
sf.cosmos.type.v2
cosmos.evm.feemarket.v1
cosmos.upgrade.v1beta1
cosmos.crypto.hd.v1
cosmos.store.snapshots.v1
cosmos.tx.v1beta1
cosmos.base.abci.v1beta1
ibc.applications.transfer.v1
cosmos.consensus.v1
cosmos.gov.v1beta1
ibc.core.types.v1
ibc.applications.fee.v1
ibc.applications.interchain_accounts.controller.v1
ibc.lightclients.wasm.v1
cosmos.base.v1beta1
cosmos.auth.v1beta1
cosmos.authz.v1beta1
ratelimit.v1
feemarket.feemarket.v1
ibc.applications.interchain_accounts.v1
cosmos.store.internal.kv.v1beta1
mantrachain.xfeemarket.v1
amino