Substreams based GRT subgraph and substreams.
This project is a subgraph fed by substreams that allows you to obtain data for The Graph's token, GRT.
This subgraph makes available the following data:
- Total supply of GRT,
- GRT balances of addresses
Here is the graph of the modules of the substreams:
graph TD;
map_transfers[map: map_transfers];
sf.ethereum.type.v2.Block[source: sf.ethereum.type.v2.Block] --> map_transfers;
store_balances[store: store_balances];
map_transfers --> store_balances;
store_total_supply[store: store_total_supply];
map_transfers --> store_total_supply;
map_accounts[map: map_accounts];
store_balances -- deltas --> map_accounts;
map_block_total_supply_change[map: map_block_total_supply_change];
store_total_supply --> map_block_total_supply_change;
graph_out[map: graph_out];
map_transfers --> graph_out;
store_balances -- deltas --> graph_out;
store_total_supply -- deltas --> graph_out;
To build and run the substream,
- Install dependencies.
- Get authentication.
- Clone this repo
git clone https://github.com/sahra-karakoc/grt-substreams-subgraph.git
- Code gen with
substreams protogen ./substreams.yaml
- Build the substream with
cargo build --target wasm32-unknown-unknown --release
- Run the graph_out module with
substreams run -e mainnet.eth.streamingfast.io:443 \
substreams.yaml \
graph_out \
--start-block 11446769
We welcome and appreciate your contributions! Please see the Contributor Guide, Code Of Conduct and Security Notes for this repository.