Skip to content

Airstack-xyz/Substreams

Repository files navigation

Substreams

Repo contains all substreams build by airstack.

Steps to run the substream with substream cli

Prerequisite

Run a substream

  1. Generate rust code with protogen
substreams protogen ./substreams.yaml --exclude-paths="sf/ethereum,sf/substreams,google"
  1. Add target wasm32-unknown-unknown
rustup target add wasm32-unknown-unknown
  1. Build the project and install the rust dependencies
cargo build --target wasm32-unknown-unknown --release

If you face any authentication error on downloading dependencies, add below code to your ~/.gitconfig by using code . ~/.gitconfig

[url "https://github.com/rust-lang/crates.io-index"]
	insteadOf = https://github.com/rust-lang/crates.io-index
  1. Run the substream. Make sure to change module name & block number based on substream.
substreams run -e mainnet.eth.streamingfast.io:443 \
   substreams.yaml \
   map_transfers \
   --start-block 10000000 \
   --stop-block 20000000

Create a substream package (.spkg)

To create substream package, run substreams pack <path_to_substreams.yaml>

About

Repo contains all substreams build by airstack.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages