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.
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).
Subgraphs are configured using yarn
.
The Lockup subgraph watches over the core lockup functionality of Sablier. It handles events such as
Create Stream
, Withdraw
or Transfer
.
Documentation and Endpoints.
The Merkle subgraph watches over the Merkle Lockup functionality from Sablier'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.
The Flow subgraph watches over the core flow functionality of Sablier. It handles events such as Create Stream
,
Deposit
or Adjust
.
Documentation and Endpoints.
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.
Indexers are configured using pnpm
.
The Lockup-Envio indexer watches over the core lockup functionality of Sablier. It handles events such as
Create Stream
, Withdraw
or Transfer
.
Documentation and Endpoints.
The Merkle-Envio subgraph watches over the Merkle Lockup functionality from Sablier'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.
The ~Flow-Envio indexer watches over the core flow functionality of Sablier. It handles events such as
Create Stream
, Deposit
or Adjust
.
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: [11]