Aims to deliver analytics & historical data for StakeWise. Still a work in progress. Feel free to contribute!
The Graph exposes a GraphQL endpoint to query the events and entities within the StakeWise ecosystem.
Current subgraphs:
-
ethereum: Includes data about ETH2 validator registrations through the deposit contract and ETH1 blocks.
-
stakewise: Includes all the StakeWise contracts data.
-
uniswap-v3: Includes all the relevant data around Uniswap V3 liquidity pools for the pairs that include any of the sETH2, rETH2, SWISE tokens.
-
Install dependencies:
npm install
-
Prepare subgraphs for the network you want to deploy on (supports goerli and mainnet):
npm run prepare:mainnet
-
Generate types for the Typescript source code:
npm run codegen
-
Optionally, build the subgraph to check compile errors before deploying:
npm run build
-
Authenticate to the Graph API for deployment:
graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>
-
Deploy all the subgraphs or a specific one by navigating to
subgraphs/<subgraph_name>
and running:npm run deploy:mainnet
The documentation for all the graphQL object fields can be found by going to subgraphs/<subgraph_name>/schema.graphql
.