Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/airstack-xyz/substreams
Repo contains all substreams build by airstack.
https://github.com/airstack-xyz/substreams
Last synced: about 20 hours ago
JSON representation
Repo contains all substreams build by airstack.
- Host: GitHub
- URL: https://github.com/airstack-xyz/substreams
- Owner: Airstack-xyz
- License: apache-2.0
- Created: 2022-10-06T17:27:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T17:50:26.000Z (9 months ago)
- Last Synced: 2024-02-15T18:47:59.328Z (9 months ago)
- Language: Rust
- Size: 744 KB
- Stars: 5
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Substreams
Repo contains all substreams build by airstack.# Steps to run the substream with substream cli
## Prerequisite
- [Install the substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli
)- [Setup development env](https://substreams.streamingfast.io/developers-guide/installation-requirements)
- 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](https://substreams.streamingfast.io/reference-and-specs/authentication).
## Run a substream
1. Generate rust code with protogen
```
substreams protogen ./substreams.yaml --exclude-paths="sf/ethereum,sf/substreams,google"
```2. Add target wasm32-unknown-unknown
```
rustup target add wasm32-unknown-unknown
```3. 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
```4. 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 `