All packages
solana-orderbook

solana-orderbook

SC4RECOIN
v0.1.1/1.5K downloads/Repository

Package ref

solana-orderbook@v0.1.1

Run package

CLI

Run map_svm_events from the command line.

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

README

Substreams

Substreams is an indexer for onchain events when subgraphs aren't available.

https://docs.substreams.dev

Deploy subgraph

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

Example: Sepolia

  1. Copy an existing configuration file and rename it to substreams-sepolia.yaml
  2. Update the package name field in the config to name: sepolia-orderbook
  3. Update the starting block initialBlock: 10108380
  4. Update the parameter field to the appropriate chain id: map_evm_events: "11155111"
  5. Update the newtork field to network: sepolia
  6. Build and publish the spkg file with just build-and-publish-evm sepolia
  7. Deploy an indexing service using the docker image specified in the justfile
  8. Set PACKAGE env variable to sepolia-orderbook-v0.1.1.spkg

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.