Package Logo
solana-devnet-m0-orderbook
solana-devnet-m0-orderbook@v0.2.0
Total Downloads
4
Published
5 hours ago
Publisher
User Avatar jonalvarezz

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)

Documentation

Modules

Maps icon
Maps

map
map_svm_events

7219496abb71f2b24ef526e0609f44ea34b986e9
map map_svm_events (
paramsstring
solana:blocks_without_votessf.solana.type.v1.Block
)  -> substreams.v1.program.Data
Default param : 1399811150
substreams gui solana-devnet-m0-orderbook@v0.2.0 map_svm_events

map
solana:blocks_without_votes

0be93a73c65aa8ec2de4b1a47209edeea493ff29
map solana:blocks_without_votes (
)  -> sf.solana.type.v1.Block
substreams gui solana-devnet-m0-orderbook@v0.2.0 solana:blocks_without_votes

map
solana:v020:blocks_without_votes

0be93a73c65aa8ec2de4b1a47209edeea493ff29
map solana:v020:blocks_without_votes (
)  -> sf.solana.type.v1.Block

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.

substreams gui solana-devnet-m0-orderbook@v0.2.0 solana:v020:blocks_without_votes
Block Indexes icon
Block Indexes

blockIndex
solana:program_ids_without_votes

811466d12743a8b02be8ba6649cfa9a24aa1af62
substreams gui solana-devnet-m0-orderbook@v0.2.0 solana:program_ids_without_votes
Protobuf

Protobuf Docs Explorer

sf.solana.type.v1
substreams.v1.program
sol.instructions.v1
sol.transactions.v1
schema