Development
Integrating
To integrate the Sablier V2 subgraph into your own product, start from the official subgraph repository. We recommend using:
- GraphQL Code Generator to create types from your GraphQL fragments and queries
- TanStack Query to fetch results from the exposed endpoints.
Github - sablier-labs/v2-subgraphs: Sablier V2 SubgraphsGitHub
Contributing
To contribute to the V2 subgraphs or deploy your own, head over to the GitHub
v2-subgraphs
repository. Get started by reviewing the packages/core
directory.
To bootstrap a subgraph project, run the following commands. They will install the requisite dependencies and generate the code for a Sepolia deployment.
cd ./packages/core
yarn install
yarn setup:sepolia
To deploy a new subgraph on Sepolia:
- Create a new item using The Graph's hosted network
- Add its name/endpoint under the
deploy:sepolia
script inpackage.json
- Add your own Sablier V2 contract addresses in
./constants/chains/sepolia.ts
- Make sure you're authenticated on your local machine
- Run
yarn deploy:sepolia
You can read more about how the The Graph works in their official docs.