To integrate the Sablier V2 subgraph or indexers into your own product, start from the official
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.
To contribute to the V2 subgraphs or deploy your own, head over to the GitHub
v2-subgraphs repository. Get started by reviewing the
To bootstrap a subgraph project, run the following commands. They will install the requisite dependencies and generate the code for a Sepolia deployment.
To deploy a new subgraph on Sepolia:
- Create a new item using The Graph's hosted network
- Add its name/endpoint under the
- Add your own Sablier V2 contract addresses in
- Make sure you're authenticated on your local machine
You can read more about how the The Graph works in their official docs.
To publish on the hosted service:
Authenticate with the hosted service credentials
graph auth --product hosted-service <ACCESS_TOKEN>
yarn deploy:<chain_name>to generate imports, configurations and deploy in the same script.