Skip to content

Subgraphs for Sablier V2 token streaming protocol

Notifications You must be signed in to change notification settings

DZakh-forks/v2-subgraphs

 
 

Repository files navigation

Sablier Branding

Sablier V2 Subgraphs and Indexers

Sablier relies on specific dependencies to source data or manage off-chain flows. All of these are either public or fully open-source, so feel free to roam around and suggest improvements or optimizations where needed.

As an alternative to reading data from the contracts or listening to onchain events, we use a set of subgraphs and indexers. These act as a middleware between the chain and our interfaces and allow for caching, formatting and querying data.

For every The Graph subgraph you will find a dedicated Envio indexer that mirrors its functionality and can be used as a fallback or as a completely alternative query engine.

The Graph Subgraphs

Read more about The Graph here.

Sablier supports multiple chains for which we've deployed subgraphs at either the Hosted Network level or within the Decentralized Network (see Ethereum, Arbitrum or Polygon's endpoints).

Subgraph: Protocol

The Protocol subgraph watches over the core functionality of Sablier V2. It handles events such as Create Stream, Withdraw or Transfer.

Documentation and Endpoints.

Subgraph: Merkle (Airstreams)

The Merkle subgraph watches over the Merkle Lockup functionality from Sablier V2's periphery contracts. It handles events such as Create Campaign, Claim or Clawback. In the client interfaces it is used to track activity for Airstreams.

Documentation and Endpoints.


Envio Indexers

Read more about Envio here.

Important

When new addresses are added to an Envio indexer (through the shared package) run pnpm run setup or pnpm run dev to make sure the necessary files get generated.

Indexer: Protocol-Envio

The Protocol-Envio indexer watches over the core functionality of Sablier V2. It handles events such as Create Stream, Withdraw or Transfer.

Documentation and Endpoints.

Indexer: Merkle-Envio (Airstreams)

The Merkle-Envio subgraph watches over the Merkle Lockup functionality from Sablier V2's periphery contracts. It handles events such as Create Campaign, Claim or Clawback. In the client interfaces it is used to track activity for Airstreams.

Documentation and Endpoints.

Tip

To track new addresses see the constants folder. Pick the chain, append a new contract and run the codegen steps to make sure everything runs smoothly. To add a new chain, create a dedicated configuration and make sure to (1) add it in the envio bundles (2) add a deployment script for subgraphs.

Important

Some versions of Node may enforce the usage of corepack. Because this repository leverages both yarn (root and the-graph) and pnpm (envio) it may scream due to a missing packageManager exact entry for pnpm. If added, it will mess with Envio's hosted service. Therefore, we advise disabling corepack to avoid the warning. It looks like it's being deprecated anyway.

Version Trigger: [4]

About

Subgraphs for Sablier V2 token streaming protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.2%
  • JavaScript 11.1%
  • Mustache 1.8%
  • HTML 0.9%