All packages
solana-devnet-m0-orderbook

solana-devnet-m0-orderbook

jonalvarezz
v0.2.0/324K downloads/Repository

Package ref

solana-devnet-m0-orderbook@v0.2.0

Run package

CLI

Run map_svm_events from the command line.

substreams run solana-devnet-m0-orderbook@v0.2.0 map_svm_events -e solana-devnet --start-block -1
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

Substreams

Substreams is an indexer for the M0 OrderBook program on Solana.

https://docs.substreams.dev

Deploy substream

Each network has its own configuration file. See the justfile for deployment commands.

Example: Solana devnet

  1. Copy an existing configuration file and rename it to substreams-solana-devnet.yaml
  2. Update the package name field in the config to name: solana-devnet-orderbook
  3. Update the starting block initialBlock: 436247835
  4. Update the parameter field to the appropriate chain id to map_svm_events: "1399811150"
  5. Update the network field to network: solana-devnet
  6. Build and publish the spkg file with just build-and-publish solana-devnet
  7. Deploy an indexing service using the docker image specified in the justfile
  8. Set PACKAGE env variable to solana-devnet-orderbook-v0.1.1.spkg
  9. Test with just debug-gui solana-devnet 436247835 (next 10 blocks should have events)

Modules

Execution graph

4 modules
Show 3 dependencies
map

solana:v020:blocks_without_votes

`blocks_without_votes` allows you to consume a full Solana Block without Vote instructions (`Vote111111111111111111111111111111111111111`). If you consume it on HISTORICAL data (+1000 blocks from HEAD), you will be reading from the StreamingFast cache, thus saving costs on the amount of TB read.