Repo contains all substreams build by airstack.
-
You will need firehose node to run substream, or you can use firehose node provided by streaming fast team for development. Get a token to access firehose node.
- Generate rust code with protogen
substreams protogen ./substreams.yaml --exclude-paths="sf/ethereum,sf/substreams,google"
- Add target wasm32-unknown-unknown
rustup target add wasm32-unknown-unknown
- 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
- 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
To create substream package, run substreams pack <path_to_substreams.yaml>