# Sablier Docs > Documentation and guides for Sablier This file contains all documentation content in a single document following the llmstxt.org standard. ## Overview This document provides an overview of the Sablier APIs, which consist of two main components: the GraphQL indexers and the Merkle API. These components are essential for accessing and managing data within the Sablier ecosystem. :::tip Ready to start building? Jump to the [Getting Started](/api/getting-started) section. ::: ## GraphQL Indexers The Sablier smart contracts do not inherently provide a structured way to access data. With multiple contract versions deployed on the blockchain, accessing data in a unified manner can be challenging. To address this, we integrated two data indexing services: The Graph and Envio. These services act as middleware, enabling data unification, caching, and querying through a GraphQL-based API. ### Source Code The source code for both The Graph and Envio is open-source and available in this GitHub repository: ### The Graph [The Graph](https://thegraph.com/) offers infrastructure for indexing EVM events through GraphQL API endpoints known as 'subgraphs'. It has been the vendor of choice in the EVM space since Sablier Legacy's launch in 2019. Our latest products use new implementations of these subgraphs, which are documented in subsequent sections. Note that each chain has its own subgraphs. - [The Graph docs: How to Query a Subgraph](https://thegraph.com/docs/en/subgraphs/querying/introduction/) - [Lockup indexers](/api/lockup/indexers#the-graph) - [Flow indexers](/api/lockup/indexers#the-graph) - [Airdrops indexers](/api/airdrops/indexers#the-graph) ### Envio [Envio](https://envio.dev) is a modern, fast, and flexible tool for accessing onchain data. Its HyperIndex service provides a GraphQL-based API for accessing cached data, which is then served to our client interfaces. Envio indexers mirror the GraphQL API of The Graph subgraphs, offering a fallback in case of issues with The Graph. Unlike The Graph, Envio's indexers are chain-agnostic, with a single GraphQL indexer for each Sablier protocol. - [Envio docs: Navigating Hasura](https://docs.envio.dev/docs/HyperIndex/navigating-hasura) - [Lockup indexers](/api/lockup/indexers#envio) - [Flow indexers](/api/lockup/indexers#envio) - [Airdrops indexers](/api/airdrops/indexers#envio) ## Merkle API For the [Airdrops](/apps/features/airdrops) product, we created a backend service to streamline Merkle tree generation, essential for creating blockchain airdrops. This API handles the validation, creation, and management of Merkle trees, defining eligibility and claiming rules for airdrop campaigns. The service is open-source and can be used by integrators as a plug-and-play solution for deploying their own campaigns. Learn more about the Merkle API service in its dedicated [section](/api/airdrops/merkle-api/overview). --- ## Getting Started This document will help you understand how to read data from the Sablier smart contracts, either by using GraphQL indexers or by calling the smart contracts directly. Each method has its own advantages and limitations, which we will explore in detail. ## Choosing Your Approach You have two options: 1. **GraphQL Indexers**: Recommended for most use cases due to ease of use and comprehensive data access. 2. **Direct Smart Contract Calls**: Offers a more decentralized approach but comes with limitations. ### GraphQL Indexers This is the preferred method for accessing Sablier data. The recommended stack includes: - **[React](https://react.dev)** - **[GraphQL Code Generator](https://the-guild.dev/graphql/codegen/docs/getting-started)**: Automatically generates types from your GraphQL fragments and queries. - **[TanStack Query](https://tanstack.com/query)**: React hooks to fetch data from the GraphQL endpoints. #### Advantages - Simplifies data access with a unified API. - Provides caching and data unification. - Easy integration with modern frontend frameworks. #### Considerations - Understanding the GraphQL schema may require some initial effort. #### Frontend Sandbox To help you get started quickly, we offer a pre-configured frontend sandbox with the recommended stack: ### Direct Smart Contract Calls This approach provides a more decentralized way to interact with the blockchain but has several limitations: - **Data Retrieval**: Cannot retrieve a list of all streams for a user directly. - **Historical Data**: Limited access to past events unless the app is set up to listen to web3 events via RPC. - **Pagination**: Not supported. ## Conclusion Choosing the right approach depends on your specific needs and the trade-offs you're willing to make. For most applications, using one of our GraphQL indexers will provide a more seamless and efficient experience. However, if decentralization is a priority, direct smart contract calls may be the way to go. For more detailed information, refer to the [Overview](/api/overview) document and explore the specific indexers available for the Sablier protocols: - [Lockup indexers](/api/lockup/indexers) - [Flow indexers](/api/lockup/indexers) - [Airdrops indexers](/api/airdrops/indexers) --- ## Identifiers ## Stream IDs ### Contracts Onchain, each Lockup and Flow contract assigns a [`streamId`](/reference/lockup/contracts/abstracts/abstract.SablierLockupState#nextstreamid) to each stream, which is the same as the ERC-721 [`tokenId`](https://docs.openzeppelin.com/contracts/5.x/api/token/erc721) (each stream is tokenized as an ERC-721). The `streamId`/ `tokenId` in the contract is a simple numerical value (a `uint256`). For example, number `42` is a valid `streamId`/ `tokenId`. You will always need this value when interacting with Sablier via a JSON-RPC endpoint because it is required by every contract method associated with a stream, e.g. [`streamedAmountOf`](/reference/lockup/contracts/interfaces/interface.ISablierLockup#streamedamountof). ### Indexers Offchain, in the GraphQL schema, we need to be able to identify streams across different EVM chains and different contract versions. Additionally, it would be nice to have short, easily readable aliases. Thus, we have come up with the following identifiers: | Identifier | Format | Example | | ------------ | --------------------------------------- | ---------------------------------------------------------------- | | Stream ID | `{contractAddress}-{chainId}-{tokenId}` | `0xe0bfe071da104e571298f8b6e0fce44c512c1ff4-137-21` | | Stream Alias | `{contractAlias}-{chainId}-{tokenId}` | `LK-137-21` | Both examples from the table above translate to: \*\*a stream on Polygon (chain ID `137`) created via the Lockup v2.0 contract at address `0xe0bfe071da104e571298f8b6e0fce44c512c1ff4`, with the token ID `21`. #### Contract Aliases Here's a table with the full list of contract aliases. | Alias | Contract Name | Release | | ----- | ------------------------------ | ------------- | | FL | SablierFlow | Flow v1.0 | | FL2 | SablierFlow | Flow v1.1 | | LD | SablierV2LockupDynamic | Lockup v1.0 | | LD2 | SablierV2LockupDynamic | Lockup v1.1 | | LD3 | SablierV2LockupDynamic | Lockup v1.2 | | LK | SablierLockup | Lockup v2.0 | | LL | SablierV2LockupLinear | Lockup v1.0 | | LL2 | SablierV2LockupLinear | Lockup v1.1 | | LL3 | SablierV2LockupLinear | Lockup v1.2 | | LT3 | SablierV2LockupTranched | Lockup v1.2 | | MSF2 | SablierV2MerkleStreamerFactory | Airdrops v1.1 | | MSF3 | SablierV2MerkleLockupFactory | Airdrops v1.2 | | MSF4 | SablierMerkleFactory | Airdrops v1.3 | ## Airdrop IDs ### Contracts Airdrops do not have any onchain IDs because every airdrop is a separate contract deployed by one of the Merkle Factory contracts. ### Indexers The ID for an airdrop is the chain ID concatenated with the contract address of the airdrop contract: | Identifier | Format | Example | | ---------- | ----------------------------- | ------------------------------------------------------------- | | Airdrop ID | `{contractAddress}-{chainId}` | `0xf50760d8ead9ff322631a1f3ebf26cc7891b3708-137` | The example from the table above translates to: **_an airdrop on Polygon (chain ID `137`), with the contract address `0xf50760d8ead9ff322631a1f3ebf26cc7891b3708`_**. :::info We have decided not to generate aliases for Airdrops, but this may change in the future. ::: --- ## Legacy # Sablier Legacy These are the indexers for the [legacy version](/apps/legacy) of Sablier (deployed between 2019-2021). Sablier Legacy is only indexed by The Graph. ## Source Code ## Endpoints In the table below, you will see three URLs: - `Production URL`: requires a Studio API key for making queries. - `Testing URL`: doesn't require an API key but it's rate-limited to 3000 queries per day. Opening this URL in the browser opens a GraphiQL playground. - `Explorer URL`: The explorer URL for the indexer, if available. To learn how to create a Studio API key, check out [this guide](https://thegraph.com/docs/en/studio/managing-api-keys). The API key has to be provided via an `Authorization: Bearer ` header. Here are two examples in curl and JavaScript: ```bash curl -X POST \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "{ _meta: { block { number } } }"' \ ``` ```js async function getBlockNumber() { const client = new GraphQLClient("", { headers: { Authorization: `Bearer `, }, }); const query = `query { _meta: { block { number } } }`; const result = await client.request(query); console.log(result); } ``` | Chain | Production URL | Testing URL | | --------- | ----------------------------------------- | ---------------------------- | | Avalanche | [sablier-avalanche][production-avalanche] | [Testing][testing-avalanche] | | Arbitrum | [sablier-arbitrum][production-arbitrum] | [Testing][testing-arbitrum] | | BSC | [sablier-bsc][production-bsc] | [Testing][testing-bsc] | | Ethereum | [sablier][production-ethereum] | [Testing][testing-ethereum] | | Optimism | [sablier-optimism][production-optimism] | [Testing][testing-optimism] | | Polygon | [sablier-matic][production-polygon] | [Testing][testing-polygon] | | Ronin | [sablier-ronin][production-ronin] | N/A | {/* Chain: Ethereum */} [production-ethereum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/DkSXWkgJD5qVqfsrfzkLC5WELVX3Dbj3ByWcYjDJieCh [testing-ethereum]: https://api.studio.thegraph.com/query/57079/sablier/version/latest/ {/* Chain: Arbitrum */} [production-arbitrum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/94SP9QVcxmGV9e2fxuTxUGcZfcv4tjpPCGyyPVyMfLP [testing-arbitrum]: https://api.studio.thegraph.com/query/57079/sablier-arbitrum/version/latest {/* Chain: Avalanche */} [production-avalanche]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/DK2gHCprwVaytwzwb5fUrkFS9xy7wh66NX6AFcDzMyF9 [testing-avalanche]: https://api.studio.thegraph.com/query/57079/sablier-avalanche/version/latest {/* Chain: BSC */} [production-bsc]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/3Gyy7of99oBRqHcCMGJXpHw2xxxZgXxVmFPFR1vL6YhT [testing-bsc]: https://api.studio.thegraph.com/query/57079/sablier-bsc/version/latest {/* Chain: OP Mainnet */} [production-optimism]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/BEnQbvBdXnohC1DpM9rSb47C1FbowK39HfPNCEHjgrBt [testing-optimism]: https://api.studio.thegraph.com/query/57079/sablier-optimism/version/latest {/* Chain: Ronin */} [production-ronin]: https://subgraph.satsuma-prod.com/d8d041c49d56/sablierlabs/sablier-ronin/api {/* Chain: Polygon */} [production-polygon]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/6UMNQfMeh3pV5Qmn2NDX2UKNeUk9kh4oZhzzzn5e8rSz [testing-polygon]: https://api.studio.thegraph.com/query/57079/sablier-matic/version/latest {/* Endpoints */} [^1]: --- ## GraphQLSchema ## Overview We provide auto-generated GraphQL schema documentation for both The Graph and Envio: - The Graph schema docs - Envio schema docs ## Query Syntax Differences | Feature | The Graph | Envio | | ------------ | -------------------------------------------------- | ------------------------------------------------------- | | Pagination | `first` | `limit` | | Pagination | `skip` | `offset` | | Get by ID | `stream(id: "...")` | `Stream_by_pk(id: "...")` | | Get multiple | `streams{}` | `Stream(where: {chainId: {_eq: ""}}){}` | | Nested items | `campaigns{ id, asset: {id, symbol}}` | `Campaign{ asset_id, asset: {id, symbol}}` | ## Entities This is the raw GraphQL file that is used by both The Graph and Envio for generating the final schemas hosted on their services. The schema only contains entities: {/* Add the code block */} --- ## Indexers # Sablier Airdrops This page documents the indexers for the [Sablier Airdrops](/concepts/airdrops) protocol, which powers the [Airdrops](/apps/features/airdrops) product in the Sablier Interface. :::info Vested airdrops will create a [Lockup](/concepts/lockup/overview) stream when a user makes a claim. ::: ## Envio ### Source Code ### Endpoints Envio is a multi-chain indexer. There's a single GraphQL API endpoint that aggregates data across chains. This approach differs from other vendors like The Graph, which require a separate indexer for each chain where Sablier is available. #### Table | Chain | Production URL | Playground URL | Explorer URL | | -------- | -------------- | ----------- | ------------ | | Abstract | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Arbitrum | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Avalanche | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Base | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Blast | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Berachain | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | BNB Chain | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Chiliz | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Form | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Gnosis | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | HyperEVM | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Lightlink | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Linea Mainnet | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Ethereum | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Mode | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Morph | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | OP Mainnet | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Polygon | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Sonic | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Scroll | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Sophon | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Superseed | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Tangle | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Unichain | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | XDC | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | ZKsync Era | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Base Sepolia | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | | Sepolia | https://indexer.hyperindex.xyz/508d217/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F508d217%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/merkle-envio) | ## The Graph ### Source Code ### Endpoints In the table below, you will see three URLs: - `Production URL`: requires a Studio API key for making queries. - `Testing URL`: doesn't require an API key but it's rate-limited to 3000 queries per day. Opening this URL in the browser opens a GraphiQL playground. - `Explorer URL`: The explorer URL for the indexer, if available. To learn how to create a Studio API key, check out [this guide](https://thegraph.com/docs/en/studio/managing-api-keys). The API key has to be provided via an `Authorization: Bearer ` header. Here are two examples in curl and JavaScript: ```bash curl -X POST \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "{ _meta: { block { number } } }"' \ ``` ```js async function getBlockNumber() { const client = new GraphQLClient("", { headers: { Authorization: `Bearer `, }, }); const query = `query { _meta: { block { number } } }`; const result = await client.request(query); console.log(result); } ``` | Chain | Production URL | Testing URL | Explorer URL | | -------- | -------------- | ----------- | ------------ | | Abstract | [sablier-airdrops-abstract](https://gateway.thegraph.com/api/subgraphs/id/DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-abstract/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx) | | Arbitrum | [sablier-airdrops-arbitrum](https://gateway.thegraph.com/api/subgraphs/id/HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-arbitrum/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr) | | Arbitrum Sepolia | [sablier-airdrops-arbitrum-sepolia](https://gateway.thegraph.com/api/subgraphs/id/3S7v3VkDq8XMBd8EFVhKur2Vk44xScaW8a4BRjoPuYWk) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-arbitrum-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/3S7v3VkDq8XMBd8EFVhKur2Vk44xScaW8a4BRjoPuYWk) | | Avalanche | [sablier-airdrops-avalanche](https://gateway.thegraph.com/api/subgraphs/id/CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-avalanche/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA) | | Base | [sablier-airdrops-base](https://gateway.thegraph.com/api/subgraphs/id/4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-base/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe) | | Base Sepolia | [sablier-airdrops-base-sepolia](https://gateway.thegraph.com/api/subgraphs/id/4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-base-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt) | | Berachain | [sablier-airdrops-berachain](https://gateway.thegraph.com/api/subgraphs/id/CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-berachain/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE) | | Blast | [sablier-airdrops-blast](https://gateway.thegraph.com/api/subgraphs/id/657bogqYaDSSeqsoJcJ1kRqGnc3jC15UmcVLzsYxyxKK) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-blast/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/657bogqYaDSSeqsoJcJ1kRqGnc3jC15UmcVLzsYxyxKK) | | BNB Chain | [sablier-airdrops-bsc](https://gateway.thegraph.com/api/subgraphs/id/FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-bsc/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL) | | Chiliz | [sablier-airdrops-chiliz](https://gateway.thegraph.com/api/subgraphs/id/6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-chiliz/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU) | | Ethereum | [sablier-airdrops-ethereum](https://gateway.thegraph.com/api/subgraphs/id/DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-ethereum/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs) | | Form | [sablier-airdrops-form](https://formapi.0xgraph.xyz/api/public/5961fb30-8fdc-45ad-9a35-555dd5e0dd56/subgraphs/sablier-airdrops-form/2.3_1.0.0/gn) | N/A | N/A | | Gnosis | [sablier-airdrops-gnosis](https://gateway.thegraph.com/api/subgraphs/id/kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-gnosis/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn) | | IoTeX | [sablier-airdrops-iotex](https://gateway.thegraph.com/api/subgraphs/id/G39uCzr1FDY7pBFe8DwShAxhMeC6dbZetutVg6wjtks3) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-iotex/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/G39uCzr1FDY7pBFe8DwShAxhMeC6dbZetutVg6wjtks3) | | Lightlink | [sablier-airdrops-lightlink](https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-airdrops-lightlink) | N/A | N/A | | Linea Mainnet | [sablier-airdrops-linea](https://gateway.thegraph.com/api/subgraphs/id/6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-linea/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN) | | Mode | [sablier-airdrops-mode](https://gateway.thegraph.com/api/subgraphs/id/HZMkVX5c2qf7BqbidwpcQMsHGWTDdEKwVjnwenzo9s6m) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-mode/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/HZMkVX5c2qf7BqbidwpcQMsHGWTDdEKwVjnwenzo9s6m) | | OP Mainnet | [sablier-airdrops-optimism](https://gateway.thegraph.com/api/subgraphs/id/CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-optimism/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7) | | OP Sepolia | [sablier-airdrops-optimism-sepolia](https://gateway.thegraph.com/api/subgraphs/id/3kp1eR2T1XpvvLkSZ7Wtt45DbDaiykTes478RZ7zwTz) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-optimism-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/3kp1eR2T1XpvvLkSZ7Wtt45DbDaiykTes478RZ7zwTz) | | Polygon | [sablier-airdrops-polygon](https://gateway.thegraph.com/api/subgraphs/id/FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-polygon/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE) | | Scroll | [sablier-airdrops-scroll](https://gateway.thegraph.com/api/subgraphs/id/Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-scroll/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9) | | Sei Network | [sablier-airdrops-sei](https://gateway.thegraph.com/api/subgraphs/id/HCxLCRqd5MorHXxmXFUBBcA71zTGXnn97Xk2uaBmStsy) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-sei/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/HCxLCRqd5MorHXxmXFUBBcA71zTGXnn97Xk2uaBmStsy) | | Sepolia | [sablier-airdrops-sepolia](https://gateway.thegraph.com/api/subgraphs/id/8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh) | | Sonic | [sablier-airdrops-sonic](https://gateway.thegraph.com/api/subgraphs/id/5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-sonic/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q) | | Unichain | [sablier-airdrops-unichain](https://gateway.thegraph.com/api/subgraphs/id/4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-unichain/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy) | | ZKsync Era | [sablier-airdrops-zksync](https://gateway.thegraph.com/api/subgraphs/id/64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-airdrops-zksync/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN) | --- ## Previous Indexers :::important The following indexers were deprecated on February 3, 2025, so they might return outdated data if queried now. Please use our latest endpoints to query up-to-date data for the Sablier Protocol. ::: | Chain | Explorer | Studio[^2] | Decentralized Network[^1] | | ---------------- | -------------------------------------------------------------- | ------------------------------------ | --------------------------------------- | | Ethereum | [sablier-v2-ms][explorer-ms-ethereum] | [Studio][studio-ms-ethereum] | [Network][network-ms-ethereum] | | Arbitrum | [sablier-v2-ms-arbitrum][explorer-ms-arbitrum] | [Studio][studio-ms-arbitrum] | [Network][network-ms-arbitrum] | | Arbitrum Sepolia | [sablier-v2-ms-arbitrum-sepolia][explorer-ms-arbitrum-sepolia] | [Studio][studio-ms-arbitrum-sepolia] | [Network][network-ms-arbitrum-sepolia] | | Avalanche | [sablier-v2-ms-avalanche][explorer-ms-avalanche] | [Studio][studio-ms-avalanche] | [Network][network-ms-avalanche] | | Base | [sablier-v2-ms-base][explorer-ms-base] | [Studio][studio-ms-base] | [Network][network-ms-base] | | Blast | [sablier-v2-ms-blast][explorer-ms-blast] | [Studio][studio-ms-blast] | [Network][network-ms-blast] | | BNB Chain | [sablier-v2-ms-bsc][explorer-ms-bsc] | [Studio][studio-ms-bsc] | [Network][network-ms-bsc] | | Chiliz Chain | [sablier-v2-ms-chiliz][explorer-ms-chiliz] | [Studio][studio-ms-chiliz] | [Network][network-ms-chiliz] | | Ethereum Sepolia | [sablier-v2-ms-sepolia][explorer-ms-sepolia] | [Studio][studio-ms-sepolia] | [Network][network-ms-sepolia] | | Gnosis | [sablier-v2-ms-gnosis][explorer-ms-gnosis] | [Studio][studio-ms-gnosis] | [Network][network-ms-gnosis] | | Lightlink | [sablier-v2-ms-lightlink\*][explorer-ms-lightlink] | N/A | [Lightlink Node\*][custom-ms-lightlink] | | Optimism | [sablier-v2-ms-optimism][explorer-ms-optimism] | [Studio][studio-ms-optimism] | [Network][network-ms-optimism] | | Optimism Sepolia | [sablier-v2-ms-optimism-sepolia][explorer-ms-optimism-sepolia] | [Studio][studio-ms-optimism-sepolia] | [Network][network-ms-optimism-sepolia] | | Polygon | [sablier-v2-ms-polygon][explorer-ms-polygon] | [Studio][studio-ms-polygon] | [Network][network-ms-polygon] | | Scroll | [sablier-v2-ms-scroll][explorer-ms-scroll] | [Studio][studio-ms-scroll] | [Network][network-ms-scroll] | | zkSync | [sablier-v2-ms-zksync][explorer-ms-zksync] | [Studio][studio-ms-zksync] | [Network][network-ms-zksync] | {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* Chain: Arbitrum */} [network-ms-arbitrum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/CPCMKbUFEM8CzVbfic1y34qKbTrKADX9Du9QxsAMAwqU [explorer-ms-arbitrum]: https://thegraph.com/explorer/subgraphs/CPCMKbUFEM8CzVbfic1y34qKbTrKADX9Du9QxsAMAwqU [studio-ms-arbitrum]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-arbitrum/version/latest {/* Chain: Arbitrum Sepolia */} [network-ms-arbitrum-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/BBJgy9RANbViGedeWTrVpH2bwm22E3niEzWcqHPMGtna [explorer-ms-arbitrum-sepolia]: https://thegraph.com/explorer/subgraphs/BBJgy9RANbViGedeWTrVpH2bwm22E3niEzWcqHPMGtna [studio-ms-arbitrum-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-arbitrum-sepolia/version/latest {/* Chain: Avalanche */} [network-ms-avalanche]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/2beDuAvmwbyFzJ95HAwfqNjnYT6nEnzbEfSNhfWGMyhJ [explorer-ms-avalanche]: https://thegraph.com/explorer/subgraphs/2beDuAvmwbyFzJ95HAwfqNjnYT6nEnzbEfSNhfWGMyhJ [studio-ms-avalanche]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-avalanche/version/latest {/* Chain: Base */} [network-ms-base]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/DrfN5cbvcCmpQUSc5RE9T1UxtcnMREi1Rd2PgLzDZCo3 [explorer-ms-base]: https://thegraph.com/explorer/subgraphs/DrfN5cbvcCmpQUSc5RE9T1UxtcnMREi1Rd2PgLzDZCo3 [studio-ms-base]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-base/version/latest {/* Chain: Blast */} [network-ms-blast]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/HVqkPvCRAvbxjx6YVmkk6w6rHPrqqtiymcGiQiMKPw8f [explorer-ms-blast]: https://thegraph.com/explorer/subgraphs/HVqkPvCRAvbxjx6YVmkk6w6rHPrqqtiymcGiQiMKPw8f [studio-ms-blast]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-blast/version/latest {/* Chain: BSC */} [network-ms-bsc]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/8uU9qAw9fSzdjqebymGRXWCjtZ5DQCmUA6QzRA14ARpz [explorer-ms-bsc]: https://thegraph.com/explorer/subgraphs/8uU9qAw9fSzdjqebymGRXWCjtZ5DQCmUA6QzRA14ARpz [studio-ms-bsc]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-bsc/version/latest {/* Chain: Chiliz */} [network-ms-chiliz]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/DdhRyXwhvEmKyioCk41m6Xu9fyaprsnp4gMWZ3bHYZJd [explorer-ms-chiliz]: https://thegraph.com/explorer/subgraphs/DdhRyXwhvEmKyioCk41m6Xu9fyaprsnp4gMWZ3bHYZJd [studio-ms-chiliz]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-chiliz/version/latest {/* Chain: Ethereum Sepolia */} [network-ms-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/8UVeHt7rHA27XZhViugaW4nStiN332dHTDWVTNBLCqPc [explorer-ms-sepolia]: https://thegraph.com/explorer/subgraphs/8UVeHt7rHA27XZhViugaW4nStiN332dHTDWVTNBLCqPc [studio-ms-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-sepolia/version/latest {/* Chain: Gnosis */} [network-ms-gnosis]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/FViBHgu2TtaZZXspDBzACjuPYKtqVDysmH35pk3W3zJJ [explorer-ms-gnosis]: https://thegraph.com/explorer/subgraphs/FViBHgu2TtaZZXspDBzACjuPYKtqVDysmH35pk3W3zJJ [studio-ms-gnosis]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-gnosis/version/latest {/* Chain: Lightlink */} [explorer-ms-lightlink]: https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-v2-ms-lightlink/graphql [custom-ms-lightlink]: https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-v2-ms-lightlink {/* Chain: Mainnet | Ethereum */} [explorer-ms-ethereum]: https://thegraph.com/explorer/subgraphs/FigCYTmdPtXbf4tgNiy5ZrtnYefz92hsMcwM4f9N5ZeZ [studio-ms-ethereum]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms/version/latest [network-ms-ethereum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/FigCYTmdPtXbf4tgNiy5ZrtnYefz92hsMcwM4f9N5ZeZ {/* Chain: Optimism */} [network-ms-optimism]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/7iSmF69W4mQqtx6EfWXXn5s27Hrdh72etsPKVC9iE62U [explorer-ms-optimism]: https://thegraph.com/explorer/subgraphs/7iSmF69W4mQqtx6EfWXXn5s27Hrdh72etsPKVC9iE62U [studio-ms-optimism]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-optimism/version/latest {/* Chain: Optimism Sepolia */} [network-ms-optimism-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/CG5QddHKoABuN6KHZHYTHL7upg2iPTMYxi35Ey7jspkX [explorer-ms-optimism-sepolia]: https://thegraph.com/explorer/subgraphs/CG5QddHKoABuN6KHZHYTHL7upg2iPTMYxi35Ey7jspkX [studio-ms-optimism-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-optimism-sepolia/version/latest {/* Chain: Polygon */} [network-ms-polygon]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/4r2pC3iyLbzytNa5phat3SWdMEyXG8fmnf1K89D7zP2G [explorer-ms-polygon]: https://thegraph.com/explorer/subgraphs/4r2pC3iyLbzytNa5phat3SWdMEyXG8fmnf1K89D7zP2G [studio-ms-polygon]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-polygon/version/latest {/* Chain: Scroll */} [network-ms-scroll]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/F1QnrgBpsVKtiVzkLisEC2PDo6cjzLoAy5HhPdFRdjW [explorer-ms-scroll]: https://thegraph.com/explorer/subgraphs/F1QnrgBpsVKtiVzkLisEC2PDo6cjzLoAy5HhPdFRdjW [studio-ms-scroll]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-scroll/version/latest {/* Chain: zkSync */} [network-ms-zksync]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/BboiKY7JCdznoqurdXRizL9UYD1YdQKajaj4gvUrPPEA [explorer-ms-zksync]: https://thegraph.com/explorer/subgraphs/BboiKY7JCdznoqurdXRizL9UYD1YdQKajaj4gvUrPPEA [studio-ms-zksync]: https://api.studio.thegraph.com/query/57079/sablier-v2-ms-zksync/version/latest {/* --------------------------------------------------------------------------------------------------------------------------------- */} [endpoint-merkle]: https://indexer.hyperindex.xyz/508d217/v1/graphql {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} --- ## Schema ## Overview We provide auto-generated GraphQL schema documentation for both The Graph and Envio: - The Graph schema docs - Envio schema docs ## Query Syntax Differences | Feature | The Graph | Envio | | ------------ | -------------------------------------------------- | ------------------------------------------------------- | | Pagination | `first` | `limit` | | Pagination | `skip` | `offset` | | Get by ID | `stream(id: "...")` | `Stream_by_pk(id: "...")` | | Get multiple | `streams{}` | `Stream(where: {chainId: {_eq: ""}}){}` | | Nested items | `campaigns{ id, asset: {id, symbol}}` | `Campaign{ asset_id, asset: {id, symbol}}` | ## Entities This is the raw GraphQL file that is used by both The Graph and Envio for generating the final schemas hosted on their services. The schema only contains entities: {/* Add the code block */} ```graphql reference title="Sablier Airdrops - GraphQL Schema Entities" https://github.com/sablier-labs/indexers/blob/main/src/schemas/airdrops.graphql ``` --- ## Overview(Envio) This documentation has been automatically generated from the GraphQL schema, with [GraphQL-Markdown](https://graphql-markdown.github.io). --- ## Overview(The-graph) This documentation has been automatically generated from the GraphQL schema, with [GraphQL-Markdown](https://graphql-markdown.github.io). --- ## Overview(Merkle-api) Sablier Airdrops use pre-configured Merkle trees, a data structure that efficiently stores recipient lists and their individual claim details. ## General data flow Merkle trees enable minimal onchain storage while maintaining cryptographic proof of eligibility. The system stores only the tree's root hash in the deployed Airstream contract, while the complete tree and recipient list reside in IPFS. Operations like eligibility checks or claim detail requests follow this process: 1. Read data from the IPFS file 2. Generate Merkle proofs from the tree 3. Interact with the contract using the obtained data ## Open-source solution We've built a Rust backend service that provides REST API access to Merkle tree functionality. This service handles tree creation, storage, and data retrieval for both the Sablier Interface and third-party applications. ## Integrations Integrate this API by forking the repository to run your own instance. We actively improve and optimize this service, so submit suggestions or issues directly on GitHub. :::tip If you want to integrate the eligibility/claim functionality in your, you have the following options: 1. Self Host the above api 2. Reach out for a more powerful backend we can host for you 3. Reach out for a custom script to pre-generate proofs and save them wherever it suits you ::: --- ## Functionality ## Architecture The backend is written in Rust and can run locally or in self-hosted environments using [`warp`](https://github.com/seanmonstar/warp), as well as on Vercel with its [`rust runtime`](https://github.com/vercel-community/rust). You can integrate the backend functionality using our official endpoints (below), but we recommend self-hosting for improved reliability. This allows you to fork the repository and provide your own IPFS and Pinata access keys. Feel free to reach out for guidance or feedback. The official endpoints are documented in the [Airdrops Indexers](/api/airdrops/indexers) section. ## Create: `/api/create` Call this route to create a new Merkle airdrop campaign. ### Prerequisites Before creating a campaign, you'll need: - The `decimals` of the token you're basing the campaign on - A CSV file containing `[address, amount]` pairs for every campaign recipient Download a template CSV file from the link below or preview it [here](https://github.com/sablier-labs/sablier-labs.github.io/blob/1933e3b5176c93b236d9a483683dad3a282cc39a/templates/airstream-template.csv). :::tip The CSV contains a header row, followed by address and amount pairs. Amounts should be in human-readable form—the API handles decimal padding automatically. ::: ### Description | | | | :--------------- | ------------------------------------------------------------------------------------------------------------------------ | | **Endpoint** | `/api/create` | | **Method** | `POST` | | **Query Params** | `{decimals: number}` | | **Body** | `FormData` on `{data: File}` | | **Response** | See in [Rust](https://github.com/sablier-labs/merkle-api/blob/main/src/data_objects/response.rs#L22) Overview TS (below) | ```typescript type Response = { /** IPFS content identifier for the uploaded file */ cid: string; /** Expected number of recipients */ recipients: string; /** HEX root of the Merkle tree */ root: string; /** Humanized status */ status: string; /** Expected amount of assets required by the campaign */ total: string; }; ``` ### Functionality The `/api/create` route performs the following actions: **1. Validation and processing** - Validates the CSV file and its contents - Adds decimal padding to every amount - Builds the Merkle tree and generates a root hash - Computes intermediary data (total expected amount, number of recipients) - Prepares an object containing the list, tree, and computed data **2. Upload to IPFS** - Uploads the object as a JSON file to IPFS - Retrieves the IPFS CID (unique identifier of the uploaded file) **3. Return data to client** - Returns the root hash, IPFS CID, and intermediary data to the client - The client uses this data to call the factory and deploy a new campaign ### Code For implementation details, check out the source code: --- ## Eligibility: `/api/eligibility` Call this route to check if a recipient is eligible to claim a stream from the Merkle airdrop campaign. ### Prerequisites To check eligibility for an address, you'll need: - The recipient's address - The CID of the IPFS file (see the [create](/api/airdrops/merkle-api/functionality#create-apicreate) flow above) linked to the campaign For obtaining the CID, see options in the [Common flows](/api/airdrops/merkle-api/examples#get-a-campaigns-cid) page. ### Description | | | | :--------------- | ------------------------------------------------------------------------------------------------------------------------ | | **Endpoint** | `/api/eligibility` | | **Method** | `GET` | | **Query Params** | `{address: string, cid: string}` | | **Response** | See in [Rust](https://github.com/sablier-labs/merkle-api/blob/main/src/data_objects/response.rs#L32) Overview TS (below) | ```typescript type Response = { /** Address of the requested recipient */ address: IAddress; /** Amount the recipient is eligible for */ amount: string; /** Position of the recipient in the list */ index: 0; /** Merkle proof */ proof: string[]; }; ``` ### Functionality The `/api/eligibility` route performs the following actions: 1. Retrieves the campaign's IPFS file and extracts the recipient list and Merkle tree 2. Searches for the provided wallet address ### Code For implementation details, check out the source code: --- ## Validity: `/api/validity` Call this route to check if an IPFS CID links to a valid Merkle airdrop campaign file. Since users may accidentally provide invalid IPFS CIDs, we use this route to perform sanity checks before allowing admins to create campaigns in the UI. ### Prerequisites To check validity, you'll need: - The CID of the IPFS file linked to the campaign For obtaining the CID, see options in the [Common flows](/api/airdrops/merkle-api/examples#get-a-campaigns-cid) page. ### Description | | | | :--------------- | ------------------------------------------------------------------------------------------------------------------------ | | **Endpoint** | `/api/validity` | | **Method** | `GET` | | **Query Params** | `{cid: string}` | | **Response** | See in [Rust](https://github.com/sablier-labs/merkle-api/blob/main/src/data_objects/response.rs#L41) Overview TS (below) | ```typescript type Response = { /** IPFS content identifier for the uploaded file */ cid: string; /** Expected number of recipients */ recipients: string; /** HEX root of the Merkle tree */ root: string; /** Expected amount of assets required by the campaign */ total: string; }; ``` ### Functionality The `/api/validity` route performs the following actions: 1. Retrieves the campaign's IPFS file 2. Runs sanity checks on the file contents ### Code For implementation details, check out the source code: --- ## Examples # Examples of common flows Here are common architectural flows you may need to integrate into your application. These include methods to gather prerequisite data for each backend [functionality](/api/airdrops/merkle-api/functionality) described earlier. ## Get a campaign's CID To obtain a campaign's IPFS CID, you can: Check the [create](/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleInstant#events) events emitted by the Merkle factory Use the Sablier [indexers](/api/overview) to query for that information. For approach "B", run the following query against the official endpoints: ```graphql query getCampaignData($campaignId: String!){ campaign(id: $campaignId){ id lockup root //highlight-start ipfsCID //highlight-end aggregateAmount totalRecipients } } ``` ```graphql query getCampaignData($campaignId: String!){ Campaign(where: {id: {_eq: $campaignId}} ){ id lockup root //highlight-start ipfsCID //highlight-end aggregateAmount totalRecipients } } ``` ## Check eligibility for an address To check if an address is eligible, use the [/api/eligibility](functionality#eligibility-apieligibility) route provided by the merkle-api backend. #### Steps 1. Get the campaign CID (see [the example](examples#get-a-campaigns-cid) above) 2. Call the `/api/eligibility` route using the CID and wallet address Read more in the dedicated route documentation within the [/api/eligibility](functionality#eligibility-apieligibility) section of the functionality page. Alternatively, you can check eligibility by searching for the address in the list stored within the IPFS file from step 1. You'll still need to download the file first using its CID. ## Get the `tokenId` after a claim After someone claims, you may want to show them a preview of the stream or its NFT. To do this, you'll need the `tokenId` (or `streamId`) related to that user's claim. To obtain a `tokenId` linked to a claim, you can: Listen to the [claim](/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL#claim) method and the Claim event emitted by the Merkle contract instance Use the [Sablier Indexers](/api/overview) to query for that information. For approach "B", run the following query against the official endpoints (ensure the address is lowercase): ```graphql query getClaimForRecipient($campaignId: String!, $recipient: String) { actions(where: { campaign: $campaignId, category: Claim, claimRecipient: $recipient }) { campaign { id lockup } claimTokenId claimRecipient claimIndex } } ``` ```graphql query getClaimForRecipient($campaignId: String!, $recipient: String) { Action( where: { _and: [{ campaign: { _eq: $campaignId } }, { category: { _eq: Claim } }, { claimRecipient: { _eq: $recipient } }] } ) { campaignObject { id lockup } claimTokenId claimRecipient claimIndex } } ``` #### Bonus: Stream NFT To get the Stream NFT, use the same query as option "B" to retrieve the `lockup` contract (where the Stream NFT is issued) and its `tokenId`. With these, you can call the [`tokenURI`](/reference/lockup/contracts/contract.LockupNFTDescriptor#tokenuri) method, which returns the SVG code of the onchain NFT. :::note Extract the SVG tags The actual SVG tags are encoded inside the `tokenURI` method response. You can feed this blob to an HTML `img` tag or render the SVG tags directly. To extract this code in plain format (not `base64`), run the following JavaScript code to decode the response: ```typescript const toPart = output.split("data:application/json;base64,").pop(); const toString = Buffer.from(toPart || "", "base64").toString("utf-8"); const toJSON = JSON.parse(toString); const blob = _.get(toJSON, "image")?.split("data:image/svg+xml;base64,")[1]; const toSVG = Buffer.from(blob || "", "base64").toString("utf-8"); ``` ::: ## Check if a user claimed their stream To check if a user has already claimed their stream from a campaign, you can: Call the [`hasClaimed`](/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase#hasclaimed) method from the Merkle contract instance Use the [Sablier Indexers](/api/overview) to query for that information. #### Approach A For approach "A", perform the following actions: 1. Get the campaign's CID, Lockup contract address, and user address (for the first items, see the [Get a campaign's CID](/api/airdrops/merkle-api/examples#get-a-campaigns-cid) example above) 2. Check user eligibility (see [Eligibility](/api/airdrops/merkle-api/examples#check-eligibility-for-an-address) example above) and extract their `index` 3. Call the `hasClaimed` method inside the `lockup` contract using the `index` from step 2 :::note A user's index represents their assigned order number in the eligibility list. We use this value to generate a proof if the recipient is eligible and to register their claim directly in the contract. ::: #### Approach B For approach "B", run the same query as in the [Get the tokenId after a claim](/api/airdrops/merkle-api/examples#get-the-tokenid-after-a-claim) example. If the query returns results, the user has claimed their stream. :::tip A missing claim could also mean the user wasn't eligible initially. We recommend checking for eligibility alongside any existing claim checks. ::: --- ## Indexers(Flow) # Sablier Flow This page documents the indexers for the [Sablier Flow](/concepts/flow/overview) protocol, which powers the [Payments](/apps/features/payments) product in the Sablier Interfaces. ## Envio ### Source Code ### Endpoints Envio is a multi-chain indexer. There's a single GraphQL API endpoint that aggregates data across chains. This approach differs from other vendors like The Graph, which require a separate indexer for each chain where Sablier is available. | Chain | Production URL | Playground URL | Explorer URL | | -------- | -------------- | ----------- | ------------ | | Abstract | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Arbitrum | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Avalanche | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Base | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Blast | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Berachain | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | BNB Chain | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Chiliz | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Form | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Gnosis | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | HyperEVM | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Lightlink | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Linea Mainnet | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Ethereum | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Mode | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Morph | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | OP Mainnet | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Polygon | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Sonic | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Scroll | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Sophon | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Superseed | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Tangle | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Unichain | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | XDC | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | ZKsync Era | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Base Sepolia | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | | Sepolia | https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F3b4ea6b%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/flow-envio) | ## The Graph ### Source Code ### Endpoints In the table below, you will see three URLs: - `Production URL`: requires a Studio API key for making queries. - `Testing URL`: doesn't require an API key but it's rate-limited to 3000 queries per day. Opening this URL in the browser opens a GraphiQL playground. - `Explorer URL`: The explorer URL for the indexer, if available. To learn how to create a Studio API key, check out [this guide](https://thegraph.com/docs/en/studio/managing-api-keys). The API key has to be provided via an `Authorization: Bearer ` header. Here are two examples in curl and JavaScript: ```bash curl -X POST \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "{ _meta: { block { number } } }"' \ ``` ```js async function getBlockNumber() { const client = new GraphQLClient("", { headers: { Authorization: `Bearer `, }, }); const query = `query { _meta: { block { number } } }`; const result = await client.request(query); console.log(result); } ``` | Chain | Production URL | Testing URL | Explorer URL | | -------- | -------------- | ----------- | ------------ | | Abstract | [sablier-flow-abstract](https://gateway.thegraph.com/api/subgraphs/id/Gq3e1gihMoSynURwGXQnPoKGVZzdsyomdrMH934vQHuG) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-abstract/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/Gq3e1gihMoSynURwGXQnPoKGVZzdsyomdrMH934vQHuG) | | Arbitrum | [sablier-flow-arbitrum](https://gateway.thegraph.com/api/subgraphs/id/C3kBBUVtW2rxqGpAgSgEuSaT49izkH6Q8UibRt7XFTyW) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-arbitrum/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/C3kBBUVtW2rxqGpAgSgEuSaT49izkH6Q8UibRt7XFTyW) | | Arbitrum Sepolia | [sablier-flow-arbitrum-sepolia](https://gateway.thegraph.com/api/subgraphs/id/2uWnxpYiDMkEMu1urxqt925mLfuax9XbvfcBoD97AU6d) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-arbitrum-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/2uWnxpYiDMkEMu1urxqt925mLfuax9XbvfcBoD97AU6d) | | Avalanche | [sablier-flow-avalanche](https://gateway.thegraph.com/api/subgraphs/id/6PAizjTALVqLLB7Ycq6XnpTeck8Z8QUpDFnVznMnisUh) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-avalanche/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/6PAizjTALVqLLB7Ycq6XnpTeck8Z8QUpDFnVznMnisUh) | | Base | [sablier-flow-base](https://gateway.thegraph.com/api/subgraphs/id/4XSxXh8ZgkzaA35nrbQG9Ry3FYz3ZFD8QBdWwVg5pF9W) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-base/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/4XSxXh8ZgkzaA35nrbQG9Ry3FYz3ZFD8QBdWwVg5pF9W) | | Base Sepolia | [sablier-flow-base-sepolia](https://gateway.thegraph.com/api/subgraphs/id/AsnKT1waQMvuQxZAqfFuYwtRtAfN8uekDu75jPttfyLh) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-base-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/AsnKT1waQMvuQxZAqfFuYwtRtAfN8uekDu75jPttfyLh) | | Berachain | [sablier-flow-berachain](https://gateway.thegraph.com/api/subgraphs/id/J87eaBLfTe7kKWgUGqe5TxntNCzA4pyWmqJowMddehuh) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-berachain/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/J87eaBLfTe7kKWgUGqe5TxntNCzA4pyWmqJowMddehuh) | | Blast | [sablier-flow-blast](https://gateway.thegraph.com/api/subgraphs/id/8joiC9LpUbSV6eGRr3RWXDArM8p9Q65FKiFekAakkyia) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-blast/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/8joiC9LpUbSV6eGRr3RWXDArM8p9Q65FKiFekAakkyia) | | BNB Chain | [sablier-flow-bsc](https://gateway.thegraph.com/api/subgraphs/id/2vU8KF4yWh3vvFjtg7MrRXMnYF3hPX2T3cvVBdaiXhNb) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-bsc/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/2vU8KF4yWh3vvFjtg7MrRXMnYF3hPX2T3cvVBdaiXhNb) | | Chiliz | [sablier-flow-chiliz](https://gateway.thegraph.com/api/subgraphs/id/7QX7tJsANNFpxFLLjqzmXRzfY1wPGp3Lty5xGbhgADa6) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-chiliz/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/7QX7tJsANNFpxFLLjqzmXRzfY1wPGp3Lty5xGbhgADa6) | | Ethereum | [sablier-flow-ethereum](https://gateway.thegraph.com/api/subgraphs/id/ECxBJhKceBGaVvK6vqmK3VQAncKwPeAQutEb8TeiUiod) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-ethereum/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/ECxBJhKceBGaVvK6vqmK3VQAncKwPeAQutEb8TeiUiod) | | Form | [sablier-flow-form](https://formapi.0xgraph.xyz/api/public/5961fb30-8fdc-45ad-9a35-555dd5e0dd56/subgraphs/sablier-flow-form/2.3_1.0.0/gn) | N/A | N/A | | Gnosis | [sablier-flow-gnosis](https://gateway.thegraph.com/api/subgraphs/id/4KiJ53cTNKdFWPBPmDNQ55tYj8hn1WQg8R4UcTY2STLL) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-gnosis/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/4KiJ53cTNKdFWPBPmDNQ55tYj8hn1WQg8R4UcTY2STLL) | | IoTeX | [sablier-flow-iotex](https://gateway.thegraph.com/api/subgraphs/id/6No3QmRiC8HXLEerDFoBpF47jUPRjhntmv28HHEMxcA2) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-iotex/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/6No3QmRiC8HXLEerDFoBpF47jUPRjhntmv28HHEMxcA2) | | Lightlink | [sablier-flow-lightlink](https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-flow-lightlink) | N/A | N/A | | Linea Mainnet | [sablier-flow-linea](https://gateway.thegraph.com/api/subgraphs/id/DV9XgcCCPKzUn6pgetg4yPetpW2fNoRKBUQC43aNeLG6) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-linea/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/DV9XgcCCPKzUn6pgetg4yPetpW2fNoRKBUQC43aNeLG6) | | Mode | [sablier-flow-mode](https://gateway.thegraph.com/api/subgraphs/id/9TwfoUZoxYUyxzDgspCPyxW6uMUKetWQDaTGsZjY1qJZ) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-mode/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/9TwfoUZoxYUyxzDgspCPyxW6uMUKetWQDaTGsZjY1qJZ) | | OP Mainnet | [sablier-flow-optimism](https://gateway.thegraph.com/api/subgraphs/id/AygPgsehNGSB4K7DYYtvBPhTpEiU4dCu3nt95bh9FhRf) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-optimism/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/AygPgsehNGSB4K7DYYtvBPhTpEiU4dCu3nt95bh9FhRf) | | OP Sepolia | [sablier-flow-optimism-sepolia](https://gateway.thegraph.com/api/subgraphs/id/EFKqBB6TeH6etGuHCffnbMbETEgDZ6U29Lgpc4gpYvdB) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-optimism-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/EFKqBB6TeH6etGuHCffnbMbETEgDZ6U29Lgpc4gpYvdB) | | Polygon | [sablier-flow-polygon](https://gateway.thegraph.com/api/subgraphs/id/ykp38sLarwz3cpmjSSPqo7UuTjYtkZ1KiL4PM2qwmT8) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-polygon/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/ykp38sLarwz3cpmjSSPqo7UuTjYtkZ1KiL4PM2qwmT8) | | Scroll | [sablier-flow-scroll](https://gateway.thegraph.com/api/subgraphs/id/HFpTrPzJyrHKWZ9ebb4VFRQSxRwpepyfz5wd138daFkF) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-scroll/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/HFpTrPzJyrHKWZ9ebb4VFRQSxRwpepyfz5wd138daFkF) | | Sei Network | [sablier-flow-sei](https://gateway.thegraph.com/api/subgraphs/id/41ZGYcFgL2N7L5ng78S4sD6NHDNYEYcNFxnz4T8Zh3iU) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-sei/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/41ZGYcFgL2N7L5ng78S4sD6NHDNYEYcNFxnz4T8Zh3iU) | | Sepolia | [sablier-flow-sepolia](https://gateway.thegraph.com/api/subgraphs/id/EU9AWmJjrjMRkjxcdHfuWPZvPTNAL3hiXfNGN5MwUpvm) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/EU9AWmJjrjMRkjxcdHfuWPZvPTNAL3hiXfNGN5MwUpvm) | | Sonic | [sablier-flow-sonic](https://gateway.thegraph.com/api/subgraphs/id/HkQKZKuM6dZ7Vc4FGC1gZTVVTniYJWRhTRmDDMNzN8zk) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-sonic/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/HkQKZKuM6dZ7Vc4FGC1gZTVVTniYJWRhTRmDDMNzN8zk) | | Unichain | [sablier-flow-unichain](https://gateway.thegraph.com/api/subgraphs/id/Cb5uDYfy4ukN9fjhQ3PQZgDzyo6G66ztn1e847rS7Xa8) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-unichain/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/Cb5uDYfy4ukN9fjhQ3PQZgDzyo6G66ztn1e847rS7Xa8) | | ZKsync Era | [sablier-flow-zksync](https://gateway.thegraph.com/api/subgraphs/id/9DRgWhDAMovpkej3eT8izum6jxEKHE62ciArffsTAScx) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-flow-zksync/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/9DRgWhDAMovpkej3eT8izum6jxEKHE62ciArffsTAScx) | --- ## Previous Indexers(Flow) :::important The following indexers were deprecated on February 3, 2025, so they might return outdated data if queried now. Please use our latest endpoints to query up-to-date data for the Sablier Protocol. ::: | Chain | Explorer | Studio[^2] | Decentralized Network[^1] | | ---------------- | ---------------------------------------------------------------- | -------------------------------------- | ----------------------------------------- | | Ethereum | [sablier-v2-fl][flow-explorer-ethereum] | [Studio][flow-studio-ethereum] | [Network][flow-network-ethereum] | | Arbitrum | [sablier-v2-fl-arbitrum][flow-explorer-arbitrum] | [Studio][flow-studio-arbitrum] | [Network][flow-network-arbitrum] | | Arbitrum Sepolia | [sablier-v2-fl-arbitrum-sepolia][flow-explorer-arbitrum-sepolia] | [Studio][flow-studio-arbitrum-sepolia] | [Network][flow-network-arbitrum-sepolia] | | Avalanche | [sablier-v2-fl-avalanche][flow-explorer-avalanche] | [Studio][flow-studio-avalanche] | [Network][flow-network-avalanche] | | Base | [sablier-v2-fl-base][flow-explorer-base] | [Studio][flow-studio-base] | [Network][flow-network-base] | | Blast | [sablier-v2-fl-blast][flow-explorer-blast] | [Studio][flow-studio-blast] | [Network][flow-network-blast] | | BNB Chain | [sablier-v2-fl-bsc][flow-explorer-bsc] | [Studio][flow-studio-bsc] | [Network][flow-network-bsc] | | Chiliz Chain | [sablier-v2-fl-chiliz][flow-explorer-chiliz] | [Studio][flow-studio-chiliz] | [Network][flow-network-chiliz] | | Gnosis | [sablier-v2-fl-gnosis][flow-explorer-gnosis] | [Studio][flow-studio-gnosis] | [Network][flow-network-gnosis] | | Linea | [sablier-v2-fl-linea][flow-explorer-linea] | [Studio][flow-studio-linea] | [Network][flow-network-linea] | | Lightlink | [sablier-v2-fl-lightlink\*][flow-explorer-lightlink] | N/A | [Lightlink Node\*][flow-custom-lightlink] | | Mode | [sablier-v2-fl-mode][flow-explorer-mode] | [Studio][flow-studio-mode] | [Network][flow-network-mode] | | Optimism | [sablier-v2-fl-optimism][flow-explorer-optimism] | [Studio][flow-studio-optimism] | [Network][flow-network-optimism] | | Optimism Sepolia | [sablier-v2-fl-optimism-sepolia][flow-explorer-optimism-sepolia] | [Studio][flow-studio-optimism-sepolia] | [Network][flow-network-optimism-sepolia] | | Polygon | [sablier-v2-fl-polygon][flow-explorer-polygon] | [Studio][flow-studio-polygon] | [Network][flow-network-polygon] | | Scroll | [sablier-v2-fl-scroll][flow-explorer-scroll] | [Studio][flow-studio-scroll] | [Network][flow-network-scroll] | | Ethereum Sepolia | [sablier-v2-fl-sepolia][flow-explorer-sepolia] | [Studio][flow-studio-sepolia] | [Network][flow-network-sepolia] | | zkSync | [sablier-v2-fl-zksync][flow-explorer-zksync] | [Studio][flow-studio-zksync] | [Network][flow-network-zksync] | {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* Chain: Arbitrum */} [flow-network-arbitrum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/61wTsPJr76vzcaMMrqQq7RkHSUsQmHoqiJbkFc1iaNN1 [flow-explorer-arbitrum]: https://thegraph.com/explorer/subgraphs/61wTsPJr76vzcaMMrqQq7RkHSUsQmHoqiJbkFc1iaNN1 [flow-studio-arbitrum]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-arbitrum/version/latest {/* Chain: Arbitrum Sepolia */} [flow-network-arbitrum-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/Ai8sJzb4W6B19kPzqWxe47R29YGw5dACy9AJ97nZzm5W [flow-explorer-arbitrum-sepolia]: https://thegraph.com/explorer/subgraphs/Ai8sJzb4W6B19kPzqWxe47R29YGw5dACy9AJ97nZzm5W [flow-studio-arbitrum-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-arbitrum-sepolia/version/latest {/* Chain: Avalanche */} [flow-network-avalanche]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/CUFanZFBBAaKcJDPLnCwWjo6gAruG92DcK38Y2PzARH8 [flow-explorer-avalanche]: https://thegraph.com/explorer/subgraphs/CUFanZFBBAaKcJDPLnCwWjo6gAruG92DcK38Y2PzARH8 [flow-studio-avalanche]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-avalanche/version/latest {/* Chain: Base */} [flow-network-base]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/DVuHKeqguX339rd6JGav7wjXBVi5R4qneHSDNu1urTKr [flow-explorer-base]: https://thegraph.com/explorer/subgraphs/DVuHKeqguX339rd6JGav7wjXBVi5R4qneHSDNu1urTKr [flow-studio-base]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-base/version/latest {/* Chain: Blast */} [flow-network-blast]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/84gjGqyeWDG2VxvRTRjTFxrnPMuZhAYF4iETBox2ix5D [flow-explorer-blast]: https://thegraph.com/explorer/subgraphs/84gjGqyeWDG2VxvRTRjTFxrnPMuZhAYF4iETBox2ix5D [flow-studio-blast]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-blast/version/latest {/* Chain: BSC */} [flow-network-bsc]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/GJvqaYwX9vGXPXDFrANs6LcDALcN22bjvvPvrcNvU8rn [flow-explorer-bsc]: https://thegraph.com/explorer/subgraphs/GJvqaYwX9vGXPXDFrANs6LcDALcN22bjvvPvrcNvU8rn [flow-studio-bsc]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-bsc/version/latest {/* Chain: Chiliz */} [flow-network-chiliz]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/H5LERpVjK2ugD42PX774kv5shHfqd13HkBPWtASq75L4 [flow-explorer-chiliz]: https://thegraph.com/explorer/subgraphs/H5LERpVjK2ugD42PX774kv5shHfqd13HkBPWtASq75L4 [flow-studio-chiliz]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-chiliz/version/latest {/* Chain: Gnosis */} [flow-network-gnosis]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/3XxHfFUMixMJTGVn1FJFFER1NFYpDDQo4QAbR2sQSpAH [flow-explorer-gnosis]: https://thegraph.com/explorer/subgraphs/3XxHfFUMixMJTGVn1FJFFER1NFYpDDQo4QAbR2sQSpAH [flow-studio-gnosis]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-gnosis/version/latest {/* Chain: Linea */} [flow-network-linea]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/25Ry5DsjAKLXh6b8uXSu6H85Jk9d3MHxQbpDUJTstwvx [flow-explorer-linea]: https://thegraph.com/explorer/subgraphs/25Ry5DsjAKLXh6b8uXSu6H85Jk9d3MHxQbpDUJTstwvx [flow-studio-linea]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-linea/version/latest {/* Chain: Lightlink */} [flow-explorer-lightlink]: https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-v2-fl-lightlink/graphql [flow-custom-lightlink]: https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-v2-fl-lightlink {/* Chain: Mainnet | Ethereum */} [flow-explorer-ethereum]: https://thegraph.com/explorer/subgraphs/DgXaXAUMFTZdwo1aZ21dmGV2vyU1Wdb1DkHyVmy3y7xi [flow-studio-ethereum]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl/version/latest [flow-network-ethereum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/DgXaXAUMFTZdwo1aZ21dmGV2vyU1Wdb1DkHyVmy3y7xi {/* Chain: Mode */} [flow-network-mode]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/H9D24a58cCZmzZTnu4VNdUoFCEMhNYjHP9uohXr9Qi65 [flow-explorer-mode]: https://thegraph.com/explorer/subgraphs/H9D24a58cCZmzZTnu4VNdUoFCEMhNYjHP9uohXr9Qi65 [flow-studio-mode]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-mode/version/latest {/* Chain: Optimism */} [flow-network-optimism]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/JAf9rM9bn6Z91htddJ33JAyrWdNXHmseHhvx11Bpfysg [flow-explorer-optimism]: https://thegraph.com/explorer/subgraphs/JAf9rM9bn6Z91htddJ33JAyrWdNXHmseHhvx11Bpfysg [flow-studio-optimism]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-optimism/version/latest {/* Chain: Optimism Sepolia */} [flow-network-optimism-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/5tosMw7VVdE9ie3Z8Hdz6Y4SqaMaKrBb3XnM9rTYUag2 [flow-explorer-optimism-sepolia]: https://thegraph.com/explorer/subgraphs/5tosMw7VVdE9ie3Z8Hdz6Y4SqaMaKrBb3XnM9rTYUag2 [flow-studio-optimism-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-optimism-sepolia/version/latest {/* Chain: Polygon */} [flow-network-polygon]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/G49hZr29bZK7TAa7KK8z4sZ3ZkL93Ss6CZDG6ffCSifV [flow-explorer-polygon]: https://thegraph.com/explorer/subgraphs/G49hZr29bZK7TAa7KK8z4sZ3ZkL93Ss6CZDG6ffCSifV [flow-studio-polygon]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-polygon/version/latest {/* Chain: Scroll */} [flow-network-scroll]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/2d1uvMnHnohZowpGwDdj6Gpk5gT8SNcZjbLfTA3JVRa8 [flow-explorer-scroll]: https://thegraph.com/explorer/subgraphs/2d1uvMnHnohZowpGwDdj6Gpk5gT8SNcZjbLfTA3JVRa8 [flow-studio-scroll]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-scroll/version/latest {/* Chain: Ethereum Sepolia */} [flow-network-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/iYRc4ETBqkeiyVhMeXktJ9jxEuQhQ1eJb2Bv68mGkQm [flow-explorer-sepolia]: https://thegraph.com/explorer/subgraphs/iYRc4ETBqkeiyVhMeXktJ9jxEuQhQ1eJb2Bv68mGkQm [flow-studio-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-sepolia/version/latest {/* Chain: zkSync */} [flow-network-zksync]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/iYRc4ETBqkeiyVhMeXktJ9jxEuQhQ1eJb2Bv68mGkQm [flow-explorer-zksync]: https://thegraph.com/explorer/subgraphs/iYRc4ETBqkeiyVhMeXktJ9jxEuQhQ1eJb2Bv68mGkQm [flow-studio-zksync]: https://api.studio.thegraph.com/query/57079/sablier-v2-fl-zksync/version/latest {/* --------------------------------------------------------------------------------------------------------------------------------- */} [endpoint-flow]: https://indexer.hyperindex.xyz/3b4ea6b/v1/graphql {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} --- ## Schema(Graphql) ## Overview We provide auto-generated GraphQL schema documentation for both The Graph and Envio: - The Graph schema docs - Envio schema docs ## Query Syntax Differences | Feature | The Graph | Envio | | ------------ | -------------------------------------------------- | ------------------------------------------------------- | | Pagination | `first` | `limit` | | Pagination | `skip` | `offset` | | Get by ID | `stream(id: "...")` | `Stream_by_pk(id: "...")` | | Get multiple | `streams{}` | `Stream(where: {chainId: {_eq: ""}}){}` | | Nested items | `campaigns{ id, asset: {id, symbol}}` | `Campaign{ asset_id, asset: {id, symbol}}` | ## Entities This is the raw GraphQL file that is used by both The Graph and Envio for generating the final schemas hosted on their services. The schema only contains entities: {/* Add the code block */} ```graphql reference title="Sablier Flow - GraphQL Schema Entities" https://github.com/sablier-labs/indexers/blob/main/src/schemas/flow.graphql ``` --- ## Overview(3) This documentation has been automatically generated from the GraphQL schema, with [GraphQL-Markdown](https://graphql-markdown.github.io). --- ## Overview(4) This documentation has been automatically generated from the GraphQL schema, with [GraphQL-Markdown](https://graphql-markdown.github.io). --- ## Indexers(Lockup) # Sablier Lockup This page documents the indexers for the [Sablier Lockup](/concepts/lockup/overview) protocol, which powers the [Vesting](/apps/features/vesting) product and some of the [Airdrop](/apps/features/airdrops) product features in the Sablier Interface. ## Envio ### Source Code ### Endpoints Envio is a multi-chain indexer. There's a single GraphQL API endpoint that aggregates data across chains. This approach differs from other vendors like The Graph, which require a separate indexer for each chain where Sablier is available. | Chain | Production URL | Playground URL | Explorer URL | | -------- | -------------- | ----------- | ------------ | | Abstract | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Arbitrum | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Avalanche | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Base | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Blast | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Berachain | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | BNB Chain | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Chiliz | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Form | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Gnosis | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | HyperEVM | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Lightlink | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Linea Mainnet | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Ethereum | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Mode | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Morph | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | OP Mainnet | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Polygon | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Sonic | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Scroll | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Sophon | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Superseed | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Tangle | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Unichain | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | XDC | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | ZKsync Era | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Base Sepolia | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | | Sepolia | https://indexer.hyperindex.xyz/53b7e25/v1/graphql | [Playground](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.hyperindex.xyz%2F53b7e25%2Fv1%2Fgraphql) | [Explorer](https://envio.dev/app/sablier-labs/lockup-envio) | ## The Graph ### Source Code ### Endpoints In the table below, you will see three URLs: - `Production URL`: requires a Studio API key for making queries. - `Testing URL`: doesn't require an API key but it's rate-limited to 3000 queries per day. Opening this URL in the browser opens a GraphiQL playground. - `Explorer URL`: The explorer URL for the indexer, if available. To learn how to create a Studio API key, check out [this guide](https://thegraph.com/docs/en/studio/managing-api-keys). The API key has to be provided via an `Authorization: Bearer ` header. Here are two examples in curl and JavaScript: ```bash curl -X POST \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "{ _meta: { block { number } } }"' \ ``` ```js async function getBlockNumber() { const client = new GraphQLClient("", { headers: { Authorization: `Bearer `, }, }); const query = `query { _meta: { block { number } } }`; const result = await client.request(query); console.log(result); } ``` | Chain | Production URL | Testing URL | Explorer URL | | -------- | -------------- | ----------- | ------------ | | Abstract | [sablier-lockup-abstract](https://gateway.thegraph.com/api/subgraphs/id/2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-abstract/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw) | | Arbitrum | [sablier-lockup-arbitrum](https://gateway.thegraph.com/api/subgraphs/id/yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-arbitrum/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam) | | Arbitrum Sepolia | [sablier-lockup-arbitrum-sepolia](https://gateway.thegraph.com/api/subgraphs/id/ApEFvaPGARHedGmFp6TRQu7DoDHQKwt1LPWi1ka6DFHT) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-arbitrum-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/ApEFvaPGARHedGmFp6TRQu7DoDHQKwt1LPWi1ka6DFHT) | | Avalanche | [sablier-lockup-avalanche](https://gateway.thegraph.com/api/subgraphs/id/FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-avalanche/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX) | | Base | [sablier-lockup-base](https://gateway.thegraph.com/api/subgraphs/id/778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-base/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F) | | Base Sepolia | [sablier-lockup-base-sepolia](https://gateway.thegraph.com/api/subgraphs/id/DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-base-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz) | | Berachain | [sablier-lockup-berachain](https://gateway.thegraph.com/api/subgraphs/id/C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-berachain/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14) | | Blast | [sablier-lockup-blast](https://gateway.thegraph.com/api/subgraphs/id/8MBBc6ET4izgJRrybgWzPjokhZKSjk43BNY1q3xcb8Es) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-blast/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/8MBBc6ET4izgJRrybgWzPjokhZKSjk43BNY1q3xcb8Es) | | BNB Chain | [sablier-lockup-bsc](https://gateway.thegraph.com/api/subgraphs/id/A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-bsc/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK) | | Chiliz | [sablier-lockup-chiliz](https://gateway.thegraph.com/api/subgraphs/id/4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-chiliz/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb) | | Ethereum | [sablier-lockup-ethereum](https://gateway.thegraph.com/api/subgraphs/id/AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-ethereum/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt) | | Form | [sablier-lockup-form](https://formapi.0xgraph.xyz/api/public/5961fb30-8fdc-45ad-9a35-555dd5e0dd56/subgraphs/sablier-lockup-form/2.3_1.0.0/gn) | N/A | N/A | | Gnosis | [sablier-lockup-gnosis](https://gateway.thegraph.com/api/subgraphs/id/DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-gnosis/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK) | | IoTeX | [sablier-lockup-iotex](https://gateway.thegraph.com/api/subgraphs/id/2P3sxwmcWBjMUv1C79Jh4h6VopBaBZeTocYWDUQqwWFV) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-iotex/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/2P3sxwmcWBjMUv1C79Jh4h6VopBaBZeTocYWDUQqwWFV) | | Lightlink | [sablier-lockup-lightlink](https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-lockup-lightlink) | N/A | N/A | | Linea Mainnet | [sablier-lockup-linea](https://gateway.thegraph.com/api/subgraphs/id/GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-linea/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs) | | Mode | [sablier-lockup-mode](https://gateway.thegraph.com/api/subgraphs/id/oSBvUM371as1pJh8HQ72NMRMb3foV3wuheULfkNf5vy) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-mode/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/oSBvUM371as1pJh8HQ72NMRMb3foV3wuheULfkNf5vy) | | OP Mainnet | [sablier-lockup-optimism](https://gateway.thegraph.com/api/subgraphs/id/NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-optimism/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6) | | OP Sepolia | [sablier-lockup-optimism-sepolia](https://gateway.thegraph.com/api/subgraphs/id/2LFYyhMVMUMYA2q7XMMnBvCs6v6awWxBeMuMk3tMtmiT) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-optimism-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/2LFYyhMVMUMYA2q7XMMnBvCs6v6awWxBeMuMk3tMtmiT) | | Polygon | [sablier-lockup-polygon](https://gateway.thegraph.com/api/subgraphs/id/8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-polygon/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu) | | Scroll | [sablier-lockup-scroll](https://gateway.thegraph.com/api/subgraphs/id/GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-scroll/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1) | | Sei Network | [sablier-lockup-sei](https://gateway.thegraph.com/api/subgraphs/id/AJU5rBfbuApuJpeZeaz6NYuYnnhAhEy4gFkqsSdAT6xb) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-sei/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/AJU5rBfbuApuJpeZeaz6NYuYnnhAhEy4gFkqsSdAT6xb) | | Sepolia | [sablier-lockup-sepolia](https://gateway.thegraph.com/api/subgraphs/id/5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-sepolia/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa) | | Sonic | [sablier-lockup-sonic](https://gateway.thegraph.com/api/subgraphs/id/GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-sonic/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh) | | Unichain | [sablier-lockup-unichain](https://gateway.thegraph.com/api/subgraphs/id/3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-unichain/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M) | | ZKsync Era | [sablier-lockup-zksync](https://gateway.thegraph.com/api/subgraphs/id/7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN) | [Testing](https://api.studio.thegraph.com/query/112500/sablier-lockup-zksync/version/latest) | [Explorer](https://thegraph.com/explorer/subgraphs/7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN) | --- ## Previous Indexers(Lockup) :::important The following indexers were deprecated on February 3, 2025, so they might return outdated data if queried now. Please use our latest endpoints to query up-to-date data for the Sablier Protocol. ::: | Chain | Explorer | Studio[^2] | Decentralized Network[^1] | | ---------------- | -------------------------------------------------------- | --------------------------------- | ------------------------------------ | | Ethereum | [sablier-v2][explorer-ethereum] | [Studio][studio-ethereum] | [Network][network-ethereum] | | Arbitrum | [sablier-v2-arbitrum][explorer-arbitrum] | [Studio][studio-arbitrum] | [Network][network-arbitrum] | | Arbitrum Sepolia | [sablier-v2-arbitrum-sepolia][explorer-arbitrum-sepolia] | [Studio][studio-arbitrum-sepolia] | [Network][network-arbitrum-sepolia] | | Avalanche | [sablier-v2-avalanche][explorer-avalanche] | [Studio][studio-avalanche] | [Network][network-avalanche] | | Base | [sablier-v2-base][explorer-base] | [Studio][studio-base] | [Network][network-base] | | Blast | [sablier-v2-blast][explorer-blast] | [Studio][studio-blast] | [Network][network-blast] | | BNB Chain | [sablier-v2-bsc][explorer-bsc] | [Studio][studio-bsc] | [Network][network-bsc] | | Chliz Chain | [sablier-v2-chiliz][explorer-chiliz] | [Studio][studio-chiliz] | [Network][network-chiliz] | | Gnosis | [sablier-v2-gnosis][explorer-gnosis] | [Studio][studio-gnosis] | [Network][network-gnosis] | | Lightlink | [sablier-v2-lightlink\*][explorer-lightlink] | N/A | [Lightlink Node\*][custom-lightlink] | | Optimism | [sablier-v2-optimism][explorer-optimism] | [Studio][studio-optimism] | [Network][network-optimism] | | Optimism Sepolia | [sablier-v2-optimism-sepolia][explorer-optimism-sepolia] | [Studio][studio-optimism-sepolia] | [Network][network-optimism-sepolia] | | Polygon | [sablier-v2-polygon][explorer-polygon] | [Studio][studio-polygon] | [Network][network-polygon] | | Scroll | [sablier-v2-scroll][explorer-scroll] | [Studio][studio-scroll] | [Network][network-scroll] | | Ethereum Sepolia | [sablier-v2-sepolia][explorer-sepolia] | [Studio][studio-sepolia] | [Network][network-sepolia] | | zkSync | [sablier-v2-zksync][explorer-zksync] | [Studio][studio-zksync] | [Network][network-zksync] | {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* --------------------------------------------------------------------------------------------------------------------------------- */} {/* Chain: Arbitrum */} [network-arbitrum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/8BnGPBojHycDxVo83LP468pUo4xDyCQbtTpHGZXR6SiB [explorer-arbitrum]: https://thegraph.com/explorer/subgraphs/8BnGPBojHycDxVo83LP468pUo4xDyCQbtTpHGZXR6SiB [studio-arbitrum]: https://api.studio.thegraph.com/query/57079/sablier-v2-arbitrum/version/latest {/* Chain: Arbitrum Sepolia */} [network-arbitrum-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/BZYXgTYGe51dy5rW6LhrLN7PWSiAgRQoqSBJEiPpRN9K [explorer-arbitrum-sepolia]: https://thegraph.com/explorer/subgraphs/BZYXgTYGe51dy5rW6LhrLN7PWSiAgRQoqSBJEiPpRN9K [studio-arbitrum-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-arbitrum-sepolia/version/latest {/* Chain: Avalanche */} [network-avalanche]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/FdVwZuMV43yCb1nPmjnLQwmzS58wvKuLMPzcZ4UWgWAc [explorer-avalanche]: https://thegraph.com/explorer/subgraphs/FdVwZuMV43yCb1nPmjnLQwmzS58wvKuLMPzcZ4UWgWAc [studio-avalanche]: https://api.studio.thegraph.com/query/57079/sablier-v2-avalanche/version/latest {/* Chain: Base */} [network-base]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/3pxjsW9rbDjmZpoQWzc5CAo4vzcyYE9YQyTghntmnb1K [explorer-base]: https://thegraph.com/explorer/subgraphs/3pxjsW9rbDjmZpoQWzc5CAo4vzcyYE9YQyTghntmnb1K [studio-base]: https://api.studio.thegraph.com/query/57079/sablier-v2-base/version/latest {/* Chain: Blast */} [network-blast]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/BXoC2ToMZXnTmCjWftQRPh9zMyM7ysijMN54Nxzb2CEY [explorer-blast]: https://thegraph.com/explorer/subgraphs/BXoC2ToMZXnTmCjWftQRPh9zMyM7ysijMN54Nxzb2CEY [studio-blast]: https://api.studio.thegraph.com/query/57079/sablier-v2-blast/version/latest {/* Chain: BSC */} [network-bsc]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/BVyi15zcH5eUg5PPKfRDDesezMezh6cAkn8LPvh7MVAF [explorer-bsc]: https://thegraph.com/explorer/subgraphs/BVyi15zcH5eUg5PPKfRDDesezMezh6cAkn8LPvh7MVAF [studio-bsc]: https://api.studio.thegraph.com/query/57079/sablier-v2-bsc/version/latest {/* Chain: Chiliz */} [network-chiliz]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/HKvzAuGjrEiza11W48waJy5csbhKpkMLF688arwHhT5f [explorer-chiliz]: https://thegraph.com/explorer/subgraphs/HKvzAuGjrEiza11W48waJy5csbhKpkMLF688arwHhT5f [studio-chiliz]: https://api.studio.thegraph.com/query/57079/sablier-v2-chiliz/version/latest {/* Chain: Gnosis */} [network-gnosis]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/EXhNLbhCbsewJPx4jx5tutNXpxwdgng2kmX1J7w1bFyu [explorer-gnosis]: https://thegraph.com/explorer/subgraphs/EXhNLbhCbsewJPx4jx5tutNXpxwdgng2kmX1J7w1bFyu [studio-gnosis]: https://api.studio.thegraph.com/query/57079/sablier-v2-gnosis/version/latest {/* Chain: Lightlink */} [explorer-lightlink]: https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-v2-lightlink/graphql [custom-lightlink]: https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/sablier-v2-lightlink {/* Chain: Mainnet | Ethereum */} [explorer-ethereum]: https://thegraph.com/explorer/subgraphs/EuZZnhFtdCGqN2Zt7EMGYDqQKNrVuhJL63KAfwvF35bL [studio-ethereum]: https://api.studio.thegraph.com/query/57079/sablier-v2/version/latest [network-ethereum]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/EuZZnhFtdCGqN2Zt7EMGYDqQKNrVuhJL63KAfwvF35bL {/* Chain: Optimism */} [network-optimism]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/6e6Dvs1yDpsWDDREZRqxGi54SVdvTNzUdKpKJxniKVrp [explorer-optimism]: https://thegraph.com/explorer/subgraphs/6e6Dvs1yDpsWDDREZRqxGi54SVdvTNzUdKpKJxniKVrp [studio-optimism]: https://api.studio.thegraph.com/query/57079/sablier-v2-optimism/version/latest {/* Chain: Optimism Sepolia */} [network-optimism-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/2a2JpbmBfQs78UEvQYXgweHetcZUPm9zXCjP69o5mTed [explorer-optimism-sepolia]: https://thegraph.com/explorer/subgraphs/2a2JpbmBfQs78UEvQYXgweHetcZUPm9zXCjP69o5mTed [studio-optimism-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-optimism-sepolia/version/latest {/* Chain: Polygon */} [network-polygon]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/CsDNYv9XPUMP8vufuwDVKQrVhsxhzzRHezjLFFKZZbrx [explorer-polygon]: https://thegraph.com/explorer/subgraphs/CsDNYv9XPUMP8vufuwDVKQrVhsxhzzRHezjLFFKZZbrx [studio-polygon]: https://api.studio.thegraph.com/query/57079/sablier-v2-polygon/version/latest {/* Chain: Scroll */} [network-scroll]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/HVcngokCByfveLwguuafrBC34xB65Ne6tpGrXHmqDSrh [explorer-scroll]: https://thegraph.com/explorer/subgraphs/HVcngokCByfveLwguuafrBC34xB65Ne6tpGrXHmqDSrh [studio-scroll]: https://api.studio.thegraph.com/query/57079/sablier-v2-scroll/version/latest {/* Chain: Ethereum Sepolia */} [network-sepolia]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/3JR9ixhdUxX5oc2Yjr6jkG4XUqDd4guy8niL6AYzDKss [explorer-sepolia]: https://thegraph.com/explorer/subgraphs/3JR9ixhdUxX5oc2Yjr6jkG4XUqDd4guy8niL6AYzDKss [studio-sepolia]: https://api.studio.thegraph.com/query/57079/sablier-v2-sepolia/version/latest {/* Chain: zkSync */} [network-zksync]: https://gateway-arbitrum.network.thegraph.com/api/API_KEY/subgraphs/id/GY2fGozmfZiZ3xF2MfevohLR4YGnyxGxAyxzi9zmU5bY [explorer-zksync]: https://thegraph.com/explorer/subgraphs/GY2fGozmfZiZ3xF2MfevohLR4YGnyxGxAyxzi9zmU5bY [studio-zksync]: https://api.studio.thegraph.com/query/57079/sablier-v2-zksync/version/latest --- ## Schema(3) ## Overview We provide auto-generated GraphQL schema documentation for both The Graph and Envio: - The Graph schema docs - Envio schema docs ## Query Syntax Differences | Feature | The Graph | Envio | | ------------ | -------------------------------------------------- | ------------------------------------------------------- | | Pagination | `first` | `limit` | | Pagination | `skip` | `offset` | | Get by ID | `stream(id: "...")` | `Stream_by_pk(id: "...")` | | Get multiple | `streams{}` | `Stream(where: {chainId: {_eq: ""}}){}` | | Nested items | `campaigns{ id, asset: {id, symbol}}` | `Campaign{ asset_id, asset: {id, symbol}}` | ## Entities This is the raw GraphQL file that is used by both The Graph and Envio for generating the final schemas hosted on their services. The schema only contains entities: {/* Add the code block */} ```graphql reference title="Sablier Lockup - GraphQL Schema Entities" https://github.com/sablier-labs/indexers/blob/main/src/schemas/lockup.graphql ``` --- ## Overview(5) This documentation has been automatically generated from the GraphQL schema, with [GraphQL-Markdown](https://graphql-markdown.github.io). --- ## Overview(6) This documentation has been automatically generated from the GraphQL schema, with [GraphQL-Markdown](https://graphql-markdown.github.io). --- ## Branding ## Brand Guidelines Want to make an integration with Sablier or just spread the word about it? We've put together a repository with all the branding assets you need to get started. If you have any special requests, reach out on [Discord](https://discord.sablier.com). --- ## Legacy(Apps) ## Sablier Legacy The first version of the Sablier protocol will keep running in perpetuity thanks to the Ethereum blockchain, but the current Sablier Interfaces are not compatible with the Legacy protocol. We will keep hosting the legacy apps so that you can manage any streams previously created on V1. - Sender interface: [legacy-sender.sablier.com](https://legacy-sender.sablier.com) - Recipient interface: [legacy-recipient.sablier.com](https://legacy-recipient.sablier.com) --- ## Overview(Features) # The Sablier Interface The Sablier Interface is a web application that allows users to interact with the Sablier Protocol. It is a user-friendly interface that enables users to create, manage, and interact with streams. Start exploring at [app.sablier.com](https://app.sablier.com) or continue reading below to learn more about the available features. ## Use-case centric ![Banner App Navigation](/img/banners/docs-app-navigation.webp) The app is split among three use cases: | Use Case | Smart Contracts Involved | Description | | -------- | ------------------------------------- | ----------------------------------------------------------------------- | | Vesting | Sablier Lockup | Closed-ended streams with and an end time and funds deposited upfront | | Payments | Sablier Flow | Open-ended streams that can be topped up over time | | Airdrops | Sablier MerkleFactory, Sablier Lockup | Instant or vested over time, with pre-configured recipients and amounts | These features are enabled by two types of streams: - Lockup streams - fixed duration, amount required upfront, strict distribution curve - Flow streams - no end time, amount can be topped-up, rate-per-second can be adjusted The Sablier Interface has adapted the Sablier Protocol for the use cases mentioned above, but we encourage you to explore other applications. ## Vesting Read about the business use-case on our [dedicated landing page](https://sablier.com/vesting) or dive deeper into the vesting-related features documented in [this section](/apps/features/vesting). ## Payments Read about the business use-case on our [dedicated landing page](https://sablier.com/payroll) or dive deeper into the vesting-related features documented in [this section](/apps/features/payments). ## Airdrop Read more about the business use-case on our [dedicated landing page](https://sablier.com/airdrops) or dive deeper into the airdrop-related features documented in [this section](/apps/features/airdrops). ## Grants Given how flexible Sablier is in adapting to any processes involving token distribution, we've also documented the business case for [onchain grants](https://sablier.com/grants) --- ## Vesting The Sablier Interface will showcase [Lockup](/concepts/lockup/overview) streams under the Vesting tab. These are token streams with a fixed duration, predefined amount and strict distribution curve. ![Banner Vesting](/img/banners/docs-vesting.webp) In Q4 2024 the app has undergone a use-case centric redesign. For past users, all streams created before this update will show up in the Vesting page. | [Vesting streams](https://app.sablier.com/vesting/gallery) | | ---------------------------------------------------------------------------------------- | | | ## Features ### Flexible curves Almost any vesting schedule can be expressed as a stream. Sablier supports multiple options out of the box, including: - Linear - Cliff-Linear - Unlock in Steps - Unlock Monthly - Backweighted - Timelock - Unlock-Linear - Unlock-Dynamic - Exponential - Cliff-Exponential But programmatically, you can create any schedule you want. See the [Stream Shapes](/concepts/lockup/stream-shapes) for more details on how we design these shapes. ### Explore the dashboard Enter the Dashboard and discover a detailed overview of your incoming and outgoing streams. Take advantage of the Search functionality to explore the chain and gain more insight into how others are using Lockup for vesting. | | | ------------------------------------------- | | ![All](/screenshots/vesting-dashboard.webp) | ### Preview any stream Gain insight into any stream. Track progress using our very own stream circle. Share the unique URL with recipients or anyone really to increase transparency of your day to day token distribution. | | | ----------------------------------------- | | ![All](/screenshots/vesting-profile.webp) | ### NFT representation Each stream in wrapped in an ERC-721 non-fungible token (NFT), making the stream recipient the owner of the NFT. Thus streams can be transferred, traded, and used as collateral in NFT lending protocols. | | | ----------------------------------------- | | | ### Multi-chain experience Streaming, everywhere. We support 11+ EVM chains and testnets where you can stream or get paid using Sablier. | | | ---------------------------------------------- | | ![ChainList](/screenshots/general-chains.webp) | ### Create in bulk Save time by creating up to 280 streams in bulk for your employees, investors, or community members. Use the forms for a clean and straightforward UX. | | | --------------------------------------------------- | | ![Create in bulk](/screenshots/vesting-create.webp) | ### Create with CSV As an alternative to manually filling out the form, you can upload a CSV file with your user data. | | | -------------------------------------------------------- | | ![Create with CSV](/screenshots/vesting-create-csv.webp) | ### Simulations Eager to see what your token distribution will look like? Use our simulation tool right from the stream creation forms (or later, from the stream profile). ![Simulate](/screenshots/simulation.webp) ### Detailed panels Explore each available stream in detail. Simulate future payouts, understand historical events, or simply enjoy cool representations of a monetized passage of time (NFTs 🔥). ### Granular management Manage your streams 24/7 as you see fit. The app will guide you through every supported process and help you keep an eye on your payouts. Remember, you can always be both a sender and a recipient. | | | | --------------------------------------------- | ----------------------------------------- | | ![Withdraw](/screenshots/cover-withdraw.webp) | ![Cancel](/screenshots/cover-cancel.webp) | ### Any ERC-20 token Thanks to our integration of Token Lists, any ERC-20 token can be distributed via Sablier Lockup. :::warning The only exception is rebasing tokens like Aave's aTokens. Tokens that dynamically rebase their balance are not supported by Sablier. ::: | | | | ----------------------------------------------- | -------------------------------------------------------- | | ![Token List](/screenshots/tokenlist-home.webp) | ![Token List Search](/screenshots/tokenlist-search.webp) | ### Mobile-ready layout Token streams on the go! Yes, the Sablier app works on mobile. And yes, we support dark mode by default (light mode coming soon). ### Permissions We've mapped the most important utilities from the Lockup contracts into in-app features. Interact with streams that reference you as a key participant (e.g. sender, recipient) directly from the interfaces. | Feature | Sender | Recipient | Public | | ---------------------- | :----: | :-------: | :----: | | Create Streams | ✅ | - | - | | Renounce Cancelability | ✅ | ❌ | - | | Cancel | ✅ | ❌ | - | | Transfer | ❌ | ✅ | - | | Withdraw | ✅ | ✅ | ✅ | ### Safe multisig support Vesting is fully integrated with [Safe](https://safe.global). Start streaming from the safety and comfort of your multisig wallet. --- ## Payments The Sablier Interface displays [Flow](/concepts/flow/overview) streams under the Payments tab. These are token streams with no end time, an ever-increasing amount (meaning the streams can be topped up), and a flexible rate per second. ![Banner Payments](/img/banners/docs-payments.webp) ## Features ### Flexible terms Increase the rate/second, fund the stream with more tokens and keep it alive indefinitely! With Flow streams in the Payments tab you have the freedom to adapt your distribution schedule based on external KPIs, pivots or executive decisions. ### Explore the dashboard Enter the Dashboard and discover a detailed overview of your incoming and outgoing flow streams. Take advantage of the Search functionality to explore the chain and gain more insight into how others are using Flow for continuous payments, grants, salaries and more. | | | -------------------------------------------------- | | ![All](/screenshots/payments-dashboard-split.webp) | ### Top up multiple streams Select the streams you want to top up, provide the deposit amount for each stream, and confirm the batched top-up with only one transaction. You can specify custom amounts for each stream, or top up all streams with the same amount. | | | ------------------------------------------------------------------- | | ![Top up multiple streams](/screenshots/topup-multiple-streams.gif) | ### Preview any stream Gain insight into any stream. Track progress using our very own stream circle. Share the unique URL with recipients or anyone really to increase transparency of your day to day token distribution. | | | ------------------------------------------ | | ![All](/screenshots/payments-profile.webp) | ### Save URL and top up later Create a unique URL to easily search the selected group of streams. Use this URL or share it with your partners to top up the streams at a later time. | | | ------------------------------------------------------------ | | ![URL for batch streams](/screenshots/batch-streams-url.gif) | ### NFT representation Each stream in wrapped in an ERC-721 non-fungible token (NFT), making the stream recipient the owner of the NFT. Thus streams can be transferred, traded, and used as collateral in NFT lending protocols. ### Multi-chain experience Streaming, everywhere. We enable payments on 11+ EVM chains and testnets where you can stream or get paid using Sablier. | | | ---------------------------------------------- | | ![ChainList](/screenshots/general-chains.webp) | ### Create in bulk Save time by creating up to 280 streams in bulk for your employees, investors, or community members. Use the forms for a clean and straightforward UX. ### Create with CSV As an alternative to manually filling out the form, you can upload a CSV file with your user data. ### Mobile-ready layout Token streams on the go! Yes, the Sablier app works on mobile. And yes, we support dark mode by default (light mode coming soon). ### Permissions We've mapped the most important utilities from the Flow contracts into in-app features. Interact with streams that reference you as a key participant (e.g. sender, recipient) directly from the interfaces. | Feature | Sender | Recipient | Public | | ---------------- | :----: | :-------: | :----: | | Create Streams | ✅ | ❌ | - | | Deposit / Top-up | ✅ | - | ✅ | | Adjust rate | ✅ | ❌ | - | | Refund | ✅ | ❌ | - | | Void | ✅ | ✅ | - | | Pause | ✅ | ❌ | - | | Restart | ✅ | ❌ | - | | Transfer | ❌ | ✅ | - | | Withdraw | ✅ | ✅ | ✅ | ### Safe multisig support Payments are fully integrated with [Safe](https://safe.global). Start streaming from the safety and comfort of your multisig wallet. --- ## Airdrops Sablier provides a solution for launching airdrops with up to a million recipients. This is designed to help projects distribute tokens to a large number of users in a fair and efficient manner. Start exploring at [app.sablier.com](https://app.sablier.com/airdrops/) or read more about it on [sablier.com/airdrops](https://sablier.com/airdrops). ## Airstreams (Vested Airdrops) ![Banner Airdrops Vesting](/img/banners/docs-airdrops-airstreams.webp) **Airdrops should be vested!** At Sablier, we believe in long-term distributions with aligned incentives. That's why we engineered Airstreams, a solution which allows you to airdrop streams with a vesting schedule. Pick a vesting curve (e.g., linear), define the rules (e.g. duration, clawback window), and allow recipients to claim their airdrops as vesting streams. ## Instant Airdrops ![Banner Airdrops Instant](/img/banners/docs-airdrops-instant.webp) Sablier also offers an instant airdrop solution, meaning the tokens are immediately released to the recipients upon claiming. ## Features ### Create with CSV Generate your list of recipients and put it into a CSV file, upload it to our app, and we'll take care of the rest. We will sanitize, validate and triple-check the data to ensure everything is formatted correctly. :::caution Timezone Caveat All times in the CSV are considered to be in the same timezone as the airdrop creator's device. Visit our [CSV guide](/apps/guides/csv-support) to read more about the format. ::: ### Easy 3-step process Creating campaigns involves a simple 3-step process: 1. Configure the initial details (e.g., token, campaign name, etc.) 2. Upload the CSV containing the recipient data 3. Deploy the Airdrop campaign contract | | | ------------------------------------------------------------- | | ![Airdrop Create: Step 1](/screenshots/airdrop-create-1.webp) | | ![Airdrop Create: Step 2](/screenshots/airdrop-create-2.webp) | ### Open source If you'd like to support Airdrops in your UI or have additional requirements, you can do so by using a self-hosted [Merkle service](/api/airdrops/merkle-api/overview). Reach out to us on [Discord](https://discord.sablier.com) for more details and customer support. ### Explore the dashboard Enter the Dashboard and discover a detailed overview of the Airdrops you may be eligible for. Take advantage of the Search functionality to explore the chain and gain more insight into how others are using Sablier. | | | --------------------------------------------------- | | ![Airdrop Search](/screenshots/airdrop-search.webp) | ### Support for any ERC-20 token You can drop your own token! Thanks to our integration of Token Lists, any ERC-20 token can be airdropped on Sablier. For your token logo to show up in the Sablier app, add it to our [token list](https://github.com/sablier-labs/community-token-list/issues/new?template=token-request.md) | | | --------------------------------------------------- | | ![List of chains](/screenshots/general-chains.webp) | ### Oversight Have a clear view of how your campaign is performing. Check eligibility or manage your own campaign from a dedicated interface. | | | ----------------------------------------------------- | | ![Airdrop Profile](/screenshots/airdrop-profile.webp) | :::info To integrate this functionality into your own products/apps, have a look at the [API guides](/api/overview), especially the [Merkle API](/api/airdrops/merkle-api/overview) and the Merkle subgraphs. ::: ### Advanced Settings For campaign admins, the interface enables advanced settings like in-app visibility, in-app geographical restrictions, and campaign-specific items like an eligibility criteria link. | | | ------------------------------------------------------- | | ![Airdrop Settings](/screenshots/airdrop-settings.webp) | ### Geographical Restrictions As shown in the image above, you can specify a list of countries where access to the campaign will be restricted on the Sablier Interface at [app.sablier.com](https://app.sablier.com). Note that this restriction does not apply to the Sablier Protocol, which runs permissionlessly on the blockchain. Additionally, some jurisdictions may already be restricted by default — either by your ISP or Vercel, our hosting provider. --- ## Other Features The Sablier Interface comes with many other smaller (but still cool) features, from aesthetic easter eggs to integrations with popular services. ## Social Media Previews For the socialites among our users, we've added a feature that generates social media preview images based on your onchain activity in Sablier. To see what your preview looks like, paste your stream URL (e.g. `app.sablier.com/stream/...`) on socials. Here's an example: ![Stream Preview](/screenshots/stream-preview.webp) ## Farcaster Frames ![Farcaster Frame](/img/frame/farcaster.webp) You can share our [Frames](https://x.com/razgraf/status/1779208294264955316) to interact directly with Sablier from your favorite Farcaster client. | Latest | Stream by ID | | ------------------------------------------------------- | --------------------------------------------------------- | | ![Farcaster Frame Latest](/img/frame/frame-latest.webp) | ![Farcaster Frame Stream](/img/frame/frame-stream.webp) | | Keep tabs on the latest streams | Share stream previews using their ID | | [app.sablier.com/api/frame/latest/home][latest] | [app.sablier.com/api/frame/stream/LL2-11155111-3][stream] | [latest]: https://app.sablier.com/api/frame/latest/home [stream]: https://app.sablier.com/api/frame/stream/LL2-11155111-3 :::note When pasted in the browser, the links will redirect to show the final images. Makes sure to use them in Farcaster in this original form. ::: --- ## CSV Support The Sablier Interfaces supports CSV files for faster processing and automating large-scale operations. This feature is available for both airdrops and streams. :::warning Formatting Caveats **Dates**: All columns with the "date" type should have the following format: "YYYY-MM-DD HH:mm". **Durations**: All columns with the "duration" type should have the following format: "**x** years **y** days **z** hours". Note that each particle is optional, e.g., you can skip the days. **Timezones**: The dates and times extracted from the CSV are processed using the same timezone used by the user's browser. **Amounts**: All token amounts should be expressed in humanized form, e.g., 10 USDC should be written as `10`, not `10000000`. The Sablier app will multiply the amounts by the token's number of decimals in the processing step. ::: ## Airdrops With Sablier, you can create airdrop campaigns with up to a million recipients. To do so, you must upload a CSV file containing all recipient addresses and the airdrop amounts. Use the provided template and fill in the rows with recipient addresses and airdrop amounts. ### CSV Template For your convenience, here's a download link for the CSV template: ### Navigation To use this feature: 1. Access the [create airdrop](https://app.sablier.com/airdrops/create) page 2. Fill out the details for your airdrop campaign in the 1st step 3. Continue to the 2nd step, where you can upload the CSV | | | ----------------------------------------------------- | | ![Airdrop Create](/screenshots/airdrop-create-2.webp) | ## Streams | | | ----------------------------------------------------- | | ![Create with CSV](/screenshots/create-with-csv.webp) | Using a CSV, you can deploy up to 280 streams all at once. Start from the suggested template, and fill in the rows with addresses, amounts, and other details. ### CSV Template Here's table with all the available CSV templates. [Sablier Flow](/concepts/use-cases#sablier-flow) (the first row in the below table) is a great fit for use cases like payroll, grants, and subscriptions. The other streaming curves in the table rely on [Sablier Lockup](/concepts/use-cases#sablier-lockup) and are a better fit for vesting and airdrops. | URL | Description | | :------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------ | | [Flow](https://files.sablier.com/templates/flow-template.csv) | [Open-ended streams](/concepts/flow/overview#total-debt) that can be topped up. | | [Linear with duration](https://files.sablier.com/templates/linear-duration-template.csv) | [Linear streams](/concepts/lockup/stream-shapes#linear) with the duration timing. | | [Linear with range](https://files.sablier.com/templates/linear-range-template.csv) | [Linear streams](/concepts/lockup/stream-shapes#linear) with the range timing. | | [Cliff with duration](https://files.sablier.com/templates/2025-02/cliff-duration-template.csv) | [Cliff streams](/concepts/lockup/stream-shapes#cliff-unlock) with the duration timing. | | [Cliff with range](https://files.sablier.com/templates/2025-02/cliff-range-template.csv) | [Cliff streams](/concepts/lockup/stream-shapes#cliff-unlock) with the range timing. | | [Monthly with range](https://files.sablier.com/templates/monthly-range-template.csv) | [Unlock Each Month streams](/concepts/lockup/stream-shapes#unlock-monthly) with the range timing. | | [Stepper with duration](https://files.sablier.com/templates/2025-02/unlockSteps-duration-template.csv) | [Unlock In Steps streams](/concepts/lockup/stream-shapes#unlock-in-steps) with the duration timing. | | [Stepper with range](https://files.sablier.com/templates/2025-02/unlockSteps-range-template.csv) | [Unlock In Steps streams](/concepts/lockup/stream-shapes#unlock-in-steps) with the range timing. | | [Timelock with duration](https://files.sablier.com/templates/timelock-duration-template.csv) | [Timelock streams](/concepts/lockup/stream-shapes#timelock) with the duration timing. | | [Timelock with range](https://files.sablier.com/templates/timelock-range-template.csv) | [Timelock streams](/concepts/lockup/stream-shapes#timelock) with the range timing. | | [BackWeighted with range](https://files.sablier.com/templates/backWeighted-range-template.csv) | [BackWeighted streams](/concepts/lockup/stream-shapes) with the range timing. | | [Unlock linear with duration](https://files.sablier.com/templates/unlockLinear-duration-template.csv) | [Unlock-Linear streams](/concepts/lockup/stream-shapes#initial-unlock) with the duration timing. | | [Unlock linear with range](https://files.sablier.com/templates/unlockLinear-range-template.csv) | [Unlock-Liner streams](/concepts/lockup/stream-shapes#initial-unlock) with the range timing. | | [Unlock cliff with duration](https://files.sablier.com/templates/2025-02/unlockCliff-duration-template.csv) | [Unlock-Cliff streams](/concepts/lockup/stream-shapes#cliff-unlock) with the duration timing. | | [Unlock cliff with range](https://files.sablier.com/templates/2025-02/unlockCliff-range-template.csv) | [Unlock-Cliff streams](/concepts/lockup/stream-shapes#cliff-unlock) with the range timing. | | [Exponential with duration](https://files.sablier.com/templates/exponential-duration-template.csv) | [Exponential streams](/concepts/lockup/stream-shapes#exponential) with the duration timing. | | [Exponential with range](https://files.sablier.com/templates/exponential-range-template.csv) | [Exponential streams](/concepts/lockup/stream-shapes#exponential) with the range timing. | | [Cliff exponential with duration](https://files.sablier.com/templates/exponentialCliff-duration-template.csv) | [Cliff-Exponential streams](/concepts/lockup/stream-shapes#cliff-exponential) with the duration timing. | | [Cliff exponential with range](https://files.sablier.com/templates/exponentialCliff-range-template.csv) | [Cliff-Exponential streams](/concepts/lockup/stream-shapes#cliff-exponential) with the range timing. | ### Navigation To use this feature: 1. Access the [vesting gallery](https://app.sablier.com/vesting/gallery/) page in the Sablier app 2. Select the desired vesting shape 3. In the top right corner, you will find a button guiding you toward the CSV feature | | | ------------------------------------------------------ | | ![CSV Selector](/screenshots/create-csv-selector.webp) | ### Column Formats To use the CSV feature, the data you provide must be formatted correctly. Bellow is a list with the format expected for all column types supported by Sablier. :::warning Make sure that your CSV editing software (e.g. Microsoft Excel) does not override the cell format. We suggest double-checking in the Sablier app that the dates have been parsed as expected. ::: | Column | Type | Description | Examples | | :------------ | :----- | :--------------------------------------------------------------------------------------- | :------------------------------------------- | | address | String | Recipient address | `0x12...AB` | | amount | Number | Deposit amount | `100`, `42161` or any other valid amount | | duration | String | Total duration | `1 year 20 days`, `3 years 20 days 4 hours` | | start | Date | Start date in `YYYY-MM-DD HH:mm` format | `2024-02-24 16:15`, `2026-02-14 17:25` | | end | Date | End date in `YYYY-MM-DD HH:mm` format | `2024-02-24 16:15`, `2026-02-14 17:25` | | cliffDuration | String | Cliff duration | `2 years 20 days`, `3 years 20 days 4 hours` | | cliffEnd | Date | Cliff date in `YYYY-MM-DD HH:mm` format | `2024-02-24 16:15`, `2026-02-14 17:25` | | months | Number | Number of months for the unlock monthly | `5`, `12` or any other valid integer | | steps | Number | Number of steps for the unlock in steps | `5`, `12` or any other valid integer | | unlock | Number | Amount that will be initially unlocked | `100`, `42161` or any other valid amount | | initial | String | Whether the first unlock should occur at the start date or at the end of the first month | `at start` or `end of first month` | --- ## URL Schemes The Sablier Interface makes it easy for integrators to link to specific users or entities. In this guide, we will cover a number of resource locators used by the apps, and dive into how you can use them. ## Stream Page | | | ------------------------------------------------- | | ![Stream profile](/screenshots/stream-share.webp) | ### Elements Every stream created through the Sablier Protocol is identified through three parameters: - a **chainId** (e.g., `1` for Ethereum, `10` for Optimism, etc. ) - an **alias** (e.g., `LK`) OR a **contract** (e.g. `0x12..AB`) - a **streamId** (generated at stream creation) #### Contract Aliases Sablier supports different token distribution products, e.g. `SablierLockup` and `SablierFlow`. To provide a visual resolver in the UI, we alias the contract addresses with the following abbreviations: In the past, the functionality of the `SablierLockup` contract used to be distributed among different contracts. - Lockup Linear V2.0 contracts become `LL`, e.g. `LL-137-1` - Lockup Linear V2.1 contracts become `LL2`, e.g. `LL2-137-1` - Lockup Dynamic V2.0 contracts become `LD`, e.g. `LD-137-1` - Lockup Dynamic V2.1 contracts become `LD2`, e.g. `LD2-137-1` ### Building the URL By combining the elements described above, you can send users from your interface directly to the create stream page in the Sablier Interface. To build the link to a stream resource, you use a hyphen `-` to concatenate the uppercase contract `alias`, the `chainId`, and the `streamId`, and then you add them to the base URL `app.sablier.com/stream/`: | URL | Description | | :---------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------ | | [app.sablier.com/stream/LL2-137-29](https://app.sablier.com/stream/LL2-137-29) | Lockup Linear V2.1 stream #29 on Polygon | | [app.sablier.com/stream/LL-137-32](https://app.sablier.com/stream/LL-137-32) | Lockup Linear V2.0 stream #32 on Polygon | | [app.sablier.com/stream/LD-137-13](https://app.sablier.com/stream/LD-137-13) | Lockup Dynamic V2.0 stream #13 on Polygon | | [app.sablier.com/stream/LL-1-6](https://app.sablier.com/stream/LL-1-6) | Lockup Linear V2.0 stream #6 on Ethereum | | [app.sablier.com/stream/0xB10...f95-1-6](https://app.sablier.com/stream/0xB10daee1FCF62243aE27776D7a92D39dC8740f95-1-6) | Lockup Linear V2.0 stream #6 on Ethereum | | [app.sablier.com/stream/LL2-11155111-40](https://app.sablier.com/stream/LL2-11155111-40) | Lockup Linear V2.1 stream #40 on Ethereum Sepolia | As you can see, the main format is `contractA-chainId-streamId`. This is supported both at the app and the subgraph level. For situations when an alias cannot be used, we fallback to the following format: `contractAddress-chainId-streamId`. Read more about identifiers and aliases in our [APIs docs](/api/ids). --- ## Search Streams ### Elements The Sablier Interface comes with an advanced search view that can be accessed directly through URL parameters. If you want to use this feature, here is a table with all the available parameters: | Parameter | Type | Description | Values | | :-------- | :----------- | :------------------------------------------------------------------------- | --------------------------------------------------------------- | | a | String | The address of the asset to filter for | `0x12...CD` for DAI | | c | Number | The chain of the streams in the search result. This parameter is required. | `1`, `42161`, or another [chain ID](/guides/lockup/deployments) | | i | String array | An array of IDs to look up | `LL-5-1`, `LD-5-14` etc. | | r | String | The address of the stream recipient by which to filter | `0x12...AB`, `vitalik.eth` | | s | String | The address of the stream sender by which to filter | `0x12...AB`, `vitalik.eth` | | t | String | The active tab in the dashboard. For global queries, use `search`. | `search`, `sender`, or `recipient` | ### Building the URL By combining the parameters described above, you can send users from your interface directly to the search view in the Sablier Interface. To build the link, you append all these elements to the base link `app.sablier.com/` as query parameters, e.g.: ```text app.sablier.com/?t=search&c=1&s=0x..1&r=0x...2&i=LL-1-2,LL2-1-29 ``` Here are some examples of URLs and the associated search modal for each: | | | | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | | [Streams created by a particular user](https://app.sablier.com/?t=search&c=1&s=0x0aAeF7BbC21c627f14caD904E283e199cA2b72cC) | ![Form](/screenshots/search-with-sender.webp) | | [Streams with particular IDs](https://app.sablier.com/?t=search&c=1&i=LL2-1-2,LL-1-29) | ![Form](/screenshots/search-with-ids.webp) | --- ## Airdrop Page | | | ----------------------------------------------------- | | ![Airdrop Profile](/screenshots/airdrop-profile.webp) | ### Elements Every airdrop created through the Lockup protocol is identified through three parameters: - a **chainId** (e.g. `1` for Ethereum, `10` for [Optimism](https://chainlist.org/) ) - a **contract** address (e.g. `0x12..AB`) :::info We've chosen not to apply aliases to Airstreams for now. In the future, we may ask the campaign creator to provide a name or an alias to be used in the URL. ::: ### Building the URL By combining the elements described above, you can send users from your interface directly to the create stream page in the Sablier Interface. To build the link to a stream resource, you use a hyphen `-` to concatenate the uppercase contract `alias`, the `chainId`, and the `streamId`, and then you add them to the base URL `app.sablier.com/stream/`: | URL | Description | | :--------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | | [app.sablier.com/stream/0xe72[...]bbabc-11155111](https://app.sablier.com/airstream/0xe72175dd12ac7efca6b7d12dfc913a5f661bbabc-11155111) | Airstream on Ethereum Sepolia | As you can see, the main format is `contractA-chainId`. This is supported both at the app and the subgraph level. Read more about identifiers and aliases in our [APIs docs](/api/ids). ## Search Airstreams ### Elements The Sablier Interface comes with an advanced search view that can be accessed directly through URL parameters. If you want to use this feature, here is a table with all the available parameters: | Parameter | Type | Description | Values | | :-------- | :----- | :---------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | a | String | The address of the asset to filter for | `0x12...CD` for DAI | | c | Number | The chain of the airstreams in the search result. This parameter is required. | `1`, `10`, `42161` or other [supported chain](/guides/lockup/deployments) | | m | String | The address of the campaign admin by which to filter | `0x12...AB`, `vitalik.eth` | | t | String | The active tab in the dashboard. For global queries, use `search`. | `search` | ### Building the URL By combining the parameters described above, you can send users from your interface directly to the search view in the Sablier Interface. To build the link, you append all these elements to the base link `app.sablier.com/airdrops` as query parameters, e.g.: ```text app.sablier.com/airdrops/?t=search&c=1&m=0x..1&a=0x ``` --- ## How-to Videos For an extensive set of video explanations please check out the [Support](/support/how-to) section. --- ## What Is Sablier? Sablier is a powerful onchain token distribution protocol. Here are some key definitions: - **The Sablier Protocol**: A collection of persistent, non-upgradeable smart contracts to facilitate streaming of ERC-20 tokens on Ethereum and other EVM blockchains. The Sablier Protocol consists of Lockup, Merkle Airdrops, and Flow. - **The Sablier Interface**: A web interface that allows for easy interaction with the Sablier Protocol. The interface is only one of many ways to interact with the Sablier Protocol. - **Sablier Labs**: The company that develops the Sablier Protocol, the Sablier Interface, and the documentation website you are reading right now. :::info Fun fact: "sablier" means "hourglass" in French. ::: ## Sablier Protocol A software protocol built with [Ethereum](https://ethereum.org/) smart contracts, designed to facilitate distribution of [ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) tokens. The protocol employs a set of persistent and non-upgradable smart contracts that prioritize security, censorship resistance, self-custody, and functionality without the need for trusted intermediaries who may selectively restrict access. Currently, Sablier consists of three separate systems: - **Lockup**: facilitates vesting and vested airdrops - **Merkle Airdrops**: enables on-chain airdrops - **Flow**: for payroll, grants etc. While most of these are licensed under BUSL-1.1, there are some components licensed under GPL v3. The source code can be accessed on Sablier's [GitHub account](https://github.com/sablier-labs), and a detailed technical reference can be found in the [Technical References](/reference/overview) section of this website. As long as Ethereum and the other EVM chains continue to exist, every version of the Sablier Protocol that gets deployed will operate continuously and without interruption, with a guarantee of 100% uptime. :::info Sablier is the first project to enable token streaming in the Ethereum ecosystem, tracing its roots [back to 2019](https://x.com/Sablier/status/1205533344886411264). ::: ## How does Sablier differ from traditional payment systems? To understand the unique characteristics of Sablier, it is helpful to examine two aspects: the permissionless nature of the protocol compared to traditional payment systems, the concept of streaming as an alternative to conventional payment methods. ### Permissionless systems Sablier is rooted in the essential ideas of open access and immutability, deriving inspiration from Ethereum's foundational principles and the core values of the DeFi[^1] movement. These concepts are crucial in shaping a future where financial services are accessible to everyone, irrespective of their geographical location or economic standing, without prejudice or exposure to counterparty risks. The permissionless design ensures that the protocol's services are open to the public, without any restrictions on who can use them. Users have the liberty to establish new streams with any ERC-20 token, or interact with existing streams as they wish. This feature stands in sharp contrast to conventional financial services that frequently impose restrictions based on factors such as location, financial status, or age. As an immutable system, the Sablier Protocol is non-upgradeable, meaning that no party can pause the contracts, reverse transactions, or alter the users' streams in any way. This ensures the system remains transparent, secure, and resistant to manipulation or abuse. ### Streaming vs conventional payments Traditional payment systems generally involve lump-sum transfers, which rely on trust between parties, have slow processing times, and are prone to errors. In the context of bank transfers, payments are also subject to substantial fees and can face delays due to intermediaries. By contrast, Sablier introduces the concept of token streaming, enabling users to make continuous, real-time payments on a per-second basis. This innovative approach enables seamless, frictionless transactions and promotes increased financial flexibility for users, businesses, and other entities. Sablier makes the passage of time itself the trust-binding mechanism, unlocking business opportunities that were previously unavailable. A good mental model to contrast streaming with conventional payment models is to view the former as "real-time finance" or "continuous finance", and the latter as of "discrete finance". ## Where can I find more information? For more details on the Sablier Protocol, its features, and potential use cases, explore this documentation site and visit the official [Sablier website](https://sablier.com) as well. :::tip If you have any questions along the way, please join the #dev channel in our Discord server. Our team and members of the community are looking forward to help you.‌ ::: ## Release history ### Lockup For more details on the UI alias, see the guide on [URL schemes](/apps/guides/url-schemes). | Version | Release Date | UI Aliases | | ------------------------------------------------ | ------------- | ---------------------------------------------------------------------- | | [v3.0](/guides/lockup/deployments) (latest) | October 2025 | `LK2` (Lockup): all models have been merged into a single contract | | [v2.0](/guides/lockup/previous-deployments/v2.0) | February 2025 | `LK` (Lockup): all models have been merged into a single contract | | [v1.2](/guides/lockup/previous-deployments/v1.2) | July 2024 | `LD3` (Lockup Dynamic), `LL3` (Lockup Linear), `LT3` (Lockup Tranched) | | [v1.1](/guides/lockup/previous-deployments/v1.1) | December 2023 | `LD2` (Lockup Dynamic), `LL2` (Lockup Linear) | | [v1.0](/guides/lockup/previous-deployments/v1.0) | July 2023 | `LD` (Lockup Dynamic), `LL` (Lockup Linear) | ### Merkle Airdrops | Version | Release Date | UI Aliases | | -------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | [v2.0](/guides/airdrops/deployments) (latest) | October 2025 | `MF_INST` (Merkle Factory Instant), `MF_LL` (Merkle Factory Linear), `MF_LT` (Merkle Factory Tranched), `MF_VCA` (Merkle Factory VCA) | | [v1.3](/guides/airdrops/previous-deployments/v1.3) | February 2025 | `MSF4` (Merkle Factory): all factories merged into a single contract | Before v1.3, Merkle Airdrops contracts were part of the Sablier Lockup [periphery repository](https://github.com/sablier-labs/v2-periphery). ### Flow For more details on the UI alias, see the guide on [URL schemes](/apps/guides/url-schemes). | Version | Release Date | UI Aliases | | ---------------------------------------------- | ------------- | ---------- | | [v2.0](/guides/flow/deployments) (latest) | October 2025 | FL3 | | [v1.1](/guides/flow/previous-deployments/v1.1) | February 2025 | FL2 | | [v1.0](/guides/flow/previous-deployments/v1.0) | December 2024 | FL | ### Legacy (Deprecated) The Legacy contracts have been superseded by Lockup. | Version | Release Date | | ---------------------------------- | ------------- | | [v1.1](/guides/legacy/deployments) | July 2021 | | [v1.0](/guides/legacy/deployments) | November 2019 | [^1]: Short for Decentralized Finance: an ecosystem of financial applications and services built on blockchain networks, primarily Ethereum, that leverage smart contracts to enable trustless, permissionless, and transparent financial transactions without relying on traditional intermediaries like banks or financial institutions. --- ## Streaming Token streaming means the ability to make continuous, real-time payments on a per-second basis. This novel approach to making payments is the core concept of Sablier. ## Brief history Andreas Antonopoulos introduced the concept of money streaming in his keynote talk [Bitcoin, Lightning, and Streaming Money](https://www.youtube.com/watch?v=gF_ZQ_eijPs), held at a Bitcoin meetup in 2016. He discussed it within the context of the Lightning Network, but the idea can be applied to any cryptocurrency platform. Inspired by Antonopoulos' presentation, Sablier co-founder Paul Berg published [ERC-1620](https://eips.ethereum.org/EIPS/eip-1620) in November 2018, proposing a standard for streaming payments on the Ethereum blockchain. The standard required users to lock a specified amount of funds in a smart contract, which would then be released to a recipient at a predetermined rate per second. Sablier was born in 2019 when Paul and his co-founder, Gabriel Apostu, decided to build a protocol implementing the ERC-1620 standard. The first iteration of Sablier was successfully deployed on Ethereum Mainnet in December 2019. In 2024, Sablier protocol got renamed to Lockup when Flow was introduced. ## What are the benefits? Conventional lump-sum payments come with inherent challenges such as the need for trust between parties, slow processing times, and susceptibility to errors. Token streaming, or continuous by-the-second payments, addresses these issues and offers additional benefits (see [Use Cases](/concepts/use-cases)). First, streaming involves a significantly smaller degree of trust compared to lump-sum payments, as it eliminates the need for advance payments. For instance, suppose you hire a remote worker to build a website for you, and they ask you for an advance payment. A lump-sum payment is risky because there is no guarantee the worker will deliver the website as promised. By streaming money to the worker instead, your potential loss is limited to the small amount streamed in the short term. If the remote worker disappears, you can simply cancel the stream and reclaim any unstreamed funds. Secondly, money streaming is substantially faster than lump-sum payments for evident reasons. Streaming transactions settle in real-time, with small amounts of tokens being released from the sender to the recipient every second. This automates the payment process and ensures a continuous flow of funds. Lastly, streaming is more secure than lump-sum payments, because it makes it possible to correct errors. Suppose you accidentally started a steam worth 10 ETH to the wrong address. For example, if you accidentally initiated a stream worth 10 ETH to an incorrect address, you can cancel the stream and reclaim the unstreamed Ether (e.g., recovering 9.99 of the 10 ETH). Conversely, recovering a lump-sum payment sent to the wrong address is not possible, unless the recipient is willing to return it. ## Diversity of streams Over time, we have come to realize that there is no one-size-fits-all streaming model that can address the diverse range of use cases. In the upcoming section, we will explore the various token distribution curves supported by Lockup and Flow. But first, let's dive into the use cases. --- ## Use Cases While Lockup and Flow both are general-purpose protocols that can be used for a wide variety of applications, some use cases are more popular than others. In this article, we will cover the primary reasons people are using Sablier Lockup and Sablier Flow. ## Sablier Lockup Sablier Lockup requires fixed dates and fixed amounts. When creating a stream, the total amount of tokens to be distributed needs to be deposited into the stream and you cannot add funds to an existing stream. Lockup streams have a fixed start date and end date, and cannot be extended. These properties make for an excellent user experience for vesting, as the terms are clear, defined and transparent. ### Vesting #### 1. Efficiency Traditional vesting schemes require a lot of manual input. Payments must be processed manually over an extended period, demanding continuous dedication from the treasury management team. The treasury admin has to initiate numerous transactions each month to compensate contributors and oversee the vesting of employees and investors As a result, traditional vesting proves to be labor-intensive, prone to errors, and ultimately delivers a subpar user experience for everyone involved. Organizations need to devote considerable time to administer funds, while recipients wait months, quarters, or sometimes even longer to obtain their compensation. Sablier solves these problems by automating the entire vesting process. The initial setup involves creating the streams, which only needs to be done once. You simply specify the total duration of the stream (e.g., two years), and that's all - no further actions are required from you. With Sablier, vesting is a "set it and forget it" process. Then, recipients receive their compensation gradually over time: with every second that passes, they receive a fraction of their allocated compensation. This model aligns with the incentives of both parties. The organization only needs to spend time once, to create the streams, while recipients receive the funds gradually over time, allowing them to manage their finances as they wish. #### 2. Schelling points :::info In game theory, a "focal point" (also called Schelling point) is a solution that people tend to choose by default in the absence of communication. ::: Since traditional vesting contracts have a predictable release schedule, the day on which a vesting period unlocks may be used as a Schelling point for speculation. As a result, some token holders may dump their tokens as soon as they receive them. By contrast, Sablier streams distribute a fraction of the total payment every second to recipients, enabling them to withdraw a portion of funds at any time. This effectively addresses the problem of coordinated dumping. #### 3. Transparency It's hard to aggregate discrete payments, which is why they typically lack transparency. Just by looking at a transaction on Etherscan, it's difficult to pin down to whom it was made, or for what purpose. This issue is particularly relevant to DAOs, where transparency is critical to enabling contributors to understand how the treasury funds are allocated and for what purposes. With Sablier streams, the issues mentioned above are avoided. Anyone can use the Sablier interface to monitor all streams created by a particular address, as well as all transactions associated with each stream. To illustrate this, here's an example of a stream as viewed on the Sablier Interface. ## Merkle Airdrops This section explores the use cases enabled by Merkle Airdrops. ### Instant airdrops Instant airdrops is the traditional way of running airdrops where there's no vesting period and tokens can instantly be claimed by the recipients. Running an airdrop campaign can become very expensive if you are storing airdrop data on-chain, however. This is where Merkle Airdrops come into the picture. When you run a campaign with Sablier, the airdrop information is stored in a merkle tree, hosted on IPFS. The EVM storage only stores the root of the Merkle tree. At the time of claim, eligible users can provide a merkle proof of their claim which is verified on-chain. This not only reduces cost of running an airdrop campaigns but also inherits the security of the Sablier protocol. ### Streaming airdrops With vested airdrops, also called Airstreams, instead of airdropping the entirety of the token allocation all at once, airdrop recipients receive a fraction of the tokens every second through a Sablier stream. A stream can have any duration you want. You can choose to vest your new token over a period of 6 months, 2 years, or any other duration you prefer. This way, airdrop recipients are forced to think about the project's long-term development and stay engaged with it. 1. The token price may fluctuate over time, which motivates recipients to do whatever they can to increase the price. 2. In cases where a recipient fails to remain involved with the project, the creator of the airdrop has the ability to cancel the recipient's stream. Canceling a stream will not undo any tokens that have already been streamed, but it will prevent the recipient from receiving any more tokens. ### Variable Claim airdrops While both Instant and Streaming airdrops have their own benefits, neither of them rewards user loyalty. To address this, we introduced Variable Claim airdrops. In a Variable Claim airdrop, the claim amount depends on when the user claims. The longer a user waits, the more tokens they receive. This creates an incentive for users to delay their claim until the end of the airdrop campaign, rewarding patience and long-term commitment. When users claim early, the remaining unclaimed tokens are forfeited and returned to the campaign. As the campaign creator, you can clawback these forfeited tokens after the airdrop campaign expires. Here are some examples of what you can do with these reclaimed tokens: - Create a second campaign and airdrop them to users who waited until the end of the airdrop campaign as a loyalty bonus. - Create a staking campaign and use them as as staking rewards. - Send them to your treasury and use them as a future fund. - Use them to buyback your tokens from the market. Currently, we only support linear unlocks in variable claim airdrops. If you are interested in other kind of curves, please reach out to us on Discord. :::tip If you are interested in airdropping your token, check out [Sablier website](https://app.sablier.com/airdrops/). ::: ## Sablier Flow Unlike Lockup, Sablier Flow streams do not require upfront deposits, nor do they have fixed start and end dates. Flow is all about flexibility, making it ideal for use cases like payroll and grants. ### Payroll What if your salary could be streamed to you in real time? Why should you wait for two weeks or a month when you can get it every second? Streaming salaries through Sablier significantly enhances employee satisfaction and retention. Your employer can create a Flow stream and keep funding it at the end of every month or in advance, for you to withdraw your money. The benefits outlined in the "Efficiency" section earlier apply equally to this use case, since traditional payroll solutions, like vesting schemes, can be both labor-intensive and prone to errors. ### Grants Grants are a powerful use case for Sablier, allowing for efficient, transparent, and flexible distribution of funds to grant recipients. :::info Uniswap Governance used Sablier to distribute grant to DeFi Education Fund. You can find more details on it [here](https://x.com/Sablier/status/1798010170133692730). ::: #### 1. Transparency Sablier enables real-time streaming of funds, ensuring transparency in how grants are distributed. Your stakeholders can monitor the flow of funds, providing assurance that the money is being used as intended. #### 2. Pay as they deliver Instead of lump-sum payments, you can use Sablier to stream funds continuously over a specified period. This ensures recipients have a steady cash flow and reduces the risk of mismanagement of funds. If a grant recipient stops working on their project, you can cancel the stream and retrieve back the remaining funds. #### 3. No Administrative Overhead All streams through Sablier are automated, which means, you don't have to send funds manually at the end of every month. --- ## Airdrops(Concepts) :::note You can refer to the [airdrop section](/concepts/use-cases#merkle-airdrops) of our use-cases page to learn more about the benefits of streaming airdrops. ::: There are three types of airdrop campaigns that you can setup using Sablier Merkle Airdrops. ## Instant Airdrop Instant airdrops is the traditional way of running airdrops where there's no vesting period and tokens can instantly be claimed by the recipients. Eligible users receive airdrop tokens directly into their wallets at the claim time. ## Vested Airdrops Vested airdrops are campaigns in which instead of airdropping the entirety of the token allocation all at once, airdrop recipients receive a fraction of the tokens every second through a Sablier stream. The gist of vested airdrops is that instead of airdropping the entirety of the tokens all at once, airdrop recipients receive a fraction of the tokens every second through a token stream. The beauty of it is that airdrop recipients are forced to think long-term and keep the project's future as their first and foremost priority. They are forced to, because instead of receiving all the tokens at once, they receive them over time in our user-friendly [vested airdrop interface](https://app.sablier.com/airdrops). :::info An airdrop campaign can have a claim window of a few days, months, or even years. Alternatively, they can have no expiration. In case of vested airdrops, you could, for example, configure the airdrop of your new token to vest over years, but the recipients get the streamed tokens only if a claim is made within that period of time. ::: Vested airdrops not only create the right incentives for token holders, but also prevent them from dumping their tokens on day one, as has been the case for many airdrops in the past. There are two types of vested airdrop campaigns that you can create using Merkle Airdrop. ### Ranged This either uses Lockup Linear model or Lockup Tranched model depending on whether you use `MerkleLL` or `MerkleLT` to create the campaign. In ranged vested airdrop campaigns, the vesting begins for all the recipients at the same time. This time had to be provided while creating the campaign. ### Non-Ranged In non-ranged vested airdrop campaigns, the vesting begins at the time of claiming. In this case, all recipients can have different start time for vesting depending on when they claim. ## Variable Claim Airdrops This is a special type of vested airdrop in which user can choose to forfeit the unvested tokens back to the campaign, by claiming early. Campaign admin can then clawback the forfeited tokens after the campaign expires. A typical variable claim airdrop, created to vest tokens over 1 year, may look like the following: - A user claims after 3 months and receive 25% of his total allocation. 75% of the tokens are then forfeited and returned to the campaign. - Another user claims after 6 months and receive 50% of his total allocation. 50% of the tokens are then forfeited and returned to the campaign. - A third user claims after 12 months and receive 100% of his total allocation. This type of airdrop is particularly useful for campaigns that want to reward users for their patience and loyalty. ## White Label Solution Sablier Labs does not currently offer any white label solutions for Merkle Airdrops. This means that you cannot have your logo displayed in the claim page seen by the airstream recipients. However, we are actively exploring implementing this feature. Fill out this form and we will respond as soon as possible. ## How it Works Thanks to our battle-tested token distribution protocol, you can create Airdrop campaigns for thousands of recipients in a few clicks using our interface. Recipients and their airdropped allocations can be set by uploading a simple CSV spreadsheet in the [user interface](https://app.sablier.com/airdrops). The spreadsheet feature is the perfect fit for merkle airdrop campaigns: it allows you to upload a CSV file with tens of thousands of recipients and the interface will let each of these recipients claim with ease. You can download a template of the CSV file [here](https://files.sablier.com/templates/airstream-template.csv). Another great advantage is that creating an airdrop campaign with thousands of recipients won't ruin you in terms of gas fees. When launching a campaign, a contract is deployed only storing the merkle root. Thus, users pay the gas fee to claim their airdrop. This is made possible by a data structure called Merkle Tree, which efficiently summarizes and verifies the integrity of large sets of data. :::info The contracts that implement vested airdrop campaigns are called [`MerkleLL`](/reference/airdrops/contracts/contract.SablierMerkleLL) and [`MerkleLT`](/reference/airdrops/contracts/contract.SablierMerkleLT). If you are interested in instant airdrop campaigns, the contract code can be found [here](/reference/airdrops/contracts/contract.SablierMerkleInstant). ::: When you create an airdrop campaign, all you are doing is deploying a contract that allows for the recipients you put in to prove that they are eligible, and create a stream if they are. That's all it is. Additionally, you don't have to immediately fund the campaign contract. You can just create the contract and at a later date fund it with the airdropped tokens. **This has three great implications:** 1. **Recipients pay for the gas fees themselves to create the stream**, when they claim (the claim action creates the stream). Creating a campaign with thousands of recipients would be incredibly costly if you had to pay for all the gas fees. 2. **You keep full control over unclaimed Tokens**. If a recipient doesn't claim their airdrop, it's not created, and you remain in full control over their allocation. - This applies only if the campaign has an expiration date. If there is no expiration date, you can only clawback during the grace period, and the recipients can claim their airdrop at any time in the future. 3. **You can retrieve your funds in case of misconfiguration**. There is a grace period during which you can retrieve unclaimed funds. The grace period ends 7 days after the first claim is made. This is useful in case where you have incorrectly configured the campaign or deposited more tokens than required. Once the campaign is launched, recipients can claim their airdrop and withdraw the underlying tokens that have already been streamed at any time using the Sablier Interface at [app.sablier.com](https://app.sablier.com). ## Diagram If you want to have a detailed look into how these campaigns work at the contract level, you can head over to the [Diagrams page](/reference/airdrops/diagrams). --- ## Supported Chains <> The Sablier Protocol is deployed on {getChainCount("mainnets")} mainnets and {getChainCount("testnets")} testnet EVM chains, although not all of these are supported by the [Sablier Interface](https://app.sablier.com/). :::tip Want to list your chain? If you're interested in having Sablier deployed on your chain, fill out this form and our team will get back to you. ::: ## Mainnets ## Testnets --- ## NFTs Both Lockup and Flow Protocols wrap every stream in an ERC-721 non-fungible token (NFT), making the stream recipient the owner of the NFT. The recipient can transfer the NFT to another address, and this also transfers the right to withdraw funds from the stream, including any funds already streamed. ## Lockup NFT Sablier Lockup streams are represented as unique onchain generated hourglass SVGs, which change their color and content based on user data. Here's an example for a stream that is 42.35% way through: ### Gallery of Multiple Sablier NFT SVGs If you prefer the granularity of a blockchain explorer, you can also view the stream NFTs on [Etherscan](https://etherscan.io/token/0xB10daee1FCF62243aE27776D7a92D39dC8740f95). See the [Deployments](/guides/lockup/deployments) page for the full list of addresses. ## Flow NFT Unlike Lockup streams, the first release of Flow streams are represented by Sablier Logo. ## Integrations The transferability of the NFT makes Sablier streams tradable and usable as collateral in DeFi. Imagine an NFT lending marketplace that allows users to borrow funds by locking their streams as collateral (effectively borrowing against their future income). Or a decentralized exchange that allows users to trade streams for other tokens. :::note Not all Sablier streams are transferable. The stream creator can choose to make the stream non-transferable. You can find more details on it in the [Transferability](/concepts/transferability) section. ::: :::info If you're interested in making an integration, please fill out this form and we will try to respond as soon as possible. ::: ## Marketplaces :::caution Be careful when buying Lockup NFTs that represent cancelable stream. When these streams are canceled, the unstreamed amount is returned to the sender. ::: Thanks to adhering to the ERC-721 standard, Sablier streams can be traded and viewed on any NFT marketplace. Here are some of the marketplaces that support Sablier streams: - [OpenSea](https://opensea.io) - [Blur](https://blur.io) - [Rarible](https://rarible.com) - [SuperRare](https://superrare.com) - [LooksRare](https://looksrare.org) ## Caching The SVG artwork is generated using certain real-time values, such as the current time on the blockchain. However, NFT marketplaces cache the NFT metadata, and this may cause the SVGs might not always be up to date. The Sablier Protocol triggers [ERC-4906](https://eips.ethereum.org/EIPS/eip-4906) events whenever there's an update in a stream (for instance, when a withdrawal is made). However, some streams might remain unchanged for an extended period. To ensure you're viewing the most recent version of the NFT SVG, it's recommended to check the stream directly via the [Sablier Interface](https://app.sablier.com). --- ## Cancelability ## Lockup Streams When creating a Lockup stream, users have the ability to set the stream as cancelable, or uncancelable. If **cancelable**, the stream can be stopped at any time by the stream creator, with the unstreamed funds being returned over to the stream creator. **Example:** If you are using Sablier Lockup for Employee Token Vesting, and one of your employees leaves your company, you can cancel the stream and get the tokens back which haven't yet been vested to the ex-employee at that specific time. Any tokens vested out before that are obviously now owned by the recipient. :::info When a stream is canceled (stopped), there is no way to uncancel it (start it again). You will need to create a new stream in that case. ::: If **uncancelable**, there is no way to cancel the stream, and the recipient is guaranteed to receive the funds. A cancelable stream can be set as uncancelable at any point in time by the stream creator. On the other hand, an uncancelable stream cannot be set as cancelable by the stream creator. Recipients do not have the ability to cancel a stream. ## Merkle Airdrop campaigns If you have created a merkle campaign and made a mistake, you can recover the funds from the campaign that haven't yet been claimed in the following cases: - Before any user claimed from the campaign - Up until 7 days after the first claim took place - After the claim window ends (assuming it's enabled) If you haven't set up a claim window, you can only recover the funds you deposited into the campaign up until 7 days after the first claim took place, or as long as you like if there are no claims. Assuming there are claims, after the 7-day period passes, you will not have the ability anymore to recover the funds deposited into the campaign contract. They will stay there forever until claimed by eligible recipients. If you have set up a claim window, after the claim window ends, you have the ability to get the funds back which haven't yet been claimed by that time. :::important It's important to mention that the airstreams created through the merkle campaigns can be set as cancelable, the above points are related to the campaign itself, not the streams created through users claiming from the campaign. **Example:** you create an Airstream campaign. You deposit 1000 USDC in it. You set up the streams as cancelable, but there is no claim window. All eligible users claim from the campaign at the same time, and 8 days later, you realize you made a mistake. While you cannot recover the funds through the campaign as the 7-day period has passed, you can cancel the streams that were created and get the funds back which haven't been paid out at that specific time to the recipients. ::: ### Ranged Airstreams In case of Ranged Airstreams, the vesting begins and ends at the same time for all the recipients, provided by the campaign creator. If campaign creator wishes to cancel unclaimed Ranged Airstreams before the campaign expiry, the creator would have to trigger claims on behalf of the recipients and then cancel the Lockup streams. On the other hand, to cancel claimed Ranged Airstreams, campaign creator can simply cancel them through the Sablier interface, provided they were set as cancelable during campaign launch. ### Non-Ranged Airstreams For all the claimed Non-Ranged Airstreams, campaign creator can cancel them through the Sablier interface, provided they were set as cancelable during campaign launch. For all non-claimed Non-Ranged Airstreams, because the vesting does not begin until the user claims, campaign creator can wait until the campaign expiry to recover the unclaimed funds. ## Flow Streams Flow Streams do not offer the ability to cancel the stream. However, the stream creator can pause a Flow stream at any time and resume it at any time making it a more flexible option for payments. --- ## Transferability As you may know, all Sablier streams [are represented by NFTs](/concepts/nft). The NFT representing a stream is owned by the stream recipient. Whoever owns the stream NFT becomes the stream recipient. When creating the stream, users have the ability to set it as transferable or untransferable. If transferable, recipients have the ability to transfer the NFT (meaning the stream) to another wallet. They have, by extension, also the ability to, for example, sell it on an NFT marketplace, or borrow against it by using it as collateral in an NFT lending protocol. If untransferable, recipients do not have the ability to transfer the NFT (meaning the stream) to another wallet, and by extension, do not have the ability to sell it on an NFT marketplace or borrow against it in an NFT lending protocol. :::info If you are using Sablier for vesting, and do not want your investors and/or employees to be able to exit their position without the vesting being complete, you should set up the streams as untransferable. ::: --- ## Governance ## Comptroller The Sablier Comptroller is a smart contract that acts as an intermediary between the protocols and the admin. It has exclusive access to specific protocol functions. This design provides a more flexible approach to access control across all protocols while maintaining security. Admin addresses that control the Comptroller are listed in the [Admin Addresses](#admin-addresses) section. ## Lockup Comptroller has the following permissions on each chain where Lockup is deployed: | Permission | Function | | ------------------ | ----------------------------------------------------------------------------------------- | | Allow to Hook | [`allowToHook`](/reference/lockup/contracts/contract.SablierLockup#allowtohook) | | Recover | [`recover`](/reference/lockup/contracts/contract.SablierLockup#recover) | | Set Native Token | [`setNativeToken`](/reference/lockup/contracts/contract.SablierLockup#setnativetoken) | | Set NFT Descriptor | [`setNFTDescriptor`](/reference/lockup/contracts/contract.SablierLockup#setnftdescriptor) | ## Merkle Factory Comptroller has the following permission on each chain where the Merkle Factories are deployed: | Permission | Function | | ---------------- | ------------------------------------------------------------------------------------------------------------ | | Set Native Token | [`setNativeToken`](/reference/airdrops/contracts/abstracts/abstract.SablierFactoryMerkleBase#setnativetoken) | ## Flow Comptroller has the following permissions on each chain where Flow is deployed: | Permission | Function | | ------------------ | ------------------------------------------------------------------------------------- | | Recover | [`recover`](/reference/flow/contracts/contract.SablierFlow#recover) | | Set Native Token | [`setNativeToken`](/reference/flow/contracts/contract.SablierFlow#setnativetoken) | | Set NFT Descriptor | [`setNFTDescriptor`](/reference/flow/contracts/contract.SablierFlow#setnftdescriptor) | ## Admin Addresses The Comptroller is introduced in Lockup v3.0, Airdrops v2.0 and Flow v2.0. For earlier versions, we use a direct "Admin" role for governance. These admin accounts have the same authority as the current Comptroller contract, with direct access to specific protocol functions. More concretely, the Admin is a collection of multisig wallets and EOAs currently in control of Sablier Labs. ## Trustlessness Despite having an admin, the Sablier Protocol remains trustless. Here's why: 1. The protocol is permissionless, i.e. it can be freely accessed by anyone with an Internet connection. 2. The protocol is persistent, i.e. the admin cannot pause it. 3. The streaming logic is non-upgradeable, i.e. the admin cannot tamper with the streams created by users. 4. There are no escape hatches that allow the admin to claim user funds. 5. There is a hard-coded upper limit of 10% to the fees that the admin can charge. ## Timelocks The parameter changes that can be effected are NOT subject to a timelock. This means that the admin can execute any of the functions listed above at any time. ## Governance As a startup, Sablier has to deal with uncertainty regarding: 1. Protocol-market fit 2. Smart contract security Attaining success in these areas is no easy feat, and as such, decentralizing the protocol's governance will not be an initial priority. Nonetheless, we believe that progressive decentralization is the most effective approach to scaling a smart contract protocol. As the protocol matures, we will decentralize its governance incrementally. --- ## Fees During the course of using Sablier, you may encounter up to three different types of fees: [Interface Fees](#interface-fees), [Contract Fees](#contract-fees), and [Gas Fees](#gas-fees). Below you can see a breakdown of how each fee is calculated and who receives it. ## Interface Fees The Sablier Interface charges a flat fee in USD for certain operations. However, this fee is paid in the native gas token, i.e. in ETH for streams on Ethereum, and in POL for streams on Polygon. The fee amount is calculated based on market prices. For example, when ETH is \$4000, a \$1 fee is 0.00025 ETH. :::tip[For Senders] Interface Fees can be subsidized - the person creating the stream or airdrop can choose to cover the fees that would normally be charged to recipients. If you're interested in subsiding fees for your users, please contact us to discuss your specific requirements. ::: ### Stream Withdrawals The Sablier Interface charges a flat fee each time you withdraw from a stream. This applies to both Lockup and Flow streams. :::info[How much is the withdraw fee?] The fee is **$1** (in the gas token) regardless of the withdraw amount. ::: The fee applies only to streams created via [Lockup v2.0 (or later)](/guides/lockup/deployments#versions) and [Flow v1.1 (or later)](/guides/flow/deployments#versions). You do not pay this fee for withdrawing from streams created using earlier releases. ### Airdrop Claims The Sablier Interface charges a flat fee when you claim an airdrop. :::info[How much is the claim fee?] The fee is **$2** (in the gas token) per claim, regardless of the airdrop amount. ::: The fee applies only to airdrops created via Merkle [Airdrops v1.3 (or later)](/guides/airdrops/deployments#versions). Claims from airdrops created with earlier versions do not incur any claim fee. ### Timeline for Interface Fees | Product | Timeline | Operation | Fee | | -------- | -------------------------- | ------------- | --- | | Airdrops | Apr 10, 2025 - present | Airdrop claim | \$2 | | Lockup | Feb 3, 2025 - present | Withdraw | \$1 | | Flow | Feb 3, 2025 - present | Withdraw | \$1 | | Airdrops | Feb 3, 2025 - Apr 10, 2025 | Airdrop claim | \$3 | | Airdrops | Dec 18, 2023 - Feb 2, 2025 | Airdrop claim | 0 | | Lockup | Jul 3, 2023 - Feb 2, 2025 | Withdraw | 0 | | Flow | Dec 4, 2024 - Feb 2, 2025 | Withdraw | 0 | ## Contract Fees As opposed to the Interface Fees, the Contract Fees are charged by the Sablier contracts themselves. They apply regardless of the interface used to interact with the Sablier Protocol. This fee is also charged in USD but paid in the native gas token via the [`msg.value`](https://docs.soliditylang.org/en/v0.8.30/units-and-global-variables.html#block-and-transaction-properties) field of the transaction. During a transaction, [Chainlink](https://chain.link/education/blockchain-oracles) is used to convert the fee from USD to the native gas token. The transaction succeeds only if the `msg.value` is greater than or equal to the fee amount returned by `calculateMinFeeWei` function which is available in [Lockup](/reference/lockup/contracts/contract.SablierLockup.md#calculateminfeewei), [Flow](/reference/flow/contracts/contract.SablierFlow.md#calculateminfeewei) and [Airdrops](/reference/airdrops/contracts/abstracts/abstract.SablierMerkleBase.md#calculateminfeewei) contracts. :::tip[For Senders] Contract Fees can be subsidized - the person creating the stream or airdrop can choose to cover the fees that would normally be charged to recipients. If you're interested in subsiding fees for your users, please contact us to discuss your specific requirements. ::: The [Comptroller](/concepts/governance/#comptroller) can update the Contract Fees. - In case of Lockup and Flow, the new fee would apply to all the new streams created after the update, as well as the existing streams. - In case of Airdrops, the new fee would apply to all the new airdrops campaigns created after the update. The fee on the existing airdrops campaigns remains the same or can be LOWERED if subsidized by the campaign owners. :::warning The Contract Fee acts as a **minimum fee**, so it is NOT cumulative with the Interface Fee. When you interact with the contracts via Sablier interface, you only pay the Interface Fee. On the other hand, if you interact with the contract directly, you will only pay the Contract Fee. ::: ### Stream Withdrawals Lockup and Flow contracts charge a flat fee each time you withdraw from a stream. On the chains listed below, the fee is **$0.9** (in the gas token). For the chains NOT listed below, it is zero. [Click here](/concepts/chains#mainnets) to see the full list of supported chains. | Chain | Gas Token | Fee | | ---------- | --------- | ---- | | Arbitrum | ETH | $0.9 | | Avalanche | AVAX | $0.9 | | Base | ETH | $0.9 | | BNB Chain | BNB | $0.9 | | Ethereum | ETH | $0.9 | | Gnosis | XDAI | $0.9 | | Linea | ETH | $0.9 | | Optimism | ETH | $0.9 | | Polygon | POL | $0.9 | | Scroll | ETH | $0.9 | | Sonic | S | $0.9 | | zkSync Era | ETH | $0.9 | The fee applies only to streams created with [Lockup v3.0 (or later)](/guides/lockup/deployments#versions) and [Flow v2.0 (or later)](/guides/flow/deployments#versions). ### Airdrop Claims Airdrop contract charges a flat fee each time you claim an airdrop. On the chains listed below, the fee is **$0.9** (in the gas token). For the chains NOT listed below, it is zero. [Click here](/concepts/chains#mainnets) to see the full list of supported chains. | Chain | Gas Token | Fee | | ---------- | --------- | ---- | | Arbitrum | ETH | $0.9 | | Avalanche | AVAX | $0.9 | | Base | ETH | $0.9 | | BNB Chain | BNB | $0.9 | | Ethereum | ETH | $0.9 | | Gnosis | XDAI | $0.9 | | Linea | ETH | $0.9 | | Optimism | ETH | $0.9 | | Polygon | POL | $0.9 | | Scroll | ETH | $0.9 | | Sonic | S | $0.9 | | zkSync Era | ETH | $0.9 | The Contract Fee applies only to airdrop campaigns created with [Merkle Airdrops v2.0 (or later)](/guides/airdrops/deployments#versions). #### Merkle Airdrops v1.3 In [Merkle Airdrops v1.3](/guides/airdrops/previous-deployments/v1.3), oracles were not used. As a result, the fees in v1.3 are specified in the native token. Therefore, the fees in the table above are applicable only to v2.0 and later. For v1.3, the fees are as follows: | Chain | Gas Token | Fee | Fee in Wei | | ---------- | --------- | ---------------- | ------------------- | | Ethereum | ETH | 0.00036 ETH | 360000000000000 | | Abstract | ETH | 0.00036 ETH | 360000000000000 | | Arbitrum | ETH | 0.00036 ETH | 360000000000000 | | Avalanche | AVAX | 0.038491147 AVAX | 38491147000000000 | | Base | ETH | 0.00036 ETH | 360000000000000 | | Berachain | BERA | 0.15385 BERA | 153850000000000000 | | Blast | ETH | 0.00036 ETH | 360000000000000 | | BNB Chain | BNB | 0.0017620835 BNB | 1762083500000000 | | Chiliz | CHZ | 9.29 CHZ | 9290000000000000000 | | Gnosis | XDAI | 1 XDAI | 1000000000000000000 | | Linea | ETH | 0.00036 ETH | 360000000000000 | | Mode | ETH | 0.00036 ETH | 360000000000000 | | Morph | ETH | 0.00036 ETH | 360000000000000 | | Optimism | ETH | 0.00036 ETH | 360000000000000 | | Polygon | POL | 3.1897926635 POL | 3189792663500000000 | | Scroll | ETH | 0.00036 ETH | 360000000000000 | | Superseed | ETH | 0.00036 ETH | 360000000000000 | | zkSync Era | ETH | 0.00036 ETH | 360000000000000 | ## Gas Fees [Gas fees](https://investopedia.com/terms/g/gas-ethereum.asp) are transaction fees paid to the blockchain validators in the native token of the network, e.g., ETH for Ethereum Mainnet. Gas is paid only when streams are created, canceled, transferred, or withdrawn from. Gas does not accrue in real-time. Importantly, Sablier Labs does not take any cut from the gas fee. 100% of the gas fee goes to the blockchain network validators, which are not affiliated with Sablier Labs. ## Fee Subsidization Interface and Contract Fees can be subsidized, partially or fully, by the sender in certain cases. This means that the person creating the stream or airdrop can choose to cover the fees that would normally be charged to the recipient. Note that the gas fees cannot be subsidized as they are paid to the blockchain network validators on every transaction. If you're interested in subsiding fees for your users, please [contact us](https://docs.google.com/forms/d/e/1FAIpQLSdqkcRjXl3urdE_yiT55itkcEX5LC4CM4HsNhjJbXB_CNMMjg/viewform) to discuss your specific requirements. ## FAQ ### Q: How are the Interface Fees charged? **A:** They are added to the gas fee. For example, if the gas fee is \$10 and the Interface Fee is \$1, you would pay \$11 in total (the payment is taken in the gas token, e.g., ETH). ### Q: Are the Interface Fees and the Contract Fees cumulative? **A:** No. The Contract Fee acts as a **minimum fee**, so it will not get added to the Interface Fee. You will pay the higher of the two fees. ### Q: Does the Stream Withdrawal Fee apply to each withdrawal? **A:** Yes, unless they are subsidized by the sender. The fee is charged each time you withdraw from a stream. For example, if you withdraw from a stream 10 times, you will pay $10 in fees. ### Q: Can the Interface Fees and the Contract Fees be subsidized? **A:** Yes, they can be subsidized by the stream sender or the airdrop creator. Please [contact us](https://docs.google.com/forms/d/e/1FAIpQLSdqkcRjXl3urdE_yiT55itkcEX5LC4CM4HsNhjJbXB_CNMMjg/viewform) to discuss your specific requirements. :::tip We provide gas benchmarks for the [Lockup](/guides/lockup/gas-benchmarks) and [Flow](/guides/flow/gas-benchmarks) contracts. ::: --- ## Security Ensuring the security of the Sablier Protocol is our utmost priority. We have dedicated significant efforts towards the design and testing of the protocol to guarantee its safety and reliability. The Sablier contracts have undergone rigorous audits by leading security experts from [Cantina](https://cantina.xyz/), [CodeHawks](https://codehawks.cyfrin.io/), and many independent auditors. For a comprehensive list of all audits conducted, check out [the audit repo](https://github.com/sablier-labs/audits/). ## Comptroller and Utility Contracts Audits All the audits of Comptroller and other utility contracts can be found [here](https://github.com/sablier-labs/audits/blob/main/evm-utils). ## Lockup Audits All the audits of Lockup contracts can be found [here](https://github.com/sablier-labs/audits/blob/main/lockup). ## Merkle Airdrops Audits All the audits of Merkle Airdrops contracts can be found [here](https://github.com/sablier-labs/audits/tree/main/airdrops). ## Flow Audits All the audits of Lockup contracts can be found [here](https://github.com/sablier-labs/audits/blob/main/flow). ## Bug Bounty The details of the bug bounty program can be found [here](https://sablier.notion.site/bug-bounty). :::info The bounty is up to $100,000 for reporting critical vulnerabilities. ::: --- ## Glossary ## Claim Fee The minimum fee, in native tokens, required for claiming an airdrop from a Merkle Airdrop campaign. ## Closed-Ended Stream Closed-ended streams have a fixed deposit amount and a fixed duration. Once the sender creates the stream, a specific start and end time are recorded on the blockchain. They contrast with [open-ended streams](/concepts/glossary#open-ended-stream). ## Comptroller A smart contract with exclusive access to specific functions of the protocol. ## DeFi Short for Decentralized Finance: an ecosystem of financial applications and services built on blockchain networks, primarily Ethereum, that leverage smart contracts to enable trustless, permissionless, and transparent financial transactions without relying on traditional intermediaries like banks or financial institutions. ## ERC-20 [ERC-20][erc-20] tokens are fungible tokens on Ethereum. Sablier supports all standard ERC-20 implementations, including those with the [missing return value bug](https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca). ## ERC-721 [ERC-721][erc-721] tokens are non-fungible tokens ("NFTs") on Ethereum. Both Lockup and Flow streams are represented as NFTs. ## Ethereum A global, open-source platform for decentralized applications. ## Ethereum Virtual Machine The technical architecture of Ethereum, which many other blockchains have appropriated. ## Flow A term coined by us for our debt tracking protocol that tracks tokens owed between two parties, enabling open-ended token streaming. ### Covered debt The amount of tokens that can be withdrawn by the recipient. ### Flow Protocol Smart contracts that are considered foundational, and are essential for Flow streams to exist. Upgrading to a new version of Flow would require deploying an entirely new set of smart contracts, and would be considered a new version of the Flow protocol. ### Rate Per Second The amount of tokens that are streamed per second in a Flow stream. ### Status A Flow stream can have one out of six possible statuses: 1. NULL 1. PENDING 1. PAUSED_INSOLVENT 1. PAUSED_SOLVENT 1. STREAMING_INSOLVENT 1. STREAMING_SOLVENT 1. VOIDED ### Uncovered debt The amount of tokens that sender owes to the stream. ## Foundry [Foundry][foundry] is the application development toolkit that has been used to develop the Sablier Protocol. ## Gas Fee [Gas fees](https://www.investopedia.com/terms/g/gas-ethereum.asp) are transaction fees paid to the blockchain validators in native tokens such as ETH. Sablier Labs does not take any cut from this. Gas is paid only when streams are created, canceled, transferred, or withdrawn from. It does not accrue in real-time. ## Lockup A term coined by us to refer to the requirement of locking up tokens in order to create a stream. ### Allow List A list of smart contract recipients that are authorized to be run by the Lockup protocol upon withdraw and cancel. The stream itself is represented as an NFT (ERC-721). ### Cliff Time The cut-off point for releasing tokens. Prior to the cliff, the recipient cannot withdraw, though tokens continue to accrue in the stream. ### Distribution Model A distribution model represents the streaming function used to create lockup streams. There are three types of models supported by the Lockup protocol: 1. Linear 2. Dynamic 3. Tranched ### Dynamic Model A Lockup [distribution model](#distribution-model) with a streaming rate per second that can vary over time. ### End Time The time when a stream is scheduled to end. ### Linear Model A Lockup [distribution model](#distribution-model) with a constant streaming rate per second. ### Lockup Math [A public library](/reference/lockup/contracts/libraries/library.LockupMath) used by the Lockup protocol to calculate the amount of vested tokens at any given time. ### Lockup Protocol Smart contracts that are considered foundational, and are essential for Lockup streams to exist. Upgrading to a new version of Lockup would require deploying an entirely new set of smart contracts, and would be considered a new version of the Lockup protocol. ### Monotonicity A protocol invariant that states that the total amount of tokens released by the stream can only increase over time and never decrease. ### Renounce A renounced stream is a stream that cannot be canceled anymore. ### Segment A data object that encapsulates these three properties: 1. Amount 2. Exponent 3. Timestamp Segments are an essential component of Dynamic [distribution model](#distribution-model), as they facilitate the calculation of the custom streaming curve. ##3 Start time The time when a stream is scheduled to start. ### Status A Lockup stream can have one out of six possible statuses: 1. NULL 2. PENDING 3. STREAMING 4. SETTLED 5. CANCELED 6. DEPLETED ### Timestamp Lockup timestamp represents start time and end time. ### Tranche A data object that encapsulates these two properties: 1. Amount 2. Timestamp Tranches are an essential component of Tranched [distribution model](#distribution-model), as they facilitate the calculation of the custom streaming curve. ### Tranched Model A Lockup [distribution model](#distribution-model) with a streaming in discrete tranches. ### Unlock Amounts A data object that encapsulates amounts to be unlocked at the start of the stream and at the cliff of the stream. ## Merkle Airdrop An onchain distribution of tokens that employs a Merkle tree data structure to perform airdrop eligibility checks. ## Merkle Tree A data structure used to store hashes of the recipients airdrop allocations in Merkle Airdrop Campaigns. ## Open-Ended Stream Open-ended streams are streams that don't have an end time and are not tethered to a specific deposit amount. They may also be called "indefinite streams". They contrast with [closed-ended streams](/concepts/glossary#closed-ended-stream). ## PRBMath [PRBMath][prb-math] is fixed-point arithmetic library used by the Sablier Protocol for precise calculations. ## Real-time finance A term coined by us in 2019 to emphasize the wide-ranging use cases for the Sablier Protocol. Since the withdrawable amounts in streams are updated every second, they embody the concept of real-time financial transactions. ## Stream A new financial primitive that permits by-the-second payments. Currently, Sablier offers two distribution protocols called Lockup and Flow. In Lockup, the creator has to lock up a specified amount of tokens, whereas in Flow, creator is not required to lock up any amount of tokens. ## Streaming By-the-second payments. ## Token Digital tokens can exist in various forms, but the Sablier Protocol exclusively supports the streaming of ERC-20 tokens. ## Vesting One of the most popular use cases for streaming today. The purpose of vesting is to delay gratification. Founders, investors, and employees must wait a certain amount of time before being able to access tokens. ## Withdraw Fee The fee collected, in native tokens, by the Sablier interface for withdrawing from streams. [erc-20]: https://eips.ethereum.org/EIPS/eip-20 [erc-721]: https://eips.ethereum.org/EIPS/eip-721 [foundry]: https://github.com/foundry-rs/foundry [prb-math]: https://github.com/PaulRBerg/prb-math --- ## Overview(Flow) Flow is a debt tracking protocol that tracks tokens owed between two parties, enabling indefinite token streaming. A Flow stream is characterized by its rate per second (rps). The relationship between the amount owed and time elapsed is linear and can be defined as: ```math \text{amount owed} = rps \cdot \text{elapsed time} ``` The Flow protocol can be used in several areas of everyday finance, such as payroll, distributing grants, insurance premiums, loans interest, token ESOPs etc. If you are looking for vesting and airdrops, please refer to our [Lockup](../lockup/overview) protocol. ## Features 1. **Flexible deposit:** A stream can be funded with any amount, at any time, by anyone, in full or in parts. 2. **Flexible start time:** A stream can be created with a start time in past, present or in future. 3. **Flexible end time:** A stream can be created without specifying any end time so that it can run indefinitely. 4. **Pause:** A stream can be paused by the sender and can later be restarted without losing track of previously accrued debt. 5. **Refund:** Unstreamed amount can be refunded back to the sender at any time. 6. **Void:** Voiding a stream implies it cannot be restarted anymore. Voiding an insolvent stream forfeits the uncovered debt. Either party can void a stream at any time. 7. **Withdraw:** it is publicly callable as long as `to` is set to the recipient. However, a stream’s recipient is allowed to withdraw funds to any address. ## Key Definitions The definitions below will help you understand some terms used in Sablier Flow: ## Open-Ended Streams Open-ended streams on Sablier are token streams without a predefined end date. They continue indefinitely until voided by the sender. Key traits: - No end time: the stream has a start time but no fixed end time. - Funds are streamed continuously at a fixed rate per second. - Stream must be topped up periodically to maintain solvency, [debt is otherwise accumulated](/concepts/flow/overview#total-debt). - Useful for ongoing payments like salaries, grants, or subscriptions. ### Stream balance Stream balance is the token balance of a stream. It increases when funds are deposited into a stream, and decreases when the sender refunds from it or when a withdrawal happens. ### Total debt Total debt is the amount of tokens owed to the recipient. This value is further divided into two sub-categories: - **Covered debt:** The part of the total debt that covered by the stream balance. This is the same as the **withdrawable amount**, which is an alias. - **Uncovered debt:** The part of the total debt that is not covered by the stream balance. This is what the sender owes to the stream. ```math \text{total debt} = \text{covered debt} + \text{uncovered debt} ``` ### Snapshot debt and Snapshot time A snapshot is an event during which snapshot debt and snapshot time of a Flow stream are updated. **Snapshot debt** is the debt accumulated until the previous snapshot. The UNIX timestamp at which snapshot debt is updated is called **Snapshot time**. At snapshot, the following operations are taking place: ```math \text{snapshot debt} = \text{previous snapshot debt} + \underbrace{ rps \cdot (\text{block.timestamp} - \text{snapshot time})}_\text{ongoing debt} ``` ```math \text{snapshot time} = \text{block.timestamp} ``` ### Ongoing debt Ongoing debt is the debt accumulated since the previous snapshot. It is calculated as the following: ```math \text{ongoing debt} = rps \cdot (\text{block.timestamp} - \text{snapshot time}) ``` Therefore, at any point in time, total debt can also be defined as: ```math \text{total debt} = \text{snapshot debt} + \text{ongoing debt} ``` --- ## Statuses # Stream Statuses A Flow stream can have one of five distinct statuses: | Status | Description | | --------------------- | ----------------------------------------------------------------------------------- | | `PENDING` | Stream created but not started. | | `STREAMING_SOLVENT` | Active stream with total debt not exceeding stream balance. | | `STREAMING_INSOLVENT` | Active stream with total debt exceeding stream balance. | | `PAUSED_SOLVENT` | Paused stream with total debt not exceeding stream balance. | | `PAUSED_INSOLVENT` | Paused stream with total debt exceeding stream balance. | | `VOIDED` | Paused stream that can no longer be restarted and has forfeited its uncovered debt. | ## Stream characteristics A stream can have the following characteristics: | Characteristic | Statuses | Description | | :------------- | :---------------------------------------------- | :------------------------------------------------------ | | Pending | `PENDING` | Snapshot time in future, and non-zero rps. | | Streaming | `STREAMING_SOLVENT`, `STREAMING_INSOLVENT` | Non-zero rps. | | Paused | `PAUSED_SOLVENT`, `PAUSED_INSOLVENT`, `VOIDED` | Zero rps. | | Solvent | `STREAMING_SOLVENT`, `PAUSED_SOLVENT`, `VOIDED` | Total debt not exceeding the stream balance. | | Insolvent | `STREAMING_INSOLVENT`, `PAUSED_INSOLVENT` | Total debt exceeding the stream balance. | ## State transitions The following diagram illustrates the statuses and the allowed transitions between them: ```mermaid flowchart LR subgraph PAUSED direction RL PS(SOLVENT) PI(INSOLVENT) PI -- "deposit" --> PS end subgraph STREAMING direction LR SS(SOLVENT) SI(INSOLVENT) SI -- "deposit" --> SS SS -- "time" --> SI end PENDING -- "time" --> STREAMING STREAMING -- pause --> PAUSED STREAMING -- void --> VOIDED PAUSED -- restart --> STREAMING PAUSED -- void --> VOIDED PENDING -- void --> VOIDED NULL -- create (rps > 0, startTime > blockTime) --> PENDING NULL -- create (rps > 0, startTime <= blockTime) --> STREAMING NULL -- create (rps = 0, startTime <= blockTime) --> PAUSED ``` ## Functions Statuses Interaction ### NULL stream ```mermaid flowchart LR CR([CREATE]) --> NULL((NULL)) ``` ### PENDING stream ```mermaid flowchart TD P((PENDING)) ADJRPS([ADJUST_RPS]) --> P DP([DEPOSIT]) --> P RFD([REFUND]) --> P VD([VOID]) --> P ``` ### STREAMING stream ```mermaid flowchart TD STR((STREAMING)) ADJRPS([ADJUST_RPS]) --> STR DP([DEPOSIT]) --> STR RFD([REFUND]) --> STR PS([PAUSE]) --> STR VD([VOID]) --> STR WTD([WITHDRAW]) --> STR ``` ### PAUSED stream ```mermaid flowchart TD PSED((PAUSED)) DP([DEPOSIT]) --> PSED RFD([REFUND]) --> PSED RST([RESTART]) --> PSED VD([VOID]) --> PSED WTD([WITHDRAW]) --> PSED ``` ### VOIDED stream ```mermaid flowchart LR VOID((VOIDED)) RFD([REFUND]) --> VOID WTD([WITHDRAW]) --> VOID ``` ## Q&A ### Q: What is a null stream? A: An ID that does not reference a created stream. Trying to interact with a null stream will result in a revert. ### Q: What to do with a stream status? A: Knowing the status of a stream can inform your decision making. For example, if a stream is `STREAMING_INSOLVENT`, that means the stream is active but has insufficient balance. As a sender, you should deposit into the stream so that your recipient can withdraw the streamed amount without any hiccups. And if you don't want to continue the stream, you can pause it. ### Q: Who can make a stream `VOIDED`? A: Both sender and recipient can void the stream. This is especially useful when either party wants to stop the stream immediately. Once a stream is voided, it cannot be restarted. If there is uncovered debt, it will be reset to 0. So to ensure that your recipient does not lose on any streamed amount, you can deposit into the stream before voiding it. --- ## Overview(Lockup) Lockup is a token streaming protocol that refers to the requirement that the creator of a stream must lock up a certain amount of tokens in a smart contract. A Lockup stream, therefore, is characterized by the start time, end time, amount of tokens to be streamed and a [stream shape](./02-stream-shapes.mdx). Let's take an example. Imagine Alice wants to stream 3000 DAI to Bob during the whole month of April. 1. Alice deposits the 3000 DAI in Lockup before Apr 1, setting the end time to May 1. 2. Bob's allocation of the DAI deposit increases every second beginning Apr 1. 3. On Apr 10, Bob will have earned approximately 1000 DAI. He can send a transaction to Lockup to withdraw the tokens. 4. If at any point during April Alice wishes to get back her tokens, she can cancel the stream and recover what has not been streamed yet. This streaming model is especially useful for use cases like vesting and airdrops. If you are looking to create an indefinite stream of tokens, please refer to our [Flow](../flow/overview) protocol. Lockup enables multiple distribution models, a feature that is discussed in the next section. --- ## Stream Shapes :::note - The code used to generate the gas benchmarks for the different stream curves can be found [here](https://github.com/sablier-labs/examples/tree/shapes-benchmark). - If you are interested in learning how to programmatically create the curves shown below in Solidity, check out the [examples](https://github.com/sablier-labs/evm-examples/blob/main/lockup/) repository and the "CurvesCreator" files. ::: ## Lockup Linear ### Linear Lockup Linear streams are the simplest token distribution curve in Sablier. The streamed amount over time follows a straight line that goes up and to the right on a graph, which corresponds to the identity function $f(x) = x$: With this shape of stream, the payment rate remains constant, meaning that the same fraction of the deposit amount is streamed to the recipient every second. This provides greater predictability and is easy to understand because of how intuitive it is. Imagine a diagonal line going up and to the right – that's how simple it is. :::info The gas cost to create this shape is approximately _168,923_ on Mainnet. This may vary due to multiple factors. ::: ### Initial Unlock The Unlock Linear shape combines an initial immediate release of tokens with a steady, linear payout over time. This shape is ideal for employment contracts that include a signing bonus along with a regular payout schedule. At the beginning of the stream, a fixed amount of tokens is instantly available to the recipient — this is your "signing bonus". Following this, the remaining tokens begin to stream continuously at a consistent rate until the end of the contract term — this is your "salary". Another use case is a token distribution to investors where a particular amount gets unlocked immediately followed by a linear vesting plan. :::info The gas cost to create this shape is approximately _191,182_ on Mainnet. This may vary due to multiple factors. ::: ### Cliff Unlock It is possible to attach a "cliff" to a Lockup Linear stream, which sets a cut-off point for releasing tokens. Prior to the cliff, the recipient cannot withdraw any tokens, but the stream continues to accrue them. After the cliff, the constant payment rate per second kicks in. This feature is especially useful for vesting ERC-20 tokens as it allows you to have, for example, a 1-year cliff, and then 3 additional years of linear streaming. If the stream is for an employee, you can make it cancellable so that if the employee leaves your company during the stream, you can cancel it and recover the tokens that have not yet been streamed. :::info The gas cost to create this shape is approximately _213,708_ on Mainnet. This may vary due to multiple factors. ::: ### Initial Cliff Unlock This shape is useful for companies who want to distribute tokens to their investors using a cliff followed by linear vesting but also want to unlock some liquidity at the beginning to be able to allow investors to bootstrap AMM pools. Initially, a set amount of tokens are made available to the recipient as an upfront payment. After this initial unlock, the tokens are held during the cliff period until the moment of time set. The release resumes in a linearly post-cliff. :::info The gas cost to create this shape is approximately _214,067_ on Mainnet. This may vary due to multiple factors. ::: ## Lockup Dynamic Lockup Dynamic streams are what makes Sablier so unique, since they enable the creation of an arbitrary streaming curve, including non-linear curves. On the Sablier Interface, we support only some distribution shapes (the ones enumerated below), but the potential for innovation is limitless when you interact programmatically with the contracts. For example, one could design a logarithmic stream that emulates the $f(x) = log(x)$ function. These streams are powered by a number of user-provided [segments](/concepts/lockup/segments), which we will cover in the next article. What is important to note here is that with Lockup Dynamic, Sablier has evolved into a universal streaming engine, capable of supporting any custom streaming curve. ### Exponential A fantastic use case for Lockup Dynamic is Exponential streams, a shape through which the recipient receives increasingly more tokens as time passes. Exponentials are a great fit if you are looking to airdrop tokens, because your community members will receive the majority of the tokens towards the end of the stream instead of receiving the tokens all at once (no streaming) or in a linear fashion (Lockup Linear). This incentivizes long-term behavior and a constructive attitude. :::info The gas cost to create this shape is approximately _219,629_ on Mainnet. This may vary due to multiple factors. ::: ### Cliff Exponential Another use case for Lockup Dynamic is a variation of the previous design: an Cliff Exponential. The stream starts with a cliff (which can be how long you want), a specific amount instantly unlocked when the cliff ends, and then the rest of the stream is exponentially streamed. This is an excellent distribution if you are a company looking to set up a token vesting plan for your employees. Your employees will have an incentive to remain with your company in the long run, as they will receive an increasingly larger number of tokens. :::info The gas cost to create this shape is approximately _274,420_ on Mainnet. This may vary due to multiple factors. ::: ## Lockup Tranched Lockup Tranched streams are, as the name says, streams that have token unlocks in tranches. Even though you can use Lockup Dynamic to create a traditional vesting structure with periodic unlocks, Lockup Tranched is specifically design for that use case. As a result, a stream with tranches created using Lockup Tranched is more gas efficient than the same stream created using Lockup Dynamic. These streams are powered by a number of user-provided [tranches](/concepts/lockup/tranches), which is covered in the tranches article. ### Unlock in Steps You can use Lockup Tranched to create a traditional vesting contract with periodic unlocks. In this case, the "streaming" rate would not be by the second, but by the week, month, or year. After each period, a specific amount becomes unlocked and available for the recipient to withdraw. Past unlocks accumulate, so if the recipient doesn't withdraw them, they will be able to withdraw them later. The advantage of using Unlock in Steps instead of a normal vesting contract is that Sablier automates the entire process. No more worries about setting up vesting contracts or creating a user interface for your investors to claim their tokens. :::info The gas cost to create this shape is approximately _299,268_ on Mainnet for four unlocks. This may vary as there are multiple factors to consider. ::: ### Unlock Monthly Unlock Monthly is a special case of Unlock in Steps where tokens are unlocked on the same day every month, e.g. the 1st of every month. This is suited for use cases like traditional monthly salaries or ESOPs plans. [ 1 + Math.floor(i / 2), 10 * Math.floor(i / 2) + (i % 2 === 1 ? 10 : 0), ]), }, ], }} /> Each month, on a particular day, a specific amount of tokens becomes unlocked and available for withdrawal. Like Unlock in Steps, unwithdrawn tokens will carry over to the next period, providing flexibility and control to the recipient. This shape is ideal for employers who wish to set up advanced payment schedules for their employees, offering them access to funds on a predictable, monthly basis. :::info The gas cost to create this shape is approximately _511,476_ on Mainnet for a period of exactly **one year**. This may vary as there are multiple factors to consider. ::: ### Backweighted Backweighted is a type of tranched vesting curve where the tokens are vested in a backweighted way, meaning little vests early on, and large chunks vest towards the end. Example for a 4-year vesting schedule: - Year 1: 10% vests - Year 2: 20% vests - Year 3: 30% vests - Year 4: 40% vests This makes it a particularly good fit for recipients that need to be particularly incentivized on a long-term perspective, as they receive progressively more and more tokens as the stream gets closer to its end date. :::info The gas cost to create this shape is approximately _342,999_ on Mainnet for a period of exactly **four years**. This may vary as there are multiple factors to consider. ::: ### Timelock The Timelock shape locks all tokens for a specified period. Users cannot access the tokens until the set period elapses. Once the set period elapses, the full amount becomes accessible to the recipient. This setup is particularly advantageous for projects seeking to stabilize token pricing and minimize market volatility, encouraging investors to maintain their stake over a more extended period. :::info The gas cost to create this shape is approximately _219,700_ on Mainnet. This may vary due to multiple factors. ::: --- ## Segments ## Definition A Dynamic stream is composed of multiple segments, which are separate partitions with different streaming amount and rates. The protocol uses these segments to enable custom streaming curves, which power exponential streams, cliff streams, etc. Technically, a segment is a [struct](/reference/lockup/contracts/types/library.LockupDynamic#segment) with three fields: | Field | Type | Description | | :-------- | :-------- | :--------------------------------------------------------------------------------------------- | | Amount | `uint128` | The amount of tokens to be streamed in this segment, denoted in units of the token's decimals. | | Exponent | `UD2x18` | The exponent of this segment, denoted as a fixed-point number. | | Timestamp | `uint40` | The Unix timestamp indicating this segment's end. | Each segment has its own streaming function: $$ f(x) = x^{exp} * csa $$ Therefore, the distribution function of a dynamic stream becomes: $$ f(x) = x^{exp} * csa + \Sigma(esa) $$ Where: - $x$ is the elapsed time divided by the total time in the current segment. - $exp$ is the current segment exponent. - $csa$ is the current segment amount. - $\Sigma(esa)$ is the sum of all elapsed segments' amounts. :::info Segments can be used to represent any monotonic increasing function. ::: :::caution Because x is a percentage, the payment rate is inversely proportional to the exponent. For example, if the exponent is 0.5, the rate is quadratically faster compared to the baseline when the exponent is 1. Conversely, if the exponent is 2, the rate is quadratically slower compared to baseline. ::: ## Requirements - The sum of all segment amounts must equal the deposit amount. - There is a limit to how many segments there can be in a stream as enforced by the block gas limit. - If someone creates a stream with an excessively large number of segments, the transaction would revert as it wouldn't fit within a block. You can fetch the limit using you can find the limit for each chain [here](https://github.com/sablier-labs/lockup/blob/main/script/Base.s.sol#L90-L131). - The timestamps must be sorted in ascending order. It's not possible for the $(i-1)^{th}$ timestamp to be greater than $i^{th}$ timestamp (given that we're dealing with an increasing monotonic function). ## Examples A segment can be used to represent any monotonic increasing function. A few popular examples are highlighted below: ### Constant Curve (exp = 0) A constant segment follows the function $f(x) = c$. This is achieved with an exponent of 0. ```solidity LockupDynamic.Segment({ amount: amount, // Total amount in this segment exponent: ud2x18(0e18), // Exponent = 0 (constant) timestamp: endTime // End time of the segment }); ``` A constant curve can be used to unlock amount in tranches where the entire segment amount unlocks at the beginning or the end of the segment. ### Linear Curve (exp = 1) A linear segment follows the function $f(x) = cx$. This is achieved with an exponent of 1. ```solidity LockupDynamic.Segment({ amount: amount, // Total amount in this segment exponent: ud2x18(1e18), // Exponent = 1 (linear) timestamp: endTime // End time of the segment }); ``` A linear curve unlocks amount linearly over time. ### Accelerating Curve (exp > 1) A function $f(x) = cx^{exp} \mid exp > 1$ can be used to create a segment that unlocks slowly at the beginning and then quickly at the end. For example, an exponent of 2 unlocks 25% of the segment amount in the first 50% of the time and the remaining 75% in the last 50% of the time. ```solidity segments[0] = LockupDynamic.Segment({ amount: totalAmount, // Total amount in this segment exponent: ud2x18(2e18), // Exponent = 2 (Quadratic) timestamp: endTime // End time of the stream }); ``` As you may have realized, the higher the exponent, the steeper the curve gets at the end. For example, an exponent of 4 unlocks 6% of the segment amount in the first 50% of the time and the remaining 94% in the last 50% of the time. ### Decelerating Curve (exp < 1) A function $f(x) = cx^{exp} \mid 0 < exp < 1$ can be used to create a segment that unlocks quickly at the beginning and then slowly at the end. For example, an exponent of 0.2 unlocks 80% of the segment amount in the first 50% of the time and the remaining 20% in the last 50% of the time. ```solidity segments[0] = LockupDynamic.Segment({ amount: totalAmount, // Total amount in this segment exponent: ud2x18(0.3e18), // Exponent = 0.3 timestamp: endTime // End time of the stream }); ``` --- ## Tranches ## Definition Analogous to the segments in Dynamic streams, a Tranched stream is composed of multiple tranches with different amounts and durations. The protocol uses these tranches to enable traditional vesting curves with regular unlocks. Technically, a tranche is a [struct](/reference/lockup/contracts/types/library.LockupTranched#tranche) with two fields: | Field | Type | Description | | :-------- | :-------- | :------------------------------------------------------------------------------------------ | | Amount | `uint128` | The amount of tokens to be unlocked in a tranche, denoted in units of the token's decimals. | | Timestamp | `uint40` | The Unix timestamp indicating the tranche's end. | The distribution function of a Lockup tranched stream: $$ f(x) = \Sigma(eta) $$ Where: - $\Sigma(eta)$ is the sum of all vested tranches' amounts. ## Requirements - The sum of all tranche amounts must equal the deposit amount. - The block gas limit enforces a limit to how many tranches there can be in a stream. - If someone creates a stream with an excessively large number of tranches, the transaction would revert as it wouldn't fit within a block. In such cases, make sure to simulate the transaction first. - The timestamps must be sorted in ascending order. It's not possible for the $(i-1)^{th}$ timestamp to be greater than $i^{th}$ timestamp (given that we're dealing with an increasing monotonic function). --- ## Statuses(Lockup) # Stream Statuses A Lockup stream can have one of five distinct statuses: | Status | Description | | ----------- | ----------------------------------------------------------------- | | `PENDING` | Stream created but not started; tokens are in a pending state. | | `STREAMING` | Active stream where tokens are currently being streamed. | | `SETTLED` | All tokens have been streamed; recipient is due to withdraw them. | | `CANCELED` | Canceled stream; remaining tokens await recipient's withdrawal. | | `DEPLETED` | Depleted stream; all tokens have been withdrawn and/or refunded. | ## Temperature A stream status can have one out of two "temperatures": | Temperature | Statuses | Description | | :---------- | :-------------------------- | :-------------------------------------------------------------- | | Warm | Pending, Streaming | The passage of time alone can change the status. | | Cold | Settled, Canceled, Depleted | The passage of time won’t affect the status anymore. | ## State transitions The following diagram illustrates the statuses and the allowed transitions between them: ```mermaid stateDiagram-v2 direction LR state Warm { Pending Streaming } state Cold { Settled Canceled Depleted } Null --> Pending Null --> Settled Pending --> Streaming Pending --> Settled Pending --> Canceled Streaming --> Settled Streaming --> Canceled Streaming --> Depleted Settled --> Depleted Canceled --> Depleted ``` ## Q&A ### Q: What is a null stream? A: An id that does not reference a created stream. Trying to interact with a null stream will result in a revert. ### Q: What to do with a stream status? A: Knowing the status of a stream can inform your decision making. For example, if a stream is canceled, you know that you can't cancel it again. Or, if a stream is depleted, you know that you can't withdraw any more tokens from it. ### Q: How can a stream enter the `SETTLED` status directly? A: This is a peculiarity of the [Lockup Dynamic](/concepts/lockup/stream-shapes#lockup-dynamic) streams. Segment amounts can be zero, and the segment milestones can be set in such a way that all non-zero segments are in the past. This will cause the stream to enter the `SETTLED` status directly. --- ## Hooks Hooks are arbitrary third-party functions that get automatically executed by the Sablier Protocol in response to `cancel` and `withdraw` events. They are similar to callback functions in web2. :::info Important Hooks have to be allowlisted before they can be run. Currently, only the [Comptroller](/concepts/governance) has permission to do this. In the future, we may decentralize this process through governance. ::: Hooks are a powerful feature that enable Sablier streams to interact with other DeFi protocols. Let's consider an example: You own a Sablier stream that expires in two years. You are interested into taking a loan against it with the intention to pay it all back after it expires. Hooks are what enable you to do that. With the help of Hooks, we can create an ecosystem of varied use cases for Sablier streams. This can range from lending, staking, credit, and more. It is worth noting that once a hook has been allowlisted, it can never be removed. This is to ensure stronger immutability and decentralization guarantees. Once a recipient contract is allowlisted, integrators do NOT have to trust us to keep their contract on the allowlist. ## Checklist The requirements a hook contract must meet: 1. The contract is not upgradeable. 2. The contract was audited by a third-party security researcher. 3. The contract implements `supportsInterface` and returns `true` for `0xf8ee98d3`, i.e., `type(ISablierLockupRecipient).interfaceId`. 4. If it implements `onSablierLockupCancel`: 1. It returns `ISablierLockupRecipient.onSablierLockupCancel.selector`. 1. It reverts if `msg.sender` is not the Lockup contract. 1. It uses input parameters correctly: `streamId`, `sender`, `senderAmount`, `recipientAmount`. 1. Be aware that if the call reverts, the entire `cancel` execution would revert too. 5. If it implements `onSablierLockupWithdraw`: 1. It returns `ISablierLockupRecipient.onSablierLockupWithdraw.selector`. 1. It reverts if `msg.sender` is not Lockup contract. 1. It uses input parameters correctly: `streamId`, `caller`, `to`, `amount`. 1. Be aware that if the call reverts, the entire `withdraw` execution would revert too. ## Visual representation :::note If the recipient contract is not on the Sablier allowlist, the hooks will not be executed. ::: ### Cancel hook ```mermaid sequenceDiagram actor Sender Sender ->> SablierLockup: cancel() SablierLockup -->> Recipient: onSablierLockupCancel() Recipient -->> SablierLockup: return selector SablierLockup -->> Sender: transfer unstreamed tokens break if hook reverts Recipient -->> SablierLockup: ❌ tx fail end ``` ### Withdraw hook ```mermaid sequenceDiagram actor Anyone Anyone ->> SablierLockup: withdraw() SablierLockup -->> Recipient: onSablierLockupWithdraw() Recipient -->> SablierLockup: return selector SablierLockup -->> Recipient: transfer streamed tokens break if hook reverts Recipient -->> SablierLockup: ❌ tx fail end ``` ## Next steps If you are interested into using Sablier hooks into your protocol, please check the [Hook guide](/guides/lockup/examples/hooks). If you are looking to get on the allowlist, reach out to us on [Discord](https://discord.sablier.com). --- ## Custom Deployments :::info[Reach Out] {/* prettier-ignore */} Want to get Sablier deployed on your chain? If you meet the requirements listed below, fill out this form and our team will get back to you. ::: ## Requirements The Sablier Interface currently supports only The Graph and Envio indexer services. If you use a different indexer, you can schedule a call here to discuss integration. - [x] GraphQL indexer: either [The Graph](https://thegraph.com) or [Envio](https://envio.dev) - [x] Blockchain explorer with instructions for verifying contracts, e.g., [Etherscan](https://etherscan.io) - [x] Functional JSON-RPC endpoint, ideally listed on [ChainList](https://chainlist.org) - [x] Bridge, and instructions for how to obtain gas tokens (e.g., ETH) and ERC-20 tokens to the target chain - [x] Support for [Shanghai](https://docs.soliditylang.org/en/latest/using-the-compiler.html#target-options) EVM version or later - [x] Support for Solidity v0.8.22 or later ### Contracts - [x] Foundry's [Deterministic Deployer](https://github.com/Arachnid/deterministic-deployment-proxy) contract at [`0x4e59b44847b379578588920cA78FbF26c0B4956C`](https://etherscan.io/address/0x4e59b44847b379578588920cA78FbF26c0B4956C) - [x] [Multicall3](https://github.com/mds1/multicall) contract at [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11) ## Making a Deployment :::warning[NOTE] The rest of the guide applies ONLY IF you have been granted a [BUSL license](https://app.ens.domains/license-grants.sablier.eth?tab=records) to deploy the protocol. Otherwise, this section is not relevant to you. ::: ### Prerequisites - Check if the deployments are not already made: [Airdrops](/guides/airdrops/deployments), [Flow](/guides/flow/deployments), [Lockup](/guides/lockup/deployments) - Follow the contributing guides for Airdrops, Flow and Lockup. - RPC endpoint, e.g., a paid [Infura](https://www.infura.io/) or [Alchemy](https://www.alchemy.com/) account - Have enough gas tokens (e.g., ETH) in your deployer account - Have an Etherscan API key (for source code verification) ### Comptroller Deployment #### Step 1: Clone the EVM Utils repo and checkout to the `v1.0.0` tag ```bash git clone -b v1.0.0 git@github.com:sablier-labs/evm-utils.git cd evm-utils bun install --frozen-lockfile ``` #### Step 2: Create an `.env` file ```bash touch .env ``` Add the following variables to `.env` file: ``` ETH_FROM="DEPLOYER ADDRESS" ETHERSCAN_API_KEY="EXPLORER API KEY" PRIVATE_KEY="PRIVATE KEY OF DEPLOYER ADDRESS" RPC_URL="RPC ENDPOINT URL" VERIFIER_URL="EXPLORER VERIFICATION URL" ``` Load the environment variables into your shell: ```bash source .env ``` #### Step 3: Run the following deployment command ```bash FOUNDRY_PROFILE=optimized \ forge script scripts/solidity/DeployDeterministicComptrollerProxy.s.sol:DeployDeterministicComptrollerProxy \ --broadcast \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --sig "run()" \ --etherscan-api-key $ETHERSCAN_API_KEY \ --verifier "etherscan" \ --verify \ -vvv ``` The above command works for etherscan equivalent explorers. If the chain uses a custom explorer, modify the verifier arguments according to [forge script documentation](https://getfoundry.sh/forge/reference/script/#forge-script). You should also refer to the forge script documentation for different wallet options such as mnemonic or hardware device. #### Step 4: Update the EVM Utils repository Add the chain ID of your newly deployed chain to the `ChainId` library in the [EVM Utils repo](https://github.com/sablier-labs/evm-utils/blob/d7d6c051a39cbacadef672e92ed9d57628c80dc4/src/tests/ChainId.sol). Then, bump the EVM Utils version in each protocol repository's `package.json` file (e.g., [Lockup](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/package.json#L16), [Flow](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/package.json#L16), [Airdrops](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/package.json#L16)). ### Lockup Deployment #### Step 1: Clone the Lockup repo and checkout to the `v3.0.1` tag ```bash git clone -b v3.0.1 git@github.com:sablier-labs/lockup.git cd lockup bun install --frozen-lockfile ``` #### Step 2: Create an `.env` file ```bash touch .env ``` Add the following variables to `.env` file: ``` ETH_FROM="DEPLOYER ADDRESS" ETHERSCAN_API_KEY="EXPLORER API KEY" PRIVATE_KEY="PRIVATE KEY OF DEPLOYER ADDRESS" RPC_URL="RPC ENDPOINT URL" VERIFIER_URL="EXPLORER VERIFICATION URL" ``` Load the environment variables into your shell: ```bash source .env ``` #### Step 3: Run the following deployment command ```bash FOUNDRY_PROFILE=optimized \ forge script scripts/solidity/DeployDeterministicProtocol.s.sol:DeployDeterministicProtocol \ --broadcast \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --sig "run()" \ --etherscan-api-key $ETHERSCAN_API_KEY \ --verifier "etherscan" \ --verify \ -vvv ``` The above command works for etherscan equivalent explorers. If the chain uses a custom explorer, modify the verifier arguments according to [forge script documentation](https://getfoundry.sh/forge/reference/script/#forge-script). You should also refer to the forge script documentation for different wallet options such as mnemonic or hardware device. ### Merkle Airdrops Deployment #### Step 1: Clone the Merkle Airdrops repo and checkout to `v2.0.1` tag ```bash git clone -b v2.0.1 git@github.com:sablier-labs/airdrops.git cd airdrops bun install --frozen-lockfile ``` #### Step 2: Create an `.env` file ```bash touch .env ``` Add the following variables to `.env` file: ``` ETH_FROM="DEPLOYER ADDRESS" ETHERSCAN_API_KEY="EXPLORER API KEY" PRIVATE_KEY="PRIVATE KEY OF DEPLOYER ADDRESS" RPC_URL="RPC ENDPOINT URL" VERIFIER_URL="EXPLORER VERIFICATION URL" ``` Load the environment variables into shell: ```bash source .env ``` #### Step 3: Run the following command to deploy all merkle airdrop contracts ```bash FOUNDRY_PROFILE=optimized \ forge script scripts/solidity/DeployDeterministicFactories.s.sol:DeployDeterministicFactories \ --broadcast \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --sig "run()" \ --etherscan-api-key $ETHERSCAN_API_KEY \ --verifier "etherscan" \ --verify \ -vvv ``` The above command works for etherscan equivalent explorers. If the chain uses a custom explorer, modify the verifier arguments according to [forge script documentation](https://getfoundry.sh/forge/reference/script/#forge-script). You should also refer to the forge script documentation for different wallet options such as mnemonic or hardware device. ### Flow Deployment #### Step 1: Clone the Flow repo and checkout to `v2.0.0` tag ```bash git clone -b v2.0.0 git@github.com:sablier-labs/flow.git cd flow bun install --frozen-lockfile ``` #### Step 2: Create an `.env` file ```bash touch .env ``` Add the following variables to `.env` file: ``` ETH_FROM="DEPLOYER ADDRESS" ETHERSCAN_API_KEY="EXPLORER API KEY" PRIVATE_KEY="PRIVATE KEY OF DEPLOYER ADDRESS" RPC_URL="RPC ENDPOINT URL" VERIFIER_URL="EXPLORER VERIFICATION URL" ``` Load the environment variables into your shell: ```bash source .env ``` #### Step 3: Run the following deployment command ```bash FOUNDRY_PROFILE=optimized \ forge script scripts/solidity/DeployDeterministicProtocol.s.sol:DeployDeterministicProtocol \ --broadcast \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --sig "run()" \ --etherscan-api-key $ETHERSCAN_API_KEY \ --verifier "etherscan" \ --verify \ -vvv ``` The above command works for etherscan equivalent explorers. If the chain uses a custom explorer, modify the verifier arguments according to [forge script documentation](https://getfoundry.sh/forge/reference/script/#forge-script). You should also refer to the forge script documentation for different wallet options such as mnemonic or hardware device. ### List your deployments After the contracts are deployed, you can submit a PR in the SDK repo by including the following details: - Add the broadcast files (JSON) to deployments directory. - Add the deployment addresses to the following files: - Comptroller Deployments - Airdrops Deployments - Flow Deployments - Lockup Deployments --- ## Snapshot Voting # Snapshot Voting Strategies To enable off-chain governance, we created a collection of Snapshot Strategies that calculate the voting power of tokens stored in Lockup streams. ## Lockup If you started using Sablier in July 2023 or later, you should be using the Lockup strategies. - [Snapshot playground](https://snapshot.org/#/playground/sablier-v2) - test the strategies - [Snapshot code repository](https://github.com/snapshot-labs/snapshot-strategies/tree/master/src/strategies/sablier-v2) - see the implementation The following strategies will read the various amounts that can be found in Lockup streams. The voting power will be calculated based on some sub-strategies called `policies`. | Snapshot Playground | | :---------------------------------------------------- | | ![Snapshot Playground](/img/snapshot/playground.webp) | ### Example Setup ```json { "address": "0x97cb342cf2f6ecf48c1285fb8668f5a4237bf862", "symbol": "DAI", "decimals": 18, "policy": "withdrawable-recipient" // recommended, } ``` #### Other parameters Aside from this example setup, we use Snapshot's base parameters `Network`, `Snapshot` (block), and `Addresses`. Based on the chosen strategy, the values filled in the `Addresses` field will represent a list (>= 1) of senders or recipients. ### Policies #### Primary policies | Policy | Methodology | | :--------------------- | :---------------------------------------------------------------- | | withdrawable-recipient | Tokens that are available for the stream's recipient to withdraw. | | reserved-recipient | Tokens available for withdraw aggregated with unstreamed tokens. | #### Secondary policies These policies are designed to address specific edge cases. We strongly recommend using the primary policies. | Policy | Methodology | | :------------------- | :------------------------------------------------------------------------------------ | | deposited-recipient | Tokens that have been deposited in streams the recipient owned at snapshot time. | | deposited-sender | Tokens that have been deposited in streams started by the sender before the snapshot. | | streamed-recipient | Tokens that have been streamed to the recipient until the snapshot. | | unstreamed-recipient | Tokens that have not yet been streamed to the recipient at the time of snapshot. | ### Example ```text Lockup Stream #000001 --- Deposited: TKN 1000 for 30 days Withdrawn: TKN 450 before snapshot Snapshot: Day 15 (midway) with a streamed amount of TKN 500 +------------------------+----------+ | POLICY | POWER | +------------------------+----------+ | erc20-balance-of | TKN 450 | +------------------------+----------+ | withdrawable-recipient | TKN 50 | +------------------------+----------+ | reserved-recipient | TKN 550 | +------------------------+----------+ | deposited-recipient | TKN 1000 | +------------------------+----------+ | deposited-sender | TKN 1000 | +------------------------+----------+ | streamed-recipient | TKN 500 | +------------------------+----------+ | unstreamed-recipient | TKN 500 | +------------------------+----------+ ``` ### Recommendation For the best results, we recommend using the primary policies. 1. The best option is to combine the `withdrawable-recipient` policy with `erc20-balance-of`. Doing so will aggregate tokens streamed but not withdrawn yet, as well as tokens in the user's wallet. 2. The second best option is to combine `reserved-recipient` with `erc20-balance-of`. They will aggregate (i) tokens streamed but not withdrawn yet, (ii) unstreamed funds (which will become available in the future), and (iii) the tokens in the user's wallet. ### Details and Caveats #### `withdrawable-recipient` ⭐️ The withdrawable amount counts tokens that have been streamed but not withdrawn yet by the recipient. This is provided using the [`withdrawableAmountOf`](/reference/lockup/contracts/contract.SablierLockup#withdrawableamountof) contract method. Voting power: realized (present). #### `reserved-recipient` ⭐️ The reserved amount combines tokens that have been streamed but not withdrawn yet (similar to `withdrawable-recipient`) with tokens that haven't been streamed (which will become available in the future). Can be computed as `reserved = withdrawable + unstreamed === deposited - withdrawn`. Canceled streams will only count the final withdrawable amount, if any. Voting power: realized (present) + expected (future). --- #### `deposited-recipient` Aggregates historical deposits up to the snapshot time, counting only the streams owned by the recipient. :::caution Caveat - Streaming, canceling and streaming again will cause tokens to be counted multiple times. ::: #### `deposited-sender` Aggregates historical deposits up to the snapshot time, counting only the streams started by the sender. :::caution Caveats - Streaming, canceling and streaming again will cause tokens to be counted multiple times. - Takes into account streams created through [PRBProxy](/reference/lockup/contracts/contract.SablierBatchLockup) instances configured through the official [Sablier Interface](https://app.sablier.com/). ::: #### `streamed-recipient` Aggregates historical amounts that have already been streamed to the recipient. Crucially, withdrawn tokens are included. It relies on the `streamedAmountOf` method in the [SablierLockup](/reference/lockup/contracts/contract.SablierLockup#streamedamountof) contract. :::caution Caveats - Using this policy alongside `erc20-balance-of` may double count tokens. In the example above, `TKN 500` was streamed, but the recipient withdrew `TKN 450`, so the total voting power would be `TKN 950`. - If funds are recycled (streamed, withdrawn and streamed again) the voting power may be increased artificially. ::: #### `unstreamed-recipient` The opposite of `streamed-recipient`, counting amounts that have not been streamed yet (locked, but will become available in the future). Subtracts the `streamed` amount from the initial `deposit`. For canceled streams, the unstreamed amount will be `0`. ## Legacy If you started using Sablier before July 2023, you should be using the Legacy strategies. - [Snapshot playground](https://snapshot.org/#/playground/sablier-v1-deposit) - test the strategies - [Snapshot code repository](https://github.com/snapshot-labs/snapshot-strategies/tree/master/src/strategies/sablier-v1-deposit) - dive into the implementation The Legacy strategy regards the stream recipient as the voter. It returns the voting power for any voter as the **sum of all deposits** made by a sender towards the recipient (the **voter**) for a specific ERC-20 token. :::caution Caveats - Similar to the Sablier Lockup [`streamed-recipient`](#streamed-recipient) strategy, the voting power can be increased artificially. ::: ### Example Setup ```json { "sender": "0xC9F2D9adfa6C24ce0D5a999F2BA3c6b06E36F75E", "token": "0x7f8F6E42C169B294A384F5667c303fd8Eedb3CF3" } ``` --- ## Building with LLMs # Sablier integrations using LLMs You can use large language models (LLMs) to assist in building Sablier integrations. We provide resources to help LLMs consume our documentation effectively. ## Plain text markdown files You can access all documentation as plain text markdown files by adding `.md` to the end of any URL. For example, you can find the plain text version of this page at [https://docs.sablier.com/guides/building-with-llms.md](https://docs.sablier.com/guides/building-with-llms.md). This helps AI agents consume our content and allows you to copy and paste entire docs into an LLM. This format is preferable to scraping or copying from our documentation pages because: - Plain text contains fewer formatting tokens. - Content that isn't rendered in the default view (for example, hidden in a tab) is rendered in the plain text version. - LLMs can parse and understand markdown hierarchy. We also host an [/llms.txt file](https://docs.sablier.com/llms.txt) which contains URLs to the plain text versions of our pages. The `/llms.txt` file is an [emerging standard](https://llmstxt.org/) for making websites more accessible to LLMs. ## Protocol-specific markdown files We provide specialized markdown files for each protocol: - **[llms-lockup.txt](https://docs.sablier.com/llms-lockup.txt)** - Complete markdown file for Lockup documentation - **[llms-flow.txt](https://docs.sablier.com/llms-flow.txt)** - Complete markdown file for Flow documentation - **[llms-airdrops.txt](https://docs.sablier.com/llms-airdrops.txt)** - Complete markdown file for Merkle Airdrops documentation - **[llms-full.txt](https://docs.sablier.com/llms-full.txt)** - Full documentation content for training custom models --- ## Overview(Airdrops) # Sablier Merkle Airdrops Welcome to the Sablier Merkle Airdrops documentation. This section contains detailed guides and technical references for the Merkle Airdrops contracts. These documents offer insight into the operational nuances of the contracts, providing a valuable resource for building onchain integrations. # Guides If you are new to Merkle Airdrops, we recommend you start with the [Airstreams](/concepts/airdrops) section first. If you want to setup your local environment, head over to [the guide](/guides/airdrops/examples/local-environment). # Reference For a deeper dive into the protocol specifications, read through the [technical reference](/reference/airdrops/diagrams). # Resources - [Source Code](https://github.com/sablier-labs/airdrops/tree/release) - [Examples](https://github.com/sablier-labs/examples/tree/main/airdrops/) - [Foundry Book](https://book.getfoundry.sh/) --- ## Deployment Addresses # Merkle Airdrops Deployments [latest]: https://npmjs.com/package/@sablier/airdrops This section contains the deployment addresses for the v2.0 release of [@sablier/airdrops][latest]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains ## Versions Any updates or additional features will require a new deployment of the protocol, due to its immutable nature. Came here looking for the previous deployments? Click below to see other versions. | Version | Release Date | UI Aliases | | -------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | [v2.0](/guides/airdrops/deployments) (latest) | October 2025 | `MF_INST` (Merkle Factory Instant), `MF_LL` (Merkle Factory Linear), `MF_LT` (Merkle Factory Tranched), `MF_VCA` (Merkle Factory VCA) | | [v1.3](/guides/airdrops/previous-deployments/v1.3) | February 2025 | `MSF4` (Merkle Factory): all factories merged into a single contract | This repository is the successor of [Lockup Periphery](https://github.com/sablier-labs/v2-periphery), which has been discontinued. For deployments earlier than v1.3, please refer to the [Lockup v1.2 deployments](/guides/lockup/previous-deployments/v1.2) page. :::info Stay up to date with any new releases by [subscribing](https://x.com/Sablier/status/1821220784661995627) to the official Sablier repositories on Github. ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x15C9d45FB210B11cF5fD16C35ed3C31D7ca475Cb`](https://abscan.org/address/0x15C9d45FB210B11cF5fD16C35ed3C31D7ca475Cb) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x9cD6c1Df185CFBa590AFcEEBe9fCFE8d273c9187`](https://abscan.org/address/0x9cD6c1Df185CFBa590AFcEEBe9fCFE8d273c9187) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x5f3A9E8e6979e9edC5738983D909617d4f2db882`](https://abscan.org/address/0x5f3A9E8e6979e9edC5738983D909617d4f2db882) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xAD49814f588085f5DE4fE5a210cA82054D0Ba693`](https://abscan.org/address/0xAD49814f588085f5DE4fE5a210cA82054D0Ba693) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x4273c32a668ee9d8b24c4d774635134c72974077`](https://arbiscan.io/address/0x4273c32a668ee9d8b24c4d774635134c72974077) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xf8224aa806510041aeab338d1667b152ed549983`](https://arbiscan.io/address/0xf8224aa806510041aeab338d1667b152ed549983) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x011c08d385c3df8d5da4edf804b4cf8b9f4a0187`](https://arbiscan.io/address/0x011c08d385c3df8d5da4edf804b4cf8b9f4a0187) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x199de153773ac81494978d7b313e7402d2fa2425`](https://arbiscan.io/address/0x199de153773ac81494978d7b313e7402d2fa2425) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x25df49158cd5d9fc9def1dae57cf891310d6bfa0`](https://snowtrace.io/address/0x25df49158cd5d9fc9def1dae57cf891310d6bfa0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x21617a5835b77fa06669402d1b60b26179c5dfc3`](https://snowtrace.io/address/0x21617a5835b77fa06669402d1b60b26179c5dfc3) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x3d4da59b6ac3ad42840ecc3ae1988d3045f6f178`](https://snowtrace.io/address/0x3d4da59b6ac3ad42840ecc3ae1988d3045f6f178) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x4489610db7937acdb975528f692011d324195763`](https://snowtrace.io/address/0x4489610db7937acdb975528f692011d324195763) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x4b2aa7e2a47b5cfd67a4943de2952d0f4ca683cd`](https://basescan.org/address/0x4b2aa7e2a47b5cfd67a4943de2952d0f4ca683cd) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xc89936e84375b80d3ec435020b3ee07c84dc49e1`](https://basescan.org/address/0xc89936e84375b80d3ec435020b3ee07c84dc49e1) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0xd97e6e03693c817e583a5046bc22d457ec503d46`](https://basescan.org/address/0xd97e6e03693c817e583a5046bc22d457ec503d46) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xb1f20bbe05463e9a5de67d9ff8a0107aa3c9e143`](https://basescan.org/address/0xb1f20bbe05463e9a5de67d9ff8a0107aa3c9e143) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Berachain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xc4ca662dce3a32ee3b592c0af35013d5ff8d6738`](https://berascan.com/address/0xc4ca662dce3a32ee3b592c0af35013d5ff8d6738) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xa7ffc4c7b7a333519a5b1f16617316e3545f535d`](https://berascan.com/address/0xa7ffc4c7b7a333519a5b1f16617316e3545f535d) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x6b108108b7a2fdf95743d7959e9bbc665aea24ad`](https://berascan.com/address/0x6b108108b7a2fdf95743d7959e9bbc665aea24ad) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x1ed18ffff2e36d0198053c1b9ceb8ec1806b0e0b`](https://berascan.com/address/0x1ed18ffff2e36d0198053c1b9ceb8ec1806b0e0b) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xc880032820f62d3fbc48bc56890ee774c3741b69`](https://blastscan.io/address/0xc880032820f62d3fbc48bc56890ee774c3741b69) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x51ab2f957e353b96ac631da75941cd18ce57900a`](https://blastscan.io/address/0x51ab2f957e353b96ac631da75941cd18ce57900a) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x8cd6cd223305ddb28432ce0f6bb129561a7e46af`](https://blastscan.io/address/0x8cd6cd223305ddb28432ce0f6bb129561a7e46af) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xa6e02ee60c7b7ee3e1806914f99f53551b3c9789`](https://blastscan.io/address/0xa6e02ee60c7b7ee3e1806914f99f53551b3c9789) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xd3195b706056349e8b371150220bf95cc6fb098b`](https://bscscan.com/address/0xd3195b706056349e8b371150220bf95cc6fb098b) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xe58e61ec19938c02055ef386873901bef08f23ff`](https://bscscan.com/address/0xe58e61ec19938c02055ef386873901bef08f23ff) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x61b571ad105240bca4dc3a757e9b62ef2390179f`](https://bscscan.com/address/0x61b571ad105240bca4dc3a757e9b62ef2390179f) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xfa1bf34fcacf54c5d11733dd487b3484dff07abc`](https://bscscan.com/address/0xfa1bf34fcacf54c5d11733dd487b3484dff07abc) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x197d5bad8e769ddba86ed4adcc2f467b82364874`](https://chiliscan.com/address/0x197d5bad8e769ddba86ed4adcc2f467b82364874) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x11aa6b13a7a96b38a067aed21e2a01a9e99604ca`](https://chiliscan.com/address/0x11aa6b13a7a96b38a067aed21e2a01a9e99604ca) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x8ccf1c388c3f679623effe54422ca09c2687220d`](https://chiliscan.com/address/0x8ccf1c388c3f679623effe54422ca09c2687220d) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x166D9de7685c3a78fecBF1fb2e20D32DB6c206aB`](https://chiliscan.com/address/0x166D9de7685c3a78fecBF1fb2e20D32DB6c206aB) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xcd7606fddbf113f7d35081950a65abd6ad2f7d84`](https://scan.coredao.org/address/0xcd7606fddbf113f7d35081950a65abd6ad2f7d84) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x8716b9de62dbc08e5cb56b912dbfd6fd0c9d45a8`](https://scan.coredao.org/address/0x8716b9de62dbc08e5cb56b912dbfd6fd0c9d45a8) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0xc31c3f1735155451a36d88e0aaeaa3d7c1065a32`](https://scan.coredao.org/address/0xc31c3f1735155451a36d88e0aaeaa3d7c1065a32) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xa06b797ffa2652f7411e256d3e9d3fc44874db47`](https://scan.coredao.org/address/0xa06b797ffa2652f7411e256d3e9d3fc44874db47) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x7f70ba7c7373baa4047ce450168cd24968321bda`](https://etherscan.io/address/0x7f70ba7c7373baa4047ce450168cd24968321bda) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x0781ad660a5ed0041b45d44d45009a163cc0b578`](https://etherscan.io/address/0x0781ad660a5ed0041b45d44d45009a163cc0b578) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x336d464276e2c7c76927d975ef866df8a7ecf8dd`](https://etherscan.io/address/0x336d464276e2c7c76927d975ef866df8a7ecf8dd) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x91fdbd7077d615f951a0defa81ec30bfd68dbd8d`](https://etherscan.io/address/0x91fdbd7077d615f951a0defa81ec30bfd68dbd8d) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xcd307b7ceb5a73c6d3c247d9aafc61851a6bedaf`](https://gnosisscan.io/address/0xcd307b7ceb5a73c6d3c247d9aafc61851a6bedaf) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xfd95edeac8979492813de5d2a968cded164cd2ee`](https://gnosisscan.io/address/0xfd95edeac8979492813de5d2a968cded164cd2ee) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x70a4c689894d834b48f1aa85b8b847be7143b581`](https://gnosisscan.io/address/0x70a4c689894d834b48f1aa85b8b847be7143b581) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x96dd74883b920fd098893e4254d9fe119f35a662`](https://gnosisscan.io/address/0x96dd74883b920fd098893e4254d9fe119f35a662) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### HyperEVM | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x17ccf6a73047eb6e477feb1d3bdac727425392a6`](https://hyperevmscan.io/address/0x17ccf6a73047eb6e477feb1d3bdac727425392a6) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xfbe39a52d26025d0fdde694b8cd16d0585022f8e`](https://hyperevmscan.io/address/0xfbe39a52d26025d0fdde694b8cd16d0585022f8e) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x936f86ba4ea97ebcb0659eac0885afc44b7baef1`](https://hyperevmscan.io/address/0x936f86ba4ea97ebcb0659eac0885afc44b7baef1) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xb229842fcf90dcb5d9832fd9401ee191e6ad355a`](https://hyperevmscan.io/address/0xb229842fcf90dcb5d9832fd9401ee191e6ad355a) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xb677dBC0d05b2d51C9A4c333d5d41e46ea3C9787`](https://phoenix.lightlink.io/address/0xb677dBC0d05b2d51C9A4c333d5d41e46ea3C9787) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xbE6A1337228AD28ccfAb97b2Ce52fCb7DEa48f5F`](https://phoenix.lightlink.io/address/0xbE6A1337228AD28ccfAb97b2Ce52fCb7DEa48f5F) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x52b40612E91A21CE6a55314520a9A4174Aa512D3`](https://phoenix.lightlink.io/address/0x52b40612E91A21CE6a55314520a9A4174Aa512D3) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x6437ECad55D68BB4B3b53a9A330D6cd7Fa8e687c`](https://phoenix.lightlink.io/address/0x6437ECad55D68BB4B3b53a9A330D6cd7Fa8e687c) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xbc378d190647154e8b193505a5e575e28c132fe6`](https://lineascan.build/address/0xbc378d190647154e8b193505a5e575e28c132fe6) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x224f6e6a1b71012428e93b666472b9052d7fda63`](https://lineascan.build/address/0x224f6e6a1b71012428e93b666472b9052d7fda63) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x5229beabd7d669e1142f989e78c09a7d716cb927`](https://lineascan.build/address/0x5229beabd7d669e1142f989e78c09a7d716cb927) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xa911c0f815d2d80fa6b4cdb81ebd252e308b80f8`](https://lineascan.build/address/0xa911c0f815d2d80fa6b4cdb81ebd252e308b80f8) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xc36ffed30c17f7b044975baee75ed41090df9d20`](https://modescan.io/address/0xc36ffed30c17f7b044975baee75ed41090df9d20) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xe7d5af3d04d55f1b1b7d71fcd8283f07c3553f61`](https://modescan.io/address/0xe7d5af3d04d55f1b1b7d71fcd8283f07c3553f61) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x90f20c6a71775cb4e5a4f59ad0086e28b42b8c39`](https://modescan.io/address/0x90f20c6a71775cb4e5a4f59ad0086e28b42b8c39) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x0787a601b523138513368fa725209773c69d41d5`](https://modescan.io/address/0x0787a601b523138513368fa725209773c69d41d5) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x39CBF38BDa1A629fcb17949cD7F8b2de2Bf6686b`](https://explorer.morphl2.io/address/0x39CBF38BDa1A629fcb17949cD7F8b2de2Bf6686b) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xbae3528d0f1963e0ca55f8816cc7174ea3da016f`](https://explorer.morphl2.io/address/0xbae3528d0f1963e0ca55f8816cc7174ea3da016f) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x36e6ac1d0bef5414855c62513be9723173526094`](https://explorer.morphl2.io/address/0x36e6ac1d0bef5414855c62513be9723173526094) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xf93b0dfa6770b6a989203395dd20560d68b09d3d`](https://explorer.morphl2.io/address/0xf93b0dfa6770b6a989203395dd20560d68b09d3d) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x2e0d590a0e48da5078c2a51d9638c6260a99915e`](https://optimistic.etherscan.io/address/0x2e0d590a0e48da5078c2a51d9638c6260a99915e) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x3f46f5d034af96248a59cd1319bf51b048938af0`](https://optimistic.etherscan.io/address/0x3f46f5d034af96248a59cd1319bf51b048938af0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x564631122bb104721629a64c5b32cb6e3e32e75d`](https://optimistic.etherscan.io/address/0x564631122bb104721629a64c5b32cb6e3e32e75d) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xaadd56cf2e781476fe49a8b36aeda84097b8f957`](https://optimistic.etherscan.io/address/0xaadd56cf2e781476fe49a8b36aeda84097b8f957) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x77efc83efdfc4fa4a0d9e6a535c2efe00bdaff62`](https://polygonscan.com/address/0x77efc83efdfc4fa4a0d9e6a535c2efe00bdaff62) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x75cb79d603ba5ef927639aeb5b20690516e2cd08`](https://polygonscan.com/address/0x75cb79d603ba5ef927639aeb5b20690516e2cd08) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x1bb7e55cdb042d0ee2a074393eab66b8e04abd33`](https://polygonscan.com/address/0x1bb7e55cdb042d0ee2a074393eab66b8e04abd33) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x8b7e26c9a2dc8f24261ad7c103ba2cc524c8c21d`](https://polygonscan.com/address/0x8b7e26c9a2dc8f24261ad7c103ba2cc524c8c21d) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x29593be78eb8c0885a2ebcba4752574e48716eb4`](https://scrollscan.com/address/0x29593be78eb8c0885a2ebcba4752574e48716eb4) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xec5a923f0dc3cc0df5e2032e97c830ccff063447`](https://scrollscan.com/address/0xec5a923f0dc3cc0df5e2032e97c830ccff063447) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x9a666e9781c487fe628fff297cdd100517aaacfa`](https://scrollscan.com/address/0x9a666e9781c487fe628fff297cdd100517aaacfa) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x71c17ef6bd5fd2e0cc1734ec207fb0a2858e78c8`](https://scrollscan.com/address/0x71c17ef6bd5fd2e0cc1734ec207fb0a2858e78c8) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Sei Network | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xaea21609d62d58c8775d59ed584338b24bbc6eb2`](https://seiscan.io/address/0xaea21609d62d58c8775d59ed584338b24bbc6eb2) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x37720179ff6b3795607f113789cd78415beda80e`](https://seiscan.io/address/0x37720179ff6b3795607f113789cd78415beda80e) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x020bc6160fcaf7ebc75844d4d8f7a3b6095aac0f`](https://seiscan.io/address/0x020bc6160fcaf7ebc75844d4d8f7a3b6095aac0f) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x43da38c9a7fafe822465e023a75b85cf012b3f7a`](https://seiscan.io/address/0x43da38c9a7fafe822465e023a75b85cf012b3f7a) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Sonic | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xc310f89972a576c3ec510c9a3265dea01a2fecdb`](https://sonicscan.org/address/0xc310f89972a576c3ec510c9a3265dea01a2fecdb) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x829ad061e203361f5333787ee99e9f5e403fc627`](https://sonicscan.org/address/0x829ad061e203361f5333787ee99e9f5e403fc627) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x01e368a15bfb058968fe617c9e5dc403b45f75e0`](https://sonicscan.org/address/0x01e368a15bfb058968fe617c9e5dc403b45f75e0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xd3c8f98e6f9cac5aebd5d653e2331c1e6fdc16a9`](https://sonicscan.org/address/0xd3c8f98e6f9cac5aebd5d653e2331c1e6fdc16a9) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x9f91de05cceb13b3fbe764bdcdd1659e447d3f63`](https://explorer.superseed.xyz/address/0x9f91de05cceb13b3fbe764bdcdd1659e447d3f63) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x1e83629989a3340f68d76dd770f271b06cb38e15`](https://explorer.superseed.xyz/address/0x1e83629989a3340f68d76dd770f271b06cb38e15) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x84328296e172146f2c58097d12f7049d0e5c28c1`](https://explorer.superseed.xyz/address/0x84328296e172146f2c58097d12f7049d0e5c28c1) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x38b33ab1c8697edfe68d177d50908bad9d66c2f7`](https://explorer.superseed.xyz/address/0x38b33ab1c8697edfe68d177d50908bad9d66c2f7) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Unichain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x2f87acb56a7b1bf6ec76ac62c3880d87af025172`](https://uniscan.xyz/address/0x2f87acb56a7b1bf6ec76ac62c3880d87af025172) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x1e2cc73bed5d4225b46fdaccc4e3b7aa07fb1016`](https://uniscan.xyz/address/0x1e2cc73bed5d4225b46fdaccc4e3b7aa07fb1016) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0xf6456cd10d3b27120d637f391743de960d819abb`](https://uniscan.xyz/address/0xf6456cd10d3b27120d637f391743de960d819abb) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x994ed981a908f6c8c6dc86fb56fede1444f38759`](https://uniscan.xyz/address/0x994ed981a908f6c8c6dc86fb56fede1444f38759) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### XDC | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x0543a1aa6abf1b5b69bfd159ebb4bcaaa7b27aa7`](https://xdcscan.com/address/0x0543a1aa6abf1b5b69bfd159ebb4bcaaa7b27aa7) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x670b50259d979854c15494476938dec79c85ba29`](https://xdcscan.com/address/0x670b50259d979854c15494476938dec79c85ba29) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x075202c1224457d46d25cb481325a0218197682b`](https://xdcscan.com/address/0x075202c1224457d46d25cb481325a0218197682b) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x49e616b0123fd05d70355c472266c647a099936e`](https://xdcscan.com/address/0x49e616b0123fd05d70355c472266c647a099936e) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x27e0076b5be25d604e201bb602d7713dcf267a30`](https://era.zksync.network//address/0x27e0076b5be25d604e201bb602d7713dcf267a30) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x2c62a3a177101ce56b3de95b11d686973956e7f0`](https://era.zksync.network//address/0x2c62a3a177101ce56b3de95b11d686973956e7f0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x38be7df6bd31cd0f74bb9089751620102e776976`](https://era.zksync.network//address/0x38be7df6bd31cd0f74bb9089751620102e776976) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xe2b3edb3b49bf65ec7d48322d1c24dee2d27c9b1`](https://era.zksync.network//address/0xe2b3edb3b49bf65ec7d48322d1c24dee2d27c9b1) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xea37da106ce1ad0264b20764824baca76bb88bd0`](https://sepolia.arbiscan.io/address/0xea37da106ce1ad0264b20764824baca76bb88bd0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xaaaf38c81fec5dc0b32c4b53f3aab31f37d76046`](https://sepolia.arbiscan.io/address/0xaaaf38c81fec5dc0b32c4b53f3aab31f37d76046) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x02ab5777c9a91b2d29e215ad2b7a49332755af8f`](https://sepolia.arbiscan.io/address/0x02ab5777c9a91b2d29e215ad2b7a49332755af8f) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x686f70dfc05a52f2842b4a7f7963b3fa0f8f9a40`](https://sepolia.arbiscan.io/address/0x686f70dfc05a52f2842b4a7f7963b3fa0f8f9a40) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0xb04a60866516e335471b801a65812c1eb02fcc75`](https://sepolia.basescan.org/address/0xb04a60866516e335471b801a65812c1eb02fcc75) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x1ea20273d24aa570074f390b9f9666e8c775afff`](https://sepolia.basescan.org/address/0x1ea20273d24aa570074f390b9f9666e8c775afff) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x04de506964b7ca8f4031bbd7f34376eb8c714764`](https://sepolia.basescan.org/address/0x04de506964b7ca8f4031bbd7f34376eb8c714764) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x9a4acab21921c0e874095aeec9d49ce15a452bfc`](https://sepolia.basescan.org/address/0x9a4acab21921c0e874095aeec9d49ce15a452bfc) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x05a666850b88a9b2f02ed851fee9a7ffc013deec`](https://sepolia.explorer.mode.network/address/0x05a666850b88a9b2f02ed851fee9a7ffc013deec) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0xb2217bda352d15c7c1972b6419f37b408b770aba`](https://sepolia.explorer.mode.network/address/0xb2217bda352d15c7c1972b6419f37b408b770aba) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x2c88ce3d64d8f51834ffa81f092558c7e52874c0`](https://sepolia.explorer.mode.network/address/0x2c88ce3d64d8f51834ffa81f092558c7e52874c0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x134243bdfac6547f3cda2ccb7a5f2fdc1e390ba0`](https://sepolia.explorer.mode.network/address/0x134243bdfac6547f3cda2ccb7a5f2fdc1e390ba0) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x15917930cc30093823790c9d1f83d550c0de33d3`](https://optimism-sepolia.blockscout.com/address/0x15917930cc30093823790c9d1f83d550c0de33d3) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x5796005a94e119ff282a2783dc46eaf543e498cd`](https://optimism-sepolia.blockscout.com/address/0x5796005a94e119ff282a2783dc46eaf543e498cd) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x4894387bec155e73fa0b7673c11bc7074949f2a1`](https://optimism-sepolia.blockscout.com/address/0x4894387bec155e73fa0b7673c11bc7074949f2a1) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0xd3d12e4281f56fc3f97b9373d7085e694a2ec438`](https://optimism-sepolia.blockscout.com/address/0xd3d12e4281f56fc3f97b9373d7085e694a2ec438) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierFactoryMerkleInstant | [`0x3633462151339dea950cBED2fd4d132Bd942b64b`](https://sepolia.etherscan.io/address/0x3633462151339dea950cBED2fd4d132Bd942b64b) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLL | [`0x24e7707BdE221D711CbA180385cd419A43E87c5A`](https://sepolia.etherscan.io/address/0x24e7707BdE221D711CbA180385cd419A43E87c5A) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleLT | [`0x4b1764eD795948273D3D7360D885DDEB9CF48Fc6`](https://sepolia.etherscan.io/address/0x4b1764eD795948273D3D7360D885DDEB9CF48Fc6) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | | SablierFactoryMerkleVCA | [`0x960b2fdfaf112edc66da793db96b0dc732d91483`](https://sepolia.etherscan.io/address/0x960b2fdfaf112edc66da793db96b0dc732d91483) | [`airdrops-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v2.0) | --- ## Configure Your Local Environment In this guide, we will go through the steps to set up a local development environment for building onchain integrations with {props.protocol}. We will use Foundry to install {props.protocol} as a dependency. At the end, you’ll have a development environment set up that you can use to build the rest of the examples under "Guides", or start your own integration project. ## Pre-requisites You will need the following software on your machine: - Git - Foundry - Node.js - Bun In addition, familiarity with [Ethereum](https://ethereum.org/) and [Solidity](https://soliditylang.org/) is requisite. ## Set up using Foundry template :::tip Make sure you are using the latest version of Foundry by running `foundryup`. ::: Foundry is a popular development toolkit for Ethereum projects, which we have used to build the {props.protocol} Protocol. For the purposes of this guide, Foundry will provide us with the tooling needed to compile and test our contracts. Let's use this command to spin up a new Foundry project: ```bash $ forge init my-project $ cd my-project ``` Once the initialization completes, take a look around at what got set up: ```bash ├── foundry.toml ├── script ├── src └── test ``` The folder structure should be intuitive: - `src` is where you'll write Solidity contracts - `test` is where you'll write tests (also in Solidity) - `script` is where you'll write scripts to perform actions like deploying contracts (you guessed it, in Solidity) - `foundry.toml` is where you can configure your Foundry settings, which we will leave as is in this guide :::note You might notice that the CLI is `forge` rather than `foundry`. This is because Foundry is a toolkit, and `forge` is just one of the tools that comes with it. ::: ## Install via npm package Let's install the {props.protocol} Node.js packages using Bun: {`$ bun add @sablier/${props.protocol.toLowerCase()}`} Bun will download the {props.protocol} contracts, along with their dependencies, and put them in the `node_modules` directory. That's it! You should now have a functional development environment to start building onchain {props.protocol} integrations. ## Next steps Congratulations! Your environment is now configured, and you are prepared to start building. Explore the guides section to discover various features available for {props.protocol} integration. Remember to include all contracts (`.sol` files) in the `src` folder and their corresponding tests in the `test` folder. As far as Foundry is concerned, there is much more to uncover. If you want to learn more about it, check out the Foundry Book, which contains numerous examples and tutorials. A deep understanding of Foundry will enable you to create more sophisticated integrations with {props.protocol} protocol. --- ## Create Campaigns # Create Airdrop Campaigns In this guide, we will show you how you can use Solidity to create a campaigns via the Merkle Factories. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/airdrops) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Now, import the relevant symbols from `@sablier/lockup` and `@sablier/airdrops`: ```solidity ``` Create a contract called `MerkleCreator`, and declare a constant `DAI` of type `IERC20`, a constant `LOCKUP` of type `ISablierLockup` and the factories constants of type `ISablierFactoryMerkleInstant`, `ISablierFactoryMerkleLL`, `ISablierFactoryMerkleLT` and `ISablierFactoryMerkleVCA`. ```solidity contract MerkleCreator { IERC20 public constant DAI = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); ISablierFactoryMerkleInstant public constant INSTANT_FACTORY = ISablierFactoryMerkleInstant(0x7f70bA7C7373BaA4047cE450168cD24968321Bda); ISablierFactoryMerkleLL public constant LL_FACTORY = ISablierFactoryMerkleLL(0x0781Ad660a5ED0041B45d44d45009a163CC0B578); ISablierFactoryMerkleLT public constant LT_FACTORY = ISablierFactoryMerkleLT(0x336d464276e2c7C76927d975Ef866Df8a7Ecf8DD); ISablierFactoryMerkleVCA public constant VCA_FACTORY = ISablierFactoryMerkleVCA(0x91FdBd7077d615f951a0defA81Ec30Bfd68dbd8D); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. Factory address can be obtained from the [Merkle Airdrops Deployments](/guides/airdrops/deployments) page. ## Create function There are four create functions available through the factories: - [`createMerkleInstant`](/reference/airdrops/contracts/contract.SablierFactoryMerkleInstant#createmerkleinstant): creates campaign for instant distribution of tokens. - [`createMerkleLL`](/reference/airdrops/contracts/contract.SablierFactoryMerkleLL#createmerklell): creates campaign with a Lockup Linear distribution. - [`createMerkleLT`](/reference/airdrops/contracts/contract.SablierFactoryMerkleLT#createmerklelt): creates campaign with a Lockup Tranched distribution. - [`createMerkleVCA`](/reference/airdrops/contracts/contract.SablierFactoryMerkleVCA#createmerklevca): creates campaign with a Variable Claim Amount distribution. Which one you choose depends upon your use case. In this guide, we will use `createMerkleLL`. :::note Below we will focus only on the LL factory. The other factories follow the same pattern. ::: ## Function definition Define a function called `createMerkleLL` that returns the address of newly deployed Merkle Lockup contract. ```solidity function createMerkleLL() public returns (ISablierMerkleLL merkleLL) { // ... } ``` ## Parameters Merkle Factory uses [MerkleLL.ConstructorParams](/reference/airdrops/contracts/types/library.MerkleLL#constructorparams) as the struct for the `createMerkleLL` function. ```solidity MerkleLL.ConstructorParams memory params; ``` Let's review each parameter of the struct in detail. ### Token The contract address of the ERC-20 token that you want to airdrop to your recipients. In this example, we will use DAI. ```solidity params.token = DAI; ``` ### Campaign Start Time The unix timestamp indicating when the campaign starts. Users will be able to claim their airdrop after this time. ```solidity params.campaignStartTime = uint40(block.timestamp); ``` ### Expiration The unix timestamp indicating the expiration of the campaign. Once this time has been passed, users will no longer be able to claim their airdrop. And you will be able to [clawback](/reference/airdrops/contracts/abstracts/abstract.SablierMerkleBase#clawback) any unclaimed tokens from the campaign. ```solidity params.expiration = uint40(block.timestamp + 12 weeks); ``` ### Initial Admin This is the initial admin of the Airstream campaign. When a recipient claims his airdrop, a Lockup stream is created with this admin as the sender of the stream. Another role of admin is to clawback unclaimed tokens from the campaign post expiry and during grace period. ```solidity params.initialAdmin = address(0xBeeF); ``` ### IPFS CID This is the content identifier (CID) for indexing the contract on IPFS. This is where we store addresses of the Airdrop recipients and their claim amount. ```solidity params.ipfsCID = "QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX"; ``` ### Merkle Root These campaigns use a Merkle tree data structure to store the airdrop data onchain. As a result, you only pay the gas fee to create the contract and store the Merkle root onchain. Airdrop recipients can then call the contract on their own to claim their airdrop. If you want to create the Merkle root programmatically, you can follow [our guide on Merkle API](/api/airdrops/merkle-api/overview). ```solidity params.merkleRoot = 0x4e07408562bedb8b60ce05c1decfe3ad16b722309875f562c03d02d7aaacb123; ``` ### Campaign Name The name of the campaign. ```solidity params.campaignName = "My First Campaign"; ``` ### Shape A custom stream shape name for visualization in the UI. This helps users understand the vesting schedule visually. ```solidity params.shape = "A custom stream shape"; ``` ### Lockup The address of the Sablier Lockup contract that will be used to create the streams when recipients claim their airdrop. ```solidity params.lockup = LOCKUP; ``` ### Vesting Start Time The unix timestamp indicating when the vesting starts. If set to 0, the vesting will begin at the time of claim. ```solidity params.vestingStartTime = uint40(block.timestamp); ``` ### Cliff Duration The duration of the cliff period in seconds. During this period, no tokens will be unlocked. ```solidity params.cliffDuration = 30 days; ``` ### Cliff Unlock Percentage The percentage of tokens to unlock after the cliff period ends. We want to unlock 0.01% after the cliff period. ```solidity params.cliffUnlockPercentage = ud60x18(0.01e18); ``` ### Start Unlock Percentage The percentage of tokens to unlock at the vesting start time. We want to unlock 0.01% at the start. ```solidity params.startUnlockPercentage = ud60x18(0.01e18); ``` ### Total Duration The total duration of vesting in seconds. This should be 90 days for this example. ```solidity params.totalDuration = 90 days; ``` ### Cancelable Boolean that indicates whether the stream will be cancelable or not after it has been claimed. ```solidity params.cancelable = false; ``` ### Transferable Boolean that indicates whether the stream will be transferable or not. This is the stream that users obtain when they claim their airstream. ```solidity params.transferable = true; ``` Now that we have the `params` ready, it's time to setup rest of the input parameters. ### Aggregate Amount This is the total amount of tokens you want to airdrop to your users, denoted in units of the asset's decimals. Let's say you want to airdrop 100M tokens of DAI. Then, the aggregate amount would be $100m\times 10^{18}$. ```solidity uint256 aggregateAmount = 100_000_000e18; ``` ### Recipient Count The total number of recipient addresses. ```solidity uint256 recipientCount = 10_000; ``` ## Invoke the create function With all parameters set, we can now call the `createMerkleLL` function, and assign the address of the newly created campaign to a variable: ```solidity merkleLL = LL_FACTORY.createMerkleLL({ params: params, aggregateAmount: aggregateAmount, recipientCount: recipientCount }); ``` ## Full code Below you can see the full code, including the other factories. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/airdrops/MerkleCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/airdrops/MerkleCreator.sol`} --- ## v1.3 # Merkle Airdrops v1.3 [v1.3.0]: https://npmjs.com/package/@sablier/airdrops/v/1.3.0 This section contains the deployment addresses for the v1.3 release of [@sablier/airdrops@1.3.0][v1.3.0]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Merkle Airdrops protocol. See the latest version [here](/guides/airdrops/deployments). ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x0C72b957347B51285854f015e4D20641655B939A`](https://abscan.org/address/0x0C72b957347B51285854f015e4D20641655B939A) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x7efd170e3e32Dc1b4c17eb4cFFf92c81FF43a6cb`](https://arbiscan.io/address/0x7efd170e3e32Dc1b4c17eb4cFFf92c81FF43a6cb) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x6bCD2260825CFed440Bb765f7A92f6CDBDc90f43`](https://snowtrace.io/address/0x6bCD2260825CFed440Bb765f7A92f6CDBDc90f43) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xD9e108f26fe104CE1058D48070438deDB3aD826A`](https://basescan.org/address/0xD9e108f26fe104CE1058D48070438deDB3aD826A) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Berachain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x7868Af143cc5e6Cd03f9B4f5cdD2832695A85d6B`](https://berascan.com/address/0x7868Af143cc5e6Cd03f9B4f5cdD2832695A85d6B) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xDd40b4F5B216F524a55E2e8F75637E8b453E4bd2`](https://blastscan.io/address/0xDd40b4F5B216F524a55E2e8F75637E8b453E4bd2) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xf9f89d99fb702b06fba16a294b7614089defe068`](https://bscscan.com/address/0xf9f89d99fb702b06fba16a294b7614089defe068) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xf978034bb3CAB5fe88d23DB5Cb38D510485DaB90`](https://chiliscan.com/address/0xf978034bb3CAB5fe88d23DB5Cb38D510485DaB90) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x71DD3Ca88E7564416E5C2E350090C12Bf8F6144a`](https://etherscan.io/address/0x71DD3Ca88E7564416E5C2E350090C12Bf8F6144a) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Form | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xA9264Ef7cB1516cc27FCD5149A2909Ace885Ffb6`](https://explorer.form.network/address/0xA9264Ef7cB1516cc27FCD5149A2909Ace885Ffb6) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x64ba580946985B4b87f4D9f7b6598C2156026775`](https://gnosisscan.io/address/0x64ba580946985B4b87f4D9f7b6598C2156026775) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### HyperEVM | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xe0548364372f3b842e6f89e2DAC2E53b5eA0a35b`](https://hyperevmscan.io/address/0xe0548364372f3b842e6f89e2DAC2E53b5eA0a35b) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### IoTeX | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xf08548b1a6DB590FEC6f1B95e6B41d17791767C2`](https://iotexscan.io/address/0xf08548b1a6DB590FEC6f1B95e6B41d17791767C2) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xC0107f368FBB50075d2190549055d9E6bf75c5c9`](https://phoenix.lightlink.io/address/0xC0107f368FBB50075d2190549055d9E6bf75c5c9) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xAa122611E0e3a0771127aA4cd4995A896BB2c20B`](https://lineascan.build/address/0xAa122611E0e3a0771127aA4cd4995A896BB2c20B) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xc472391DB89e7BE07170f18c4fdb010242507F2C`](https://modescan.io/address/0xc472391DB89e7BE07170f18c4fdb010242507F2C) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xBE64e8718D82C598EBCDA5149D10eB68b79632a4`](https://explorer.morphl2.io/address/0xBE64e8718D82C598EBCDA5149D10eB68b79632a4) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x2455bff7a71E6e441b2d0B1b1e480fe36EbF6D1E`](https://optimistic.etherscan.io/address/0x2455bff7a71E6e441b2d0B1b1e480fe36EbF6D1E) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xf0d61b42311C810dfdE191D58427d81E87c5d5F6`](https://polygonscan.com/address/0xf0d61b42311C810dfdE191D58427d81E87c5d5F6) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x6dF0bfFDb106b19d1e954853f4d14003E21B7854`](https://scrollscan.com/address/0x6dF0bfFDb106b19d1e954853f4d14003E21B7854) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Sei Network | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x0171A06878F7ff81c9955DEB5641f64f520d45E5`](https://seiscan.io/address/0x0171A06878F7ff81c9955DEB5641f64f520d45E5) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Sonic | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xbD73389Cbdd4f31F374F2815ecb7f9dEc0F124D3`](https://sonicscan.org/address/0xbD73389Cbdd4f31F374F2815ecb7f9dEc0F124D3) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Sophon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x9D4923e2ff0b9DAdc447A89f528760928f84D0F7`](https://sophscan.xyz/address/0x9D4923e2ff0b9DAdc447A89f528760928f84D0F7) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x3df48bb93509D9a041C81F6670C37B1eEb3E154B`](https://explorer.superseed.xyz/address/0x3df48bb93509D9a041C81F6670C37B1eEb3E154B) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Taiko | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x39D4D8C60D3596B75bc09863605BBB4dcE8243F1`](https://taikoscan.io/address/0x39D4D8C60D3596B75bc09863605BBB4dcE8243F1) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Tangle | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xd641a0E4509Cced67cC24E7BDcDe2a31b7F7cF77`](https://explorer.tangle.tools/address/0xd641a0E4509Cced67cC24E7BDcDe2a31b7F7cF77) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Unichain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xC6fC028E988D158C52Aa2e38CDd6f969AA14bdCd`](https://uniscan.xyz/address/0xC6fC028E988D158C52Aa2e38CDd6f969AA14bdCd) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### XDC | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xe41909f5623c3b78219D9a2Bb92bE95AEe5bbC30`](https://xdcscan.com/address/0xe41909f5623c3b78219D9a2Bb92bE95AEe5bbC30) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x8E7E78799F8cC87d4816112A758281dabc158452`](https://era.zksync.network//address/0x8E7E78799F8cC87d4816112A758281dabc158452) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x465E9218C1A8d36169e0c40C01b856A83CE44153`](https://sepolia.arbiscan.io/address/0x465E9218C1A8d36169e0c40C01b856A83CE44153) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x6a3466398A66c7Ce801989B45C390cdC8717102D`](https://sepolia.basescan.org/address/0x6a3466398A66c7Ce801989B45C390cdC8717102D) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Linea Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x5ADE5DF4FB42e353223DFF677cbfec812c6C4Da7`](https://sepolia.lineascan.build/address/0x5ADE5DF4FB42e353223DFF677cbfec812c6C4Da7) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x659836D788cce324Ad8c445584b9c44c6a8c74b7`](https://sepolia.explorer.mode.network/address/0x659836D788cce324Ad8c445584b9c44c6a8c74b7) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Monad Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x99846E1379fEBC91FCeC641097f8191b51ef0d34`](https://testnet.monadexplorer.com/address/0x99846E1379fEBC91FCeC641097f8191b51ef0d34) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0x2934A7aDDC3000D1625eD1E8D21C070a89073702`](https://optimism-sepolia.blockscout.com/address/0x2934A7aDDC3000D1625eD1E8D21C070a89073702) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xf642751d1271c88bBb8786067de808B32a016Fd4`](https://sepolia.etherscan.io/address/0xf642751d1271c88bBb8786067de808B32a016Fd4) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Superseed Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xb5951501D416cb7326e5b9bEB6EF8840a8DF6910`](https://sepolia-explorer.superseed.xyz/address/0xb5951501D416cb7326e5b9bEB6EF8840a8DF6910) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | ### Taiko Hekla | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierMerkleFactory | [`0xB5F4FB527568f88F8898Ce5F366f4d72e2C742BE`](https://hekla.taikoscan.network/address/0xB5F4FB527568f88F8898Ce5F366f4d72e2C742BE) | [`airdrops-v1.3`](https://github.com/sablier-labs/sdk/blob/main/deployments/airdrops/v1.3) | --- ## Overview(7) # Sablier Flow Welcome to the Sablier Flow documentation. This section contains detailed guides and technical references for the Flow protocol. These documents offer insight into the operational nuances of the contracts, providing a valuable resource for building onchain integrations. # Guides If you are new to Sablier, we recommend you start with the [Concepts](/concepts/what-is-sablier) section first. If you want to setup your local environment, head over to [the guide](/guides/flow/examples/local-environment). # Reference For a deeper dive into the protocol specifications, read through the [technical reference](/reference/flow/diagrams). # Resources - [Source Code](https://github.com/sablier-labs/flow/tree/release) - [Integration Templates](https://github.com/sablier-labs/flow-integration-template) - [Examples](https://github.com/sablier-labs/examples/tree/main/flow/) - [Foundry Book](https://book.getfoundry.sh/) --- ## Deployment Addresses(Flow) # Flow Deployments [latest]: https://npmjs.com/package/@sablier/flow This section contains the deployment addresses for the v2.0 release of [@sablier/flow][latest]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains ## Versions Any updates or additional features will require a new deployment of the protocol, due to its immutable nature. Came here looking for the previous deployments? Click below to see other versions. | Version | Release Date | UI Aliases | | ---------------------------------------------- | ------------- | ---------- | | [v2.0](/guides/flow/deployments) (latest) | October 2025 | FL3 | | [v1.1](/guides/flow/previous-deployments/v1.1) | February 2025 | FL2 | | [v1.0](/guides/flow/previous-deployments/v1.0) | December 2024 | FL | :::info Stay up to date with any new releases by [subscribing](https://x.com/Sablier/status/1821220784661995627) to the official Sablier repositories on Github. ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x6CefdBc5Ba80937235F012c83d6aA83F1200d6cC`](https://abscan.org/address/0x6CefdBc5Ba80937235F012c83d6aA83F1200d6cC) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xc415425e56cc6c42b87bacffb276db2292cc1e50`](https://abscan.org/address/0xc415425e56cc6c42b87bacffb276db2292cc1e50) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x5F23eF12A7e861CB92c24B4314Af2A5F363CDD4F`](https://arbiscan.io/address/0x5F23eF12A7e861CB92c24B4314Af2A5F363CDD4F) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xf0f6477422a346378458f73cf02f05a7492e0c25`](https://arbiscan.io/address/0xf0f6477422a346378458f73cf02f05a7492e0c25) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xb09b714B0feC83675E09fc997B7D532cF6620326`](https://snowtrace.io/address/0xb09b714B0feC83675E09fc997B7D532cF6620326) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x64dc318ba879eca8222e963d319728f211c600c7`](https://snowtrace.io/address/0x64dc318ba879eca8222e963d319728f211c600c7) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x5b5e742305Be3A484EacCB124C83456463c24E6a`](https://basescan.org/address/0x5b5e742305Be3A484EacCB124C83456463c24E6a) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x8551208f75375abfaee1fbe0a69e390a94000ec2`](https://basescan.org/address/0x8551208f75375abfaee1fbe0a69e390a94000ec2) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Berachain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x581250eE4311F7Dc1afCF965cF8024004B423e9E`](https://berascan.com/address/0x581250eE4311F7Dc1afCF965cF8024004B423e9E) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xb89cc68b2ef376ca1b9645f109f7a490b180cf1b`](https://berascan.com/address/0xb89cc68b2ef376ca1b9645f109f7a490b180cf1b) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x92f1dB592C771D9Ec7708abFEe79771AbC1b4fAd`](https://blastscan.io/address/0x92f1dB592C771D9Ec7708abFEe79771AbC1b4fAd) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x13ce2ca4602d5d1dd323014cd5a4e8414d310a06`](https://blastscan.io/address/0x13ce2ca4602d5d1dd323014cd5a4e8414d310a06) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xAE557c04B46d47Ecac24edA63F22cabB4571Da61`](https://bscscan.com/address/0xAE557c04B46d47Ecac24edA63F22cabB4571Da61) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x5505c2397B0BeBEEE64919F21Df84F83C008C51b`](https://bscscan.com/address/0x5505c2397B0BeBEEE64919F21Df84F83C008C51b) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xC7fd18CA19938d559dC45aDE362a850015CF0bd8`](https://chiliscan.com/address/0xC7fd18CA19938d559dC45aDE362a850015CF0bd8) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x21797da50e180d24d6a68e8be6f8daca1c06f0ee`](https://chiliscan.com/address/0x21797da50e180d24d6a68e8be6f8daca1c06f0ee) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x7293F2D4A4e676EF67C085E92277AdF560AECb88`](https://scan.coredao.org/address/0x7293F2D4A4e676EF67C085E92277AdF560AECb88) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x4cb7fb49e4b646b472a5609804004722b3b94f93`](https://scan.coredao.org/address/0x4cb7fb49e4b646b472a5609804004722b3b94f93) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x24bE13897eE1F83367661B6bA616a72523fC55C9`](https://etherscan.io/address/0x24bE13897eE1F83367661B6bA616a72523fC55C9) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x7a86d3e6894f9c5b5f25ffbdaae658cfc7569623`](https://etherscan.io/address/0x7a86d3e6894f9c5b5f25ffbdaae658cfc7569623) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x5A47FC8732d399a2f3845c4FC91aB91bb97da31F`](https://gnosisscan.io/address/0x5A47FC8732d399a2f3845c4FC91aB91bb97da31F) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xcdd3eb5283e4a675f16ba83e9d8c28c871a550a2`](https://gnosisscan.io/address/0xcdd3eb5283e4a675f16ba83e9d8c28c871a550a2) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### HyperEVM | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x81Cc8C4B57B9A60a56330d087D6854A8E17Dfc7A`](https://hyperevmscan.io/address/0x81Cc8C4B57B9A60a56330d087D6854A8E17Dfc7A) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x70ce7795896c1e226C71360F9d77B743d8302182`](https://hyperevmscan.io/address/0x70ce7795896c1e226C71360F9d77B743d8302182) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc58E948Cb0a010105467C92856bcd4842B759fb1`](https://phoenix.lightlink.io/address/0xc58E948Cb0a010105467C92856bcd4842B759fb1) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x5f742f6becc61e76ae67b0dc29d58f5c964e2c78`](https://phoenix.lightlink.io/address/0x5f742f6becc61e76ae67b0dc29d58f5c964e2c78) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x294D7fceBa43C4507771707CeBBB7b6d81d0BFdE`](https://lineascan.build/address/0x294D7fceBa43C4507771707CeBBB7b6d81d0BFdE) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x977FDf70abeD6b60eECcee85322beA4575B0b6Ed`](https://lineascan.build/address/0x977FDf70abeD6b60eECcee85322beA4575B0b6Ed) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xD9E2822a33606741BeDbA31614E68A745e430102`](https://modescan.io/address/0xD9E2822a33606741BeDbA31614E68A745e430102) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xbed2f163cc0aa3278261ef1c3fa51b98db270829`](https://modescan.io/address/0xbed2f163cc0aa3278261ef1c3fa51b98db270829) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x1dd4dcE2BB742908b4062E583d9c035973413A3F`](https://explorer.morphl2.io/address/0x1dd4dcE2BB742908b4062E583d9c035973413A3F) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xbf407836021c993dfa27cb8232415d15faea709a`](https://explorer.morphl2.io/address/0xbf407836021c993dfa27cb8232415d15faea709a) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x7AD245b74bBC1B71Da1713D53238931F791b90A3`](https://optimistic.etherscan.io/address/0x7AD245b74bBC1B71Da1713D53238931F791b90A3) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xd18491649440d6338532f260761cee64e79d7bb2`](https://optimistic.etherscan.io/address/0xd18491649440d6338532f260761cee64e79d7bb2) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x87B836a9e26673feB3E409A0da2EAf99C79f26C3`](https://polygonscan.com/address/0x87B836a9e26673feB3E409A0da2EAf99C79f26C3) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x62b6d5a3ac0cc91ecebd019d1c70fe955d8c7426`](https://polygonscan.com/address/0x62b6d5a3ac0cc91ecebd019d1c70fe955d8c7426) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x797Fe78c41d9cbE81BBEA2f420101be5e47d2aFf`](https://scrollscan.com/address/0x797Fe78c41d9cbE81BBEA2f420101be5e47d2aFf) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xc3e92b9714ed01b51fdc29bb88b17af5cddd2c22`](https://scrollscan.com/address/0xc3e92b9714ed01b51fdc29bb88b17af5cddd2c22) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Sei Network | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xF3D18b06c87735a58DAb3baC45af058b3772fD54`](https://seiscan.io/address/0xF3D18b06c87735a58DAb3baC45af058b3772fD54) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x9eaf5a3f23964148a1321078f9cce4c2325c603e`](https://seiscan.io/address/0x9eaf5a3f23964148a1321078f9cce4c2325c603e) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Sonic | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xAab30e5CB903f67F109aFc7102ac8ED803681EA5`](https://sonicscan.org/address/0xAab30e5CB903f67F109aFc7102ac8ED803681EA5) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x3954146884425accb86a6476dad69ec3591838cd`](https://sonicscan.org/address/0x3954146884425accb86a6476dad69ec3591838cd) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xd932fDA016eE9d9F70f745544b4F56715b1E723b`](https://explorer.superseed.xyz/address/0xd932fDA016eE9d9F70f745544b4F56715b1E723b) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xe91bbae6c7d67b7c5055de1c9635c17af056211b`](https://explorer.superseed.xyz/address/0xe91bbae6c7d67b7c5055de1c9635c17af056211b) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Unichain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x89824A7e48dcf6B7AE9DeE6E566f62A5aDF037F2`](https://uniscan.xyz/address/0x89824A7e48dcf6B7AE9DeE6E566f62A5aDF037F2) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x170ecc032c96aa976fa702e94fbc9fa5bb64ee7c`](https://uniscan.xyz/address/0x170ecc032c96aa976fa702e94fbc9fa5bb64ee7c) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### XDC | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x9D3F0122b260D2218ecf681c416495882003deDd`](https://xdcscan.com/address/0x9D3F0122b260D2218ecf681c416495882003deDd) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x3F00b8334EBE2A85875D1F8b50a43a12db67ACAD`](https://xdcscan.com/address/0x3F00b8334EBE2A85875D1F8b50a43a12db67ACAD) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x423C1b454250992Ede8516D36DE456F609714B53`](https://era.zksync.network//address/0x423C1b454250992Ede8516D36DE456F609714B53) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xa7f02e692973b6315eaca7fb4285ad2536a89cd0`](https://era.zksync.network//address/0xa7f02e692973b6315eaca7fb4285ad2536a89cd0) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x3E64A31C3974b6ae9f09a8fbc784519bF551e795`](https://sepolia.arbiscan.io/address/0x3E64A31C3974b6ae9f09a8fbc784519bF551e795) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x73a474c9995b659bc4736486f25501e0a4a671ed`](https://sepolia.arbiscan.io/address/0x73a474c9995b659bc4736486f25501e0a4a671ed) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xcb5591F6d0e0fFC03037ef7b006D1361C6D33D25`](https://sepolia.basescan.org/address/0xcb5591F6d0e0fFC03037ef7b006D1361C6D33D25) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x19e99dcdbaf2fbf43c60cfd026d571860da29d43`](https://sepolia.basescan.org/address/0x19e99dcdbaf2fbf43c60cfd026d571860da29d43) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xe1eDdA64eea2173a015A3738171C3a1C263324C7`](https://sepolia.explorer.mode.network/address/0xe1eDdA64eea2173a015A3738171C3a1C263324C7) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xed1bde07c0af4a2b27301555af0ac26ab1b727a8`](https://sepolia.explorer.mode.network/address/0xed1bde07c0af4a2b27301555af0ac26ab1b727a8) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x4739327acfb56E90177d44Cb0845e759276BCA88`](https://optimism-sepolia.blockscout.com/address/0x4739327acfb56E90177d44Cb0845e759276BCA88) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0x4cc7b50b0856c607edee0b6547221360e82e768c`](https://optimism-sepolia.blockscout.com/address/0x4cc7b50b0856c607edee0b6547221360e82e768c) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc9dBf2D207D178875b698e5f7493ce2d8BA88994`](https://sepolia.etherscan.io/address/0xc9dBf2D207D178875b698e5f7493ce2d8BA88994) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | | SablierFlow | [`0xde489096eC9C718358c52a8BBe4ffD74857356e9`](https://sepolia.etherscan.io/address/0xde489096eC9C718358c52a8BBe4ffD74857356e9) | [`flow-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v2.0) | --- ## Gas Benchmarks The gas usage of the Flow protocol is not deterministic and varies by user. Calls to third-party contracts, such as ERC-20 tokens, may use an arbitrary amount of gas. The values in the table below are rough estimations on Ethereum mainnet - you shouldn't take them for granted. The gas usage may vary depending on the network. :::note The benchmarks were generated using the code in this GitHub repository. ::: ## SablierFlow --- ## Configure Your Local Environment(Examples) In this guide, we will go through the steps to set up a local development environment for building onchain integrations with {props.protocol}. We will use Foundry to install {props.protocol} as a dependency, and run a simple test. At the end, you’ll have a development environment set up that you can use to build the rest of the examples under "Guides", or start your own integration project. ## Pre-requisites You will need the following software on your machine: - Git - Foundry - Node.js - Bun In addition, familiarity with Ethereum and Solidity is requisite. ## Set up using integration template :::tip Make sure you are using the latest version of Foundry by running `foundryup`. ::: We put together a template repository that you can use to get started quickly. This repository features a basic project structure, pre-configured {props.protocol} imports, and a selection of sample contracts and tests. To install the template, simply execute the following commands: {`$ mkdir ${props.protocol.toLowerCase()}-integration-template $ cd ${props.protocol.toLowerCase()}-integration-template $ forge init --template sablier-labs/${props.protocol.toLowerCase()}-integration-template $ bun install`} Then, hop to the Run a Fork Test section to complete your set up and start developing. ## Set up using Foundry template Foundry is a popular development toolkit for Ethereum projects, which we have used to build the {props.protocol} Protocol. For the purposes of this guide, Foundry will provide us with the tooling needed to compile and test our contracts. Let's use this command to spin up a new Foundry project: ```bash $ forge init my-project $ cd my-project ``` Once the initialization completes, take a look around at what got set up: ```bash ├── foundry.toml ├── script ├── src └── test ``` The folder structure should be intuitive: - `src` is where you'll write Solidity contracts - `test` is where you'll write tests (also in Solidity) - `script` is where you'll write scripts to perform actions like deploying contracts (you guessed it, in Solidity) - `foundry.toml` is where you can configure your Foundry settings, which we will leave as is in this guide :::note You might notice that the CLI is `forge` rather than `foundry`. This is because Foundry is a toolkit, and `forge` is just one of the tools that comes with it. ::: ## Install via npm package Let's install the {props.protocol} Node.js packages using Bun: {`$ bun add @sablier/${props.protocol.toLowerCase()}`} Bun will download the {props.protocol} contracts, along with their dependencies, and put them in the `node_modules` directory. That's it! You should now have a functional development environment to start building onchain {props.protocol} integrations. Let's run a quick test to confirm everything is set up properly. ## Write your first contract Delete the `src/Counter.sol` and `test/Counter.t.sol` files generated by Forge, and create two new files: `src/StreamCreator.sol` and `test/StreamCreator.t.sol`. Paste the following code into `src/StreamCreator.sol`: {`https://github.com/sablier-labs/${props.protocol.toLowerCase()}-integration-template/blob/main/src/${props.protocol}StreamCreator.sol`} Let's use Forge to compile this contract: ```bash $ forge build ``` If the contract was compiled correctly, you should see this message: ```bash [⠢] Compiling... [⠰] Compiling 62 files with Solc 0.8.29 [⠒] Solc 0.8.29 finished in 798.47ms Compiler run successful! ``` :::info The minimum Solidity version supported by the {props.protocol} contracts is v0.8.22. ::: ## Run a fork test Foundry offers native support for running tests against a fork of Ethereum Mainnet, testnets and L2s, which is useful when building and testing integrations with onchain protocols like Sablier. In practice, this enables you to access all Sablier contracts deployed on Ethereum, and use them for testing your integration. As a prerequisite, you will need an RPC that supports forking. A good solution for this is Alchemy, as it includes forking in its free tier plan. Once you have obtained your RPC, you can proceed to run the following test: {`https://github.com/sablier-labs/${props.protocol.toLowerCase()}-integration-template/blob/main/test/${props.protocol}StreamCreator.t.sol`} You can run the test using Forge: ```bash $ forge test ``` If the test passed, you should see a message like this: {`Ran 2 tests for test/${props.protocol}StreamCreator.t.sol:${props.protocol}StreamCreatorTest [PASS] test_Create${props.protocol}Stream() (gas: 246830) Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 626.58ms (500.67µs CPU time)`} ## Next steps Congratulations! Your environment is now configured, and you are prepared to start building. Explore the guides section to discover various features available for {props.protocol} integration. Remember to include all contracts (`.sol` files) in the `src` folder and their corresponding tests in the `test` folder. As far as Foundry is concerned, there is much more to uncover. If you want to learn more about it, check out the Foundry Book, which contains numerous examples and tutorials. A deep understanding of Foundry will enable you to create more sophisticated integrations with {props.protocol} protocol. --- ## Calculate Rate per Second This guide explains how to calculate the rate per second when creating a Flow stream. It is the most important step in setting up a stream since the rate per second is a key parameter in the stream's configuration. We assume that you have already gone through the [Protocol Concepts](/concepts/streaming) and the [Flow Overview](/concepts/flow/overview) sections. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: The rate per second is the amount of tokens streamed in one second. It is represented as a fixed-point number with 18 decimals, specifically as a `UD21x18` type from the `PRBMath` library. The underlying native Solidity type associated with `UD21x18` is `uint128`. Depending on how you receive payments, you have to calculate the rate per second and scale its value to 18 decimals format as below: 1. Based on a duration, e.g., 3 months 2. Between two points in time, e.g., January 1, 2025 to April, 1 2025 The calculation method is the same in either case. ## Set up a library Declare the Solidity version used to compile the library: ```solidity pragma solidity >=0.8.22; ``` Import the relevant symbols: ```solidity ``` Declare a library that can be used in other contracts: ```solidity library FlowUtilities {} ``` ## Calculate the rate per second on a duration Define a function called `ratePerSecondWithDuration` that takes the following parameters and the returned value: ```solidity function ratePerSecondWithDuration( address token, uint128 amount, uint40 duration ) internal view returns (UD21x18 ratePerSecond) { // ... } ``` First, retrieve the token's decimals. Note that not all ERC-20 tokens use the 18-decimal standard. ```solidity uint8 decimals = IERC20Metadata(token).decimals(); ``` If the token uses 18 decimals, simply divide the amount by the duration: ```solidity if (decimals == 18) { return ud21x18(amount / duration); } ``` If the token has less than 18 decimals, calculate the scale factor from the token's decimals: ```solidity uint128 scaleFactor = uint128(10 ** (18 - decimals)); ``` Then, multiply the amount by the scale factor and divide it by the duration: ```solidity return ud21x18((amount * scaleFactor) / duration); ``` ## Calculate the rate per second on timestamps Here, there are two time parameters, a start and an end time, instead of a duration. Let's define the function: ```solidity function ratePerSecondForTimestamps( address token, uint128 amount, uint40 start, uint40 end ) internal view returns (UD21x18 ratePerSecond) { // ... } ``` The first step is to calculate the duration between the two timestamps: ```solidity uint40 duration = end - start; ``` The remaining logic is identical to the duration-based calculation: ```solidity uint8 decimals = IERC20Metadata(token).decimals(); if (decimals == 18) { return ud21x18(amount / duration); } uint128 scaleFactor = uint128(10 ** (18 - decimals)); ratePerSecond = ud21x18((scaleFactor * amount) / duration); ``` ## Additional utilities To calculate earnings for specific durations from an existing stream, you can use the following functions: ```solidity function calculateAmountStreamedPerWeek(UD21x18 ratePerSecond) internal pure returns (uint128 amountPerWeek) { amountPerWeek = ratePerSecond.unwrap() * 1 weeks; } function calculateAmountStreamedPerMonth(UD21x18 ratePerSecond) internal pure returns (uint128 amountPerMonth) { amountPerMonth = ratePerSecond.unwrap() * 30 days; } function calculateAmountStreamedPerYear(UD21x18 ratePerSecond) internal pure returns (uint128 amountPerYear) { amountPerYear = ratePerSecond.unwrap() * 365 days; } ``` ## Full code Below you can see the complete `FlowUtilities` library: {`https://github.com/sablier-labs/evm-examples/blob/main/flow/FlowUtilities.sol`} --- ## Create a Stream # Create a Flow stream In this guide, we will show you how you can create a Flow stream using Solidity. It is important to note that A Flow stream has no end date, which means it will continue to accumulate debt even if no funds are deposited. This guide assumes that you have already gone through the [Calculate Rate per Second](./02-calculate-rps.mdx) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity pragma solidity >=0.8.22; ``` Import the relevant symbols from `@sablier/flow`, and the `FlowUtilities` library: ```solidity ``` Create a contract called `FlowStreamCreator`, and declare a constant `USDC` of type `IERC20` and a constant `FLOW` of type `ISablierFlow`: ```solidity contract FlowStreamCreator { IERC20 public constant USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); ISablierFlow public constant FLOW = ISablierFlow(0x7a86d3e6894f9c5B5f25FFBDAaE658CFc7569623); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. We will declare two functions, based on the amount desired to stream over a period of time. ## Define a function Define a function to stream a salary of 1000 USDC per month, call it `createStream_1K_PerMonth` which returns the newly created stream ID: ```solidity function createStream_1K_PerMonth() external returns (uint256) { // ... } ``` ## Input parameters ### Rate Per Second Use the [`FlowUtilities`](./02-calculate-rps.mdx) library to calculate the rate per second for the desired amount: ```solidity UD21x18 ratePerSecond = FlowUtilities.ratePerSecondWithDuration({ token: address(USDC), amount: 1000e6, duration: 30 days }); ``` ### Sender The address streaming the tokens, with the ability to `pause` the stream: ```solidity sender = msg.sender ``` ### Recipient The address receiving the tokens: ```solidity recipient = address(0xCAFE); ``` ### Start time The timestamp when the stream starts. ```solidity startTime = uint40(block.timestamp); ``` ### Token The contract address of the ERC-20 token used for streaming. In this example, we will stream `USDC`: ```solidity token = USDC; ``` ### Transferable Boolean that indicates whether the stream will be transferable or not. ```solidity transferable = true; ``` ### Invoke the create function With all the parameters, we can call the `create` function on the `FLOW` contract and assign the newly created stream to `streamId` variable: ```solidity streamId = FLOW.create({ sender: msg.sender, recipient: address(0xCAFE), ratePerSecond: FlowUtilities.ratePerSecondWithDuration({ token: address(USDC), amount: 1000e6, duration: 30 days }), startTime: uint40(block.timestamp), token: USDC, transferable: true }); ``` ## Full code Below you can see the complete `FlowStreamCreator` contract: {`https://github.com/sablier-labs/evm-examples/blob/main/flow/FlowStreamCreator.sol`} --- ## Stream Management # Managing a Stream This section will guide you through the different functions of Flow and how to interact with them. Before diving in, please note the following: 1. We assume you are already familiar with [creating Flow streams](./03-create-stream.mdx). 2. We also assume that the stream management contract is authorized to invoke each respective function. To learn more about access control in Flow, see the [Access Control](/reference/flow/access-control) guide. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: # Set up your contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Import the relevant symbols from `@sablier/flow` and `@prb/math`: ```solidity ``` Declare the contract and add the Flow address as a constant: ```solidity contract FlowStreamManager { ISablierFlow public constant FLOW = ISablierFlow(0x7a86d3e6894f9c5B5f25FFBDAaE658CFc7569623); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. ## Deposit Depositing into streams means adding tokens to the stream, which will then be distributed to the recipient based on the value of rate per second. :::info A deposit is also referred to as a top-up. ::: There are three deposit functions: 1. [`deposit`](/reference/flow/contracts/contract.SablierFlow#deposit): deposits an amount of tokens. 2. [`depositAndPause`](/reference/flow/contracts/contract.SablierFlow#depositandpause): deposits an amount of tokens and then pauses the stream. ```solidity function deposit(uint256 streamId, uint256 amount) external { FLOW.deposit(streamId, amount); } function depositAndPause(uint256 streamId) external { FLOW.depositAndPause(streamId, 3.14159e18); } ``` ## Withdraw The recipient of a stream can withdraw any amount, not exceeding the withdrawable amount. The recipient also has the option to withdraw the tokens to an alternate address of their choice. There are two withdrawal functions: 1. [`withdraw`](/reference/flow/contracts/contract.SablierFlow#withdraw): withdraws an amount of tokens not exceeding the withdrawable amount. 2. [`withdrawMax`](/reference/flow/contracts/contract.SablierFlow#withdrawmax): withdraws the entire withdrawable amount of tokens. ```solidity function withdraw(uint256 streamId) external { FLOW.withdraw({ streamId: streamId, to: address(0xCAFE), amount: 2.71828e18 }); } function withdrawMax(uint256 streamId) external { FLOW.withdrawMax({ streamId: streamId, to: address(0xCAFE) }); } ``` ## Adjust Rate per Second Adjusting the rate per second means changing the amount of tokens that is streamed each second. ```solidity function adjustRatePerSecond(uint256 streamId) external { FLOW.adjustRatePerSecond({ streamId: streamId, newRatePerSecond: ud21x18(0.0001e18) }); } ``` ## Pause Pausing a stream means setting the rate per second to zero, which means no more streaming. ```solidity function pause(uint256 streamId) external { FLOW.pause(streamId); } ``` ## Restart There are two restart functions: 1. [`restart`](/reference/flow/contracts/contract.SablierFlow#restart): restarts a stream. 2. [`restartAndDeposit`](/reference/flow/contracts/contract.SablierFlow#restartanddeposit): restarts a stream followed by depositing an amount of tokens into it. ```solidity function restart(uint256 streamId) external { FLOW.restart({ streamId: streamId, ratePerSecond: ud21x18(0.0001e18) }); } function restartAndDeposit(uint256 streamId) external { FLOW.restartAndDeposit({ streamId: streamId, ratePerSecond: ud21x18(0.0001e18), amount: 2.71828e18 }); } ``` ## Refund There are three refund functions: 1. [`refund`](/reference/flow/contracts/contract.SablierFlow#refund): refunds an amount of tokens not exceeding the refundable amount. 2. [`refundAndPause`](/reference/flow/contracts/contract.SablierFlow#refundandpause): refunds an amount of tokens, and then pauses the stream. 3. [`refundMax`](/reference/flow/contracts/contract.SablierFlow#refundmax): refunds the entire refundable amount of tokens. ```solidity function refund(uint256 streamId) external { FLOW.refund({ streamId: streamId, amount: 1.61803e18 }); } function refundAndPause(uint256 streamId) external { FLOW.refundAndPause({ streamId: streamId, amount: 1.61803e18 }); } function refundMax(uint256 streamId) external { FLOW.refundMax(streamId); } ``` ## Void Voiding a stream means permanently stopping it from streaming any tokens. This is slightly different from pausing a stream because it also sets the stream's uncovered debt to zero. ```solidity function void(uint256 streamId) external { FLOW.void(streamId); } ``` ## Full code Below you can see the complete `FlowStreamManager` contract: {`https://github.com/sablier-labs/evm-examples/blob/main/flow/FlowStreamManager.sol`} --- ## Batching Functions A neat feature of Sablier Flow is the ability to batch multiple function calls into a single transaction. This is made possible by the [`Batch`](/reference/flow/contracts/abstracts/abstract.Batch) contract, which is inherited by `SablierFlow`. With this, you can efficiently batch multiple function calls in a single transaction. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity pragma solidity >=0.8.22; ``` Import the relevant symbols: ```solidity ``` Create a contract called `FlowBatchable`, and declare a constant `USDC` of type `IERC20` and a constant `FLOW` of type `ISablierFlow`: ```solidity contract FlowBatchable { IERC20 public constant USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); ISablierFlow public constant FLOW = ISablierFlow(0x7a86d3e6894f9c5B5f25FFBDAaE658CFc7569623); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. ## Create multiple streams One of the most useful features achieved by `batch` is the ability to create multiple streams in a single transaction. Let's focus on it in this example. Define a function that creates multiple streams and returns their respective stream IDs: ```solidity function createMultiple() external returns (uint256[] memory streamIds) { // ... } ``` ### Parameters We will create two streams with same stream parameters required by the `create` function. ```solidity address sender = msg.sender; address firstRecipient = address(0xCAFE); address secondRecipient = address(0xBEEF); UD21x18 firstRatePerSecond = ud21x18(0.0001e18); UD21x18 secondRatePerSecond = ud21x18(0.0002e18); bool transferable = true; ``` Construct an array of `bytes` of length 2 to be passed into the `batch` function: ```solidity bytes[] memory calls = new bytes[](2); calls[0] = abi.encodeCall(FLOW.create, (sender, firstRecipient, firstRatePerSecond, USDC, transferable)); calls[1] = abi.encodeCall(FLOW.create, (sender, secondRecipient, secondRatePerSecond, USDC, transferable)); ``` Since we are creating two streams, the function will return an array containing the two generated stream IDs: ```solidity uint256 nextStreamId = FLOW.nextStreamId(); streamIds = new uint256[](2); streamIds[0] = nextStreamId; streamIds[1] = nextStreamId + 1; ``` Execute the `batch`: ```solidity FLOW.batch(calls); ``` ## Homework Try to implement the following ideas using `batch` function: - Adjust Rate Per Second and Deposit - Pause and Withdraw Max - Void and Withdraw Max - Multiple Withdraw Max Below, you will find the full code for it. ## Other ideas There are plenty of other possibilities as well! Feel free to experiment and come up with combinations that suit your system. 🚀 ## Full code Below you can see the complete `FlowBatchable` contract: {`https://github.com/sablier-labs/evm-examples/blob/main/flow/FlowBatchable.sol`} --- ## v1.0 # Flow v1.0 [v1.0.0]: https://npmjs.com/package/@sablier/flow/v/1.0.0 This section contains the deployment addresses for the v1.0 release of [@sablier/flow@1.0.0][v1.0.0]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Flow protocol. See the latest version [here](/guides/flow/deployments). ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x20C9A3E27322Fc2b21Ced430D1B2e12d90804db6`](https://abscan.org/address/0x20C9A3E27322Fc2b21Ced430D1B2e12d90804db6) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x001F1408515Ccd5C1A19A682455ed4eFa39DadD6`](https://abscan.org/address/0x001F1408515Ccd5C1A19A682455ed4eFa39DadD6) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x900ebdb9ecfb19f9463d68d1fd6e5fa7ab9c6897`](https://arbiscan.io/address/0x900ebdb9ecfb19f9463d68d1fd6e5fa7ab9c6897) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x18a12a7035aa56240bcd236bc019aa245dcc015a`](https://arbiscan.io/address/0x18a12a7035aa56240bcd236bc019aa245dcc015a) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x82ea83ab59b106c125168492cd468c322bd0d195`](https://snowtrace.io/address/0x82ea83ab59b106c125168492cd468c322bd0d195) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x8c172e42c06302e3cfe555dc4d6b71a756ee186b`](https://snowtrace.io/address/0x8c172e42c06302e3cfe555dc4d6b71a756ee186b) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x8e64f389a4697e004647162ec6ea0a7779d5d899`](https://basescan.org/address/0x8e64f389a4697e004647162ec6ea0a7779d5d899) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x1a9adc0e2114c8407cc31669baafeee031d15dd2`](https://basescan.org/address/0x1a9adc0e2114c8407cc31669baafeee031d15dd2) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xb40624ce2af67227529f713bac46e2b7064b7b92`](https://blastscan.io/address/0xb40624ce2af67227529f713bac46e2b7064b7b92) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xfdac2799644141856e20e021ac06f231cafc731f`](https://blastscan.io/address/0xfdac2799644141856e20e021ac06f231cafc731f) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xbc6fdd3f59900b9fcd445f8df159e2e794f098ec`](https://bscscan.com/address/0xbc6fdd3f59900b9fcd445f8df159e2e794f098ec) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xfce01f79247cf450062545e7155d7bd568551d0e`](https://bscscan.com/address/0xfce01f79247cf450062545e7155d7bd568551d0e) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x3D664B2Da905DDD0Db931982FD9a759ea950D6e1`](https://chiliscan.com/address/0x3D664B2Da905DDD0Db931982FD9a759ea950D6e1) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x9EfC8663cAB0e2d97ad17C9fbfc8392445517E94`](https://chiliscan.com/address/0x9EfC8663cAB0e2d97ad17C9fbfc8392445517E94) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xbfaa055ecfe503e1323dc9fc26b7d3aa3bf54364`](https://scan.coredao.org/address/0xbfaa055ecfe503e1323dc9fc26b7d3aa3bf54364) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x447c6ea25540611541ff98fc677ca865f4e92450`](https://scan.coredao.org/address/0x447c6ea25540611541ff98fc677ca865f4e92450) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xb69b27073fa0366cddf432f5976c34c9baf7eae6`](https://etherscan.io/address/0xb69b27073fa0366cddf432f5976c34c9baf7eae6) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x2d9221a63e12aa796619cb381ec4a71b201281f5`](https://etherscan.io/address/0x2d9221a63e12aa796619cb381ec4a71b201281f5) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc07c1128c19c2bf303b68ae061eff5293927630e`](https://gnosisscan.io/address/0xc07c1128c19c2bf303b68ae061eff5293927630e) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x5515f774a4db42820802333ba575f68a6e85bd13`](https://gnosisscan.io/address/0x5515f774a4db42820802333ba575f68a6e85bd13) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### IoTeX | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x83Dd52FCA44E069020b58155b761A590F12B59d3`](https://iotexscan.io/address/0x83Dd52FCA44E069020b58155b761A590F12B59d3) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x1DdC1c21CD39c2Fa16366E6036c95342A31831Ba`](https://iotexscan.io/address/0x1DdC1c21CD39c2Fa16366E6036c95342A31831Ba) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xa2a48b83b6c96e1536336df9ead024d557a97a23`](https://phoenix.lightlink.io/address/0xa2a48b83b6c96e1536336df9ead024d557a97a23) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x46fa0164c5af9382d330e5a245a2ca8a18398950`](https://phoenix.lightlink.io/address/0x46fa0164c5af9382d330e5a245a2ca8a18398950) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xF430f0d2f798c42fDFAc35b5e32BD4f63Bf51130`](https://lineascan.build/address/0xF430f0d2f798c42fDFAc35b5e32BD4f63Bf51130) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x949bFa08f1632432A2656a9dB17CA34d54Da8296`](https://lineascan.build/address/0x949bFa08f1632432A2656a9dB17CA34d54Da8296) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x46fa0164c5af9382d330e5a245a2ca8a18398950`](https://modescan.io/address/0x46fa0164c5af9382d330e5a245a2ca8a18398950) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x75970dde488431fc4961494569def3269f20d6b3`](https://modescan.io/address/0x75970dde488431fc4961494569def3269f20d6b3) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xab281bbc2bc34a1f202ddff17ffd1c00edf73f3a`](https://explorer.morphl2.io/address/0xab281bbc2bc34a1f202ddff17ffd1c00edf73f3a) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xfe6972d0ae797fae343e5a58d0c7d8513937f092`](https://explorer.morphl2.io/address/0xfe6972d0ae797fae343e5a58d0c7d8513937f092) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xe674fb603d6f72b88bf297c1ba69f57b588a8f6d`](https://optimistic.etherscan.io/address/0xe674fb603d6f72b88bf297c1ba69f57b588a8f6d) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x906356e4e6410ea0a97dbc5b071cf394ab0dcd69`](https://optimistic.etherscan.io/address/0x906356e4e6410ea0a97dbc5b071cf394ab0dcd69) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x011277c87158e52cfbd8a1dd4a29118d602dda3a`](https://polygonscan.com/address/0x011277c87158e52cfbd8a1dd4a29118d602dda3a) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xcf2d812d5aad4e6fec3b05850ff056b21159d496`](https://polygonscan.com/address/0xcf2d812d5aad4e6fec3b05850ff056b21159d496) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x57fd892b3dc20eadb83cd8fb0240a87960046daa`](https://scrollscan.com/address/0x57fd892b3dc20eadb83cd8fb0240a87960046daa) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x66826f53bffeaab71adc7fe1a77e86f8268848d8`](https://scrollscan.com/address/0x66826f53bffeaab71adc7fe1a77e86f8268848d8) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xac2c36347869d8d779f7872c6202de3efd6ef2bb`](https://explorer.superseed.xyz/address/0xac2c36347869d8d779f7872c6202de3efd6ef2bb) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x4f5f9b3fb57bba43aaf90e3f71d8f8f384e88e20`](https://explorer.superseed.xyz/address/0x4f5f9b3fb57bba43aaf90e3f71d8f8f384e88e20) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Taiko | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xe790b6178612eeba6faeec16a2e1354c872f8bde`](https://taikoscan.io/address/0xe790b6178612eeba6faeec16a2e1354c872f8bde) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x3d303e4c61285f87da9f61aaadc8c89b7d55dfa2`](https://taikoscan.io/address/0x3d303e4c61285f87da9f61aaadc8c89b7d55dfa2) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Tangle | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x2De92156000269fa2fde7544F10f01E8cBC80fFa`](https://explorer.tangle.tools/address/0x2De92156000269fa2fde7544F10f01E8cBC80fFa) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2`](https://explorer.tangle.tools/address/0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x01C40608f2822816cF25a0a911c1df330487ba62`](https://era.zksync.network//address/0x01C40608f2822816cF25a0a911c1df330487ba62) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x015899a075B7C181e357Cd0ed000683DBB4F1FcE`](https://era.zksync.network//address/0x015899a075B7C181e357Cd0ed000683DBB4F1FcE) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x9a08e6ae67c28002ee2c7cff9badecd33ae2151c`](https://sepolia.arbiscan.io/address/0x9a08e6ae67c28002ee2c7cff9badecd33ae2151c) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x781b3b2527f2a0a1e6b429161f2717a8a28b9f46`](https://sepolia.arbiscan.io/address/0x781b3b2527f2a0a1e6b429161f2717a8a28b9f46) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x168ad0b246f604bc70bef87ecde585c3f1d49617`](https://sepolia.basescan.org/address/0x168ad0b246f604bc70bef87ecde585c3f1d49617) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xd5f78708d83ac2bc8734a8cdf2d112c1bb3b62a2`](https://sepolia.basescan.org/address/0xd5f78708d83ac2bc8734a8cdf2d112c1bb3b62a2) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Blast Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x567a95aa72a23b924f79dfa437d28c38740e144c`](https://sepolia.blastscan.io/address/0x567a95aa72a23b924f79dfa437d28c38740e144c) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xa8c864c53e72301c2ab484d013627a5a7084174b`](https://sepolia.blastscan.io/address/0xa8c864c53e72301c2ab484d013627a5a7084174b) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Linea Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xcd8871a22640c57ba36984fb57e9c794f5df7f40`](https://sepolia.lineascan.build/address/0xcd8871a22640c57ba36984fb57e9c794f5df7f40) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xb0255ed1ee5c01dfe865c1b21bbf56a80f9ae739`](https://sepolia.lineascan.build/address/0xb0255ed1ee5c01dfe865c1b21bbf56a80f9ae739) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x1cae76b71913598d7664d16641ccb6037d8ed61a`](https://sepolia.explorer.mode.network/address/0x1cae76b71913598d7664d16641ccb6037d8ed61a) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0xf5ac60870e1ccc4bfce23cfbb7a796a0d8dbaf47`](https://sepolia.explorer.mode.network/address/0xf5ac60870e1ccc4bfce23cfbb7a796a0d8dbaf47) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Morph Holesky | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x3d664b2da905ddd0db931982fd9a759ea950d6e1`](https://explorer-holesky.morphl2.io/address/0x3d664b2da905ddd0db931982fd9a759ea950d6e1) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x9efc8663cab0e2d97ad17c9fbfc8392445517e94`](https://explorer-holesky.morphl2.io/address/0x9efc8663cab0e2d97ad17c9fbfc8392445517e94) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x28401987a23ed9b8926b07f3b6855222a70c2128`](https://optimism-sepolia.blockscout.com/address/0x28401987a23ed9b8926b07f3b6855222a70c2128) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x417db0f2bd020fc4d6bccea6b2bb6be0c541862e`](https://optimism-sepolia.blockscout.com/address/0x417db0f2bd020fc4d6bccea6b2bb6be0c541862e) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xbc4da2fbdfe5c5eaa11bd0e282201e2abf40b1ee`](https://sepolia.etherscan.io/address/0xbc4da2fbdfe5c5eaa11bd0e282201e2abf40b1ee) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x5ae8c13f6ae094887322012425b34b0919097d8a`](https://sepolia.etherscan.io/address/0x5ae8c13f6ae094887322012425b34b0919097d8a) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Superseed Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc43fb9fe4477d8e8bf68b9fd3a0163a4cffcbb31`](https://sepolia-explorer.superseed.xyz/address/0xc43fb9fe4477d8e8bf68b9fd3a0163a4cffcbb31) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x905756b52efeaf75f6b1bb1bb0fc35eea15ae260`](https://sepolia-explorer.superseed.xyz/address/0x905756b52efeaf75f6b1bb1bb0fc35eea15ae260) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### Taiko Hekla | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xd45f45dd34045a368854f7987a84d9485b4b45e9`](https://hekla.taikoscan.network/address/0xd45f45dd34045a368854f7987a84d9485b4b45e9) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x29b7bafce0a04638dc91ca0b87a562cab8c3dbde`](https://hekla.taikoscan.network/address/0x29b7bafce0a04638dc91ca0b87a562cab8c3dbde) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | ### ZKsync Sepolia Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x900277DBB45a04eB79028b3A44c650Ac81Ca86c4`](https://sepolia-era.zksync.network//address/0x900277DBB45a04eB79028b3A44c650Ac81Ca86c4) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | | SablierFlow | [`0x8e70296F8972eBE94d885B1Caf94Da4836976140`](https://sepolia-era.zksync.network//address/0x8e70296F8972eBE94d885B1Caf94Da4836976140) | [`flow-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.0) | --- ## v1.1 # Flow v1.1 [v1.1.1]: https://npmjs.com/package/@sablier/flow/v/1.1.1 This section contains the deployment addresses for the v1.1 release of [@sablier/flow@1.1.1][v1.1.1]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Flow protocol. See the latest version [here](/guides/flow/deployments). ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x6CefdBc5Ba80937235F012c83d6aA83F1200d6cC`](https://abscan.org/address/0x6CefdBc5Ba80937235F012c83d6aA83F1200d6cC) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x555B0766f494c641bb522086da4E728AC08c1420`](https://abscan.org/address/0x555B0766f494c641bb522086da4E728AC08c1420) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x5F23eF12A7e861CB92c24B4314Af2A5F363CDD4F`](https://arbiscan.io/address/0x5F23eF12A7e861CB92c24B4314Af2A5F363CDD4F) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x87CF87ec5de33DeB4a88787065373563Ba85Ee72`](https://arbiscan.io/address/0x87CF87ec5de33DeB4a88787065373563Ba85Ee72) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xb09b714B0feC83675E09fc997B7D532cF6620326`](https://snowtrace.io/address/0xb09b714B0feC83675E09fc997B7D532cF6620326) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xac7CB985d4022A5Ebd4a385374ac3d3B487b3C63`](https://snowtrace.io/address/0xac7CB985d4022A5Ebd4a385374ac3d3B487b3C63) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x5b5e742305Be3A484EacCB124C83456463c24E6a`](https://basescan.org/address/0x5b5e742305Be3A484EacCB124C83456463c24E6a) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x6FE93c7f6cd1DC394e71591E3c42715Be7180A6A`](https://basescan.org/address/0x6FE93c7f6cd1DC394e71591E3c42715Be7180A6A) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Berachain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x581250eE4311F7Dc1afCF965cF8024004B423e9E`](https://berascan.com/address/0x581250eE4311F7Dc1afCF965cF8024004B423e9E) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xA031544946ED769377128fBD961c9d621c4b4179`](https://berascan.com/address/0xA031544946ED769377128fBD961c9d621c4b4179) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x92f1dB592C771D9Ec7708abFEe79771AbC1b4fAd`](https://blastscan.io/address/0x92f1dB592C771D9Ec7708abFEe79771AbC1b4fAd) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x16b50eb5eAeF0366f1A4da594e2A8c8943A297e0`](https://blastscan.io/address/0x16b50eb5eAeF0366f1A4da594e2A8c8943A297e0) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xAE557c04B46d47Ecac24edA63F22cabB4571Da61`](https://bscscan.com/address/0xAE557c04B46d47Ecac24edA63F22cabB4571Da61) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x4C4610aF3f3861EC99b6F6F8066C03E4C3a0E023`](https://bscscan.com/address/0x4C4610aF3f3861EC99b6F6F8066C03E4C3a0E023) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xC7fd18CA19938d559dC45aDE362a850015CF0bd8`](https://chiliscan.com/address/0xC7fd18CA19938d559dC45aDE362a850015CF0bd8) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x28eAB88ee8a951F78e1028557D0C3fD97af61A33`](https://chiliscan.com/address/0x28eAB88ee8a951F78e1028557D0C3fD97af61A33) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x7293F2D4A4e676EF67C085E92277AdF560AECb88`](https://scan.coredao.org/address/0x7293F2D4A4e676EF67C085E92277AdF560AECb88) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xa0aE7F1bE0DB024Beda05c80722413EDDe7231Bd`](https://scan.coredao.org/address/0xa0aE7F1bE0DB024Beda05c80722413EDDe7231Bd) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x24bE13897eE1F83367661B6bA616a72523fC55C9`](https://etherscan.io/address/0x24bE13897eE1F83367661B6bA616a72523fC55C9) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x3DF2AAEdE81D2F6b261F79047517713B8E844E04`](https://etherscan.io/address/0x3DF2AAEdE81D2F6b261F79047517713B8E844E04) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Form | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x88E64227D4DcF8De1141bb0807A9DC04a5Be9251`](https://explorer.form.network/address/0x88E64227D4DcF8De1141bb0807A9DC04a5Be9251) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x5dd399bb320412dF92Df5c10484d3F8d481FE231`](https://explorer.form.network/address/0x5dd399bb320412dF92Df5c10484d3F8d481FE231) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x5A47FC8732d399a2f3845c4FC91aB91bb97da31F`](https://gnosisscan.io/address/0x5A47FC8732d399a2f3845c4FC91aB91bb97da31F) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x34Bc0C2BF1F2DA51c65cd821bA4133aFCacdb8f5`](https://gnosisscan.io/address/0x34Bc0C2BF1F2DA51c65cd821bA4133aFCacdb8f5) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### HyperEVM | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x81Cc8C4B57B9A60a56330d087D6854A8E17Dfc7A`](https://hyperevmscan.io/address/0x81Cc8C4B57B9A60a56330d087D6854A8E17Dfc7A) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x556d859DFEB58Ed3fa092B6526b09da6b74113e2`](https://hyperevmscan.io/address/0x556d859DFEB58Ed3fa092B6526b09da6b74113e2) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### IoTeX | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x91D7B990B1aCDfB2F38189c646371377416c641E`](https://iotexscan.io/address/0x91D7B990B1aCDfB2F38189c646371377416c641E) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xCD8871a22640C57ba36984Fb57E9c794f5Df7F40`](https://iotexscan.io/address/0xCD8871a22640C57ba36984Fb57E9c794f5Df7F40) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc58E948Cb0a010105467C92856bcd4842B759fb1`](https://phoenix.lightlink.io/address/0xc58E948Cb0a010105467C92856bcd4842B759fb1) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x89d964E0b508234bCfDc7a32aE0aA0356f422B70`](https://phoenix.lightlink.io/address/0x89d964E0b508234bCfDc7a32aE0aA0356f422B70) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x294D7fceBa43C4507771707CeBBB7b6d81d0BFdE`](https://lineascan.build/address/0x294D7fceBa43C4507771707CeBBB7b6d81d0BFdE) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xEFc6e4C7DC5faA0CfBFEbB5e04eA7Cd47f64012f`](https://lineascan.build/address/0xEFc6e4C7DC5faA0CfBFEbB5e04eA7Cd47f64012f) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xD9E2822a33606741BeDbA31614E68A745e430102`](https://modescan.io/address/0xD9E2822a33606741BeDbA31614E68A745e430102) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xc968E8eEFe19BD6De8868df40D9740Be127a172a`](https://modescan.io/address/0xc968E8eEFe19BD6De8868df40D9740Be127a172a) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x1dd4dcE2BB742908b4062E583d9c035973413A3F`](https://explorer.morphl2.io/address/0x1dd4dcE2BB742908b4062E583d9c035973413A3F) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xf31c8E7D9a0Bd310a9d5Fb317ba67BB1f0101c6D`](https://explorer.morphl2.io/address/0xf31c8E7D9a0Bd310a9d5Fb317ba67BB1f0101c6D) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x7AD245b74bBC1B71Da1713D53238931F791b90A3`](https://optimistic.etherscan.io/address/0x7AD245b74bBC1B71Da1713D53238931F791b90A3) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xC5612feA2D370127ac67048115bd6b1dF7b7F7C0`](https://optimistic.etherscan.io/address/0xC5612feA2D370127ac67048115bd6b1dF7b7F7C0) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x87B836a9e26673feB3E409A0da2EAf99C79f26C3`](https://polygonscan.com/address/0x87B836a9e26673feB3E409A0da2EAf99C79f26C3) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x3e5c4130Ea7cfbD364FA5f170289d697865cA94b`](https://polygonscan.com/address/0x3e5c4130Ea7cfbD364FA5f170289d697865cA94b) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x797Fe78c41d9cbE81BBEA2f420101be5e47d2aFf`](https://scrollscan.com/address/0x797Fe78c41d9cbE81BBEA2f420101be5e47d2aFf) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xC4F104cE12cb12484Ff67cF0C4Bd0561F0014ec2`](https://scrollscan.com/address/0xC4F104cE12cb12484Ff67cF0C4Bd0561F0014ec2) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Sei Network | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xF3D18b06c87735a58DAb3baC45af058b3772fD54`](https://seiscan.io/address/0xF3D18b06c87735a58DAb3baC45af058b3772fD54) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xdEF70082ebda4944A55311624900E42A720b4Ec9`](https://seiscan.io/address/0xdEF70082ebda4944A55311624900E42A720b4Ec9) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Sonic | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xAab30e5CB903f67F109aFc7102ac8ED803681EA5`](https://sonicscan.org/address/0xAab30e5CB903f67F109aFc7102ac8ED803681EA5) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x63815da47C97063cc24b28D0b6F59234f71D5c96`](https://sonicscan.org/address/0x63815da47C97063cc24b28D0b6F59234f71D5c96) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Sophon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x2F1eB117A87217E8bE9AA96795F69c9e380686Db`](https://sophscan.xyz/address/0x2F1eB117A87217E8bE9AA96795F69c9e380686Db) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x20C9A3E27322Fc2b21Ced430D1B2e12d90804db6`](https://sophscan.xyz/address/0x20C9A3E27322Fc2b21Ced430D1B2e12d90804db6) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xd932fDA016eE9d9F70f745544b4F56715b1E723b`](https://explorer.superseed.xyz/address/0xd932fDA016eE9d9F70f745544b4F56715b1E723b) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x40E75bb2F2aA3507D3a332872829c71be19eF623`](https://explorer.superseed.xyz/address/0x40E75bb2F2aA3507D3a332872829c71be19eF623) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Taiko | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x80Bde7C505eFE9960b673567CB25Cd8af85552BE`](https://taikoscan.io/address/0x80Bde7C505eFE9960b673567CB25Cd8af85552BE) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x9d4bc7f013cCddAE1658dc28F981C2D424d7F0Dd`](https://taikoscan.io/address/0x9d4bc7f013cCddAE1658dc28F981C2D424d7F0Dd) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Tangle | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xDf578C2c70A86945999c65961417057363530a1c`](https://explorer.tangle.tools/address/0xDf578C2c70A86945999c65961417057363530a1c) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xcb099EfC90e88690e287259410B9AE63e1658CC6`](https://explorer.tangle.tools/address/0xcb099EfC90e88690e287259410B9AE63e1658CC6) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Unichain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x89824A7e48dcf6B7AE9DeE6E566f62A5aDF037F2`](https://uniscan.xyz/address/0x89824A7e48dcf6B7AE9DeE6E566f62A5aDF037F2) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x9797B40340be0bFc9EC0dBb8712627Bcdd17E771`](https://uniscan.xyz/address/0x9797B40340be0bFc9EC0dBb8712627Bcdd17E771) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### XDC | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x9D3F0122b260D2218ecf681c416495882003deDd`](https://xdcscan.com/address/0x9D3F0122b260D2218ecf681c416495882003deDd) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xD6482334242862951dA3E730F818c3f6E3f45A30`](https://xdcscan.com/address/0xD6482334242862951dA3E730F818c3f6E3f45A30) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x423C1b454250992Ede8516D36DE456F609714B53`](https://era.zksync.network//address/0x423C1b454250992Ede8516D36DE456F609714B53) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xE3747379bF7282e0ab5389A63eA053a5256042df`](https://era.zksync.network//address/0xE3747379bF7282e0ab5389A63eA053a5256042df) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x3E64A31C3974b6ae9f09a8fbc784519bF551e795`](https://sepolia.arbiscan.io/address/0x3E64A31C3974b6ae9f09a8fbc784519bF551e795) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xF9cbfFAe10010475A2800a5eFC11f4D4780cA48d`](https://sepolia.arbiscan.io/address/0xF9cbfFAe10010475A2800a5eFC11f4D4780cA48d) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xcb5591F6d0e0fFC03037ef7b006D1361C6D33D25`](https://sepolia.basescan.org/address/0xcb5591F6d0e0fFC03037ef7b006D1361C6D33D25) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xFB6B72a5988A7701a9090C56936269241693a9CC`](https://sepolia.basescan.org/address/0xFB6B72a5988A7701a9090C56936269241693a9CC) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Blast Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x42Abaf2c1E36624FD0084998A9BeA4a753A93e45`](https://sepolia.blastscan.io/address/0x42Abaf2c1E36624FD0084998A9BeA4a753A93e45) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x027b55FD4b26A78a0463304C63f35e97A35246FD`](https://sepolia.blastscan.io/address/0x027b55FD4b26A78a0463304C63f35e97A35246FD) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Linea Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xbd17DFd74078dB49f12101Ca929b5153E924e9C7`](https://sepolia.lineascan.build/address/0xbd17DFd74078dB49f12101Ca929b5153E924e9C7) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x3D0804610dE1b8DC19B1DDf90C26d5a51ab2B6b6`](https://sepolia.lineascan.build/address/0x3D0804610dE1b8DC19B1DDf90C26d5a51ab2B6b6) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xe1eDdA64eea2173a015A3738171C3a1C263324C7`](https://sepolia.explorer.mode.network/address/0xe1eDdA64eea2173a015A3738171C3a1C263324C7) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x1063D400953441F1C6d8EF6406e1E6aa5684B82d`](https://sepolia.explorer.mode.network/address/0x1063D400953441F1C6d8EF6406e1E6aa5684B82d) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Morph Holesky | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x3d664b2da905ddd0db931982fd9a759ea950d6e1`](https://explorer-holesky.morphl2.io/address/0x3d664b2da905ddd0db931982fd9a759ea950d6e1) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x9efc8663cab0e2d97ad17c9fbfc8392445517e94`](https://explorer-holesky.morphl2.io/address/0x9efc8663cab0e2d97ad17c9fbfc8392445517e94) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0x4739327acfb56E90177d44Cb0845e759276BCA88`](https://optimism-sepolia.blockscout.com/address/0x4739327acfb56E90177d44Cb0845e759276BCA88) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x77873085a88189c8B82B3a01BcbC294108D02805`](https://optimism-sepolia.blockscout.com/address/0x77873085a88189c8B82B3a01BcbC294108D02805) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc9dBf2D207D178875b698e5f7493ce2d8BA88994`](https://sepolia.etherscan.io/address/0xc9dBf2D207D178875b698e5f7493ce2d8BA88994) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x93FE8f86e881a23e5A2FEB4B160514Fd332576A6`](https://sepolia.etherscan.io/address/0x93FE8f86e881a23e5A2FEB4B160514Fd332576A6) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Superseed Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xc43fb9fe4477d8e8bf68b9fd3a0163a4cffcbb31`](https://sepolia-explorer.superseed.xyz/address/0xc43fb9fe4477d8e8bf68b9fd3a0163a4cffcbb31) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0x905756b52efeaf75f6b1bb1bb0fc35eea15ae260`](https://sepolia-explorer.superseed.xyz/address/0x905756b52efeaf75f6b1bb1bb0fc35eea15ae260) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### Taiko Hekla | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xB197D4142b9DBf34979588cf8BF1222Ea3907916`](https://hekla.taikoscan.network/address/0xB197D4142b9DBf34979588cf8BF1222Ea3907916) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xb528AF43fFEe6d4B702CF6235d2380e1828eD852`](https://hekla.taikoscan.network/address/0xb528AF43fFEe6d4B702CF6235d2380e1828eD852) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | ### ZKsync Sepolia Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | FlowNFTDescriptor | [`0xb3eCE4451825f865479813d42f74a080D2CcC928`](https://sepolia-era.zksync.network//address/0xb3eCE4451825f865479813d42f74a080D2CcC928) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | | SablierFlow | [`0xf499b35e2e932a05ecD6115Aa4DcCeb29aF55E3D`](https://sepolia-era.zksync.network//address/0xf499b35e2e932a05ecD6115Aa4DcCeb29aF55E3D) | [`flow-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/flow/v1.1) | --- ## Overview(Legacy) # Legacy :::warning Legacy has been superseded by [Sablier Lockup](/guides/lockup/overview). ::: This is a technical account on how to integrate Legacy into your own application. If you have any questions along the way, please join the #dev channel in the [Sablier Discord server](https://discord.sablier.com); our team, and members of the community, look forward to helping you. What we will cover: - Smart contract architecture and ABI. - Networks and typical gas costs. - How to create, withdraw from and cancel streams. --- ## Deployment Addresses(Legacy) # Legacy Deployment Addresses This section contains deployment addresses for Sablier Legacy, an old release that has been superseded by [Sablier Lockup](/guides/lockup/overview). Legacy is still accessible through the [legacy user interfaces](https://legacy-sender.sablier.com). ## Legacy v1.1 | Contract | Chain | Address | | ----------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | Sablier.sol | Ethereum Mainnet | [0xCD18eAa163733Da39c232722cBC4E8940b1D8888](https://etherscan.io/address/0xCD18eAa163733Da39c232722cBC4E8940b1D8888) | | Sablier.sol | Arbitrum One | [0xaDB944B478818d95659067E70D2e5Fc43Fa3eDe9](https://arbiscan.io/address/0xaDB944B478818d95659067E70D2e5Fc43Fa3eDe9) | | Sablier.sol | Avalanche | [0x73f503fad13203C87889c3D5c567550b2d41D7a4](https://snowtrace.io/address/0x73f503fad13203C87889c3D5c567550b2d41D7a4) | | Sablier.sol | BNB Smart Chain | [0x05BC7f5fb7F248d44d38703e5C921A8c16825161](https://bscscan.com/address/0x05BC7f5fb7F248d44d38703e5C921A8c16825161) | | Sablier.sol | Optimism | [0x6C5927c0679e6d857E87367bb635decbcB20F31c](https://optimistic.etherscan.io/address/0x6C5927c0679e6d857E87367bb635decbcB20F31c) | | Sablier.sol | Polygon Mainnet | [0xAC18EAB6592F5fF6F9aCf5E0DCE0Df8E49124C06](https://polygonscan.com/address/0xAC18EAB6592F5fF6F9aCf5E0DCE0Df8E49124C06) | | Sablier.sol | Ronin | [0xDe9dCc27aa1552d591Fc9B9c21881feE43BD8118](https://explorer.roninchain.com/address/ronin:de9dcc27aa1552d591fc9b9c21881fee43bd8118) | | Sablier.sol | Goerli | [0xFc7E3a3073F88B0f249151192812209117C2014b](https://goerli.etherscan.io/address/0xFc7E3a3073F88B0f249151192812209117C2014b) | ## Legacy v1.0 _This is an outdated deployment_. | Contract | Chain | Address | | ----------- | ---------------- | --------------------------------------------------------------------------------------------------------------------- | | Payroll.sol | Ethereum Mainnet | [0xbd6a40Bb904aEa5a49c59050B5395f7484A4203d](https://etherscan.io/address/0xbd6a40Bb904aEa5a49c59050B5395f7484A4203d) | | Sablier.sol | Ethereum Mainnet | [0xA4fc358455Febe425536fd1878bE67FfDBDEC59a](https://etherscan.io/address/0xA4fc358455Febe425536fd1878bE67FfDBDEC59a) | ## Unofficial deployments Unofficial deployments are made by external teams, an they are not supported in the official user interface. | Chain | Address | Deployer | | ----- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | IoTeX | [0x93Efd750a7F589f9FE26408a91e15587a88c4E78](https://iotexscout.io/address/0x93Efd750a7F589f9FE26408a91e15587a88c4E78) | [IoTeX team](https://twitter.com/iotex_io) | ## Testnet Tokens If you want to use the Sablier interfaces on a testnet, you need to get some testnet DAI first. To do this, you have to go to the Etherscan page of the associated token, tap the "Write Contract" tab, connect your Ethereum wallet and call the `mint` method. Note that the testnet token has 18 decimals, so you may want to use a [unit converter](https://tools.deth.net/token-unit-conversion). | Chain | Network | Ethereum address | | ---------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | | TestnetDAI | Goerli | [0x97cb342Cf2F6EcF48c1285Fb8668f5a4237BF862](https://goerli.etherscan.io/address/0x97cb342Cf2F6EcF48c1285Fb8668f5a4237BF862) | --- ## Codebase ## Repository The Sablier Legacy code is hosted on GitHub and the source code for each contract is verified on Etherscan. ## ABIs Depending on the web3 library you're working with, you may need to get hold of the Lockup ABIs (application binary interfaces). The ABI acts as an interface between two program modules, one of which is the smart contract and the other the Ethereum virtual machine code. There are two ways to obtain it: 1. Copy `Sablier.json` from [sablier-labs/legacy-abis](https://github.com/sablier-labs/legacy-abis). 2. Clone [sablier-labs/legacy](https://github.com/sablier-labs/legacy) and compile the contract yourself. Here's an example for how to do step 2 with yarn and truffle: ```bash $ git clone git@github.com/sablier-labs/legacy.git sablier-legacy $ cd ./sablier-legacy $ yarn bootstrap $ cd ./packages/protocol $ truffle compile The `Sablier.json` artifact should be generated in the relative `build/contracts` folder. ``` --- ## Streams Every interaction with Sablier is in relation to a specific "token stream". This is how we refer to a real-time payment. A token stream has six properties: 1. Sender. 2. Recipient. 3. Fixed deposit amount. 4. ERC-20 token used as streaming currency. 5. Start time 6. Stop Time ## Example Imagine a 3,000 DAI salary paid by Alice to Bob over the whole month of January. The start time would be Jan 1 and the stop time Feb 1. Every second makes Bob richer; on Jan 10, he would have earned approximately 1,000 DAI. --- ## Gas Costs The gas usage of Sablier Legacy is not deterministic and varies by user. Calls to third-party contracts, such as [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens, may use an arbitrary amount of gas. The values in the table below are rough estimations - you shouldn't take them for granted: | Action | Typical Gas Cost | | -------------------- | ---------------- | | Create stream | ~240K | | Withdraw from stream | ~80K | | Cancel stream | ~90K | --- ## Overview(8) # Sablier Lockup Welcome to the Sablier Lockup documentation. This section contains detailed guides and technical references for the Lockup protocol, a suite of smart contracts running autonomously in the Ethereum ecosystem. These documents offer insight into the operational nuances of the contracts, providing a valuable resource for building onchain integrations. # Guides If you are new to Sablier, we recommend you start with the [Concepts](/concepts/what-is-sablier) section first. You can then setup your [local environment](/guides/lockup/examples/local-environment) and create your [first stream](/guides/lockup/examples/create-stream/lockup-linear). # Reference For a deeper dive into the protocol specifications, read through the [technical reference](/reference/lockup/diagrams). # Versioning The product uses a unified versioning system across releases and NPM packages. Prior to Lockup v1.2, we used a different versioning scheme (V2.0, V2.1, V2.2), while the NPM package used a semantic versioning scheme (e.g., v1.0.2, v1.1.2). Since Lockup v1.2, the versioning has been unified into a single system for greater consistency across protocol releases and NPM packages. # Resources - [Source Code](https://github.com/sablier-labs/lockup/tree/release) - [Integration Templates](https://github.com/sablier-labs/lockup-integration-template) - [Examples](https://github.com/sablier-labs/examples/tree/main/lockup/) - [Foundry Book](https://book.getfoundry.sh/) --- ## Deployment Addresses(Lockup) # Lockup Deployments [latest]: https://npmjs.com/package/@sablier/lockup This section contains the deployment addresses for the v3.0 release of [@sablier/lockup][latest]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info[important] The Lockup Periphery repo has been discontinued in favor of the new [Airdrops repo](/guides/airdrops/overview). ::: ## Versions Any updates or additional features will require a new deployment of the protocol, due to its immutable nature. Came here looking for the previous Lockup deployments? Click below to see other versions. | Version | Release Date | UI Aliases | | ------------------------------------------------ | ------------- | ---------------------------------------------------------------------- | | [v3.0](/guides/lockup/deployments) (latest) | October 2025 | `LK2` (Lockup): all models have been merged into a single contract | | [v2.0](/guides/lockup/previous-deployments/v2.0) | February 2025 | `LK` (Lockup): all models have been merged into a single contract | | [v1.2](/guides/lockup/previous-deployments/v1.2) | July 2024 | `LD3` (Lockup Dynamic), `LL3` (Lockup Linear), `LT3` (Lockup Tranched) | | [v1.1](/guides/lockup/previous-deployments/v1.1) | December 2023 | `LD2` (Lockup Dynamic), `LL2` (Lockup Linear) | | [v1.0](/guides/lockup/previous-deployments/v1.0) | July 2023 | `LD` (Lockup Dynamic), `LL` (Lockup Linear) | Or maybe you're looking for Legacy? [Click here](/guides/legacy/deployments). :::info Stay up to date with any new releases by [subscribing](https://x.com/Sablier/status/1821220784661995627) to the official Sablier repositories on Github. ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://abscan.org/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://abscan.org/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x63Ff2E370788C163D5a1909B5FCb299DB327AEF9`](https://abscan.org/address/0x63Ff2E370788C163D5a1909B5FCb299DB327AEF9) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x47a27E76b32A9aA168297A32c5F081740600A16F`](https://abscan.org/address/0x47a27E76b32A9aA168297A32c5F081740600A16F) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x293d8d192C0C93225FF6bBE7415a56B57379bbA3`](https://abscan.org/address/0x293d8d192C0C93225FF6bBE7415a56B57379bbA3) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://arbiscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://arbiscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xd5c6a0Dd2E1822865c308850b8b3E2CcE762D061`](https://arbiscan.io/address/0xd5c6a0Dd2E1822865c308850b8b3E2CcE762D061) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xf094baa1b754f54d8f282bc79a74bd76aff29d25`](https://arbiscan.io/address/0xf094baa1b754f54d8f282bc79a74bd76aff29d25) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xF12AbfB041b5064b839Ca56638cDB62fEA712Db5`](https://arbiscan.io/address/0xF12AbfB041b5064b839Ca56638cDB62fEA712Db5) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://snowtrace.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://snowtrace.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x906A4BD5dD0EF13654eA29bFD6185d0d64A4b674`](https://snowtrace.io/address/0x906A4BD5dD0EF13654eA29bFD6185d0d64A4b674) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x7125669bFbCA422bE806d62B6b21E42ED0D78494`](https://snowtrace.io/address/0x7125669bFbCA422bE806d62B6b21E42ED0D78494) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x7e146250Ed5CCCC6Ada924D456947556902acaFD`](https://snowtrace.io/address/0x7e146250Ed5CCCC6Ada924D456947556902acaFD) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://basescan.org/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://basescan.org/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x87e437030b7439150605a641483de98672E26317`](https://basescan.org/address/0x87e437030b7439150605a641483de98672E26317) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x8882549b29dfed283738918d90b5f6e2ab0baeb6`](https://basescan.org/address/0x8882549b29dfed283738918d90b5f6e2ab0baeb6) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xe261b366f231b12fcb58d6bbd71e57faee82431d`](https://basescan.org/address/0xe261b366f231b12fcb58d6bbd71e57faee82431d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Berachain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://berascan.com/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://berascan.com/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x3bbE0a21792564604B0fDc00019532Adeffa70eb`](https://berascan.com/address/0x3bbE0a21792564604B0fDc00019532Adeffa70eb) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x35860B173573CbDB7a14dE5F9fBB7489c57a5727`](https://berascan.com/address/0x35860B173573CbDB7a14dE5F9fBB7489c57a5727) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xC37B51a3c3Be55f0B34Fbd8Bd1F30cFF6d251408`](https://berascan.com/address/0xC37B51a3c3Be55f0B34Fbd8Bd1F30cFF6d251408) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://blastscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://blastscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x959c412d5919b1Ec5D07bee3443ea68c91d57dd7`](https://blastscan.io/address/0x959c412d5919b1Ec5D07bee3443ea68c91d57dd7) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xd2187e309a93895fcd1c43fb5eae903b583d7e38`](https://blastscan.io/address/0xd2187e309a93895fcd1c43fb5eae903b583d7e38) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xcD16d89cc79Ab0b52717A46b8A3F73E61014c7dc`](https://blastscan.io/address/0xcD16d89cc79Ab0b52717A46b8A3F73E61014c7dc) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://bscscan.com/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://bscscan.com/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x56831a5a932793E02251126831174Ab8Bf2f7695`](https://bscscan.com/address/0x56831a5a932793E02251126831174Ab8Bf2f7695) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xFEd01907959CD5d470F438daad232a99cAffe67f`](https://bscscan.com/address/0xFEd01907959CD5d470F438daad232a99cAffe67f) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x06bd1Ec1d80acc45ba332f79B08d2d9e24240C74`](https://bscscan.com/address/0x06bd1Ec1d80acc45ba332f79B08d2d9e24240C74) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://chiliscan.com/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://chiliscan.com/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x8A96f827082FB349B6e268baa0a7A5584c4Ccda6`](https://chiliscan.com/address/0x8A96f827082FB349B6e268baa0a7A5584c4Ccda6) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x202628bCF205BC57a2D181D6B4eF1f7E5538EC35`](https://chiliscan.com/address/0x202628bCF205BC57a2D181D6B4eF1f7E5538EC35) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x957a54aC691893B20c705e0b2EecbDDF5220d019`](https://chiliscan.com/address/0x957a54aC691893B20c705e0b2EecbDDF5220d019) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://scan.coredao.org/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://scan.coredao.org/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xac0cf0f2a96ed7ec3cfa4d0be621c67adc9dd903`](https://scan.coredao.org/address/0xac0cf0f2a96ed7ec3cfa4d0be621c67adc9dd903) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x80054b6797C5F657CaCaEC05E4890acfC4Ef79dB`](https://scan.coredao.org/address/0x80054b6797C5F657CaCaEC05E4890acfC4Ef79dB) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x01Fed2aB51A830a3AF3AE1AB817dF1bA4F152bB0`](https://scan.coredao.org/address/0x01Fed2aB51A830a3AF3AE1AB817dF1bA4F152bB0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://gnosisscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://gnosisscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x3140a6900AA2FF3186730741ad8255ee4e6d8Ff1`](https://gnosisscan.io/address/0x3140a6900AA2FF3186730741ad8255ee4e6d8Ff1) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xb778B396dD6f3a770C4B4AE7b0983345b231C16C`](https://gnosisscan.io/address/0xb778B396dD6f3a770C4B4AE7b0983345b231C16C) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x87f87Eb0b59421D1b2Df7301037e923932176681`](https://gnosisscan.io/address/0x87f87Eb0b59421D1b2Df7301037e923932176681) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### HyperEVM | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://hyperevmscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://hyperevmscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x7263d77e9e872f82A15e5E1a9816440D23758708`](https://hyperevmscan.io/address/0x7263d77e9e872f82A15e5E1a9816440D23758708) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xF66b45FA5Be1F633Cd521d480A1832645DE0C710`](https://hyperevmscan.io/address/0xF66b45FA5Be1F633Cd521d480A1832645DE0C710) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x50ff828e66612A4D1F7141936F2B4078C7356329`](https://hyperevmscan.io/address/0x50ff828e66612A4D1F7141936F2B4078C7356329) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://phoenix.lightlink.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://phoenix.lightlink.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xCFB5F90370A7884DEc59C55533782B45FA24f4d1`](https://phoenix.lightlink.io/address/0xCFB5F90370A7884DEc59C55533782B45FA24f4d1) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xc1d996e119f82D3Cb540687463804545A13065db`](https://phoenix.lightlink.io/address/0xc1d996e119f82D3Cb540687463804545A13065db) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xA4f1f4a5C55b5d9372CBB29112b14e1912A23d9D`](https://phoenix.lightlink.io/address/0xA4f1f4a5C55b5d9372CBB29112b14e1912A23d9D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x1b06a7aed1f6e5d8c0f4b410687b37c867fa8987`](https://lineascan.build/address/0x1b06a7aed1f6e5d8c0f4b410687b37c867fa8987) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x8e6f2e21df39ffb23fbd5a51a5903952334435e3`](https://lineascan.build/address/0x8e6f2e21df39ffb23fbd5a51a5903952334435e3) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x1514a869D29a8B22961e8F9eBa3DC64000b96BCe`](https://lineascan.build/address/0x1514a869D29a8B22961e8F9eBa3DC64000b96BCe) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x145Ca6411bD62172fbE8728893E8e8E75a2b066c`](https://lineascan.build/address/0x145Ca6411bD62172fbE8728893E8e8E75a2b066c) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xc853DB30a908dC1b655bbd4A8B9d5DB8588C13c8`](https://lineascan.build/address/0xc853DB30a908dC1b655bbd4A8B9d5DB8588C13c8) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://etherscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://etherscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xA9dC6878C979B5cc1d98a1803F0664ad725A1f56`](https://etherscan.io/address/0xA9dC6878C979B5cc1d98a1803F0664ad725A1f56) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x0636d83b184d65c242c43de6aad10535bfb9d45a`](https://etherscan.io/address/0x0636d83b184d65c242c43de6aad10535bfb9d45a) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73`](https://etherscan.io/address/0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://modescan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://modescan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x64e7879558b6dfE2f510bd4b9Ad196ef0371EAA8`](https://modescan.io/address/0x64e7879558b6dfE2f510bd4b9Ad196ef0371EAA8) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x9ba4cE334706F822cbCaa4F6fA650e0054D5fa99`](https://modescan.io/address/0x9ba4cE334706F822cbCaa4F6fA650e0054D5fa99) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x9513CE572D4f4AAc1Dd493bcd50866235D1c698d`](https://modescan.io/address/0x9513CE572D4f4AAc1Dd493bcd50866235D1c698d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://explorer.morphl2.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://explorer.morphl2.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x660314f09ac3B65E216B6De288aAdc2599AF14e2`](https://explorer.morphl2.io/address/0x660314f09ac3B65E216B6De288aAdc2599AF14e2) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xf81d757E270790c03E3cd2dbFBc62d38ad2e17f9`](https://explorer.morphl2.io/address/0xf81d757E270790c03E3cd2dbFBc62d38ad2e17f9) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xE646D9A037c6B62e4d417592A10f57e77f007a27`](https://explorer.morphl2.io/address/0xE646D9A037c6B62e4d417592A10f57e77f007a27) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://optimistic.etherscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://optimistic.etherscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x41dBa1AfBB6DF91b3330dc009842327A9858Cbae`](https://optimistic.etherscan.io/address/0x41dBa1AfBB6DF91b3330dc009842327A9858Cbae) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xf3aBc38b5e0f372716F9bc00fC9994cbd5A8e6FC`](https://optimistic.etherscan.io/address/0xf3aBc38b5e0f372716F9bc00fC9994cbd5A8e6FC) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xe2620fB20fC9De61CD207d921691F4eE9d0fffd0`](https://optimistic.etherscan.io/address/0xe2620fB20fC9De61CD207d921691F4eE9d0fffd0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://polygonscan.com/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://polygonscan.com/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xf5e12d0bA25FCa0D738Ec57f149736B2e4C46980`](https://polygonscan.com/address/0xf5e12d0bA25FCa0D738Ec57f149736B2e4C46980) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x3395Db92edb3a992E4F0eC1dA203C92D5075b845`](https://polygonscan.com/address/0x3395Db92edb3a992E4F0eC1dA203C92D5075b845) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x1E901b0E05A78C011D6D4cfFdBdb28a42A1c32EF`](https://polygonscan.com/address/0x1E901b0E05A78C011D6D4cfFdBdb28a42A1c32EF) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://scrollscan.com/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://scrollscan.com/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x00Ff6443E902874924dd217c1435e3be04f57431`](https://scrollscan.com/address/0x00Ff6443E902874924dd217c1435e3be04f57431) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xa57C667E78BA165e8f09899fdE4e8C974C2dD000`](https://scrollscan.com/address/0xa57C667E78BA165e8f09899fdE4e8C974C2dD000) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xcb60a39942CD5D1c2a1C8aBBEd99C43A73dF3f8d`](https://scrollscan.com/address/0xcb60a39942CD5D1c2a1C8aBBEd99C43A73dF3f8d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Sei Network | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://seiscan.io/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://seiscan.io/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xeaFB40669fe3523b073904De76410b46e79a56D7`](https://seiscan.io/address/0xeaFB40669fe3523b073904De76410b46e79a56D7) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xB33f16e55Ac8Ff6CCdfe466C0D9A25c706952EF8`](https://seiscan.io/address/0xB33f16e55Ac8Ff6CCdfe466C0D9A25c706952EF8) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x1d96e9d05f6910d22876177299261290537cfBBc`](https://seiscan.io/address/0x1d96e9d05f6910d22876177299261290537cfBBc) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Sonic | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://sonicscan.org/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://sonicscan.org/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x955dC7A2170782344FA9Ac11De0C0C42C05De2Fc`](https://sonicscan.org/address/0x955dC7A2170782344FA9Ac11De0C0C42C05De2Fc) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x84A865542640B24301F1C8A8C60Eb098a7e1df9b`](https://sonicscan.org/address/0x84A865542640B24301F1C8A8C60Eb098a7e1df9b) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x763Cfb7DF1D1BFe50e35E295688b3Df789D2feBB`](https://sonicscan.org/address/0x763Cfb7DF1D1BFe50e35E295688b3Df789D2feBB) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://explorer.superseed.xyz/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://explorer.superseed.xyz/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xa4576b58Ec760A8282D081dc94F3dc716DFc61e9`](https://explorer.superseed.xyz/address/0xa4576b58Ec760A8282D081dc94F3dc716DFc61e9) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x48c45c1DF54bDA1F1819AD07B6B4f8B2dcF85BAA`](https://explorer.superseed.xyz/address/0x48c45c1DF54bDA1F1819AD07B6B4f8B2dcF85BAA) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x2F1c6AD6306Bd0200D55b59AD54d4b44067D00E6`](https://explorer.superseed.xyz/address/0x2F1c6AD6306Bd0200D55b59AD54d4b44067D00E6) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Unichain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://uniscan.xyz/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://uniscan.xyz/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xa5F12D63E18a28C9BE27B6f3d91ce693320067ba`](https://uniscan.xyz/address/0xa5F12D63E18a28C9BE27B6f3d91ce693320067ba) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xA8B4355D37C3660aE0C8fD14c39D44Ad5EA60b3e`](https://uniscan.xyz/address/0xA8B4355D37C3660aE0C8fD14c39D44Ad5EA60b3e) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xfFb540fC132dCefb0Fdef96ef63FE2f2F1BD7CFd`](https://uniscan.xyz/address/0xfFb540fC132dCefb0Fdef96ef63FE2f2F1BD7CFd) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### XDC | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://xdcscan.com/address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://xdcscan.com/address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x4c1311a9d88BFb7023148aB04F7321C2E91c29bf`](https://xdcscan.com/address/0x4c1311a9d88BFb7023148aB04F7321C2E91c29bf) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xCf2491021E56E04e5ceF582c928d64b185843124`](https://xdcscan.com/address/0xCf2491021E56E04e5ceF582c928d64b185843124) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x2266901B1EcF499b4c91B6cBeA8e06700cFbde1e`](https://xdcscan.com/address/0x2266901B1EcF499b4c91B6cBeA8e06700cFbde1e) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0a1ac47260b95d334763473b868117ef7343aa0`](https://era.zksync.network//address/0xa0a1ac47260b95d334763473b868117ef7343aa0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feb172238638897b13b69c65feb508a0a96b35d`](https://era.zksync.network//address/0x1feb172238638897b13b69c65feb508a0a96b35d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x955dC7A2170782344FA9Ac11De0C0C42C05De2Fc`](https://era.zksync.network//address/0x955dC7A2170782344FA9Ac11De0C0C42C05De2Fc) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x60dD755dB423EB27983B7000b81e434249670608`](https://era.zksync.network//address/0x60dD755dB423EB27983B7000b81e434249670608) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xC07E338Ce1aEd183A8b3c55f980548f5E463b5c5`](https://era.zksync.network//address/0xC07E338Ce1aEd183A8b3c55f980548f5E463b5c5) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0A1aC47260B95D334763473B868117EF7343aA0`](https://sepolia.arbiscan.io/address/0xa0A1aC47260B95D334763473B868117EF7343aA0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feB172238638897B13b69C65feB508a0a96b35D`](https://sepolia.arbiscan.io/address/0x1feB172238638897B13b69C65feB508a0a96b35D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x8224eb5D7d76B2D7Df43b868D875E79B11500eA8`](https://sepolia.arbiscan.io/address/0x8224eb5D7d76B2D7Df43b868D875E79B11500eA8) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x1e963e9214679757ecbf2fa98499f1e61c44697c`](https://sepolia.arbiscan.io/address/0x1e963e9214679757ecbf2fa98499f1e61c44697c) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x5bd5a50100d0cbc93837a1d10c816614008554fe`](https://sepolia.arbiscan.io/address/0x5bd5a50100d0cbc93837a1d10c816614008554fe) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0A1aC47260B95D334763473B868117EF7343aA0`](https://sepolia.basescan.org/address/0xa0A1aC47260B95D334763473B868117EF7343aA0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feB172238638897B13b69C65feB508a0a96b35D`](https://sepolia.basescan.org/address/0x1feB172238638897B13b69C65feB508a0a96b35D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xCA2593027BA24856c292Fdcb5F987E0c25e755a4`](https://sepolia.basescan.org/address/0xCA2593027BA24856c292Fdcb5F987E0c25e755a4) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0xB88458246a0657a54cc7b32C3f3a19969cdD571A`](https://sepolia.basescan.org/address/0xB88458246a0657a54cc7b32C3f3a19969cdD571A) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x5C51EA827Bfa65f7c9AF699e19Ec9fB12A2D40E2`](https://sepolia.basescan.org/address/0x5C51EA827Bfa65f7c9AF699e19Ec9fB12A2D40E2) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0A1aC47260B95D334763473B868117EF7343aA0`](https://sepolia.explorer.mode.network/address/0xa0A1aC47260B95D334763473B868117EF7343aA0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feB172238638897B13b69C65feB508a0a96b35D`](https://sepolia.explorer.mode.network/address/0x1feB172238638897B13b69C65feB508a0a96b35D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xDd695E927b97460C8d454D8f6d8Cd797Dcf1FCfD`](https://sepolia.explorer.mode.network/address/0xDd695E927b97460C8d454D8f6d8Cd797Dcf1FCfD) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x7bA30955C69a7B2B07314EE83a8EB269A1CCdb0c`](https://sepolia.explorer.mode.network/address/0x7bA30955C69a7B2B07314EE83a8EB269A1CCdb0c) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x3e786959E2cE5e0cE68b845e991e34C47D48236A`](https://sepolia.explorer.mode.network/address/0x3e786959E2cE5e0cE68b845e991e34C47D48236A) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0A1aC47260B95D334763473B868117EF7343aA0`](https://optimism-sepolia.blockscout.com/address/0xa0A1aC47260B95D334763473B868117EF7343aA0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feB172238638897B13b69C65feB508a0a96b35D`](https://optimism-sepolia.blockscout.com/address/0x1feB172238638897B13b69C65feB508a0a96b35D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0xDf6163ddD3Ebcb552Cc1379a9c65AFe68683534e`](https://optimism-sepolia.blockscout.com/address/0xDf6163ddD3Ebcb552Cc1379a9c65AFe68683534e) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x279593Bb164c79Ae8220A48F616434203B171E6d`](https://optimism-sepolia.blockscout.com/address/0x279593Bb164c79Ae8220A48F616434203B171E6d) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0xc9a70D7190bE5dafDce4B09c4e78bB7C4A71255D`](https://optimism-sepolia.blockscout.com/address/0xc9a70D7190bE5dafDce4B09c4e78bB7C4A71255D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xa0A1aC47260B95D334763473B868117EF7343aA0`](https://sepolia.etherscan.io/address/0xa0A1aC47260B95D334763473B868117EF7343aA0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupMath | [`0x1feB172238638897B13b69C65feB508a0a96b35D`](https://sepolia.etherscan.io/address/0x1feB172238638897B13b69C65feB508a0a96b35D) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | LockupNFTDescriptor | [`0x955dC7A2170782344FA9Ac11De0C0C42C05De2Fc`](https://sepolia.etherscan.io/address/0x955dC7A2170782344FA9Ac11De0C0C42C05De2Fc) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierBatchLockup | [`0x44Fd5d5854833975E5Fc80666a10cF3376C088E0`](https://sepolia.etherscan.io/address/0x44Fd5d5854833975E5Fc80666a10cF3376C088E0) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | | SablierLockup | [`0x6b0307b4338f2963A62106028E3B074C2c0510DA`](https://sepolia.etherscan.io/address/0x6b0307b4338f2963A62106028E3B074C2c0510DA) | [`lockup-v3.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v3.0) | --- ## Gas Benchmarks(Lockup) The gas usage of the Lockup protocol is not deterministic and varies by user. Calls to third-party contracts, such as ERC-20 tokens, may use an arbitrary amount of gas. The values in the table below are rough estimations on Ethereum mainnet - you shouldn't take them for granted. The gas usage may vary depending on the network. :::note The benchmarks were generated using the code in this GitHub repository. ::: ## BatchLockup ## LockupLinear streams ## LockupDynamic streams ## LockupTranched streams --- ## Etherscan Operations # Etherscan: Manual Operations ## Introduction Just like any other open protocol, Lockup can be interacted with directly through a blockchain explorer like Etherscan. In this guide, we will show you how to create a stream and withdraw from a stream by manually interacting with the Lockup Core contracts on Etherscan. If you're interested in interacting with Legacy contracts, please refer to this [article](https://blog.sablier.com/operating-the-sablier-v1-protocol-manually/). ## Creating a Stream ### Prerequisites Before being able to create a stream using the Lockup Core contracts you need to have granted a sufficient token allowance. See the [Allowances](#prerequisite-erc20-allowances) section below for a guide on how to do that. ### Step 1: Go to contract page Head over to our [deployments](/guides/lockup/deployments) list to pick the contract address you want to interact with. In this tutorial, we will create a Lockup stream on Ethereum Sepolia. Once you find the right contract, click on the address to access its explorer's page. Click on the "Contract" tab, and then on the "Write Contract" sub-tab. ![Etherscan 01](/img/etherscan-tutorial/01.webp) ![Etherscan 02](/img/etherscan-tutorial/02.webp) You can now connect your wallet to the interface by clicking on "Connect to Web3". ![Etherscan 03](/img/etherscan-tutorial/03.webp) ### Step 2: Fill in parameters We will now proceed to create our first stream. Let's go with the following parameters: - a Lockup Linear stream - and a deposit of 100 DAI - starting Jan 1, 2026 - ending Jan 1, 2027 - with cliff until Jan 24, 2026 and cliff amount of 2 DAI - no token unlock at start time - cancelable - and transferrable As the start and end date are fixed, we'll be using the [`createwithtimestampsLL`](/reference/lockup/contracts/interfaces/interface.ISablierLockupLinear#createwithtimestampsll) method. Please note that using [`createwithdurationsLL`](/reference/lockup/contracts/interfaces/interface.ISablierLockupLinear#createwithdurationsll) is also possible if you specify durations instead of the timestamps. Open the **"createwithtimestampsLL"** method, and start filling in the stream details: :::note All functions are marked as `payable`, however, its entirely optional to attach any value (in native token) to the transaction. For this example, we will not be attaching any value and therefore `payableAmount(ether)` will be 0. ::: ![Etherscan 04](/img/etherscan-tutorial/04.webp) ```json { "sender": "0xb1bEF51ebCA01EB12001a639bDBbFF6eEcA12B9F", "recipient": "0xf26994E6Af0b95cCa8DFA22A0BC25E1f38a54C42", "depositAmount": 100000000000000000000, "token": "0x776b6fC2eD15D6Bb5Fc32e0c89DE68683118c62A", "cancelable": true, "transferable": true, "timestamps": [1767261600, 1798797600], "shape": "", "unlockAmounts": ["0", "2000000000000000000"], "cliffTime": 1769261600 } ``` If the Etherscan UI does not break down the inputs into separate fields (like in the screenshot above), you will have to provide it like this: ```json [ "0xb1bEF51ebCA01EB12001a639bDBbFF6eEcA12B9F", "0xf26994E6Af0b95cCa8DFA22A0BC25E1f38a54C42", 100000000000000000000, "0x776b6fC2eD15D6Bb5Fc32e0c89DE68683118c62A", false, true, [1737936000, 1769472000], "", ["0x0000000000000000000000000000000000000000", 0], ["0", "2000000000000000000"], 1738195200 ] ``` :::tip In case of a tuple, ensure to follow the best practices: 1. Use square brackets 2. Wrap addresses in double quotes 3. Wrap large numbers in quotes Follow [this guide](https://info.etherscan.com/understanding-the-required-input-formats-for-read-write-contract-tab/) from Etherscan to learn how to correctly format input data for Write Contract tab. ::: As an example, in the screenshot below, we are providing input parameters for [`createWithTimestampsLL`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithtimestampsll) function in [`SablierBatchLockup`](https://sepolia.etherscan.io/address/0x44Fd5d5854833975E5Fc80666a10cF3376C088E0#writeContract) contract. As you can see, since `batch` requires a tuple and does not break it down into separate fields, we had to use the above method. ![Etherscan 08](/img/etherscan-tutorial/08.webp) ```json [ [ "0xb1bEF51ebCA01EB12001a639bDBbFF6eEcA12B9F", "0xf26994E6Af0b95cCa8DFA22A0BC25E1f38a54C42", "100000000000000000000", true, true, [1767261600, 1798797600], 1769261600, ["0", "2000000000000000000"], "" ] ] ``` #### Sender If the stream is cancelable, the sender is the wallet that will have the ability to cancel and renounce the stream. But if the stream is non-cancelable, the sender cannot cancel the stream. Most users will set their own wallet address as the sender. #### Recipient The address you want to stream tokens to. The owner of this address is the stream recipient and will receive tokens on [withdraw](#withdrawing-from-a-stream). #### Deposit Amount This is the deposit amount of tokens available to be streamed, **DECIMALS INCLUDED**. If the token has 18 decimals, for example, you will need to add eighteen zeros after the amount. Let's say you want to stream 20,000 DAI like in this example, you will need to fill in `20000000000000000000000`. #### Token The token is the contract address of the ERC-20 token being streamed. You can obtain this from the [Sablier Interface](#step-1-go-to-token-page) or from [Etherscan explorer](https://sepolia.etherscan.io/token/0x776b6fc2ed15d6bb5fc32e0c89de68683118c62a). Please double check the token address is correct before continuing. #### Cancelable This field indicates whether or not you want the stream to be cancelable. This can be set to either `true` or `false`. If set to true, the stream will be cancelable. You can make a cancelable stream non-cancelable after the stream has been created, but if it's a non-cancelable stream, it cannot become cancelable post-creation. #### Transferable The `transferable` field indicates whether the NFT owner is allowed to transfer te NFT or not. This can be set to either `true` or `false`. This flag cannot be changed later. #### Timestamps The `timestamps` field contains the start time, and the end time of the stream, in this order. The values should be UNIX timestamps (represented in **seconds**). You can find a Unix timestamp converter [here](https://www.unixtimestamp.com/). #### Shape The shape field can be used to specify the shape of the stream that you want the User Interface to display. This is an optional field and can be left empty. #### Unlock Amounts The `unlockAmounts` field contains the amount of tokens that will be unlocked at the start time and at the cliff time. For this example, we do not want to unlock any amount at the start time, however, we want to unlock 2 DAI at the cliff time. #### Cliff Time If you prefer to not have a cliff, you can simply set the cliff time to 0. If, however, you want to have a cliff, fill in the timestamp for the cliff there. :::caution Inside tuples/arrays (the `[ ... ]` structures in the example) make sure that you: - Use square brackets - Wrap addresses in double quotes, i.e. `" "` ::: Once the data is filled, and after you double-checked, click on the "Write" button and confirm the transaction in your wallet. That's all! You are done. You can now head over to the [Sablier Interface](https://app.sablier.com), connect your wallet, and your stream should appear like this: ![Etherscan 05](/img/etherscan-tutorial/05.webp) #### How about [`createWithDurationsLL`](/reference/lockup/contracts/abstracts/abstract.SablierLockupLinear#createwithdurationsll)? For the durations version, we'll replace the `timestamps` and `cliffTime` parameters with a single `durations` parameter to represent the total duration of the stream (in seconds) and the duration of the cliff (in seconds). ```json { "durations": [0, 864000] // no cliff and a total duration of 10 days } ``` | Total Duration | Cliff Duration | [Cliff, Total] | | :------------- | :------------- | ----------------- | | 10 days | no cliff | `[0, 864000]` | | 10 days | 1 day | `[86400, 864000]` | ## Withdrawing from a Stream ### Prerequisites To withdraw from a stream using Etherscan, you will need to obtain the stream's ID. To obtain this without the Sablier Interface, find the transaction which created the stream on Etherscan. Here's an [example](https://sepolia.etherscan.io/tx/0x1346d7bcb82b70f20e35ed2d404b0b65593344cf54b4b402af170434799e40cf) of what it should look like. Once found, you will see the stream ID between the two brackets. Note that stream ID and "Token ID" are the same thing. :::info Anyone can withdraw on your behalf if they pay the gas fee. When a third party withdraws, the recipient is the only allowed withdrawal address. However, if you withdraw yourself, you can choose to withdraw to any other address. You can read more about this advanced feature [here](/reference/lockup/access-control#overview). ::: ![Etherscan 06](/img/etherscan-tutorial/06.webp) ### Step 1: Go to contract page Head over to our [deployments](/guides/lockup/deployments) list and select the contract address you want to interact with. Once you find the right contract, click on the address to access its explorer's page. Click on the "Contract" tab, and then on the "Write Contract" sub-tab. ![Etherscan 01](/img/etherscan-tutorial/01.webp) ![Etherscan 02](/img/etherscan-tutorial/02.webp) You can now connect your wallet to the interface by clicking on "Connect to Web3". ![Etherscan 03](/img/etherscan-tutorial/03.webp) ### Step 2: Fill in parameters Head over to the **`withdraw`** method, and fill in the data. ![Etherscan 07](/img/etherscan-tutorial/07.webp) ```json { "streamId": 1, "to": "0xb1bEF51ebCA01EB12001a639bDBbFF6eEcA12B9F", "amount": 100000000000000000000 } ``` #### Stream ID The `streamId` is the value you have previously located in the transaction in which the stream was created. #### To The `to` field is there for the stream recipient's address. This will most likely be your own wallet, but you can also choose to withdraw these funds to another wallet (e.g. a separate cold wallet) if you are the stream's recipient. If you are not the stream recipient, it MUST be the address of the recipient. #### Amount This represents the amount of tokens that you want to withdraw, **DECIMALS INCLUDED**. For example, if the token you are looking to withdraw has 18 decimals, you will need to add eighteen zeros after the amount. Let's say you want to withdraw 100 DAI like in this example, you will need to put in `100000000000000000000`. Oh, and make sure that that amount has already been streamed, you cannot withdraw funds that haven't yet been streamed over to you. Once ready, click on the "Write" button, and confirm the transaction in your wallet. You are done! --- Apart from the main flows, you may be required to do some other actions, usually listed as prerequisites. ## Prerequisite: ERC20 Allowances Before interacting directly with the Lockup [contracts](/guides/lockup/deployments) to [create a stream](#creating-a-stream) you will need to manually grant proper ERC20 allowances. ### Step 1: Go to token page Pick a token you want to stream, e.g. [DAI](https://sepolia.etherscan.io/token/0x68194a729C2450ad26072b3D33ADaCbcef39D574). Using its address, visit the token page on Etherscan (in this example, we're using Ethereum Sepolia): `https://sepolia.etherscan.io/token/` :::info To get the address of an asset in the [Sablier Interface](/apps/features/overview), you can click on its name in the token list dialog or find an existing stream with that token and click on the icon inside the stream circle. ![Etherscan 09](/img/etherscan-tutorial/09.webp) ![Etherscan 10](/img/etherscan-tutorial/10.webp) ::: ### Step 2: Go to `approve` Next, look for the "Contract" tab and the "Write Contract" sub-tab. You'll see a list of methods that can be called for that token. Pick the `approve` method (e.g. [DAI's approve](https://sepolia.etherscan.io/token/0x68194a729C2450ad26072b3D33ADaCbcef39D574#writeContract#F1)). Most ERC-20 approve methods will contain two fields: 1. The spender 2. The amount :::tip Some tokens like [USDC](https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48?a=#writeProxyContract) or [AAVE](https://etherscan.io/token/0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9?a=#writeProxyContract) are upgradeable and use a proxy pattern. For these, you have to use the "Write as Proxy" tab. ::: ### Step 3: Send transaction For the purpose of creating a **LockupLinear** stream with Lockup, the spender will be the [SablierLockup](/guides/lockup/deployments) contract. As for the amount, you'll have to pad it with the right number of decimals. For DAI, that's 18 decimals, so a value of `100` will turn into `100 * 1e18` (100 followed by 18 zeroes). For USDC,that's 6 decimals, so a value of `100` will turn into `100 * 1e8` (100 followed by 8 zeroes). The same logic applies to the [deposit amounts](#deposit-amount) when creating the stream. ```json { "spender": "0x6b0307b4338f2963A62106028E3B074C2c0510DA", "amount": 100000000000000000000 } ``` ![Etherscan 11](/img/etherscan-tutorial/11.webp) Before clicking on the "Write" button to submit your allowance update, make sure to connect your wallet to the interface by clicking on "Connect to Web3". --- ## Configure Your Local Environment(3) In this guide, we will go through the steps to set up a local development environment for building onchain integrations with {props.protocol}. We will use Foundry to install {props.protocol} as a dependency, and run a simple test. At the end, you’ll have a development environment set up that you can use to build the rest of the examples under "Guides", or start your own integration project. ## Pre-requisites You will need the following software on your machine: - Git - Foundry - Node.js - Bun In addition, familiarity with Ethereum and Solidity is requisite. ## Set up using integration template :::tip Make sure you are using the latest version of Foundry by running `foundryup`. ::: We put together a template repository that you can use to get started quickly. This repository features a basic project structure, pre-configured {props.protocol} imports, and a selection of sample contracts and tests. To install the template, simply execute the following commands: {`$ mkdir ${props.protocol.toLowerCase()}-integration-template $ cd ${props.protocol.toLowerCase()}-integration-template $ forge init --template sablier-labs/${props.protocol.toLowerCase()}-integration-template $ bun install`} Then, hop to the Run a Fork Test section to complete your set up and start developing. ## Set up using Foundry template Foundry is a popular development toolkit for Ethereum projects, which we have used to build the {props.protocol} Protocol. For the purposes of this guide, Foundry will provide us with the tooling needed to compile and test our contracts. Let's use this command to spin up a new Foundry project: ```bash $ forge init my-project $ cd my-project ``` Once the initialization completes, take a look around at what got set up: ```bash ├── foundry.toml ├── script ├── src └── test ``` The folder structure should be intuitive: - `src` is where you'll write Solidity contracts - `test` is where you'll write tests (also in Solidity) - `script` is where you'll write scripts to perform actions like deploying contracts (you guessed it, in Solidity) - `foundry.toml` is where you can configure your Foundry settings, which we will leave as is in this guide :::note You might notice that the CLI is `forge` rather than `foundry`. This is because Foundry is a toolkit, and `forge` is just one of the tools that comes with it. ::: ## Install via npm package Let's install the {props.protocol} Node.js packages using Bun: {`$ bun add @sablier/${props.protocol.toLowerCase()}`} Bun will download the {props.protocol} contracts, along with their dependencies, and put them in the `node_modules` directory. That's it! You should now have a functional development environment to start building onchain {props.protocol} integrations. Let's run a quick test to confirm everything is set up properly. ## Write your first contract Delete the `src/Counter.sol` and `test/Counter.t.sol` files generated by Forge, and create two new files: `src/StreamCreator.sol` and `test/StreamCreator.t.sol`. Paste the following code into `src/StreamCreator.sol`: {`https://github.com/sablier-labs/${props.protocol.toLowerCase()}-integration-template/blob/main/src/${props.protocol}StreamCreator.sol`} Let's use Forge to compile this contract: ```bash $ forge build ``` If the contract was compiled correctly, you should see this message: ```bash [⠢] Compiling... [⠰] Compiling 62 files with Solc 0.8.29 [⠒] Solc 0.8.29 finished in 798.47ms Compiler run successful! ``` :::info The minimum Solidity version supported by the {props.protocol} contracts is v0.8.22. ::: ## Run a fork test Foundry offers native support for running tests against a fork of Ethereum Mainnet, testnets and L2s, which is useful when building and testing integrations with onchain protocols like Sablier. In practice, this enables you to access all Sablier contracts deployed on Ethereum, and use them for testing your integration. As a prerequisite, you will need an RPC that supports forking. A good solution for this is Alchemy, as it includes forking in its free tier plan. Once you have obtained your RPC, you can proceed to run the following test: {`https://github.com/sablier-labs/${props.protocol.toLowerCase()}-integration-template/blob/main/test/${props.protocol}StreamCreator.t.sol`} You can run the test using Forge: ```bash $ forge test ``` If the test passed, you should see a message like this: {`Ran 2 tests for test/${props.protocol}StreamCreator.t.sol:${props.protocol}StreamCreatorTest [PASS] test_Create${props.protocol}Stream() (gas: 246830) Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 626.58ms (500.67µs CPU time)`} ## Next steps Congratulations! Your environment is now configured, and you are prepared to start building. Explore the guides section to discover various features available for {props.protocol} integration. Remember to include all contracts (`.sol` files) in the `src` folder and their corresponding tests in the `test` folder. As far as Foundry is concerned, there is much more to uncover. If you want to learn more about it, check out the Foundry Book, which contains numerous examples and tutorials. A deep understanding of Foundry will enable you to create more sophisticated integrations with {props.protocol} protocol. --- ## Implement Hooks Hooks provide an interface for recipient contracts to react upon cancellations and withdrawals. In order to allow your contract to be able to hook into Lockup, you must implement this interface and it must have been allowlisted by the Lockup contract's admin. :::info [`allowToHook`](/reference/lockup/contracts/interfaces/interface.ISablierLockup#allowtohook) is an irreversible operation, i.e., once a contract has been added to the allowlist, it can never be removed. This is to ensure stronger immutability and decentralization guarantees. Once a recipient contract is allowlisted, integrators should NOT have to trust us to keep their contract on the allowlist. ::: In this guide, we will explain how to implement [hooks](/concepts/lockup/hooks) in your smart contract to allow interacting with Lockup streams. ### Overview ### Requirements The recipient contract should implement the `{IERC165-supportsInterface}` method, which MUST return `true` when called with `0xf8ee98d3`, which is the interface ID for `ISablierLockupRecipient`. ```solidity function supportsInterface(bytes4 interfaceId) public view override(IERC165, ERC165) returns (bool) { return interfaceId == 0xf8ee98d3; } ``` ### Hook Functions These are the hooks that can be implemented by a recipient contract: | Hook | Arguments | Return value | Description | | ------------------------- | --------------------------------------------------- | ----------------- | --------------------------------------------------- | | `onSablierLockupCancel` | `(streamId, sender, senderAmount, recipientAmount)` | function selector | Called when the stream is canceled by the sender. | | `onSablierLockupWithdraw` | `(streamId, caller, to, amount)` | function selector | Called when an amount is withdrawn from the stream. | The complete interface for `ISablierLockupRecipient` can be found [here](/reference/lockup/contracts/interfaces/interface.ISablierLockupRecipient). :::tip Looking to get on the allowlist? Reach out to us on [Discord](https://discord.sablier.com). ::: ### Sample Implementations #### Recipient {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/RecipientHooks.sol`} --- ## Pull Vesting Data This guide explains how you can pull vesting data from Sablier Lockup streams. This data can be useful for a variety of use cases, including but not limited to staking contracts, blockchain explorers, and data dashboards: 1. **Staking**: Staking of Sablier streams require access to the amount of tokens that are held by the stream. You do not want to distribute rewards for tokens that have been withdrawn by users. 2. **Explorers (e.g., Etherscan, CoinGecko)**: One major feature of blockchain explorers is to show accurate circulating supplies. When tokens are vested through Sablier, you may want to exclude the amount of unvested tokens from the circulating supply. This is helpful to accurately calculate the market cap, which depends upon the amount of liquid tokens. 3. **Data Dashboards (e.g., Tokenomist, Nansen, Dune)**: Investors and traders use data dashboards to make informed trading decisions. When Sablier is used, you may want to show the amount of liquid (or vested) tokens and the amount of illiquid (or unvested) tokens. This is helpful to understand the token distribution and the team's commitment to the long-term success of the project. :::note Note that 'streamed amount' is synonymous with 'vested amount'. ::: ## Frontend Sandbox The examples in this guide are written in Solidity, but you may want to interact with the Sablier Lockup contract from your frontend application. A good starting point for this is the [Sablier Sandbox](https://github.com/sablier-labs/sandbox). For a comprehensive list of all the functions available in Sablier Lockup, visit the [References](/reference/overview) section of this website. ## Actions ### Cancel on first withdraw To automatically cancel streams as soon as the user withdraws their tokens, you can use one of two methods: onchain or offchain. The onchain method is to track the withdrawn amount and check if its value is greater than 0: ```solidity if (lockup.getWithdrawnAmount(streamId) > 0) { lockup.cancel(streamId); } ``` Offchain, you can monitor the [`WithdrawFromLockupStream`](/reference/lockup/contracts/interfaces/interface.ISablierLockup) events. As soon as a withdrawal event is detected, you can send a transaction to cancel the stream. ## Calculating Amounts ### Amount in stream This is the amount of tokens held by the stream. It is the sum of locked tokens and vested tokens that have not been withdrawn. This value is particularly useful for applications like staking. The following formula can be used for both cancelable and non-cancelable streams: ```solidity uint256 amountInStream = sablierLockup.getDepositedAmount(streamId) - sablierLockup.getWithdrawnAmount(streamId) - sablierLockup.getRefundedAmount(streamId); ``` For non-cancelable stream, a more efficient way to calculate the amount in stream is: ```solidity uint256 amountInStream = sablierLockup.getDepositedAmount(streamId) - sablierLockup.getWithdrawnAmount(streamId); ``` ### Locked amount This is the amount of tokens that are locked in the stream and are effectively illiquid. This is particularly relevant when calculating the circulating supply of a token. ```solidity uint256 lockedAmount = lockup.getDepositedAmount(streamId) - lockup.streamedAmountOf(streamId) - sablierLockup.getRefundedAmount(streamId); ``` For non-cancelable stream, a more efficient way to calculate locked amount is: ```solidity uint256 lockedAmount = lockup.getDepositedAmount(streamId) - lockup.streamedAmountOf(streamId); ``` While calculating the circulating supply, you may want to subtract the locked amount from your calculations. ### Unlocked amount As opposed to the locked amount, the unlocked amount refers to tokens that are no longer locked and are effectively liquid. ```solidity uint256 unlockedAmount = lockup.streamedAmountOf(streamId) + sablierLockup.getRefundedAmount(streamId); ``` For non-cancelable stream, a more efficient way to calculate unlocked amount is: ```solidity uint256 unlockedAmount = lockup.streamedAmountOf(streamId); ``` ## Vested amount not withdrawn If you are building an application that requires access to amount of tokens that have been vested but not yet withdrawn, you can use the following formula: ```solidity uint256 vestedAmount = lockup.streamedAmountOf(streamId) - lockup.getWithdrawnAmount(streamId); ``` This may be useful for use cases in which you want to reward 'diamond hands', i.e., users who have not withdrawn their share of airdrops. ## Unlock Dates This section is useful if you are building a data dashboard and want to index the dates when tokens will be unlocked in Sablier. To obtain the time at which a stream will be fully unlocked, you can use the following function: ```solidity uint256 unlockTime = lockup.getEndTime(streamId); ``` Obtaining the earlier unlock times depends on the type of stream. Let's go through each stream type: ### Linear streams For Linear streams, make requests to `lockup.getCliffTime(streamId)` and `lockup.getEndTime(streamId)` to read cliff time and end time respectively. ### Dynamic streams For Dynamic streams, you may be particularly interested in the unlock amount and time of the current segment. ```solidity LockupDynamic.Segment[] memory segments = lockup.getSegments(streamId); // Loop over the segments to find the next unlock time. for (uint i; i < segments.length; ++i) { if (segments[i].timestamp > block.timestamp) { nextUnlockAmount = segments[i].amount; nextUnlockTime = segments[i].timestamp; break; } } ``` ### Tranched streams For Tranched streams, you may be particularly interested in the unlock amount and time of the current tranche. ```solidity LockupTranched.Tranche[] memory tranches = lockup.getTranches(streamId); // Loop over the tranches to find the next unlock time. for (uint i; i < tranches.length; ++i) { if (tranches[i].timestamp > block.timestamp) { nextUnlockAmount = tranches[i].amount; nextUnlockTime = tranches[i].timestamp; break; } } ``` We hope you have found this guide helpful. If you have a use case that is not covered here, please reach out to us on [Discord](https://discord.sablier.com), and we will assist you. --- ## Batch Lockup Linear # Create a Batch of Linear Streams In this guide, we will show you how you can use Solidity to batch create linear streams via the [Batch Lockup](/reference/lockup/contracts/contract.SablierBatchLockup) contract. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/streaming) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Now, import the relevant symbols from `@sablier/lockup`: ```solidity ``` Create a contract called `BatchLLStreamCreator`, and declare a constant `DAI` of type `IERC20`, a constant `LOCKUP` of type `ISablierLockup`, and a constant `BATCH_LOCKUP` of type `ISablierBatchLockup`: ```solidity contract BatchLLStreamCreator { IERC20 public constant DAI = IERC20(0x68194a729C2450ad26072b3D33ADaCbcef39D574); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); ISablierBatchLockup public constant BATCH_LOCKUP = ISablierBatchLockup(0x0636D83B184D65C242c43de6AAd10535BFb9D45a); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. ## Batch create functions There are two batch create functions for the Linear streams: - [`createWithDurationsLL`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithdurationsll) - [`createWithTimestampsLL`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithtimestampsll) Which one you choose depends upon your use case. In this guide, we will use `createWithDurationsLL`. ## Function definition Define a function called `batchCreateStreams` that takes a parameter `perStreamAmount` and returns an array of ids for the created streams: ```solidity function batchCreateStreams(uint128 perStreamAmount) public returns (uint256[] memory streamIds) { // ... } ``` ## Batch size Next, declare a batch size, which is needed to calculate the transfer amount: ```solidity // Create a batch of two streams uint256 batchSize = 2; // Calculate the combined amount of DAI to transfer to this contract uint256 transferAmount = perStreamAmount * batchSize; ``` ## ERC-20 steps To create a stream, the caller must approve the creator contract to pull the tokens from the calling address's account. Then, we have to also approve the `Batch` contract to pull the tokens that the creator contract will be in possession of after they are transferred from the calling address (you): ```solidity // Transfer the provided amount of DAI tokens to this contract DAI.transferFrom(msg.sender, address(this), transferAmount); // Approve the Batch contract to spend DAI DAI.approve(address(BATCH_LOCKUP), transferAmount); ``` For more guidance on how to approve and transfer ERC-20 tokens, see [this article](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) on the Ethereum website. ## Stream Parameters Given that we declared a `batchSize` of two, we need to define two [BatchLockup.CreateWithDurationsLL](/reference/lockup/contracts/types/library.BatchLockup#createwithdurationsll) structs: ```solidity BatchLockup.CreateWithDurationsLL memory stream0; stream0.sender = address(0xABCD); // The sender to stream the tokens, he will be able to cancel the stream stream0.recipient = address(0xCAFE); // The recipient of the streamed tokens stream0.depositAmount = perStreamAmount; // The deposit amount of each stream stream0.cancelable = true; // Whether the stream will be cancelable or not stream0.transferable = false; // Whether the recipient can transfer the NFT or not stream0.durations = LockupLinear.Durations({ cliff: 4 weeks, // Tokens will start streaming continuously after 4 weeks total: 52 weeks // Setting a total duration of ~1 year }); stream0.unlockAmounts = LockupLinear.UnlockAmounts({ start: 0, // Whether the stream will unlock a certain amount of tokens at the start time cliff: 0 // Whether the stream will unlock a certain amount of tokens at the cliff time }); ``` To add some variety, we will change the parameters of the second stream: ```solidity BatchLockup.CreateWithDurationsLL memory stream1; stream1.sender = address(0xABCD); // The sender to stream the tokens, he will be able to cancel the stream stream1.recipient = address(0xBEEF); // The recipient of the streamed tokens stream1.depositAmount = perStreamAmount; // The deposit amount of each stream stream1.cancelable = false; // Whether the stream will be cancelable or not stream1.transferable = false; // Whether the recipient can transfer the NFT or not stream1.durations = LockupLinear.Durations({ cliff: 1 weeks, // Tokens will start streaming continuously after 4 weeks total: 26 weeks // Setting a total duration of ~6 months }); stream1.unlockAmounts = LockupLinear.UnlockAmounts({ start: 0, // Whether the stream will unlock a certain amount of tokens at the start time cliff: 0 // Whether the stream will unlock a certain amount of tokens at the start time }); ``` Once both structs are declared, the batch array has to be filled: ```solidity // Fill the batch param BatchLockup.CreateWithDurationsLL[] memory batch = new BatchLockup.CreateWithDurationsLL[](batchSize); batch[0] = stream0; batch[1] = stream1; ``` ## Invoke the batch create function With all parameters set, we can now call the `createWithDurationsLL` function, and assign the ids of the newly created streams to the array: ```solidity streamIds = BATCH_LOCKUP.createWithDurationsLL(LOCKUP_LINEAR, DAI, batch); ``` ## Full code Below you can see the full code. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/lockup/BatchLLStreamCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/BatchLLStreamCreator.sol`} --- ## Batch Lockup Dynamic # Create a Batch of Dynamic Streams In this guide, we will show you how you can use Solidity to batch create dynamic streams via the [Batch Lockup](/reference/lockup/contracts/contract.SablierBatchLockup) contract. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/streaming) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Now, import the relevant symbols from `@sablier/lockup`: ```solidity ``` Create a contract called `BatchLDStreamCreator`, and declare a constant `DAI` of type `IERC20`, a constant `LOCKUP` of type `ISablierLockup`, and a constant `BATCH_LOCKUP` of type `ISablierBatchLockup`: ```solidity contract BatchLDStreamCreator { IERC20 public constant DAI = IERC20(0x68194a729C2450ad26072b3D33ADaCbcef39D574); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); ISablierBatchLockup public constant BATCH_LOCKUP = ISablierBatchLockup(0x0636D83B184D65C242c43de6AAd10535BFb9D45a); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. ## Batch create functions There are two batch create functions for the Dynamic streams: - [`createWithDurationsLD`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithdurationsld) - [`createWithTimestampsLD`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithtimestampsld) Which one you choose depends upon your use case. In this guide, we will use `createWithTimestampsLD`. ## Function definition Define a function called `batchCreateStreams` that takes a parameter `perStreamAmount` and returns an array of ids for the created streams: ```solidity function batchCreateStreams(uint128 perStreamAmount) public returns (uint256[] memory streamIds) { // ... } ``` ## Batch size Next, declare a batch size, which is needed to calculate the transfer amount: ```solidity // Create a batch of two streams uint256 batchSize = 2; // Calculate the combined amount of DAI to transfer to this contract uint256 transferAmount = perStreamAmount * batchSize; ``` ## ERC-20 steps To create a stream, the caller must approve the creator contract to pull the tokens from the calling address's account. Then, we have to also approve the `Batch` contract to pull the tokens that the creator contract will be in possession of after they are transferred from the calling address (you): ```solidity // Transfer the provided amount of DAI tokens to this contract DAI.transferFrom(msg.sender, address(this), transferAmount); // Approve the Batch contract to spend DAI DAI.approve(address(BATCH_LOCKUP), transferAmount); ``` For more guidance on how to approve and transfer ERC-20 tokens, see [this article](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) on the Ethereum website. ## Stream Parameters Given that we declared a `batchSize` of two, we need to define two [BatchLockup.CreateWithTimestampsLD](/reference/lockup/contracts/types/library.BatchLockup#createwithtimestampsld) structs: ```solidity // Declare the first stream in the batch BatchLockup.CreateWithTimestampsLD memory stream0; stream0.sender = address(0xABCD); // The sender to stream the tokens, he will be able to cancel the stream stream0.recipient = address(0xCAFE); // The recipient of the streamed tokens stream0.depositAmount = perStreamAmount; // The deposit amount of each stream stream0.cancelable = true; // Whether the stream will be cancelable or not stream0.transferable = false; // Whether the recipient can transfer the NFT or not stream0.startTime = uint40(block.timestamp); // Set the start time to block timestamp // Declare some dummy segments stream0.segments = new LockupDynamic.Segment[](2); stream0.segments[0] = LockupDynamic.Segment({ amount: uint128(perStreamAmount / 2), exponent: ud2x18(0.25e18), timestamp: uint40(block.timestamp + 1 weeks) }); stream0.segments[1] = ( LockupDynamic.Segment({ amount: uint128(perStreamAmount - stream0.segments[0].amount), exponent: ud2x18(2.71e18), timestamp: uint40(block.timestamp + 24 weeks) }) ); ``` To add some variety, we will change the parameters of the second stream: ```solidity BatchLockup.CreateWithTimestampsLD memory stream1; stream1.sender = address(0xABCD); // The sender to stream the tokens, he will be able to cancel the stream stream1.recipient = address(0xBEEF); // The recipient of the streamed tokens stream1.depositAmount = uint128(perStreamAmount); // The deposit amount of each stream stream1.cancelable = false; // Whether the stream will be cancelable or not stream1.transferable = false; // Whether the recipient can transfer the NFT or not stream1.startTime = uint40(block.timestamp); // Set the start time to block timestamp // Declare some dummy segments stream1.segments = new LockupDynamic.Segment[](2); stream1.segments[0] = LockupDynamic.Segment({ amount: uint128(perStreamAmount / 4), exponent: ud2x18(1e18), timestamp: uint40(block.timestamp + 4 weeks) }); stream1.segments[1] = ( LockupDynamic.Segment({ amount: uint128(perStreamAmount - stream1.segments[0].amount), exponent: ud2x18(3.14e18), timestamp: uint40(block.timestamp + 52 weeks) }) ); ``` Once both structs are declared, the batch array has to be filled: ```solidity // Fill the batch array BatchLockup.CreateWithTimestampsLD[] memory batch = new BatchLockup.CreateWithTimestampsLD[](batchSize); batch[0] = stream0; batch[1] = stream1; ``` ## Invoke the batch create function With all parameters set, we can now call the `createWithTimestampsLD` function, and assign the ids of the newly created streams to the array: ```solidity streamIds = BATCH_LOCKUP.createWithTimestampsLD(LOCKUP_DYNAMIC, DAI, batch); ``` ## Full code Below you can see the full code. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/lockup/BatchLDStreamCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/BatchLDStreamCreator.sol`} --- ## Batch Lockup Tranched # Create a Batch of Tranched Streams In this guide, we will show you how can use Solidity to batch create tranched streams via the [Batch Lockup](/reference/lockup/contracts/contract.SablierBatchLockup) contract. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/streaming) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Now, import the relevant symbols from `@sablier/lockup`: ```solidity ``` Create a contract called `BatchLTStreamCreator`, and declare a constant `DAI` of type `IERC20`, a constant `LOCKUP` of type `ISablierLockup`, and a constant `BATCH_LOCKUP` of type `ISablierBatchLockup`: ```solidity contract BatchLTStreamCreator { IERC20 public constant DAI = IERC20(0x68194a729C2450ad26072b3D33ADaCbcef39D574); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); ISablierBatchLockup public constant BATCH_LOCKUP = ISablierBatchLockup(0x0636D83B184D65C242c43de6AAd10535BFb9D45a); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. ## Batch create functions There are two batch create functions for the Tranched streams: - [`createWithDurationsLT`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithdurationslt) - [`createWithTimestampsLT`](/reference/lockup/contracts/contract.SablierBatchLockup#createwithtimestampslt) Which one you choose depends upon your use case. In this guide, we will use `createWithTimestampsLT`. ## Function definition Define a function called `batchCreateStreams` that takes a parameter `perStreamAmount` and returns an array of ids for the created streams: ```solidity function batchCreateStreams(uint128 perStreamAmount) public returns (uint256[] memory streamIds) { // ... } ``` ## Batch size Next, declare a batch size, which is needed to calculate the transfer amount: ```solidity // Create a batch of two streams uint256 batchSize = 2; // Calculate the combined amount of DAI to transfer to this contract uint256 transferAmount = perStreamAmount * batchSize; ``` ## ERC-20 steps To create a stream, the caller must approve the creator contract to pull the tokens from the calling address's account. Then, we have to also approve the `Batch` contract to pull the tokens that the creator contract will be in possession of after they are transferred from the calling address (you): ```solidity // Transfer the provided amount of DAI tokens to this contract DAI.transferFrom(msg.sender, address(this), transferAmount); // Approve the Batch contract to spend DAI DAI.approve(address(BATCH_LOCKUP), transferAmount); ``` For more guidance on how to approve and transfer ERC-20 tokens, see [this article](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) on the Ethereum website. ## Stream Parameters Given that we declared a `batchSize` of two, we need to define two [BatchLockup.CreateWithTimestampsLT](/reference/lockup/contracts/types/library.BatchLockup#createwithtimestampslt) structs: ```solidity // Declare the first stream in the batch BatchLockup.CreateWithTimestampsLT memory stream0; stream0.sender = address(0xABCD); // The sender to stream the tokens, he will be able to cancel the stream stream0.recipient = address(0xCAFE); // The recipient of the streamed tokens stream0.depositAmount = perStreamAmount; // The deposit amount of each stream stream0.cancelable = true; // Whether the stream will be cancelable or not stream0.transferable = false; // Whether the recipient can transfer the NFT or not stream0.startTime = uint40(block.timestamp); // Set the start time to block timestamp // Declare some dummy tranches stream0.tranches = new LockupTranched.Tranche[](2); stream0.tranches[0] = LockupTranched.Tranche({ amount: uint128(perStreamAmount / 2), timestamp: uint40(block.timestamp + 1 weeks) }); stream0.tranches[1] = LockupTranched.Tranche({ amount: uint128(perStreamAmount - stream0.tranches[0].amount), timestamp: uint40(block.timestamp + 24 weeks) }); ``` To add some variety, we will change the parameters of the second stream: ```solidity BatchLockup.CreateWithTimestampsLT memory stream1; stream1.sender = address(0xABCD); // The sender to stream the tokens, he will be able to cancel the stream stream1.recipient = address(0xBEEF); // The recipient of the streamed tokens stream1.depositAmount = uint128(perStreamAmount); // The deposit amount of each stream stream1.cancelable = false; // Whether the stream will be cancelable or not stream1.transferable = false; // Whether the recipient can transfer the NFT or not stream1.startTime = uint40(block.timestamp); // Set the start time to block timestamp // Declare some dummy tranches stream1.tranches = new LockupTranched.Tranche[](2); stream1.tranches[0] = LockupTranched.Tranche({ amount: uint128(perStreamAmount / 4), timestamp: uint40(block.timestamp + 4 weeks) }); stream1.tranches[1] = LockupTranched.Tranche({ amount: uint128(perStreamAmount - stream1.tranches[0].amount), timestamp: uint40(block.timestamp + 24 weeks) }); ``` Once both structs are declared, the batch array has to be filled: ```solidity // Fill the batch array BatchLockup.CreateWithTimestampsLT[] memory batch = new BatchLockup.CreateWithTimestampsLT[](batchSize); batch[0] = stream0; batch[1] = stream1; ``` ## Invoke the batch create function With all parameters set, we can now call the `createWithTimestampsLT` function, and assign the ids of the newly created streams to the array: ```solidity streamIds = BATCH_LOCKUP.createWithTimestampsLT(LOCKUP_TRANCHED, DAI, batch); ``` ## Full code Below you can see the full code. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/lockup/BatchLTStreamCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/BatchLTStreamCreator.sol`} --- ## Lockup Linear # Create a Lockup Linear Stream Linear streams are streams with a linear streaming function. In this guide, we will show you how to create a Lockup Linear stream using Solidity. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/streaming) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Import the relevant symbols from `@sablier/lockup`: ```solidity ``` Create a contract called `LockupLinearStreamCreator`, and declare a constant `DAI` of type `IERC20` and a constant `LOCKUP` of type `ISablierLockup`: ```solidity contract LockupLinearStreamCreator { IERC20 public constant DAI = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. There are two create functions in the Lockup contract that can be used to create Linear streams: - `createWithDurationsLL`: takes duration and calculates the start and end timestamps based on the provided durations. - `createWithTimestampsLL`: takes start and end timestamps. Which one you choose depends upon your use case. In this guide, we will use `createWithDurationsLL`. ## Function definition Define a function called `createStream` which takes a single parameter `depositAmount`, and which returns the id of the created stream: ```solidity function createStream(uint128 depositAmount) public returns (uint256 streamId) { // ... } ``` ## ERC-20 steps To create a stream, the caller must approve the creator contract to pull the tokens from the calling address's account. Then, we have to approve the Lockup contract to pull the tokens that the creator contract will be in possession of after they are transferred from the calling address (you): ```solidity // Transfer the provided amount of DAI tokens to this contract DAI.transferFrom(msg.sender, address(this), depositAmount); // Approve the Sablier contract to spend DAI DAI.approve(address(LOCKUP), depositAmount); ``` For more guidance on how to approve and transfer ERC-20 tokens, see [this article](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) on the Ethereum website. ## Parameters The struct associated with `createWithDurationsLL` are [`Lockup.CreateWithDurations`](/reference/lockup/contracts/types/library.Lockup#createwithdurations) (a shared struct across all the lockup streams), [`LockupLinear.Durations`](/reference/lockup/contracts/types/library.LockupLinear#durations) and [`LockupLinear.UnlockAmounts`](/reference/lockup/contracts/types/library.LockupLinear#unlockamounts). ```solidity Lockup.CreateWithDurations memory params; LockupLinear.UnlockAmounts memory unlockAmounts; LockupLinear.Durations memory durations; ``` Let's review each parameter in detail. ### Sender The address streaming the tokens, with the ability to cancel the stream: ```solidity params.sender = msg.sender; ``` ### Recipient The address receiving the tokens: ```solidity params.recipient = address(0xCAFE); ``` ### Deposit amount The deposit amount of ERC-20 tokens to be paid, denoted in units of the token's decimals. ```solidity params.depositAmount = depositAmount; ``` ### Token The contract address of the ERC-20 token used for streaming. In this example, we will stream DAI: ```solidity params.token = DAI; ``` ### Cancelable Boolean that indicates whether the stream will be cancelable or not. ```solidity params.cancelable = true; ``` ### Transferable Boolean that indicates whether the stream will be transferable or not. ```solidity params.transferable = true; ``` ### Unlock Amounts Struct containing details on unlock amounts at start time and at cliff time. ```solidity unlockAmounts = LockupLinear.UnlockAmounts({ start: 0, cliff: 0 }); ``` ### Durations Struct containing (i) cliff duration and (ii) total stream duration, both denoted in seconds. ```solidity durations = LockupLinear.Durations({ cliff: 0, total: 52 weeks }); ``` ## Invoke the create function With all parameters set, we can now call the `createWithDurationsLL` function, and assign the id of the newly created stream to a variable: ```solidity streamId = LOCKUP.createWithDurationsLL(params, unlockAmounts, durations); ``` ## Full code Below you can see the full code. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/lockup/LockupLinearStreamCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/LockupLinearStreamCreator.sol`} --- ## Lockup Tranched # Create a Lockup Tranched Stream Lockup Tranched are streams with discrete unlocks. In this guide, we will show you how to create a Lockup Tranched stream using Solidity. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/streaming) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Import the relevant symbols from `@sablier/lockup`: ```solidity ``` Create a contract called `LockupTranchedStreamCreator`, and declare a constant `DAI` of type `IERC20` and a constant `LOCKUP` of type `ISablierLockup`: ```solidity contract LockupTranchedStreamCreator { IERC20 public constant DAI = IERC20(0x68194a729C2450ad26072b3D33ADaCbcef39D574); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. There are two create functions in the Lockup contract that can be used to create Tranched streams: - `createWithDurationsLT`: takes duration and calculates the tranche timestamps based on the provided durations. - `createWithTimestampsLT`: takes UNIX timestamps for tranches. Which one you choose depends upon your use case. In this guide, we will use `createWithDurationsLT`. ## Function definition Define a function called `createStream` which takes two parameters, `amount0` and `amount1`, and which returns the id of the created stream: ```solidity function createStream(uint128 amount0, uint128 amount1) public returns (uint256 streamId) { // ... } ``` Next, sum up the `amount0` and `amount1` parameters to get the deposit amount of the stream, which will be needed in many of the steps below: ```solidity uint128 depositAmount = amount0 + amount1; ``` ## ERC-20 steps To create a stream, the caller must approve the creator contract to pull the tokens from the calling address's account. Then, we have to approve the Lockup contract to pull the tokens that the creator contract will be in possession of after they are transferred from the calling address (you): ```solidity // Transfer the provided amount of DAI tokens to this contract DAI.transferFrom(msg.sender, address(this), depositAmount); // Approve the Sablier contract to spend DAI DAI.approve(address(LOCKUP), depositAmount); ``` For more guidance on how to approve and transfer ERC-20 tokens, see [this article](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) on the Ethereum website. ## Parameters The struct associated with `createWithDurationsLT` are [`Lockup.CreateWithDurations`](/reference/lockup/contracts/types/library.Lockup#createwithdurations) (a shared struct across all the lockup streams) and [`LockupTranched.TrancheWithDuration`](/reference/lockup/contracts/types/library.LockupTranched#tranchewithduration). ```solidity Lockup.CreateWithDurations memory params; LockupTranched.TrancheWithDuration[] memory tranches = new LockupTranched.TrancheWithDuration[](2); ``` Let's review each parameter in detail. ### Sender The address streaming the tokens, with the ability to cancel the stream: ```solidity params.sender = msg.sender; ``` ### Recipient The address receiving the tokens: ```solidity params.recipient = address(0xCAFE); ``` ### Deposit amount The deposit amount of ERC-20 tokens to be paid, denoted in units of the token's decimals. ```solidity params.depositAmount = depositAmount; ``` ### Token The contract address of the ERC-20 token used for streaming. In this example, we will stream DAI: ```solidity params.token = DAI; ``` ### Cancelable Boolean that indicates whether the stream will be cancelable or not. ```solidity params.cancelable = true; ``` ### Transferable Boolean that indicates whether the stream will be transferable or not. ```solidity params.transferable = true; ``` ### Tranches With Duration Tranches are what the protocol uses to compose the discrete unlocks. For a full exposition of tranches, see the [Tranches](/concepts/lockup/tranches) guide. Each tranche is characterized by a specific amount and timestamp. Because we are using `createWithDurationsLT` in this example, these tranches are supplied to the function in the form of an array containing [`LockupTranched.TrancheWithDuration`](/reference/lockup/contracts/types/library.LockupTranched#tranchewithduration) structs. Let's define two dummy tranches: ```solidity tranches[0] = LockupTranched.TrancheWithDuration({ amount: amount0, duration: uint40(4 weeks) }); tranches[1] = (LockupTranched.TrancheWithDuration({ amount: amount1, duration: uint40(6 weeks) })); ``` In this example, the first tranche (`amount0`) will unlock at the end of the 4 weeks after the stream was created and the second tranche (`amount1`) will unlock after further 6 weeks. Thus, the deposit amount will be unlocked in 10 weeks. ## Invoke the create function With all parameters set, we can now call the `createWithDurationsLT` function, and assign the ID of the newly created stream to a variable: ```solidity streamId = LOCKUP.createWithDurationsLT(params, tranches); ``` ## Full code Below you can see the full code. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/lockup/LockupTranchedStreamCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/LockupTranchedStreamCreator.sol`} --- ## Lockup Dynamic # Create a Lockup Dynamic Stream Dynamic streams are streams with a custom streaming function. In this guide, we will show you how to create a Lockup Dynamic stream using Solidity. This guide assumes that you have already gone through the [Protocol Concepts](/concepts/streaming) section. :::caution The code in this guide is not production-ready, and is implemented in a simplistic manner for the purpose of learning. ::: ## Set up a contract Declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Import the relevant symbols from `@sablier/lockup`: ```solidity ``` Create a contract called `LockupDynamicStreamCreator`, and declare a constant `DAI` of type `IERC20` and a constant `LOCKUP` of type `ISablierLockup`: ```solidity contract LockupDynamicStreamCreator { IERC20 public constant DAI = IERC20(0x68194a729C2450ad26072b3D33ADaCbcef39D574); ISablierLockup public constant LOCKUP = ISablierLockup(0xcF8ce57fa442ba50aCbC57147a62aD03873FfA73); } ``` In the code above, the contract addresses are hard-coded for demonstration purposes. However, in production, you would likely use input parameters to allow flexibility in changing the addresses. Also, these addresses are deployed on Ethereum Sepolia. If you need to work with a different chain, {props.protocol} addresses can be obtained from the {props.protocol} Deployments page. There are two create functions in the Lockup contract that can be used to create Dynamic streams: - `createWithDurationsLD`: takes duration and calculates the segment timestamps based on the provided durations. - `createWithTimestampsLD`: takes UNIX timestamps for segment. Which one you choose depends upon your use case. In this guide, we will use `createWithTimestampsLD`. ## Function definition Define a function called `createStream` which takes two parameters, `amount0` and `amount1`, and which returns the id of the created stream: ```solidity function createStream(uint128 amount0, uint128 amount1) public returns (uint256 streamId) { // ... } ``` Next, sum up the `amount0` and `amount1` parameters to get the deposit amount of the stream, which will be needed in many of the steps below: ```solidity uint128 depositAmount = amount0 + amount1; ``` ## ERC-20 steps To create a stream, the caller must approve the creator contract to pull the tokens from the calling address's account. Then, we have to approve the Lockup contract to pull the tokens that the creator contract will be in possession of after they are transferred from the calling address (you): ```solidity // Transfer the provided amount of DAI tokens to this contract DAI.transferFrom(msg.sender, address(this), depositAmount); // Approve the Sablier contract to spend DAI DAI.approve(address(LOCKUP), depositAmount); ``` For more guidance on how to approve and transfer ERC-20 tokens, see [this article](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) on the Ethereum website. ## Parameters The struct associated with `createWithTimestampsLD` are [`Lockup.CreateWithTimestamps`](/reference/lockup/contracts/types/library.Lockup#createwithtimestamps) (a shared struct across all the lockup streams) and [`LockupDynamic.Segment`](/reference/lockup/contracts/types/library.LockupDynamic#segment). ```solidity LockupDynamic.CreateWithTimestamps memory params; LockupDynamic.Segment[] memory segments = new LockupDynamic.Segment[](2); ``` Let's review each parameter in detail. ### Sender The address streaming the tokens, with the ability to cancel the stream: ```solidity params.sender = msg.sender; ``` ### Recipient The address receiving the tokens: ```solidity params.recipient = address(0xCAFE); ``` ### Deposit amount The deposit amount of ERC-20 tokens to be paid, denoted in units of the token's decimals. ```solidity params.depositAmount = depositAmount; ``` ### Token The contract address of the ERC-20 token used for streaming. In this example, we will stream DAI: ```solidity params.token = DAI; ``` ### Cancelable Boolean that indicates whether the stream will be cancelable or not. ```solidity params.cancelable = true; ``` ### Transferable Boolean that indicates whether the stream will be transferable or not. ```solidity params.transferable = true; ``` ### Start Time and End Time The start and end timestamps for the stream. Note that the end timestamps much match the timestamp of the last segment. ```solidity params.timestamps.start = uint40(block.timestamp + 100 seconds); params.timestamps.end = uint40(block.timestamp + 52 weeks); ``` ### Segments Segments are what the protocol uses to compose the custom distribution curve of a Dynamic stream. For a full exposition of segments, see the [Segments](/concepts/lockup/segments) guide. The term "segment" refers to the splitting of the stream into separate partitions, with each segment characterized by a specific amount, exponent, and timestamp. These segments are supplied to the function in the form of an array containing [`LockupDynamic.Segment`](/reference/lockup/contracts/types/library.LockupDynamic#segment) structs. Let's define two dummy segments: ```solidity segments[0] = LockupDynamic.Segment({ amount: amount0, exponent: ud2x18(1e18), timestamp: uint40(block.timestamp + 4 weeks) }); segments[1] = ( LockupDynamic.Segment({ amount: amount1, exponent: ud2x18(3.14e18), timestamp: uint40(block.timestamp + 52 weeks) }) ); ``` In this example, the first segment (`amount0`) will stream much faster than the second segment (`amount1`), because the exponents are different. As a rule of thumb: the higher the exponent, the slower the stream. :::note The segment timestamp must be in ascending order. ::: :::info The `ud2x18` function wraps a basic integer to the `UD2x18` value type, which is part of the [PRBMath](https://github.com/PaulRBerg/prb-math) library. ::: ## Invoke the create function With all parameters set, we can now call the `createWithTimestampsLD` function, and assign the id of the newly created stream to a variable: ```solidity streamId = LOCKUP.createWithTimestampsLD(params, segments); ``` ## Full code Below you can see the full code. You can also access the code on GitHub through [this link](https://github.com/sablier-labs/evm-examples/blob/main/lockup/LockupDynamicStreamCreator.sol). {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/LockupDynamicStreamCreator.sol`} --- ## Set Up Your Contract The "Stream Management" series will guide you through how to withdraw, cancel, renounce, and transfer ownership of streams. Before diving in, please note the following: 1. We assume you are already familiar with [creating streams](/guides/lockup/examples/create-stream/lockup-linear). 2. We also assume that the stream management contract is authorized to invoke each respective function. To learn more about access control in Lockup, see the [Access Control](/reference/lockup/access-control) guide. With that said, let's begin. First, declare the Solidity version used to compile the contract: ```solidity // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.22; ``` Import the relevant symbols from `@sablier/core`: ```solidity ``` Create a contract called `StreamManagement` and declare an immutable variable `sablier` of type `ISablierLockup`: ```solidity contract StreamManagement { ISablierLockup public immutable sablier; } ``` Just like in the create stream guides, the next step requires you to head over to the [Deployment Addresses](/guides/lockup/deployments) page and copy the address of the Lockup contract. Then, you can deploy the stream management contract: ```solidity constructor(ISablierLockup sablier_) { sablier = sablier_; } ``` You're all set! You can now move on to the next page, which will teach you how to withdraw from a stream. --- ## Withdraw from Streams :::note This section assumes that you have already gone through the [setup](/guides/lockup/examples/stream-management/setup) part. ::: :::tip See the [Access Control](/reference/lockup/access-control) guide for an overview of who is allowed to withdraw from streams. ::: Withdrawing from streams means claiming the tokens that have become due to the recipient, who has the option to direct the withdrawal to an alternative address of their choice. There are four withdrawal functions: 1. [`withdraw`](/reference/lockup/contracts/contract.SablierLockup#withdraw): withdraws a specific amount of tokens. 2. [`withdrawMax`](/reference/lockup/contracts/contract.SablierLockup#withdrawmax): withdraws the maximum withdrawable amount of tokens. 3. [`withdrawMaxAndTransfer`](/reference/lockup/contracts/contract.SablierLockup#withdrawmaxandtransfer): withdraws the maximum withdrawable amount and transfers the NFT. 4. [`withdrawMultiple`](/reference/lockup/contracts/contract.SablierLockup#withdrawmultiple): withdraws specific amounts of tokens from multiple streams at once. To call any of these functions, you need to have created a stream. If you don't have one yet, go back to the [previous guide](/guides/lockup/examples/create-stream/lockup-linear) and create a stream with a brief duration, assigning the `StreamManagement` contract as the recipient. Then, you can use the `withdraw` function like this: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L20-L22`} In this example, the withdrawal address and withdrawal amount are hard-coded for demonstration purposes. However, in a production environment, these values would likely be adjustable parameters determined by the user. Alternatively, you can use [`withdrawableAmountOf`](/reference/lockup/contracts/contract.SablierLockup#withdrawableamountof) function to determine how much amount of tokens is available to withdraw. In addition to the `withdraw` function, there is the `withdrawMax` function, which you can use to withdraw the maximum withdrawable amount of tokens at the time of invocation: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L25-L27`} What `withdrawMax` does is call the [`withdrawableAmountOf`](/reference/lockup/contracts/contract.SablierLockup#withdrawableamountof) function and pass its value to `withdraw`. Similar to `withdrawMax`, you can use `withdrawMaxAndTransfer` to withdraw the maximum withdrawable tokens and at the same time, transfer the NFT to another address. Lastly, there is the `withdrawMultiple` function, with which you can use to withdraw from multiple streams at once: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L30-L32`} --- ## Cancel Streams :::note This section assumes that you have already gone through the [setup](/guides/lockup/examples/stream-management/setup) part. ::: :::tip See the [Access Control](/reference/lockup/access-control) guide for an overview of who is allowed to cancel streams. ::: Canceling streams involves stopping the flow of tokens before the stream's end time and refunding the remaining funds to the sender. However, the portion that has already been streamed is NOT automatically transferred - the recipient will need to withdraw it. There are two functions that can be used to cancel streams: 1. [`cancel`](/reference/lockup/contracts/contract.SablierLockup#cancel): cancels a single stream 2. [`cancelMultiple`](/reference/lockup/contracts/contract.SablierLockup#cancelmultiple): cancels multiple streams at once To call any of these functions, you need to have created a cancelable stream. If you don't have one yet, go back to the [previous guide](/guides/lockup/examples/create-stream/lockup-linear) and create a stream. Then, you can use the `cancel` function like this: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L39-L41`} In addition to the `cancel` function, there is the `cancelMultiple` function, which allows you to cancel several streams at once: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L44-L46`} --- ## Renounce Streams :::note This section assumes that you have already gone through the [setup](/guides/lockup/examples/stream-management/setup) part. ::: Renouncing a stream means that the sender of the stream will no longer be able to cancel it. This is useful if the sender wants to give up control of the stream. To renounce a stream, you can use [`renounce`](/reference/lockup/contracts/contract.SablierLockup#renounce). Before invoking this function, ensure that you have an active, cancelable stream with the sender set to the `StreamManagement` contract. Once the stream is created, you can use the `renounce` function like this: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L53-L55`} --- ## Transfer Ownership :::note This section assumes that you have already gone through the [setup](/guides/lockup/examples/stream-management/setup) part. ::: :::tip See the [Access Control](/reference/lockup/access-control) guide for an overview of who is allowed to transfer ownership. ::: You may remember from the [NFT](/concepts/nft) guide that every Lockup stream is wrapped in an [ERC-721](https://eips.ethereum.org/EIPS/eip-721) non-fungible token (NFT). One of the key benefits of this design is that the recipient of the stream has the ability to transfer the NFT to a different address, effectively redirecting the streaming of tokens to that new address. To transfer ownership of a stream, it is recommended to invoke the [`withdrawMaxAndTransfer`](/reference/lockup/contracts/contract.SablierLockup#withdrawmaxandtransfer) function, which withdraws all the unclaimed funds to the current recipient prior to transferring ownership to the new recipient: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L72-L74`} The withdrawal will be skipped if there are no unclaimed funds. If you want to transfer ownership without withdrawing the funds, you can use the `IERC721.transferFrom` function: {`https://github.com/sablier-labs/evm-examples/blob/main/lockup/StreamManagement.sol#L67-L69`} :::caution Be careful with `transferFrom`. All remaining funds, including the already streamed portion, will enter into the possession of the new recipient. Consider using `withdrawMaxAndTransfer` instead. ::: Finally, note that in the examples above, the new recipient is hard-coded for demonstration purposes. However, in a production environment, the new recipient would definitely be an adjustable parameter provided by the user. --- ## v1.0(Previous-deployments) # Lockup v1.0 [v2-core]: https://npmjs.com/package/@sablier/v2-core/v/1.0.2 [v2-periphery]: https://npmjs.com/package/@sablier/v2-periphery/v/1.0.3 This section contains the deployment addresses for the v1.0 release of [@sablier/v2-core@1.0.2][v2-core] and [@sablier/v2-periphery@1.0.3][v2-periphery]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Lockup protocol. See the latest version [here](/guides/lockup/deployments). ::: ## Mainnets ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x17Ec73692F0aDf7E7C554822FBEAACB4BE781762`](https://arbiscan.io/address/0x17Ec73692F0aDf7E7C554822FBEAACB4BE781762) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0xA9EfBEf1A35fF80041F567391bdc9813b2D50197`](https://arbiscan.io/address/0xA9EfBEf1A35fF80041F567391bdc9813b2D50197) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x197D655F3be03903fD25e7828c3534504bfe525e`](https://arbiscan.io/address/0x197D655F3be03903fD25e7828c3534504bfe525e) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xc245d6C9608769CeF91C3858e4d2a74802B9f1bB`](https://arbiscan.io/address/0xc245d6C9608769CeF91C3858e4d2a74802B9f1bB) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0xDFa4512d07AbD4eb8Be570Cd79e2e6Fe21ff15C9`](https://arbiscan.io/address/0xDFa4512d07AbD4eb8Be570Cd79e2e6Fe21ff15C9) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0x9aB73CA73c89AF0bdc69642aCeb23CC6A55A514C`](https://arbiscan.io/address/0x9aB73CA73c89AF0bdc69642aCeb23CC6A55A514C) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0xB7185AcAF42C4966fFA3c81486d9ED9633aa4c13`](https://arbiscan.io/address/0xB7185AcAF42C4966fFA3c81486d9ED9633aa4c13) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x90cc23dc3e12e80f27c05b8137b5f0d2b1edfa20`](https://arbiscan.io/address/0x90cc23dc3e12e80f27c05b8137b5f0d2b1edfa20) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x66F5431B0765D984f82A4fc4551b2c9ccF7eAC9C`](https://snowtrace.io/address/0x66F5431B0765D984f82A4fc4551b2c9ccF7eAC9C) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x665d1C8337F1035cfBe13DD94bB669110b975f5F`](https://snowtrace.io/address/0x665d1C8337F1035cfBe13DD94bB669110b975f5F) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x610346E9088AFA70D6B03e96A800B3267E75cA19`](https://snowtrace.io/address/0x610346E9088AFA70D6B03e96A800B3267E75cA19) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xFd050AFA2e04aA0596947DaD3Ec5690162aDc77F`](https://snowtrace.io/address/0xFd050AFA2e04aA0596947DaD3Ec5690162aDc77F) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x7b1ef644ce9a625537e9e0c3d7fef3be667e6159`](https://snowtrace.io/address/0x7b1ef644ce9a625537e9e0c3d7fef3be667e6159) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0x17167A7e2763121e263B4331B700a1BF9113b387`](https://snowtrace.io/address/0x17167A7e2763121e263B4331B700a1BF9113b387) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x48B4889cf5d6f8360050f9d7606505F1433120BC`](https://snowtrace.io/address/0x48B4889cf5d6f8360050f9d7606505F1433120BC) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x817fE1364A9d57d1fB951945B53942234163Ef10`](https://snowtrace.io/address/0x817fE1364A9d57d1fB951945B53942234163Ef10) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x7Faaedd40B1385C118cA7432952D9DC6b5CbC49e`](https://basescan.org/address/0x7Faaedd40B1385C118cA7432952D9DC6b5CbC49e) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x645B00960Dc352e699F89a81Fc845C0C645231cf`](https://basescan.org/address/0x645B00960Dc352e699F89a81Fc845C0C645231cf) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x6b9a46C8377f21517E65fa3899b3A9Fab19D17f5`](https://basescan.org/address/0x6b9a46C8377f21517E65fa3899b3A9Fab19D17f5) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xEFc2896c29F70bc23e82892Df827d4e2259028Fd`](https://basescan.org/address/0xEFc2896c29F70bc23e82892Df827d4e2259028Fd) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x1C5Ac71dd48c7ff291743e5E6e3689ba92F73cC6`](https://basescan.org/address/0x1C5Ac71dd48c7ff291743e5E6e3689ba92F73cC6) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0x50E8B9dC7F28e5cA9253759455C1077e497c4232`](https://basescan.org/address/0x50E8B9dC7F28e5cA9253759455C1077e497c4232) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x0648C80b969501c7778b6ff3ba47aBb78fEeDF39`](https://basescan.org/address/0x0648C80b969501c7778b6ff3ba47aBb78fEeDF39) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0xf19576Ab425753816eCbF98aca8132A0f693aEc5`](https://basescan.org/address/0xf19576Ab425753816eCbF98aca8132A0f693aEc5) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x33511f69A784Fd958E6713aCaC7c9dCF1A5578E8`](https://bscscan.com/address/0x33511f69A784Fd958E6713aCaC7c9dCF1A5578E8) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0xF2f3feF2454DcA59ECA929D2D8cD2a8669Cc6214`](https://bscscan.com/address/0xF2f3feF2454DcA59ECA929D2D8cD2a8669Cc6214) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x3FE4333f62A75c2a85C8211c6AeFd1b9Bfde6e51`](https://bscscan.com/address/0x3FE4333f62A75c2a85C8211c6AeFd1b9Bfde6e51) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0x3daD1bF57edCFF979Fb68a802AC54c5AAfB78F4c`](https://bscscan.com/address/0x3daD1bF57edCFF979Fb68a802AC54c5AAfB78F4c) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0xeDe48EB173A869c0b27Cb98CC56d00BC391e5887`](https://bscscan.com/address/0xeDe48EB173A869c0b27Cb98CC56d00BC391e5887) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0xC43b2d8CedB71df30F45dFd9a21eC1E50A813bD6`](https://bscscan.com/address/0xC43b2d8CedB71df30F45dFd9a21eC1E50A813bD6) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x135e78B8E17B1d189Af75FcfCC018ab2E6c7b879`](https://bscscan.com/address/0x135e78B8E17B1d189Af75FcfCC018ab2E6c7b879) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0xc9bf2A6bD467A813908d836c1506efE61E465761`](https://bscscan.com/address/0xc9bf2A6bD467A813908d836c1506efE61E465761) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xC3Be6BffAeab7B297c03383B4254aa3Af2b9a5BA`](https://etherscan.io/address/0xC3Be6BffAeab7B297c03383B4254aa3Af2b9a5BA) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x39EFdC3dbB57B2388CcC4bb40aC4CB1226Bc9E44`](https://etherscan.io/address/0x39EFdC3dbB57B2388CcC4bb40aC4CB1226Bc9E44) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0xB10daee1FCF62243aE27776D7a92D39dC8740f95`](https://etherscan.io/address/0xB10daee1FCF62243aE27776D7a92D39dC8740f95) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0x98F2196fECc01C240d1429B624d007Ca268EEA29`](https://etherscan.io/address/0x98F2196fECc01C240d1429B624d007Ca268EEA29) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x0Be20a8242B0781B6fd4d453e90DCC1CcF7DBcc6`](https://etherscan.io/address/0x0Be20a8242B0781B6fd4d453e90DCC1CcF7DBcc6) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0x9bdebF4F9adEB99387f46e4020FBf3dDa885D2b8`](https://etherscan.io/address/0x9bdebF4F9adEB99387f46e4020FBf3dDa885D2b8) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x297b43aE44660cA7826ef92D8353324C018573Ef`](https://etherscan.io/address/0x297b43aE44660cA7826ef92D8353324C018573Ef) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x638a7aC8315767cEAfc57a6f5e3559454347C3f6`](https://etherscan.io/address/0x638a7aC8315767cEAfc57a6f5e3559454347C3f6) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x73962c44c0fB4cC5e4545FB91732a5c5e87F55C2`](https://gnosisscan.io/address/0x73962c44c0fB4cC5e4545FB91732a5c5e87F55C2) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0xeb148E4ec13aaA65328c0BA089a278138E9E53F9`](https://gnosisscan.io/address/0xeb148E4ec13aaA65328c0BA089a278138E9E53F9) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x685E92c9cA2bB23f1B596d0a7D749c0603e88585`](https://gnosisscan.io/address/0x685E92c9cA2bB23f1B596d0a7D749c0603e88585) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0x8CE9Cd651e03325Cf6D4Ce9cfa74BE79CDf6d530`](https://gnosisscan.io/address/0x8CE9Cd651e03325Cf6D4Ce9cfa74BE79CDf6d530) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0xF4A6F47Da7c6b26b6Dd774671aABA48fb4bFE309`](https://gnosisscan.io/address/0xF4A6F47Da7c6b26b6Dd774671aABA48fb4bFE309) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0xc84f0e95815A576171A19EB9E0fA55a217Ab1536`](https://gnosisscan.io/address/0xc84f0e95815A576171A19EB9E0fA55a217Ab1536) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x5B144C3B9C8cfd48297Aeb59B90a024Ef3fCcE92`](https://gnosisscan.io/address/0x5B144C3B9C8cfd48297Aeb59B90a024Ef3fCcE92) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x89AfE038714e547C29Fa881029DD4B5CFB008454`](https://gnosisscan.io/address/0x89AfE038714e547C29Fa881029DD4B5CFB008454) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x1EECb6e6EaE6a1eD1CCB4323F3a146A7C5443A10`](https://optimistic.etherscan.io/address/0x1EECb6e6EaE6a1eD1CCB4323F3a146A7C5443A10) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x6f68516c21E248cdDfaf4898e66b2b0Adee0e0d6`](https://optimistic.etherscan.io/address/0x6f68516c21E248cdDfaf4898e66b2b0Adee0e0d6) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0xB923aBdCA17Aed90EB5EC5E407bd37164f632bFD`](https://optimistic.etherscan.io/address/0xB923aBdCA17Aed90EB5EC5E407bd37164f632bFD) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xe0138C596939CC0D2382046795bC163ad5755e0E`](https://optimistic.etherscan.io/address/0xe0138C596939CC0D2382046795bC163ad5755e0E) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x9A09eC6f991386718854aDDCEe68647776Befd5b`](https://optimistic.etherscan.io/address/0x9A09eC6f991386718854aDDCEe68647776Befd5b) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0x77C8516B1F327890C956bb38F93Ac2d6B24795Ea`](https://optimistic.etherscan.io/address/0x77C8516B1F327890C956bb38F93Ac2d6B24795Ea) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x194ed7D6005C8ba4084A948406545DF299ad37cD`](https://optimistic.etherscan.io/address/0x194ed7D6005C8ba4084A948406545DF299ad37cD) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x8a6974c162fdc7Cb67996F7dB8bAAFb9a99566e0`](https://optimistic.etherscan.io/address/0x8a6974c162fdc7Cb67996F7dB8bAAFb9a99566e0) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x9761692EDf10F5F2A69f0150e2fd50dcecf05F2E`](https://polygonscan.com/address/0x9761692EDf10F5F2A69f0150e2fd50dcecf05F2E) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x7313AdDb53f96a4f710D3b91645c62B434190725`](https://polygonscan.com/address/0x7313AdDb53f96a4f710D3b91645c62B434190725) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x67422C3E36A908D5C3237e9cFfEB40bDE7060f6E`](https://polygonscan.com/address/0x67422C3E36A908D5C3237e9cFfEB40bDE7060f6E) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xA820946EaAceB2a85aF123f706f23192c28bC6B9`](https://polygonscan.com/address/0xA820946EaAceB2a85aF123f706f23192c28bC6B9) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0xA2f5B2e798e7ADd59d85d9b76645E6AC13fC4e1f`](https://polygonscan.com/address/0xA2f5B2e798e7ADd59d85d9b76645E6AC13fC4e1f) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0xBe4cad0e99865CC62787Ecf029aD9DD4815d3d2e`](https://polygonscan.com/address/0xBe4cad0e99865CC62787Ecf029aD9DD4815d3d2e) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x576743075fc5F771bbC1376c3267A6185Af9D62B`](https://polygonscan.com/address/0x576743075fc5F771bbC1376c3267A6185Af9D62B) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0xccA6dd77bA2cfcccEdA01A82CB309e2A17901682`](https://polygonscan.com/address/0xccA6dd77bA2cfcccEdA01A82CB309e2A17901682) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x859708495E3B3c61Bbe19e6E3E1F41dE3A5C5C5b`](https://scrollscan.com/address/0x859708495E3B3c61Bbe19e6E3E1F41dE3A5C5C5b) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0xde6a30D851eFD0Fc2a9C922F294801Cfd5FCB3A1`](https://scrollscan.com/address/0xde6a30D851eFD0Fc2a9C922F294801Cfd5FCB3A1) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0x80640ca758615ee83801EC43452feEA09a202D33`](https://scrollscan.com/address/0x80640ca758615ee83801EC43452feEA09a202D33) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xC1fa624733203F2B7185c3724039C4D5E5234fE4`](https://scrollscan.com/address/0xC1fa624733203F2B7185c3724039C4D5E5234fE4) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x94A18AC6e4B7d97E31f1587f6a666Dc5503086c3`](https://scrollscan.com/address/0x94A18AC6e4B7d97E31f1587f6a666Dc5503086c3) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0xED1591BD6038032a74D786A452A23536b3201490`](https://scrollscan.com/address/0xED1591BD6038032a74D786A452A23536b3201490) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x91154fc80933D25793E6B4D7CE19fb51dE6794B7`](https://scrollscan.com/address/0x91154fc80933D25793E6B4D7CE19fb51dE6794B7) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x71CeA9c4d15fed2E58785cE0C05165CE34313A74`](https://scrollscan.com/address/0x71CeA9c4d15fed2E58785cE0C05165CE34313A74) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xA6A0cfA3442053fbB516D55205A749Ef2D33aed9`](https://sepolia.arbiscan.io/address/0xA6A0cfA3442053fbB516D55205A749Ef2D33aed9) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x7938c18a59FaD2bA11426AcfBe8d74F0F598a4D2`](https://sepolia.arbiscan.io/address/0x7938c18a59FaD2bA11426AcfBe8d74F0F598a4D2) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0xa3e36b51B7A456812c92253780f4B15bad56e34c`](https://sepolia.arbiscan.io/address/0xa3e36b51B7A456812c92253780f4B15bad56e34c) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0xEe93BFf599C17C6fF8e31F2De6c3e40bd5e51312`](https://sepolia.arbiscan.io/address/0xEe93BFf599C17C6fF8e31F2De6c3e40bd5e51312) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x2C8fA48361C7D48Dc21b27a3D549402Cf8AE16B0`](https://sepolia.arbiscan.io/address/0x2C8fA48361C7D48Dc21b27a3D549402Cf8AE16B0) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0x7D310803c3824636bAff74e4f80e81ece167c440`](https://sepolia.arbiscan.io/address/0x7D310803c3824636bAff74e4f80e81ece167c440) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x396A3a169918A4C0B339ECf86C583f46D696254E`](https://sepolia.arbiscan.io/address/0x396A3a169918A4C0B339ECf86C583f46D696254E) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x2006d43E65e66C5FF20254836E63947FA8bAaD68`](https://sepolia.etherscan.io/address/0x2006d43E65e66C5FF20254836E63947FA8bAaD68) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupDynamic | [`0x421e1E7a53FF360f70A2D02037Ee394FA474e035`](https://sepolia.etherscan.io/address/0x421e1E7a53FF360f70A2D02037Ee394FA474e035) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2LockupLinear | [`0xd4300c5bc0b9e27c73ebabdc747ba990b1b570db`](https://sepolia.etherscan.io/address/0xd4300c5bc0b9e27c73ebabdc747ba990b1b570db) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2NFTDescriptor | [`0x3cb51943EbcEA05B23C35c50491B3d296FF675db`](https://sepolia.etherscan.io/address/0x3cb51943EbcEA05B23C35c50491B3d296FF675db) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2Archive | [`0x83495d8DF6221f566232e1353a6e7231A86C61fF`](https://sepolia.etherscan.io/address/0x83495d8DF6221f566232e1353a6e7231A86C61fF) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyPlugin | [`0xa333c8233CfD04740E64AB4fd5447995E357561B`](https://sepolia.etherscan.io/address/0xa333c8233CfD04740E64AB4fd5447995E357561B) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTarget | [`0x5091900B7cF803a7407FCE6333A6bAE4aA779Fd4`](https://sepolia.etherscan.io/address/0x5091900B7cF803a7407FCE6333A6bAE4aA779Fd4) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | | SablierV2ProxyTargetApprove | [`0x105E7728C5706Ad41d194EbDc7873B047352F3d2`](https://sepolia.etherscan.io/address/0x105E7728C5706Ad41d194EbDc7873B047352F3d2) | [`lockup-v1.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.0) | --- ## v1.1(Previous-deployments) # Lockup v1.1 [v2-core]: https://npmjs.com/package/@sablier/v2-core/v/1.1.2 [v2-periphery]: https://npmjs.com/package/@sablier/v2-periphery/v/1.1.1 This section contains the deployment addresses for the v1.1 release of [@sablier/v2-core@1.1.2][v2-core] and [@sablier/v2-periphery@1.1.1][v2-periphery]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Lockup protocol. See the latest version [here](/guides/lockup/deployments). ::: ## Mainnets ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x17Ec73692F0aDf7E7C554822FBEAACB4BE781762`](https://arbiscan.io/address/0x17Ec73692F0aDf7E7C554822FBEAACB4BE781762) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xf390cE6f54e4dc7C5A5f7f8689062b7591F7111d`](https://arbiscan.io/address/0xf390cE6f54e4dc7C5A5f7f8689062b7591F7111d) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xFDD9d122B451F549f48c4942c6fa6646D849e8C1`](https://arbiscan.io/address/0xFDD9d122B451F549f48c4942c6fa6646D849e8C1) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x2fb103fC853b2F5022a840091ab1cDf5172E7cfa`](https://arbiscan.io/address/0x2fb103fC853b2F5022a840091ab1cDf5172E7cfa) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xAFd1434296e29a0711E24014656158055F00784c`](https://arbiscan.io/address/0xAFd1434296e29a0711E24014656158055F00784c) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x237400eF5a41886a75B0e036228221Df075b3B80`](https://arbiscan.io/address/0x237400eF5a41886a75B0e036228221Df075b3B80) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x66F5431B0765D984f82A4fc4551b2c9ccF7eAC9C`](https://snowtrace.io/address/0x66F5431B0765D984f82A4fc4551b2c9ccF7eAC9C) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x0310Da0D8fF141166eD47548f00c96464880781F`](https://snowtrace.io/address/0x0310Da0D8fF141166eD47548f00c96464880781F) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xB24B65E015620455bB41deAAd4e1902f1Be9805f`](https://snowtrace.io/address/0xB24B65E015620455bB41deAAd4e1902f1Be9805f) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xaBEdCf46c5D1d8eD8B9a487144189887695835DC`](https://snowtrace.io/address/0xaBEdCf46c5D1d8eD8B9a487144189887695835DC) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x68f156E5fa8C23D65B33aBEbbA50e0CA3626F741`](https://snowtrace.io/address/0x68f156E5fa8C23D65B33aBEbbA50e0CA3626F741) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x4849e797d7Aab20FCC8f807EfafDffF98A83412E`](https://snowtrace.io/address/0x4849e797d7Aab20FCC8f807EfafDffF98A83412E) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x7Faaedd40B1385C118cA7432952D9DC6b5CbC49e`](https://basescan.org/address/0x7Faaedd40B1385C118cA7432952D9DC6b5CbC49e) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x461E13056a3a3265CEF4c593F01b2e960755dE91`](https://basescan.org/address/0x461E13056a3a3265CEF4c593F01b2e960755dE91) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xFCF737582d167c7D20A336532eb8BCcA8CF8e350`](https://basescan.org/address/0xFCF737582d167c7D20A336532eb8BCcA8CF8e350) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x67e0a126b695DBA35128860cd61926B90C420Ceb`](https://basescan.org/address/0x67e0a126b695DBA35128860cd61926B90C420Ceb) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x94E596EEd73b4e3171c067f05A87AB0268cA993c`](https://basescan.org/address/0x94E596EEd73b4e3171c067f05A87AB0268cA993c) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x5545c8E7c3E1F74aDc98e518F2E8D23A002C4412`](https://basescan.org/address/0x5545c8E7c3E1F74aDc98e518F2E8D23A002C4412) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x2De92156000269fa2fde7544F10f01E8cBC80fFa`](https://blastscan.io/address/0x2De92156000269fa2fde7544F10f01E8cBC80fFa) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xDf578C2c70A86945999c65961417057363530a1c`](https://blastscan.io/address/0xDf578C2c70A86945999c65961417057363530a1c) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xcb099EfC90e88690e287259410B9AE63e1658CC6`](https://blastscan.io/address/0xcb099EfC90e88690e287259410B9AE63e1658CC6) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2`](https://blastscan.io/address/0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264`](https://blastscan.io/address/0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a`](https://blastscan.io/address/0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x33511f69A784Fd958E6713aCaC7c9dCF1A5578E8`](https://bscscan.com/address/0x33511f69A784Fd958E6713aCaC7c9dCF1A5578E8) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xf900c5E3aA95B59Cc976e6bc9c0998618729a5fa`](https://bscscan.com/address/0xf900c5E3aA95B59Cc976e6bc9c0998618729a5fa) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x14c35E126d75234a90c9fb185BF8ad3eDB6A90D2`](https://bscscan.com/address/0x14c35E126d75234a90c9fb185BF8ad3eDB6A90D2) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xEcAfcF09c23057210cB6470eB5D0FD8Bafd1755F`](https://bscscan.com/address/0xEcAfcF09c23057210cB6470eB5D0FD8Bafd1755F) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x2E30a2ae6565Db78C06C28dE937F668597c80a1c`](https://bscscan.com/address/0x2E30a2ae6565Db78C06C28dE937F668597c80a1c) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x434D73465aAc4125d204A6637eB6C579d8D69f48`](https://bscscan.com/address/0x434D73465aAc4125d204A6637eB6C579d8D69f48) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xC3Be6BffAeab7B297c03383B4254aa3Af2b9a5BA`](https://etherscan.io/address/0xC3Be6BffAeab7B297c03383B4254aa3Af2b9a5BA) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x7CC7e125d83A581ff438608490Cc0f7bDff79127`](https://etherscan.io/address/0x7CC7e125d83A581ff438608490Cc0f7bDff79127) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xAFb979d9afAd1aD27C5eFf4E27226E3AB9e5dCC9`](https://etherscan.io/address/0xAFb979d9afAd1aD27C5eFf4E27226E3AB9e5dCC9) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x23eD5DA55AF4286c0dE55fAcb414dEE2e317F4CB`](https://etherscan.io/address/0x23eD5DA55AF4286c0dE55fAcb414dEE2e317F4CB) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xEa07DdBBeA804E7fe66b958329F8Fa5cDA95Bd55`](https://etherscan.io/address/0xEa07DdBBeA804E7fe66b958329F8Fa5cDA95Bd55) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x1A272b596b10f02931480BC7a3617db4a8d154E3`](https://etherscan.io/address/0x1A272b596b10f02931480BC7a3617db4a8d154E3) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x73962c44c0fB4cC5e4545FB91732a5c5e87F55C2`](https://gnosisscan.io/address/0x73962c44c0fB4cC5e4545FB91732a5c5e87F55C2) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x1DF83C7682080B0f0c26a20C6C9CB8623e0Df24E`](https://gnosisscan.io/address/0x1DF83C7682080B0f0c26a20C6C9CB8623e0Df24E) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xce49854a647a1723e8Fb7CC3D190CAB29A44aB48`](https://gnosisscan.io/address/0xce49854a647a1723e8Fb7CC3D190CAB29A44aB48) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x01dbFE22205d8B109959e2Be02d0095379309eed`](https://gnosisscan.io/address/0x01dbFE22205d8B109959e2Be02d0095379309eed) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xBd9DDbC55B85FF6Dc0b76E9EFdCd2547Ab482501`](https://gnosisscan.io/address/0xBd9DDbC55B85FF6Dc0b76E9EFdCd2547Ab482501) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x777F66477FF83aBabADf39a3F22A8CC3AEE43765`](https://gnosisscan.io/address/0x777F66477FF83aBabADf39a3F22A8CC3AEE43765) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xb568f9Bc0dcE39B9B64e843bC19DA102B5E3E939`](https://phoenix.lightlink.io/address/0xb568f9Bc0dcE39B9B64e843bC19DA102B5E3E939) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x49d753422ff05daa291A9efa383E4f57daEAd889`](https://phoenix.lightlink.io/address/0x49d753422ff05daa291A9efa383E4f57daEAd889) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x17c4f98c40e69a6A0D5c42B11E3733f076A99E20`](https://phoenix.lightlink.io/address/0x17c4f98c40e69a6A0D5c42B11E3733f076A99E20) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xda55fB3E53b7d205e37B6bdCe990b789255e4302`](https://phoenix.lightlink.io/address/0xda55fB3E53b7d205e37B6bdCe990b789255e4302) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x3eb9F8f80354a157315Fce64990C554434690c2f`](https://phoenix.lightlink.io/address/0x3eb9F8f80354a157315Fce64990C554434690c2f) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xdB07a1749D5Ca49909C7C4159652Fbd527c735B8`](https://phoenix.lightlink.io/address/0xdB07a1749D5Ca49909C7C4159652Fbd527c735B8) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x1EECb6e6EaE6a1eD1CCB4323F3a146A7C5443A10`](https://optimistic.etherscan.io/address/0x1EECb6e6EaE6a1eD1CCB4323F3a146A7C5443A10) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xd6920c1094eABC4b71f3dC411A1566f64f4c206e`](https://optimistic.etherscan.io/address/0xd6920c1094eABC4b71f3dC411A1566f64f4c206e) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x4b45090152a5731b5bc71b5baF71E60e05B33867`](https://optimistic.etherscan.io/address/0x4b45090152a5731b5bc71b5baF71E60e05B33867) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xF5050c04425E639C647F5ED632218b16ce96694d`](https://optimistic.etherscan.io/address/0xF5050c04425E639C647F5ED632218b16ce96694d) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x8145429538dDBdDc4099B2bAfd24DD8958fa03b8`](https://optimistic.etherscan.io/address/0x8145429538dDBdDc4099B2bAfd24DD8958fa03b8) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x044EC80FbeC40f0eE7E7b3856828170971796C19`](https://optimistic.etherscan.io/address/0x044EC80FbeC40f0eE7E7b3856828170971796C19) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x9761692EDf10F5F2A69f0150e2fd50dcecf05F2E`](https://polygonscan.com/address/0x9761692EDf10F5F2A69f0150e2fd50dcecf05F2E) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xB194c7278C627D52E440316b74C5F24FC70c1565`](https://polygonscan.com/address/0xB194c7278C627D52E440316b74C5F24FC70c1565) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x5f0e1dea4A635976ef51eC2a2ED41490d1eBa003`](https://polygonscan.com/address/0x5f0e1dea4A635976ef51eC2a2ED41490d1eBa003) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x8683da9DF8c5c3528e8251a5764EC7DAc7264795`](https://polygonscan.com/address/0x8683da9DF8c5c3528e8251a5764EC7DAc7264795) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x5865C73789C4496665eDE1CAF018dc52ac248598`](https://polygonscan.com/address/0x5865C73789C4496665eDE1CAF018dc52ac248598) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xF4906225e783fb8977410BDBFb960caBed6C2EF4`](https://polygonscan.com/address/0xF4906225e783fb8977410BDBFb960caBed6C2EF4) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x859708495E3B3c61Bbe19e6E3E1F41dE3A5C5C5b`](https://scrollscan.com/address/0x859708495E3B3c61Bbe19e6E3E1F41dE3A5C5C5b) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xAaff2D11f9e7Cd2A9cDC674931fAC0358a165995`](https://scrollscan.com/address/0xAaff2D11f9e7Cd2A9cDC674931fAC0358a165995) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x57e14AB4DAd920548899d86B54AD47Ea27F00987`](https://scrollscan.com/address/0x57e14AB4DAd920548899d86B54AD47Ea27F00987) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xB71440B85172332E8B768e85EdBfdb34CB457c1c`](https://scrollscan.com/address/0xB71440B85172332E8B768e85EdBfdb34CB457c1c) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xD18faa233E02d41EDFFdb64f20281dE0592FA3b5`](https://scrollscan.com/address/0xD18faa233E02d41EDFFdb64f20281dE0592FA3b5) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xb3ade5463000E6c0D376e7d7570f372eBf98BDAf`](https://scrollscan.com/address/0xb3ade5463000E6c0D376e7d7570f372eBf98BDAf) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xD05bdb4cF6Be7D647c5FEcC7952660bdD82cE44C`](https://era.zksync.network//address/0xD05bdb4cF6Be7D647c5FEcC7952660bdD82cE44C) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xE6c7324BEA8474209103e407779Eec600c07cF3F`](https://era.zksync.network//address/0xE6c7324BEA8474209103e407779Eec600c07cF3F) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x2FcA69fa0a318EFDf4c15eE8F13A873347a8A8D4`](https://era.zksync.network//address/0x2FcA69fa0a318EFDf4c15eE8F13A873347a8A8D4) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xf12d2B8ff4Fc0495Db9c6d16b6a03bff9a10657A`](https://era.zksync.network//address/0xf12d2B8ff4Fc0495Db9c6d16b6a03bff9a10657A) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x37A20Fb12DD6e0ADA47B327C0466A231dDc4504A`](https://era.zksync.network//address/0x37A20Fb12DD6e0ADA47B327C0466A231dDc4504A) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x46DE683D20c3575A0381fFd66C10Ab6836390140`](https://era.zksync.network//address/0x46DE683D20c3575A0381fFd66C10Ab6836390140) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xA6A0cfA3442053fbB516D55205A749Ef2D33aed9`](https://sepolia.arbiscan.io/address/0xA6A0cfA3442053fbB516D55205A749Ef2D33aed9) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x8c8102b92B1f31cC304A085D490796f4DfdF7aF3`](https://sepolia.arbiscan.io/address/0x8c8102b92B1f31cC304A085D490796f4DfdF7aF3) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x483bdd560dE53DC20f72dC66ACdB622C5075de34`](https://sepolia.arbiscan.io/address/0x483bdd560dE53DC20f72dC66ACdB622C5075de34) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x593050f0360518C3A4F11c32Eb936146e1096FD1`](https://sepolia.arbiscan.io/address/0x593050f0360518C3A4F11c32Eb936146e1096FD1) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x72D921E579aB7FC5D19CD398B6be24d626Ccb6e7`](https://sepolia.arbiscan.io/address/0x72D921E579aB7FC5D19CD398B6be24d626Ccb6e7) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xcc87b1A4de285832f226BD585bd54a2184D32105`](https://sepolia.arbiscan.io/address/0xcc87b1A4de285832f226BD585bd54a2184D32105) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x90b1C663314cFb55c8FF6f9a50a8D57a2D83a664`](https://sepolia.basescan.org/address/0x90b1C663314cFb55c8FF6f9a50a8D57a2D83a664) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xF46d5fA9bFC964E8d06846c8739AEc69BC06344d`](https://sepolia.basescan.org/address/0xF46d5fA9bFC964E8d06846c8739AEc69BC06344d) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xbd7AAA2984c0a887E93c66baae222749883763d3`](https://sepolia.basescan.org/address/0xbd7AAA2984c0a887E93c66baae222749883763d3) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xb2b4b1E69B16411AEBD30c8EA5aB395E13069160`](https://sepolia.basescan.org/address/0xb2b4b1E69B16411AEBD30c8EA5aB395E13069160) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xbD636B8EF09760aC91f6Df3c6AC5531250420200`](https://sepolia.basescan.org/address/0xbD636B8EF09760aC91f6Df3c6AC5531250420200) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xf632521bbAb0dBC2bEf169865e6c8e285AFe0a42`](https://sepolia.basescan.org/address/0xf632521bbAb0dBC2bEf169865e6c8e285AFe0a42) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Blast Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x9e216126115AFcdA9531232D3B735731905B4DC4`](https://sepolia.blastscan.io/address/0x9e216126115AFcdA9531232D3B735731905B4DC4) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0x8aB55a8E046634D5AD87f64d65C1E96275e48712`](https://sepolia.blastscan.io/address/0x8aB55a8E046634D5AD87f64d65C1E96275e48712) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xe31Ac61c7762930625D4700D7ea9282B7E57b816`](https://sepolia.blastscan.io/address/0xe31Ac61c7762930625D4700D7ea9282B7E57b816) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x1e7217Aa198A17F79cc45aB5C90277Ff1d18b5DB`](https://sepolia.blastscan.io/address/0x1e7217Aa198A17F79cc45aB5C90277Ff1d18b5DB) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x72D91DB141fd38eD5DDc0D4b00BdDd2A17Cf6D55`](https://sepolia.blastscan.io/address/0x72D91DB141fd38eD5DDc0D4b00BdDd2A17Cf6D55) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x6F147f9A251A1F004A1d043b8E486aAb00A49cef`](https://sepolia.blastscan.io/address/0x6F147f9A251A1F004A1d043b8E486aAb00A49cef) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x6587166c4F4E0b6203549463EbAB4dBeFA63fd8f`](https://optimism-sepolia.blockscout.com/address/0x6587166c4F4E0b6203549463EbAB4dBeFA63fd8f) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xf9e4095C1dfC058B34135C5c48cae66a8D2b3Aa5`](https://optimism-sepolia.blockscout.com/address/0xf9e4095C1dfC058B34135C5c48cae66a8D2b3Aa5) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xe59D28bEF2D37E99b93E734ed1dDcFc4B9C1bf73`](https://optimism-sepolia.blockscout.com/address/0xe59D28bEF2D37E99b93E734ed1dDcFc4B9C1bf73) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0x3590f54c5d3d83BA68c17cF5C28DB89C5d1DfA10`](https://optimism-sepolia.blockscout.com/address/0x3590f54c5d3d83BA68c17cF5C28DB89C5d1DfA10) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x65D3A5b99372ef59E741EE768443dF884aB56E0b`](https://optimism-sepolia.blockscout.com/address/0x65D3A5b99372ef59E741EE768443dF884aB56E0b) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x9b6cC73522f22Ad3f2F8187e892A51b95f1A0E8a`](https://optimism-sepolia.blockscout.com/address/0x9b6cC73522f22Ad3f2F8187e892A51b95f1A0E8a) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x2006d43E65e66C5FF20254836E63947FA8bAaD68`](https://sepolia.etherscan.io/address/0x2006d43E65e66C5FF20254836E63947FA8bAaD68) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xc9940AD8F43aAD8e8f33A4D5dbBf0a8F7FF4429A`](https://sepolia.etherscan.io/address/0xc9940AD8F43aAD8e8f33A4D5dbBf0a8F7FF4429A) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0x7a43F8a888fa15e68C103E18b0439Eb1e98E4301`](https://sepolia.etherscan.io/address/0x7a43F8a888fa15e68C103E18b0439Eb1e98E4301) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xE8fFEbA8963CD9302ffD39c704dc2c027128D36F`](https://sepolia.etherscan.io/address/0xE8fFEbA8963CD9302ffD39c704dc2c027128D36F) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xd2569DC4A58dfE85d807Dffb976dbC0a3bf0B0Fb`](https://sepolia.etherscan.io/address/0xd2569DC4A58dfE85d807Dffb976dbC0a3bf0B0Fb) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xBacC1d151A78eeD71D504f701c25E8739DC0262D`](https://sepolia.etherscan.io/address/0xBacC1d151A78eeD71D504f701c25E8739DC0262D) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### Taiko Hekla | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0x2De92156000269fa2fde7544F10f01E8cBC80fFa`](https://hekla.taikoscan.network/address/0x2De92156000269fa2fde7544F10f01E8cBC80fFa) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xDf578C2c70A86945999c65961417057363530a1c`](https://hekla.taikoscan.network/address/0xDf578C2c70A86945999c65961417057363530a1c) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xcb099EfC90e88690e287259410B9AE63e1658CC6`](https://hekla.taikoscan.network/address/0xcb099EfC90e88690e287259410B9AE63e1658CC6) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2`](https://hekla.taikoscan.network/address/0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0xd641a0E4509Cced67cC24E7BDcDe2a31b7F7cF77`](https://hekla.taikoscan.network/address/0xd641a0E4509Cced67cC24E7BDcDe2a31b7F7cF77) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0x29a8d9F67608d77D0B4544A70FC2ab80BA5525f5`](https://hekla.taikoscan.network/address/0x29a8d9F67608d77D0B4544A70FC2ab80BA5525f5) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | ### ZKsync Sepolia Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2Comptroller | [`0xEB4570723ae207a0473D73B3c2B255b0D5Ec9f01`](https://sepolia-era.zksync.network//address/0xEB4570723ae207a0473D73B3c2B255b0D5Ec9f01) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupDynamic | [`0xe101C69A6f9c071Ab79aEE0be56928565962F56d`](https://sepolia-era.zksync.network//address/0xe101C69A6f9c071Ab79aEE0be56928565962F56d) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2LockupLinear | [`0xdFC6F5D327dcF5DB579eC1b47fb260F93e042409`](https://sepolia-era.zksync.network//address/0xdFC6F5D327dcF5DB579eC1b47fb260F93e042409) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2NFTDescriptor | [`0xABF4a24519c9A3c68a354FD6d5D4429De0A0D36C`](https://sepolia-era.zksync.network//address/0xABF4a24519c9A3c68a354FD6d5D4429De0A0D36C) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2Batch | [`0x5F812F1332A2294149b9e1cBd216a5eED12cEbDD`](https://sepolia-era.zksync.network//address/0x5F812F1332A2294149b9e1cBd216a5eED12cEbDD) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | | SablierV2MerkleStreamerFactory | [`0xd9a834135c816FFd133a411a36219aAFD190fF97`](https://sepolia-era.zksync.network//address/0xd9a834135c816FFd133a411a36219aAFD190fF97) | [`lockup-v1.1`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.1) | --- ## v1.2 # Lockup v1.2 [v2-core]: https://npmjs.com/package/@sablier/v2-core/v/1.2.0 [v2-periphery]: https://npmjs.com/package/@sablier/v2-periphery/v/1.2.0 This section contains the deployment addresses for the v1.2 release of [@sablier/v2-core@1.2.0][v2-core] and [@sablier/v2-periphery@1.2.0][v2-periphery]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Lockup protocol. See the latest version [here](/guides/lockup/deployments). ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xc69c06c030E825EDE13F1486078Aa9a2E2AAffaf`](https://abscan.org/address/0xc69c06c030E825EDE13F1486078Aa9a2E2AAffaf) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x7282d83E49363f373102d195F66649eBD6C57B9B`](https://abscan.org/address/0x7282d83E49363f373102d195F66649eBD6C57B9B) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x28fCAE6bda2546C93183EeC8638691B2EB184003`](https://abscan.org/address/0x28fCAE6bda2546C93183EeC8638691B2EB184003) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xAc2E42b520364940c90Ce164412Ca9BA212d014B`](https://abscan.org/address/0xAc2E42b520364940c90Ce164412Ca9BA212d014B) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x2F1eB117A87217E8bE9AA96795F69c9e380686Db`](https://abscan.org/address/0x2F1eB117A87217E8bE9AA96795F69c9e380686Db) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xe2C0C3e0ff10Df4485a2dcbbdd1D002a40446164`](https://abscan.org/address/0xe2C0C3e0ff10Df4485a2dcbbdd1D002a40446164) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x53F5eEB133B99C6e59108F35bCC7a116da50c5ce`](https://arbiscan.io/address/0x53F5eEB133B99C6e59108F35bCC7a116da50c5ce) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x05a323a4C936fed6D02134c5f0877215CD186b51`](https://arbiscan.io/address/0x05a323a4C936fed6D02134c5f0877215CD186b51) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x0dA2c7Aa93E7CD43e6b8D043Aab5b85CfDDf3818`](https://arbiscan.io/address/0x0dA2c7Aa93E7CD43e6b8D043Aab5b85CfDDf3818) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xacA12cdC4DcD7063c82E69A358549ba082463608`](https://arbiscan.io/address/0xacA12cdC4DcD7063c82E69A358549ba082463608) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x785Edf1e617824A78EFE76295E040B1AE06002bf`](https://arbiscan.io/address/0x785Edf1e617824A78EFE76295E040B1AE06002bf) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xc9A5a0Bc2D8E217BDbdFE7486E9E72c5c3308F01`](https://arbiscan.io/address/0xc9A5a0Bc2D8E217BDbdFE7486E9E72c5c3308F01) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xE3826241E5EeBB3F5fEde33F9f677047674D3FBF`](https://snowtrace.io/address/0xE3826241E5EeBB3F5fEde33F9f677047674D3FBF) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xc0bF14AfB95CA4C049BDc19E06a3531D8065F6Fd`](https://snowtrace.io/address/0xc0bF14AfB95CA4C049BDc19E06a3531D8065F6Fd) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xfA536049652BFb5f57ba8DCFbec1B2b2Dd9803D3`](https://snowtrace.io/address/0xfA536049652BFb5f57ba8DCFbec1B2b2Dd9803D3) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xcF24fb2a09227d955F8e9A12f36A26cf1ac079c6`](https://snowtrace.io/address/0xcF24fb2a09227d955F8e9A12f36A26cf1ac079c6) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xaBCdF4dcDBa57a04889784A670b862540758f9E7`](https://snowtrace.io/address/0xaBCdF4dcDBa57a04889784A670b862540758f9E7) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x0430ed39EA2789AcdF27b89268117EBABc8176D1`](https://snowtrace.io/address/0x0430ed39EA2789AcdF27b89268117EBABc8176D1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xF9E9eD67DD2Fab3b3ca024A2d66Fcf0764d36742`](https://basescan.org/address/0xF9E9eD67DD2Fab3b3ca024A2d66Fcf0764d36742) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x4CB16D4153123A74Bc724d161050959754f378D8`](https://basescan.org/address/0x4CB16D4153123A74Bc724d161050959754f378D8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xf4937657Ed8B3f3cB379Eed47b8818eE947BEb1e`](https://basescan.org/address/0xf4937657Ed8B3f3cB379Eed47b8818eE947BEb1e) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x0fF9d05E6331A43A906fE1440E0C9D0742F475A3`](https://basescan.org/address/0x0fF9d05E6331A43A906fE1440E0C9D0742F475A3) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xc1c548F980669615772dadcBfEBC29937c29481A`](https://basescan.org/address/0xc1c548F980669615772dadcBfEBC29937c29481A) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x58A51E5382318EeA6065BB7721eecdF4331c0B90`](https://basescan.org/address/0x58A51E5382318EeA6065BB7721eecdF4331c0B90) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xA705DE617673e2Fe63a4Ea0E58c26897601D32A5`](https://blastscan.io/address/0xA705DE617673e2Fe63a4Ea0E58c26897601D32A5) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x9b1468d29b4A5869f00c92517c57f8656E928B93`](https://blastscan.io/address/0x9b1468d29b4A5869f00c92517c57f8656E928B93) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x91FB72e5297e2728c10FDe73BdE74A4888A68570`](https://blastscan.io/address/0x91FB72e5297e2728c10FDe73BdE74A4888A68570) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x5f111b49f8f8bdb4A6001701E0D330fF52D6B370`](https://blastscan.io/address/0x5f111b49f8f8bdb4A6001701E0D330fF52D6B370) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xdc988d7AD6F186ea4a236f3E61A45a7851edF84E`](https://blastscan.io/address/0xdc988d7AD6F186ea4a236f3E61A45a7851edF84E) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x3aBCDDa756d069Cf3c7a17410602343966EAFf27`](https://blastscan.io/address/0x3aBCDDa756d069Cf3c7a17410602343966EAFf27) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xeB6d84c585bf8AEA34F05a096D6fAA3b8477D146`](https://bscscan.com/address/0xeB6d84c585bf8AEA34F05a096D6fAA3b8477D146) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x88ad3B5c62A46Df953A5d428d33D70408F53C408`](https://bscscan.com/address/0x88ad3B5c62A46Df953A5d428d33D70408F53C408) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xAb5f007b33EDDA56962A0fC428B15D544EA46591`](https://bscscan.com/address/0xAb5f007b33EDDA56962A0fC428B15D544EA46591) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x27641f29b012d0d523EB5943011148c42c98e7F1`](https://bscscan.com/address/0x27641f29b012d0d523EB5943011148c42c98e7F1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x70998557980CB6E8E63c46810081262B6c343051`](https://bscscan.com/address/0x70998557980CB6E8E63c46810081262B6c343051) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x96Aa12809CAC29Bba4944fEca1dFDC8e1704e6c1`](https://bscscan.com/address/0x96Aa12809CAC29Bba4944fEca1dFDC8e1704e6c1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2`](https://chiliscan.com/address/0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xDf578C2c70A86945999c65961417057363530a1c`](https://chiliscan.com/address/0xDf578C2c70A86945999c65961417057363530a1c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xcb099EfC90e88690e287259410B9AE63e1658CC6`](https://chiliscan.com/address/0xcb099EfC90e88690e287259410B9AE63e1658CC6) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x2De92156000269fa2fde7544F10f01E8cBC80fFa`](https://chiliscan.com/address/0x2De92156000269fa2fde7544F10f01E8cBC80fFa) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264`](https://chiliscan.com/address/0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a`](https://chiliscan.com/address/0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xf0a7F2cCE911c298B5CB8106Db19EF1D00230710`](https://scan.coredao.org/address/0xf0a7F2cCE911c298B5CB8106Db19EF1D00230710) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x98Fe0d8b2c2c05d9C6a9e635f59474Aaa0000120`](https://scan.coredao.org/address/0x98Fe0d8b2c2c05d9C6a9e635f59474Aaa0000120) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x9C99EF88399bC1c1188399B39E7Cc667D78210ea`](https://scan.coredao.org/address/0x9C99EF88399bC1c1188399B39E7Cc667D78210ea) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x64C734B2F1704822D8E69CAF230aE8d2eC18AA3e`](https://scan.coredao.org/address/0x64C734B2F1704822D8E69CAF230aE8d2eC18AA3e) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xdE21BBFf718723E9069d8528d6Bb26c2971D58a7`](https://scan.coredao.org/address/0xdE21BBFf718723E9069d8528d6Bb26c2971D58a7) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x074CC814a8114126c505F5eecFC82A400B39cA03`](https://scan.coredao.org/address/0x074CC814a8114126c505F5eecFC82A400B39cA03) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x9DeaBf7815b42Bf4E9a03EEc35a486fF74ee7459`](https://etherscan.io/address/0x9DeaBf7815b42Bf4E9a03EEc35a486fF74ee7459) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x3962f6585946823440d274aD7C719B02b49DE51E`](https://etherscan.io/address/0x3962f6585946823440d274aD7C719B02b49DE51E) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xf86B359035208e4529686A1825F2D5BeE38c28A8`](https://etherscan.io/address/0xf86B359035208e4529686A1825F2D5BeE38c28A8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xAE32Ca14d85311A506Bb852D49bbfB315466bA26`](https://etherscan.io/address/0xAE32Ca14d85311A506Bb852D49bbfB315466bA26) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xB5Ec9706C3Be9d22326D208f491E5DEef7C8d9f0`](https://etherscan.io/address/0xB5Ec9706C3Be9d22326D208f491E5DEef7C8d9f0) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xF35aB407CF28012Ba57CAF5ee2f6d6E4420253bc`](https://etherscan.io/address/0xF35aB407CF28012Ba57CAF5ee2f6d6E4420253bc) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x555eb55cbc477Aebbe5652D25d0fEA04052d3971`](https://gnosisscan.io/address/0x555eb55cbc477Aebbe5652D25d0fEA04052d3971) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xf1cAeB104AB29271463259335357D57772C90758`](https://gnosisscan.io/address/0xf1cAeB104AB29271463259335357D57772C90758) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x59A4B7255A5D01247837600e7828A6F77f664b34`](https://gnosisscan.io/address/0x59A4B7255A5D01247837600e7828A6F77f664b34) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xA0B5C851E3E9fED83f387f4D8847DA398Da4A8E2`](https://gnosisscan.io/address/0xA0B5C851E3E9fED83f387f4D8847DA398Da4A8E2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x0F324E5CB01ac98b2883c8ac4231aCA7EfD3e750`](https://gnosisscan.io/address/0x0F324E5CB01ac98b2883c8ac4231aCA7EfD3e750) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x5f12318fc6cCa518A950e2Ee16063a6317C2a9Ef`](https://gnosisscan.io/address/0x5f12318fc6cCa518A950e2Ee16063a6317C2a9Ef) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### IoTeX | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x6FcAB41e3b62d05aB4fC729586CB06Af2a2662D0`](https://iotexscan.io/address/0x6FcAB41e3b62d05aB4fC729586CB06Af2a2662D0) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x84f092cf4d7d36c2d4987f672df81a39200a7146`](https://iotexscan.io/address/0x84f092cf4d7d36c2d4987f672df81a39200a7146) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x179536f3289fb50076968b339C7EF0Dc0B38E3AF`](https://iotexscan.io/address/0x179536f3289fb50076968b339C7EF0Dc0B38E3AF) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x28eAB88ee8a951F78e1028557D0C3fD97af61A33`](https://iotexscan.io/address/0x28eAB88ee8a951F78e1028557D0C3fD97af61A33) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x711900e5f55d427cd88e5E3FCAe54Ccf02De71F4`](https://iotexscan.io/address/0x711900e5f55d427cd88e5E3FCAe54Ccf02De71F4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xf978034bb3CAB5fe88d23DB5Cb38D510485DaB90`](https://iotexscan.io/address/0xf978034bb3CAB5fe88d23DB5Cb38D510485DaB90) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xAa05E418Fb7851C211351C65435F1b17cbFa88Bf`](https://phoenix.lightlink.io/address/0xAa05E418Fb7851C211351C65435F1b17cbFa88Bf) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x6329591464FA6721c8E1c1271e4c6C41531Aea6b`](https://phoenix.lightlink.io/address/0x6329591464FA6721c8E1c1271e4c6C41531Aea6b) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x83403c6426E6D044bF3B84EC1C007Db211AaA140`](https://phoenix.lightlink.io/address/0x83403c6426E6D044bF3B84EC1C007Db211AaA140) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x5881ef3c0D3eB21b1b40E13b4a69c50754bc77C7`](https://phoenix.lightlink.io/address/0x5881ef3c0D3eB21b1b40E13b4a69c50754bc77C7) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x5C847244649BD74aB41f09C893aF792AD87D32aA`](https://phoenix.lightlink.io/address/0x5C847244649BD74aB41f09C893aF792AD87D32aA) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x278AC15622846806BD46FBDbdB8dB8d09614173A`](https://phoenix.lightlink.io/address/0x278AC15622846806BD46FBDbdB8dB8d09614173A) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xF2E46B249cFe09c2b3A2022dc81E0bB4bE3336F1`](https://lineascan.build/address/0xF2E46B249cFe09c2b3A2022dc81E0bB4bE3336F1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xB5d39049510F47EE7f74c528105D225E42747d63`](https://lineascan.build/address/0xB5d39049510F47EE7f74c528105D225E42747d63) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xC46ce4B77cBc46D17A2EceB2Cc8e2EE23D96529F`](https://lineascan.build/address/0xC46ce4B77cBc46D17A2EceB2Cc8e2EE23D96529F) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x2E72F7523cFeaed6B841aCe20060E0b203c312F5`](https://lineascan.build/address/0x2E72F7523cFeaed6B841aCe20060E0b203c312F5) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x4259557F6665eCF5907c9019a30f3Cb009c20Ae7`](https://lineascan.build/address/0x4259557F6665eCF5907c9019a30f3Cb009c20Ae7) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x35E9C3445A039B258Eb7112A5Eea259a825E8AC0`](https://lineascan.build/address/0x35E9C3445A039B258Eb7112A5Eea259a825E8AC0) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Meld | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2`](https://meldscan.io/address/0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xDf578C2c70A86945999c65961417057363530a1c`](https://meldscan.io/address/0xDf578C2c70A86945999c65961417057363530a1c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xcb099EfC90e88690e287259410B9AE63e1658CC6`](https://meldscan.io/address/0xcb099EfC90e88690e287259410B9AE63e1658CC6) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x2De92156000269fa2fde7544F10f01E8cBC80fFa`](https://meldscan.io/address/0x2De92156000269fa2fde7544F10f01E8cBC80fFa) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264`](https://meldscan.io/address/0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a`](https://meldscan.io/address/0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x704552099f5aD679294D337638B9a57Fd4726F52`](https://modescan.io/address/0x704552099f5aD679294D337638B9a57Fd4726F52) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xD8C65Bd7CB6924EF895b2eDcA03407c652f5a2C5`](https://modescan.io/address/0xD8C65Bd7CB6924EF895b2eDcA03407c652f5a2C5) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xBbfA51A10bE68714fa33281646B986dae9f52021`](https://modescan.io/address/0xBbfA51A10bE68714fa33281646B986dae9f52021) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xA1976d4bd6572B68A677037B496D806ACC2cBdB3`](https://modescan.io/address/0xA1976d4bd6572B68A677037B496D806ACC2cBdB3) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x641A10A2c9e0CeB94F406e1EF68b1E1da002662d`](https://modescan.io/address/0x641A10A2c9e0CeB94F406e1EF68b1E1da002662d) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x0Fd01Dd30F96A15dE6AfAd5627d45Ef94752460a`](https://modescan.io/address/0x0Fd01Dd30F96A15dE6AfAd5627d45Ef94752460a) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x946654AB30Dd6eD10236C89f2C8B2719df653691`](https://explorer.morphl2.io/address/0x946654AB30Dd6eD10236C89f2C8B2719df653691) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xAC19F4181E58efb7094e0cb4e1BB18c79F6AAdf4`](https://explorer.morphl2.io/address/0xAC19F4181E58efb7094e0cb4e1BB18c79F6AAdf4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x63B92F7E2f69877184C955E63B9D8Dff55e52e14`](https://explorer.morphl2.io/address/0x63B92F7E2f69877184C955E63B9D8Dff55e52e14) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xe785101Cb228693cc3EFdCd5d637fEf6A6Ff7259`](https://explorer.morphl2.io/address/0xe785101Cb228693cc3EFdCd5d637fEf6A6Ff7259) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x28D116d7e917756310986C4207eA54183fcba06A`](https://explorer.morphl2.io/address/0x28D116d7e917756310986C4207eA54183fcba06A) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x5e73bb96493C10919204045fCdb639D35ad859f8`](https://explorer.morphl2.io/address/0x5e73bb96493C10919204045fCdb639D35ad859f8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x4994325F8D4B4A36Bd643128BEb3EC3e582192C0`](https://optimistic.etherscan.io/address/0x4994325F8D4B4A36Bd643128BEb3EC3e582192C0) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x5C22471A86E9558ed9d22235dD5E0429207ccf4B`](https://optimistic.etherscan.io/address/0x5C22471A86E9558ed9d22235dD5E0429207ccf4B) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x90952912a50079bef00D5F49c975058d6573aCdC`](https://optimistic.etherscan.io/address/0x90952912a50079bef00D5F49c975058d6573aCdC) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x1a4837b8c668b8F7BE22Ba156419b7b823Cfd05c`](https://optimistic.etherscan.io/address/0x1a4837b8c668b8F7BE22Ba156419b7b823Cfd05c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x6cd7bB0f63aFCc9F6CeDd1Bf1E3Bd4ED078CD019`](https://optimistic.etherscan.io/address/0x6cd7bB0f63aFCc9F6CeDd1Bf1E3Bd4ED078CD019) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xe041629D99730b3EE4d6518097C45b4E3591992b`](https://optimistic.etherscan.io/address/0xe041629D99730b3EE4d6518097C45b4E3591992b) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x8D4dDc187a73017a5d7Cef733841f55115B13762`](https://polygonscan.com/address/0x8D4dDc187a73017a5d7Cef733841f55115B13762) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x8D87c5eddb5644D1a714F85930Ca940166e465f0`](https://polygonscan.com/address/0x8D87c5eddb5644D1a714F85930Ca940166e465f0) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xBF67f0A1E847564D0eFAD475782236D3Fa7e9Ec2`](https://polygonscan.com/address/0xBF67f0A1E847564D0eFAD475782236D3Fa7e9Ec2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xf28BF9390fb57BB68386430550818D312699ED15`](https://polygonscan.com/address/0xf28BF9390fb57BB68386430550818D312699ED15) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xD29EC4B9203f2d1C9Cd4Ba8c68FCFE4ECd85f6f5`](https://polygonscan.com/address/0xD29EC4B9203f2d1C9Cd4Ba8c68FCFE4ECd85f6f5) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xC28872e0c1f3633EeD467907123727ac0155029D`](https://polygonscan.com/address/0xC28872e0c1f3633EeD467907123727ac0155029D) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xAc199bFea92aa4D4C3d8A49fd463EAD99C7a6A8f`](https://scrollscan.com/address/0xAc199bFea92aa4D4C3d8A49fd463EAD99C7a6A8f) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xBc5DC6D77612E636DA32af0d85Ca3179a57330fd`](https://scrollscan.com/address/0xBc5DC6D77612E636DA32af0d85Ca3179a57330fd) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xb0f78dDc01D829d8b567821Eb193De8082b57D9D`](https://scrollscan.com/address/0xb0f78dDc01D829d8b567821Eb193De8082b57D9D) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xA1A281BbcaED8f0A9Dcd0fe67cbC53e0993C24cb`](https://scrollscan.com/address/0xA1A281BbcaED8f0A9Dcd0fe67cbC53e0993C24cb) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x4B8BF9cD3274517609e7Fe905740fa151C9aa711`](https://scrollscan.com/address/0x4B8BF9cD3274517609e7Fe905740fa151C9aa711) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x344afe8ad5dBA3d55870dc398e0F53B635B2ed0d`](https://scrollscan.com/address/0x344afe8ad5dBA3d55870dc398e0F53B635B2ed0d) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x1fA500262b352d821B4e1c933A20f2242B45383d`](https://explorer.superseed.xyz/address/0x1fA500262b352d821B4e1c933A20f2242B45383d) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x251FC799344151026d19b959B8f3667416d56B88`](https://explorer.superseed.xyz/address/0x251FC799344151026d19b959B8f3667416d56B88) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x91211E1760280d3f7dF2182ce4D1Fd6A1735C202`](https://explorer.superseed.xyz/address/0x91211E1760280d3f7dF2182ce4D1Fd6A1735C202) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x0a6C2E6B61cf05800F9aA91494480440843d6c3c`](https://explorer.superseed.xyz/address/0x0a6C2E6B61cf05800F9aA91494480440843d6c3c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xc4DE6f667435d5Ce0150e08BcEc9722C9017e90b`](https://explorer.superseed.xyz/address/0xc4DE6f667435d5Ce0150e08BcEc9722C9017e90b) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xF60bEADEfbeb98C927E13C4165BCa7D85Ba32cB2`](https://explorer.superseed.xyz/address/0xF60bEADEfbeb98C927E13C4165BCa7D85Ba32cB2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Taiko | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x238C830FA8E4ED0f0A4bc9C986BF338aEC9e38D1`](https://taikoscan.io/address/0x238C830FA8E4ED0f0A4bc9C986BF338aEC9e38D1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x5Ec0a2e88dAd09ad940Be2639c9aDb24D186989E`](https://taikoscan.io/address/0x5Ec0a2e88dAd09ad940Be2639c9aDb24D186989E) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x6a619d35972578E8458E33B7d1e07b155A51585E`](https://taikoscan.io/address/0x6a619d35972578E8458E33B7d1e07b155A51585E) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xBFD6048C80665792d949692CE77307e55dbb8986`](https://taikoscan.io/address/0xBFD6048C80665792d949692CE77307e55dbb8986) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x65E2C9990d4CAc5E54E65c1BD625CdcC9FDd1292`](https://taikoscan.io/address/0x65E2C9990d4CAc5E54E65c1BD625CdcC9FDd1292) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xd7df0b795756b60ab51a37e26f1edb7ef9e78828`](https://taikoscan.io/address/0xd7df0b795756b60ab51a37e26f1edb7ef9e78828) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Tangle | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x946654AB30Dd6eD10236C89f2C8B2719df653691`](https://explorer.tangle.tools/address/0x946654AB30Dd6eD10236C89f2C8B2719df653691) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xAC19F4181E58efb7094e0cb4e1BB18c79F6AAdf4`](https://explorer.tangle.tools/address/0xAC19F4181E58efb7094e0cb4e1BB18c79F6AAdf4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x63B92F7E2f69877184C955E63B9D8Dff55e52e14`](https://explorer.tangle.tools/address/0x63B92F7E2f69877184C955E63B9D8Dff55e52e14) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xe785101Cb228693cc3EFdCd5d637fEf6A6Ff7259`](https://explorer.tangle.tools/address/0xe785101Cb228693cc3EFdCd5d637fEf6A6Ff7259) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x28D116d7e917756310986C4207eA54183fcba06A`](https://explorer.tangle.tools/address/0x28D116d7e917756310986C4207eA54183fcba06A) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x5e73bb96493C10919204045fCdb639D35ad859f8`](https://explorer.tangle.tools/address/0x5e73bb96493C10919204045fCdb639D35ad859f8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xf03f4Bf48b108360bAf1597Fb8053Ebe0F5245dA`](https://era.zksync.network//address/0xf03f4Bf48b108360bAf1597Fb8053Ebe0F5245dA) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x8cB69b514E97a904743922e1adf3D1627deeeE8D`](https://era.zksync.network//address/0x8cB69b514E97a904743922e1adf3D1627deeeE8D) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x1fB145A47Eb9b8bf565273e137356376197b3559`](https://era.zksync.network//address/0x1fB145A47Eb9b8bf565273e137356376197b3559) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x99BA0D464942e7166dEBb8BAaAF1192F8d4117eb`](https://era.zksync.network//address/0x99BA0D464942e7166dEBb8BAaAF1192F8d4117eb) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xAE1A55205A0499d6BBb0Cf0f1210641957e9cb7e`](https://era.zksync.network//address/0xAE1A55205A0499d6BBb0Cf0f1210641957e9cb7e) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x8a84fCF962163A7E98Bf0daFD918973c846fa5C8`](https://era.zksync.network//address/0x8a84fCF962163A7E98Bf0daFD918973c846fa5C8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x8127E8081C22807c8a786Af1e1b174939577144A`](https://sepolia.arbiscan.io/address/0x8127E8081C22807c8a786Af1e1b174939577144A) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x9D1C257d9bc09E6E6B8E7e7c2496C12000f55457`](https://sepolia.arbiscan.io/address/0x9D1C257d9bc09E6E6B8E7e7c2496C12000f55457) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xaff2efFCF38Ea4A92E0cC5D7c48456C53358fE1a`](https://sepolia.arbiscan.io/address/0xaff2efFCF38Ea4A92E0cC5D7c48456C53358fE1a) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x46AEd4FE32aE1306d8073FE54A4E844e10a3ca16`](https://sepolia.arbiscan.io/address/0x46AEd4FE32aE1306d8073FE54A4E844e10a3ca16) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xC1FD380b3B0fF989C259D0b45B97F9663B638aA4`](https://sepolia.arbiscan.io/address/0xC1FD380b3B0fF989C259D0b45B97F9663B638aA4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xa11561F9e418f2C431B411E1CA22FD3F85D4c831`](https://sepolia.arbiscan.io/address/0xa11561F9e418f2C431B411E1CA22FD3F85D4c831) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x6DCB73E5F7e8e70bE20b3B9CF50E3be4625A91C3`](https://sepolia.basescan.org/address/0x6DCB73E5F7e8e70bE20b3B9CF50E3be4625A91C3) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xFE7fc0Bbde84C239C0aB89111D617dC7cc58049f`](https://sepolia.basescan.org/address/0xFE7fc0Bbde84C239C0aB89111D617dC7cc58049f) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xb8c724df3eC8f2Bf8fA808dF2cB5dbab22f3E68c`](https://sepolia.basescan.org/address/0xb8c724df3eC8f2Bf8fA808dF2cB5dbab22f3E68c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x474dFf3Cdd6489523947bf08D538F56d07Ca699e`](https://sepolia.basescan.org/address/0x474dFf3Cdd6489523947bf08D538F56d07Ca699e) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x23d0B7691F4Ca0E5477132a7C7F54fdCEd1814B9`](https://sepolia.basescan.org/address/0x23d0B7691F4Ca0E5477132a7C7F54fdCEd1814B9) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x899a05feb160fe912f621733A1d0b39C1446B3eB`](https://sepolia.basescan.org/address/0x899a05feb160fe912f621733A1d0b39C1446B3eB) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Blast Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x9dA09f4887FD3a78Ea237F74a456a82e4301F3D4`](https://sepolia.blastscan.io/address/0x9dA09f4887FD3a78Ea237F74a456a82e4301F3D4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x07f1386803ab6e1D8b6AABD50A9772E45bEA08f1`](https://sepolia.blastscan.io/address/0x07f1386803ab6e1D8b6AABD50A9772E45bEA08f1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x7eB79ab3652713bBE989e7A0dCA61ba484CAED85`](https://sepolia.blastscan.io/address/0x7eB79ab3652713bBE989e7A0dCA61ba484CAED85) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x93c0c4a57573C7056D7d63B536e33E28FB3ec2EE`](https://sepolia.blastscan.io/address/0x93c0c4a57573C7056D7d63B536e33E28FB3ec2EE) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xAC83E6aDA41a9251516601d8D5D0188466044Cc1`](https://sepolia.blastscan.io/address/0xAC83E6aDA41a9251516601d8D5D0188466044Cc1) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0xb9fCF1f73DD941Dd1C589fCf8545E60133EE5eC2`](https://sepolia.blastscan.io/address/0xb9fCF1f73DD941Dd1C589fCf8545E60133EE5eC2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Linea Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x95D29708be647BDD8dA0bdF82B84eB5f42d45918`](https://sepolia.lineascan.build/address/0x95D29708be647BDD8dA0bdF82B84eB5f42d45918) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x435F33C21B9Ea8BF207785616Bb28C46eDeD7366`](https://sepolia.lineascan.build/address/0x435F33C21B9Ea8BF207785616Bb28C46eDeD7366) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x5A52E9F4dFcdBcd68E50386D484378718167aB60`](https://sepolia.lineascan.build/address/0x5A52E9F4dFcdBcd68E50386D484378718167aB60) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x237f114a9cF62b87383684529d889DdfEd917f0c`](https://sepolia.lineascan.build/address/0x237f114a9cF62b87383684529d889DdfEd917f0c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x8224eb5D7d76B2D7Df43b868D875E79B11500eA8`](https://sepolia.lineascan.build/address/0x8224eb5D7d76B2D7Df43b868D875E79B11500eA8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x83Dd52FCA44E069020b58155b761A590F12B59d3`](https://sepolia.lineascan.build/address/0x83Dd52FCA44E069020b58155b761A590F12B59d3) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x5cD39Ec69F0Ed62733d0DA3E083E451334bA1f70`](https://sepolia.explorer.mode.network/address/0x5cD39Ec69F0Ed62733d0DA3E083E451334bA1f70) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x61861e4C72EE2F6967C852FE79Eac0E7a9C4f466`](https://sepolia.explorer.mode.network/address/0x61861e4C72EE2F6967C852FE79Eac0E7a9C4f466) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xc51346d1FD003E536530584eb4c8974BB279712D`](https://sepolia.explorer.mode.network/address/0xc51346d1FD003E536530584eb4c8974BB279712D) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0xD3c856A7333c264475aD87F9E6f84Ef376AE250D`](https://sepolia.explorer.mode.network/address/0xD3c856A7333c264475aD87F9E6f84Ef376AE250D) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xece83740834694A6E204825e5bcD8774F26a2665`](https://sepolia.explorer.mode.network/address/0xece83740834694A6E204825e5bcD8774F26a2665) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x900de6cC1021afa13f41e1067bEE681BbD661C69`](https://sepolia.explorer.mode.network/address/0x900de6cC1021afa13f41e1067bEE681BbD661C69) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Morph Holesky | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x36477f8FEf1fC3B0fe7F24b8F6d9561f0BeC30e7`](https://explorer-holesky.morphl2.io/address/0x36477f8FEf1fC3B0fe7F24b8F6d9561f0BeC30e7) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x4b4126036726085636BC2A4788a448d5C26705E4`](https://explorer-holesky.morphl2.io/address/0x4b4126036726085636BC2A4788a448d5C26705E4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x6AF155530D6360E789deD0CF88219f855CCb158F`](https://explorer-holesky.morphl2.io/address/0x6AF155530D6360E789deD0CF88219f855CCb158F) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x33BE6a7810B464B913052EC0436A067de25C164c`](https://explorer-holesky.morphl2.io/address/0x33BE6a7810B464B913052EC0436A067de25C164c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x728Ec8260Ea1115252D33c0D563d78CA18990dE4`](https://explorer-holesky.morphl2.io/address/0x728Ec8260Ea1115252D33c0D563d78CA18990dE4) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x4B5F6B967dC61c2B39fa233092745B460eA1b433`](https://explorer-holesky.morphl2.io/address/0x4B5F6B967dC61c2B39fa233092745B460eA1b433) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x89EC3830040dec63E9dF0C904d649fda4d49DF16`](https://optimism-sepolia.blockscout.com/address/0x89EC3830040dec63E9dF0C904d649fda4d49DF16) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x0a881bbd71a21710D56Ff1931EC8189d94019D60`](https://optimism-sepolia.blockscout.com/address/0x0a881bbd71a21710D56Ff1931EC8189d94019D60) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xb971A93608413C54F407eE86C7c15b295E0004bB`](https://optimism-sepolia.blockscout.com/address/0xb971A93608413C54F407eE86C7c15b295E0004bB) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x48F8C05C721E27FA82aD6c8ddB1a88eF43864A9A`](https://optimism-sepolia.blockscout.com/address/0x48F8C05C721E27FA82aD6c8ddB1a88eF43864A9A) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0xd9dD971D4800100aED0BfF3535aB116D4Be5c420`](https://optimism-sepolia.blockscout.com/address/0xd9dD971D4800100aED0BfF3535aB116D4Be5c420) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x6CBe6e298A9354306e6ee65f63FF85CFA7062a39`](https://optimism-sepolia.blockscout.com/address/0x6CBe6e298A9354306e6ee65f63FF85CFA7062a39) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x73BB6dD3f5828d60F8b3dBc8798EB10fbA2c5636`](https://sepolia.etherscan.io/address/0x73BB6dD3f5828d60F8b3dBc8798EB10fbA2c5636) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x3E435560fd0a03ddF70694b35b673C25c65aBB6C`](https://sepolia.etherscan.io/address/0x3E435560fd0a03ddF70694b35b673C25c65aBB6C) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0x3a1beA13A8C24c0EA2b8fAE91E4b2762A59D7aF5`](https://sepolia.etherscan.io/address/0x3a1beA13A8C24c0EA2b8fAE91E4b2762A59D7aF5) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x56F2f7f4d15d1A9FF9d3782b6F6bB8f6fd690D33`](https://sepolia.etherscan.io/address/0x56F2f7f4d15d1A9FF9d3782b6F6bB8f6fd690D33) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x04A9c14b7a000640419aD5515Db4eF4172C00E31`](https://sepolia.etherscan.io/address/0x04A9c14b7a000640419aD5515Db4eF4172C00E31) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x56E9180A8d2C35c99F2F8a1A5Ab8aBe79E876E8c`](https://sepolia.etherscan.io/address/0x56E9180A8d2C35c99F2F8a1A5Ab8aBe79E876E8c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Superseed Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2`](https://sepolia-explorer.superseed.xyz/address/0xCff4a803b0Bf55dD1BE38Fb96088478F3D2eeCF2) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0xDf578C2c70A86945999c65961417057363530a1c`](https://sepolia-explorer.superseed.xyz/address/0xDf578C2c70A86945999c65961417057363530a1c) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xcb099EfC90e88690e287259410B9AE63e1658CC6`](https://sepolia-explorer.superseed.xyz/address/0xcb099EfC90e88690e287259410B9AE63e1658CC6) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x2De92156000269fa2fde7544F10f01E8cBC80fFa`](https://sepolia-explorer.superseed.xyz/address/0x2De92156000269fa2fde7544F10f01E8cBC80fFa) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264`](https://sepolia-explorer.superseed.xyz/address/0x0eDA15D606733f6CDe9DB67263E546bfcDDe9264) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a`](https://sepolia-explorer.superseed.xyz/address/0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### Taiko Hekla | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0x01565a1298d631302c114E13C431c9345ae5532e`](https://hekla.taikoscan.network/address/0x01565a1298d631302c114E13C431c9345ae5532e) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x640376B26E5f57dCD385b394a24c91F4C60E4fAc`](https://hekla.taikoscan.network/address/0x640376B26E5f57dCD385b394a24c91F4C60E4fAc) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xd040fa437021F771C307178F06183bffC36cb4A5`](https://hekla.taikoscan.network/address/0xd040fa437021F771C307178F06183bffC36cb4A5) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x49Fd46F7d897778205c00D5c1D943fCDc26Ed9E8`](https://hekla.taikoscan.network/address/0x49Fd46F7d897778205c00D5c1D943fCDc26Ed9E8) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x6C6a4Ef6C0C1318C9FD60b5084B68E04FB5e9Db9`](https://hekla.taikoscan.network/address/0x6C6a4Ef6C0C1318C9FD60b5084B68E04FB5e9Db9) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x4F0d64365EfA9D6D1B88FfC387Ce02e4A71d9f9f`](https://hekla.taikoscan.network/address/0x4F0d64365EfA9D6D1B88FfC387Ce02e4A71d9f9f) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | ### ZKsync Sepolia Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | SablierV2LockupDynamic | [`0xc4311a5913953162111bF75530f7BB14ec24e014`](https://sepolia-era.zksync.network//address/0xc4311a5913953162111bF75530f7BB14ec24e014) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupLinear | [`0x43864C567b89FA5fEE8010f92d4473Bf19169BBA`](https://sepolia-era.zksync.network//address/0x43864C567b89FA5fEE8010f92d4473Bf19169BBA) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2LockupTranched | [`0xF6e869b73E20b812dcf0E850AA8822F74f67f670`](https://sepolia-era.zksync.network//address/0xF6e869b73E20b812dcf0E850AA8822F74f67f670) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2NFTDescriptor | [`0x477DDC91a7e13CBaC01c06737abF96d50ECa7961`](https://sepolia-era.zksync.network//address/0x477DDC91a7e13CBaC01c06737abF96d50ECa7961) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2BatchLockup | [`0x1D68417ff71855Eb0237Ff03a8FfF02Ef67e4AFb`](https://sepolia-era.zksync.network//address/0x1D68417ff71855Eb0237Ff03a8FfF02Ef67e4AFb) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | | SablierV2MerkleLockupFactory | [`0x2CEf8C06dDF7a1440Ad2561c53821e43adDbfA31`](https://sepolia-era.zksync.network//address/0x2CEf8C06dDF7a1440Ad2561c53821e43adDbfA31) | [`lockup-v1.2`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v1.2) | --- ## v2.0 # Lockup v2.0 [v2.0.1]: https://npmjs.com/package/@sablier/lockup/v/2.0.1 This section contains the deployment addresses for the v2.0 release of [@sablier/lockup@2.0.1][v2.0.1]. A few noteworthy details about the deployments: - The addresses are final - All contracts are non-upgradeable - The source code is verified on Etherscan across all chains :::info This is an outdated version of the Lockup protocol. See the latest version [here](/guides/lockup/deployments). ::: ## Mainnets ### Abstract | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x07c194dFE7DCe9Ae7Ffe4bF32683cf1F8CDD4aEa`](https://abscan.org/address/0x07c194dFE7DCe9Ae7Ffe4bF32683cf1F8CDD4aEa) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x63Ff2E370788C163D5a1909B5FCb299DB327AEF9`](https://abscan.org/address/0x63Ff2E370788C163D5a1909B5FCb299DB327AEF9) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x3409308357BB704f79f70d748da502F363Dc2f1D`](https://abscan.org/address/0x3409308357BB704f79f70d748da502F363Dc2f1D) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x14Eb4AB47B2ec2a71763eaBa202a252E176FAE88`](https://abscan.org/address/0x14Eb4AB47B2ec2a71763eaBa202a252E176FAE88) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0xbB2e2884AE40003BB55fd3A85A9f8f7f72Aa441F`](https://abscan.org/address/0xbB2e2884AE40003BB55fd3A85A9f8f7f72Aa441F) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Arbitrum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://arbiscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xd5c6a0Dd2E1822865c308850b8b3E2CcE762D061`](https://arbiscan.io/address/0xd5c6a0Dd2E1822865c308850b8b3E2CcE762D061) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xB11Ead48F572155C5F8dB6201701e91A936896f7`](https://arbiscan.io/address/0xB11Ead48F572155C5F8dB6201701e91A936896f7) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x467D5Bf8Cfa1a5f99328fBdCb9C751c78934b725`](https://arbiscan.io/address/0x467D5Bf8Cfa1a5f99328fBdCb9C751c78934b725) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://arbiscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Avalanche | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://snowtrace.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x906A4BD5dD0EF13654eA29bFD6185d0d64A4b674`](https://snowtrace.io/address/0x906A4BD5dD0EF13654eA29bFD6185d0d64A4b674) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xABDE228d84D86D78029C31A37Ae2435C8f923c8b`](https://snowtrace.io/address/0xABDE228d84D86D78029C31A37Ae2435C8f923c8b) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x3C81BBBe72EF8eF3fb1D19B0bd6310Ad0dd27E82`](https://snowtrace.io/address/0x3C81BBBe72EF8eF3fb1D19B0bd6310Ad0dd27E82) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://snowtrace.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Base | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://basescan.org/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x87e437030b7439150605a641483de98672E26317`](https://basescan.org/address/0x87e437030b7439150605a641483de98672E26317) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xC26CdAFd6ec3c91AD9aEeB237Ee1f37205ED26a4`](https://basescan.org/address/0xC26CdAFd6ec3c91AD9aEeB237Ee1f37205ED26a4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xb5D78DD3276325f5FAF3106Cc4Acc56E28e0Fe3B`](https://basescan.org/address/0xb5D78DD3276325f5FAF3106Cc4Acc56E28e0Fe3B) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://basescan.org/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Berachain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://berascan.com/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x3bbE0a21792564604B0fDc00019532Adeffa70eb`](https://berascan.com/address/0x3bbE0a21792564604B0fDc00019532Adeffa70eb) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x75838C66Dfa2296bB9758f75fC7ad219718C8a88`](https://berascan.com/address/0x75838C66Dfa2296bB9758f75fC7ad219718C8a88) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xC19A2542156b5d7960e0eF46E9787E7d336cF428`](https://berascan.com/address/0xC19A2542156b5d7960e0eF46E9787E7d336cF428) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://berascan.com/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Blast | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://blastscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x959c412d5919b1Ec5D07bee3443ea68c91d57dd7`](https://blastscan.io/address/0x959c412d5919b1Ec5D07bee3443ea68c91d57dd7) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x193c2af965FEAca8D893c974712e5b6BD3cBc5ec`](https://blastscan.io/address/0x193c2af965FEAca8D893c974712e5b6BD3cBc5ec) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xDbB6e9653d7e41766712Db22eB08ED3F21009fdd`](https://blastscan.io/address/0xDbB6e9653d7e41766712Db22eB08ED3F21009fdd) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://blastscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### BNB Chain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://bscscan.com/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x56831a5a932793E02251126831174Ab8Bf2f7695`](https://bscscan.com/address/0x56831a5a932793E02251126831174Ab8Bf2f7695) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xcf990fA3267F0945bBf7cf40A0c03F9dFE6a1804`](https://bscscan.com/address/0xcf990fA3267F0945bBf7cf40A0c03F9dFE6a1804) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x6E0baD2c077d699841F1929b45bfb93FAfBEd395`](https://bscscan.com/address/0x6E0baD2c077d699841F1929b45bfb93FAfBEd395) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://bscscan.com/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Chiliz | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x6FcAB41e3b62d05aB4fC729586CB06Af2a2662D0`](https://chiliscan.com/address/0x6FcAB41e3b62d05aB4fC729586CB06Af2a2662D0) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x8A96f827082FB349B6e268baa0a7A5584c4Ccda6`](https://chiliscan.com/address/0x8A96f827082FB349B6e268baa0a7A5584c4Ccda6) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x179536f3289fb50076968b339C7EF0Dc0B38E3AF`](https://chiliscan.com/address/0x179536f3289fb50076968b339C7EF0Dc0B38E3AF) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x711900e5f55d427cd88e5E3FCAe54Ccf02De71F4`](https://chiliscan.com/address/0x711900e5f55d427cd88e5E3FCAe54Ccf02De71F4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x84f092cf4D7D36C2d4987F672df81a39200a7146`](https://chiliscan.com/address/0x84f092cf4D7D36C2d4987F672df81a39200a7146) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Core Dao | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://scan.coredao.org/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xac0cf0f2a96ed7ec3cfa4d0be621c67adc9dd903`](https://scan.coredao.org/address/0xac0cf0f2a96ed7ec3cfa4d0be621c67adc9dd903) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x96dadeeab25413de04a1b8e40c4de41bd9d7fd29`](https://scan.coredao.org/address/0x96dadeeab25413de04a1b8e40c4de41bd9d7fd29) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x4fff53bfe86a0bd59a81c89d8ba84c67cf947764`](https://scan.coredao.org/address/0x4fff53bfe86a0bd59a81c89d8ba84c67cf947764) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://scan.coredao.org/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Form | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://explorer.form.network/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x6Ef33eeCE9D3B04B1A954C0c94F09808C81512c8`](https://explorer.form.network/address/0x6Ef33eeCE9D3B04B1A954C0c94F09808C81512c8) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x74759072f464F6600E7563DcC2828A2dE8111840`](https://explorer.form.network/address/0x74759072f464F6600E7563DcC2828A2dE8111840) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xa2dD5E785AA0225D681416884D395c7E22D92850`](https://explorer.form.network/address/0xa2dD5E785AA0225D681416884D395c7E22D92850) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://explorer.form.network/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Gnosis | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://gnosisscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x3140a6900AA2FF3186730741ad8255ee4e6d8Ff1`](https://gnosisscan.io/address/0x3140a6900AA2FF3186730741ad8255ee4e6d8Ff1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xe89EE0b2B31A296C5cCb631C3670F94bDD64a0D2`](https://gnosisscan.io/address/0xe89EE0b2B31A296C5cCb631C3670F94bDD64a0D2) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x007aF5dC7b1CaA66Cf7Ebcc01E2e6ba4D55D3e92`](https://gnosisscan.io/address/0x007aF5dC7b1CaA66Cf7Ebcc01E2e6ba4D55D3e92) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://gnosisscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### HyperEVM | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xe2f66eEe2E227c40074668ba53021423ED7D4ea1`](https://hyperevmscan.io/address/0xe2f66eEe2E227c40074668ba53021423ED7D4ea1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x7263d77e9e872f82A15e5E1a9816440D23758708`](https://hyperevmscan.io/address/0x7263d77e9e872f82A15e5E1a9816440D23758708) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x5444eA1B8B636A8FdF7cE814077E664c28dE30Ec`](https://hyperevmscan.io/address/0x5444eA1B8B636A8FdF7cE814077E664c28dE30Ec) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x856167EE3e09Ba562d69A542Ab6A939903ad738e`](https://hyperevmscan.io/address/0x856167EE3e09Ba562d69A542Ab6A939903ad738e) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0xf91e1a8fA643F8062C12Ca2865f1eb2258d6422F`](https://hyperevmscan.io/address/0xf91e1a8fA643F8062C12Ca2865f1eb2258d6422F) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### IoTeX | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xAe60adf8D373523076F68941A6C48dF4C18C68ef`](https://iotexscan.io/address/0xAe60adf8D373523076F68941A6C48dF4C18C68ef) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xf9920809bf97Fc038bdB8c5c2C2D100036d7cc8c`](https://iotexscan.io/address/0xf9920809bf97Fc038bdB8c5c2C2D100036d7cc8c) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x5F448badebB50b9da6589C57B999725dc514B5D5`](https://iotexscan.io/address/0x5F448badebB50b9da6589C57B999725dc514B5D5) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xcaF51434a0af3c43Cd5569bC5eCc5aa21d28086E`](https://iotexscan.io/address/0xcaF51434a0af3c43Cd5569bC5eCc5aa21d28086E) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0xe3247c554200C2dFf6Ba3c2Ea5b2F5a50dbf6B32`](https://iotexscan.io/address/0xe3247c554200C2dFf6Ba3c2Ea5b2F5a50dbf6B32) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Lightlink | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://phoenix.lightlink.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xCFB5F90370A7884DEc59C55533782B45FA24f4d1`](https://phoenix.lightlink.io/address/0xCFB5F90370A7884DEc59C55533782B45FA24f4d1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xe8fa70D0172BB36c952E3e20e2f3550Ca4557761`](https://phoenix.lightlink.io/address/0xe8fa70D0172BB36c952E3e20e2f3550Ca4557761) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x6c65aAf03186d1DA60127D3d7792cF36eD99D909`](https://phoenix.lightlink.io/address/0x6c65aAf03186d1DA60127D3d7792cF36eD99D909) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://phoenix.lightlink.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Linea Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x058aD99662FE7ecB8c3109920C99439a302b6573`](https://lineascan.build/address/0x058aD99662FE7ecB8c3109920C99439a302b6573) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x1514a869D29a8B22961e8F9eBa3DC64000b96BCe`](https://lineascan.build/address/0x1514a869D29a8B22961e8F9eBa3DC64000b96BCe) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xEdf0A4b30defD14449604d1b97e2c39128c136CA`](https://lineascan.build/address/0xEdf0A4b30defD14449604d1b97e2c39128c136CA) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x6964252561e8762dD10267176EaC5078b6291e51`](https://lineascan.build/address/0x6964252561e8762dD10267176EaC5078b6291e51) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0xdEe57959770667d97A90C94fE70C055496B7a791`](https://lineascan.build/address/0xdEe57959770667d97A90C94fE70C055496B7a791) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Ethereum | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://etherscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xA9dC6878C979B5cc1d98a1803F0664ad725A1f56`](https://etherscan.io/address/0xA9dC6878C979B5cc1d98a1803F0664ad725A1f56) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x3F6E8a8Cffe377c4649aCeB01e6F20c60fAA356c`](https://etherscan.io/address/0x3F6E8a8Cffe377c4649aCeB01e6F20c60fAA356c) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x7C01AA3783577E15fD7e272443D44B92d5b21056`](https://etherscan.io/address/0x7C01AA3783577E15fD7e272443D44B92d5b21056) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://etherscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Mode | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://modescan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x64e7879558b6dfE2f510bd4b9Ad196ef0371EAA8`](https://modescan.io/address/0x64e7879558b6dfE2f510bd4b9Ad196ef0371EAA8) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x34dBab20FD097F63DDbf3092D83B1005D2573082`](https://modescan.io/address/0x34dBab20FD097F63DDbf3092D83B1005D2573082) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x3aEbaDFC423fD08BE4715986F68D5E9A597ec974`](https://modescan.io/address/0x3aEbaDFC423fD08BE4715986F68D5E9A597ec974) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://modescan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Morph | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://explorer.morphl2.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x660314f09ac3B65E216B6De288aAdc2599AF14e2`](https://explorer.morphl2.io/address/0x660314f09ac3B65E216B6De288aAdc2599AF14e2) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x081BBbd4861BaBACE3E7eDC8a45741129DfC02fE`](https://explorer.morphl2.io/address/0x081BBbd4861BaBACE3E7eDC8a45741129DfC02fE) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xF3cd08105b6745965149eF02b8aBdCEa0Ae51241`](https://explorer.morphl2.io/address/0xF3cd08105b6745965149eF02b8aBdCEa0Ae51241) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://explorer.morphl2.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### OP Mainnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://optimistic.etherscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x41dBa1AfBB6DF91b3330dc009842327A9858Cbae`](https://optimistic.etherscan.io/address/0x41dBa1AfBB6DF91b3330dc009842327A9858Cbae) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x0c4Cd6087DbFa3F74661BAbbFaa35273baC1c4b1`](https://optimistic.etherscan.io/address/0x0c4Cd6087DbFa3F74661BAbbFaa35273baC1c4b1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x822e9c4852E978104d82F0f785bFA663c2b700c1`](https://optimistic.etherscan.io/address/0x822e9c4852E978104d82F0f785bFA663c2b700c1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://optimistic.etherscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Polygon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://polygonscan.com/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xf5e12d0bA25FCa0D738Ec57f149736B2e4C46980`](https://polygonscan.com/address/0xf5e12d0bA25FCa0D738Ec57f149736B2e4C46980) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x1aDd9385F2C5c8e446bbB77c7A36839aB7743AF4`](https://polygonscan.com/address/0x1aDd9385F2C5c8e446bbB77c7A36839aB7743AF4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xE0BFe071Da104e571298f8b6e0fcE44C512C1Ff4`](https://polygonscan.com/address/0xE0BFe071Da104e571298f8b6e0fcE44C512C1Ff4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://polygonscan.com/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Scroll | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://scrollscan.com/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x00Ff6443E902874924dd217c1435e3be04f57431`](https://scrollscan.com/address/0x00Ff6443E902874924dd217c1435e3be04f57431) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x8234Ad3CC4D29a4619C36a15286dac73078672a8`](https://scrollscan.com/address/0x8234Ad3CC4D29a4619C36a15286dac73078672a8) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xcB0B1f1D116eD62135848d8C90EB61afDA936Da8`](https://scrollscan.com/address/0xcB0B1f1D116eD62135848d8C90EB61afDA936Da8) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://scrollscan.com/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Sei Network | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://seiscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xeaFB40669fe3523b073904De76410b46e79a56D7`](https://seiscan.io/address/0xeaFB40669fe3523b073904De76410b46e79a56D7) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x34686937bef23c6441248Cc5A63A79a3a707e7E4`](https://seiscan.io/address/0x34686937bef23c6441248Cc5A63A79a3a707e7E4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x736A6E895790e089aEC2Bf76B2D7f368ce6Efff5`](https://seiscan.io/address/0x736A6E895790e089aEC2Bf76B2D7f368ce6Efff5) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://seiscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Sonic | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sonicscan.org/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xAE8FE47765f88e0A2D7E8fbaf33583DBf0373f01`](https://sonicscan.org/address/0xAE8FE47765f88e0A2D7E8fbaf33583DBf0373f01) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xc91b20dC29E19120BF3f54277947327AfD50fBa2`](https://sonicscan.org/address/0xc91b20dC29E19120BF3f54277947327AfD50fBa2) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xc37462eE6500D2C36c9131b921fAADBD6cb7B60b`](https://sonicscan.org/address/0xc37462eE6500D2C36c9131b921fAADBD6cb7B60b) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sonicscan.org/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Sophon | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x424B27529B49EF4Bfa0727aFcFE4387Ac2932944`](https://sophscan.xyz/address/0x424B27529B49EF4Bfa0727aFcFE4387Ac2932944) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xAc2E42b520364940c90Ce164412Ca9BA212d014B`](https://sophscan.xyz/address/0xAc2E42b520364940c90Ce164412Ca9BA212d014B) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x7282d83E49363f373102d195F66649eBD6C57B9B`](https://sophscan.xyz/address/0x7282d83E49363f373102d195F66649eBD6C57B9B) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x28fCAE6bda2546C93183EeC8638691B2EB184003`](https://sophscan.xyz/address/0x28fCAE6bda2546C93183EeC8638691B2EB184003) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x9971914DA16787F6cCfb27bEfB4404e33C8b869D`](https://sophscan.xyz/address/0x9971914DA16787F6cCfb27bEfB4404e33C8b869D) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Superseed | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://explorer.superseed.xyz/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xa4576b58Ec760A8282D081dc94F3dc716DFc61e9`](https://explorer.superseed.xyz/address/0xa4576b58Ec760A8282D081dc94F3dc716DFc61e9) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x89e9F2473836d9ab7D28Df6F180E30992b8CB5d6`](https://explorer.superseed.xyz/address/0x89e9F2473836d9ab7D28Df6F180E30992b8CB5d6) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xF46D1f8C85f215A515F6D738ab3E3bA081f6C083`](https://explorer.superseed.xyz/address/0xF46D1f8C85f215A515F6D738ab3E3bA081f6C083) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://explorer.superseed.xyz/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Taiko | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://taikoscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x79F1fD8bB2D455f64010063Fc79E27561980FE10`](https://taikoscan.io/address/0x79F1fD8bB2D455f64010063Fc79E27561980FE10) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xcBbA08768C4a9D9131dE0467Ae136b8450dC13B2`](https://taikoscan.io/address/0xcBbA08768C4a9D9131dE0467Ae136b8450dC13B2) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x628E88cDF558c0F4796c8CeB5068a023a7159aA7`](https://taikoscan.io/address/0x628E88cDF558c0F4796c8CeB5068a023a7159aA7) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://taikoscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Tangle | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x3D664B2Da905DDD0Db931982FD9a759ea950D6e1`](https://explorer.tangle.tools/address/0x3D664B2Da905DDD0Db931982FD9a759ea950D6e1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a`](https://explorer.tangle.tools/address/0x92FC05e49c27884d554D98a5C01Ff0894a9DC29a) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xF5AC60870E1CCc4Bfce23cfbb7a796A0d8dBAf47`](https://explorer.tangle.tools/address/0xF5AC60870E1CCc4Bfce23cfbb7a796A0d8dBAf47) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x1cAe76b71913598d7664d16641CCB6037d8Ed61a`](https://explorer.tangle.tools/address/0x1cAe76b71913598d7664d16641CCB6037d8Ed61a) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x9EfC8663cAB0e2d97ad17C9fbfc8392445517E94`](https://explorer.tangle.tools/address/0x9EfC8663cAB0e2d97ad17C9fbfc8392445517E94) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Unichain | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076e4fb5cfe8be1c26e61222dc51828db8c1dc`](https://uniscan.xyz/address/0xf8076e4fb5cfe8be1c26e61222dc51828db8c1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xa5F12D63E18a28C9BE27B6f3d91ce693320067ba`](https://uniscan.xyz/address/0xa5F12D63E18a28C9BE27B6f3d91ce693320067ba) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xaf875A2bDb74bA8872292FC371131eb45a9b570C`](https://uniscan.xyz/address/0xaf875A2bDb74bA8872292FC371131eb45a9b570C) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x26C341C4D79bA8F6BFB450a49E9165c936316B14`](https://uniscan.xyz/address/0x26C341C4D79bA8F6BFB450a49E9165c936316B14) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522ca06ce080800ab59ba4c091e63f6f54c5e6d`](https://uniscan.xyz/address/0x5522ca06ce080800ab59ba4c091e63f6f54c5e6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### XDC | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076e4fb5cfe8be1c26e61222dc51828db8c1dc`](https://xdcscan.com/address/0xf8076e4fb5cfe8be1c26e61222dc51828db8c1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x4c1311a9d88BFb7023148aB04F7321C2E91c29bf`](https://xdcscan.com/address/0x4c1311a9d88BFb7023148aB04F7321C2E91c29bf) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x6d36227Dd84e2A3d898B192Bc82a005c3cc2320C`](https://xdcscan.com/address/0x6d36227Dd84e2A3d898B192Bc82a005c3cc2320C) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x489e0DC5E62A751A2b209f1cC03E189fd6257176`](https://xdcscan.com/address/0x489e0DC5E62A751A2b209f1cC03E189fd6257176) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522ca06ce080800ab59ba4c091e63f6f54c5e6d`](https://xdcscan.com/address/0x5522ca06ce080800ab59ba4c091e63f6f54c5e6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### ZKsync Era | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x37De3Fc44a07A40411AD0Cea4310990C9F88c1C1`](https://era.zksync.network//address/0x37De3Fc44a07A40411AD0Cea4310990C9F88c1C1) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xCB2d53c58496C2aA114bce4ED5C7fe768ce86542`](https://era.zksync.network//address/0xCB2d53c58496C2aA114bce4ED5C7fe768ce86542) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xCC926359DBE6b6311D63f8155fcC3B57F3fAAE80`](https://era.zksync.network//address/0xCC926359DBE6b6311D63f8155fcC3B57F3fAAE80) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x7BCcB3595Aa81Dbe8A69DD8C46f5C2A3cf76594A`](https://era.zksync.network//address/0x7BCcB3595Aa81Dbe8A69DD8C46f5C2A3cf76594A) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0xEE4a32E026aC2FD6BF71d9D7eB00803576aD314d`](https://era.zksync.network//address/0xEE4a32E026aC2FD6BF71d9D7eB00803576aD314d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ## Testnets ### Arbitrum Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sepolia.arbiscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x8224eb5D7d76B2D7Df43b868D875E79B11500eA8`](https://sepolia.arbiscan.io/address/0x8224eb5D7d76B2D7Df43b868D875E79B11500eA8) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xbf85cD17cA59b7A2b81d3D776cE1602a7C0aF9D9`](https://sepolia.arbiscan.io/address/0xbf85cD17cA59b7A2b81d3D776cE1602a7C0aF9D9) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x83Dd52FCA44E069020b58155b761A590F12B59d3`](https://sepolia.arbiscan.io/address/0x83Dd52FCA44E069020b58155b761A590F12B59d3) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sepolia.arbiscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Base Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sepolia.basescan.org/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xCA2593027BA24856c292Fdcb5F987E0c25e755a4`](https://sepolia.basescan.org/address/0xCA2593027BA24856c292Fdcb5F987E0c25e755a4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xEdc716E9672f672456d22b02532395c1e62B8C16`](https://sepolia.basescan.org/address/0xEdc716E9672f672456d22b02532395c1e62B8C16) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xa4777CA525d43a7aF55D45b11b430606d7416f8d`](https://sepolia.basescan.org/address/0xa4777CA525d43a7aF55D45b11b430606d7416f8d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sepolia.basescan.org/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Blast Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sepolia.blastscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xF0182C7c0F155CdB49B575cFB5Fe7b3cE94D2234`](https://sepolia.blastscan.io/address/0xF0182C7c0F155CdB49B575cFB5Fe7b3cE94D2234) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x30FC3D5b53e17edbC72d0a488f10C0eD3d7b0893`](https://sepolia.blastscan.io/address/0x30FC3D5b53e17edbC72d0a488f10C0eD3d7b0893) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x3fC9E80478c65759a8273CD9dFe2D7011b45164E`](https://sepolia.blastscan.io/address/0x3fC9E80478c65759a8273CD9dFe2D7011b45164E) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sepolia.blastscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Linea Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0x058aD99662FE7ecB8c3109920C99439a302b6573`](https://sepolia.lineascan.build/address/0x058aD99662FE7ecB8c3109920C99439a302b6573) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xCE94BE25320A51Ac868d0C133c251aE10682DabD`](https://sepolia.lineascan.build/address/0xCE94BE25320A51Ac868d0C133c251aE10682DabD) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x9A987181BF05b7C154118A3216d522fa2407a8Be`](https://sepolia.lineascan.build/address/0x9A987181BF05b7C154118A3216d522fa2407a8Be) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xbb4A14868A4BEc78b7354582b8C818ba520d7A4E`](https://sepolia.lineascan.build/address/0xbb4A14868A4BEc78b7354582b8C818ba520d7A4E) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0xdEe57959770667d97A90C94fE70C055496B7a791`](https://sepolia.lineascan.build/address/0xdEe57959770667d97A90C94fE70C055496B7a791) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Mode Testnet | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sepolia.explorer.mode.network/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xdd695e927b97460c8d454d8f6d8cd797dcf1fcfd`](https://sepolia.explorer.mode.network/address/0xdd695e927b97460c8d454d8f6d8cd797dcf1fcfd) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xaD2f0228369D71605cd19c33FfA2Dde85A2FE477`](https://sepolia.explorer.mode.network/address/0xaD2f0228369D71605cd19c33FfA2Dde85A2FE477) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xF56b79523FD0b4A6c9bf4e6F7a3Ea45dC0fB5bBC`](https://sepolia.explorer.mode.network/address/0xF56b79523FD0b4A6c9bf4e6F7a3Ea45dC0fB5bBC) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sepolia.explorer.mode.network/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### OP Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://optimism-sepolia.blockscout.com/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xDf6163ddD3Ebcb552Cc1379a9c65AFe68683534e`](https://optimism-sepolia.blockscout.com/address/0xDf6163ddD3Ebcb552Cc1379a9c65AFe68683534e) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xF7BA8a7dc96d1939b789b91865bdb05596EBB558`](https://optimism-sepolia.blockscout.com/address/0xF7BA8a7dc96d1939b789b91865bdb05596EBB558) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x1f898895eAB949FfD34c29Cf859C035DC4525DF4`](https://optimism-sepolia.blockscout.com/address/0x1f898895eAB949FfD34c29Cf859C035DC4525DF4) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://optimism-sepolia.blockscout.com/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sepolia.etherscan.io/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x08D3C81626d9Cb19760835e8730Ec0D3F1899976`](https://sepolia.etherscan.io/address/0x08D3C81626d9Cb19760835e8730Ec0D3F1899976) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xB655ecD83D27f7c683A9605783bd2866a4dCEB04`](https://sepolia.etherscan.io/address/0xB655ecD83D27f7c683A9605783bd2866a4dCEB04) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xd116c275541cdBe7594A202bD6AE4DBca4578462`](https://sepolia.etherscan.io/address/0xd116c275541cdBe7594A202bD6AE4DBca4578462) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sepolia.etherscan.io/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Superseed Sepolia | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://sepolia-explorer.superseed.xyz/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0xc5D8E4317CE4a2E323192A5d856C90372bDE1558`](https://sepolia-explorer.superseed.xyz/address/0xc5D8E4317CE4a2E323192A5d856C90372bDE1558) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0xB2C6C57ee10B88E8344f34ffeCe39B0C6573c23D`](https://sepolia-explorer.superseed.xyz/address/0xB2C6C57ee10B88E8344f34ffeCe39B0C6573c23D) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0x4E83EC1Ea3B885C1a3698dA7DC42F32575688ABE`](https://sepolia-explorer.superseed.xyz/address/0x4E83EC1Ea3B885C1a3698dA7DC42F32575688ABE) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://sepolia-explorer.superseed.xyz/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | ### Taiko Hekla | Contract | Address | Deployment | | :-------- | :-------- | :--------- | | Helpers | [`0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc`](https://hekla.taikoscan.network/address/0xf8076E4Fb5cfE8be1C26E61222DC51828Db8C1dc) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | LockupNFTDescriptor | [`0x4a92Ca0a777fd781B3aA1d7925Ad54B64C85eedE`](https://hekla.taikoscan.network/address/0x4a92Ca0a777fd781B3aA1d7925Ad54B64C85eedE) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierBatchLockup | [`0x5F62Be3b60c3Dc3D49e96Ee8390Fea2930A3E01b`](https://hekla.taikoscan.network/address/0x5F62Be3b60c3Dc3D49e96Ee8390Fea2930A3E01b) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | SablierLockup | [`0xa969f0CCc080dfd513Eb7175248df68364701fC2`](https://hekla.taikoscan.network/address/0xa969f0CCc080dfd513Eb7175248df68364701fC2) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | | VestingMath | [`0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d`](https://hekla.taikoscan.network/address/0x5522CA06Ce080800AB59BA4C091e63f6f54C5E6d) | [`lockup-v2.0`](https://github.com/sablier-labs/sdk/blob/main/deployments/lockup/v2.0) | --- ## Overview(Reference) The Sablier Protocol is a smart contract system comprised of many abstract contracts, libraries, and types. The design of the smart contracts draws some inspiration from the architectural principles of [Uniswap](https://docs.uniswap.org). This section provides a detailed overview of the Sablier smart contracts, their designs, control flows, and contract references. ## Lockup > [**Lockup Source Code**](https://github.com/sablier-labs/lockup/tree/release) The Lockup repo consists of the Sablier Lockup contract, public libraries, Batch Lockup contract and an NFT descriptor. ### BatchLockup > [**BatchLockup Reference**](./lockup/contracts/contract.SablierBatchLockup) Creates multiple streams in a single transaction. ### Libraries > [**Helpers Library**](./lockup/contracts/libraries/library.Helpers) Library to validate input parameters across lockup streams. > [**LockupMath Library**](./lockup/contracts/libraries/library.LockupMath) Library to calculate vested amount across lockup streams. ### NFTDescriptor > [**NFTDescriptor Reference**](./lockup/contracts/contract.LockupNFTDescriptor) Generates the URI describing the Sablier Lockup stream NFTs. ### SablierLockup > [**SablierLockup Reference**](./lockup/contracts/contract.SablierLockup) Creates and manages Lockup streams with three different streaming functions. ## Merkle Airdrops > [**Merkle Airdrops Source Code**](https://github.com/sablier-labs/airdrops/tree/release) The Merkle Airdrops repo is a collection of contracts to create various kinds of airdrop campaigns. Some of these campaigns make use of the Lockup protocol to create what we call [Airstreams](/concepts/airdrops). This repo consists of airdrops related contracts such as MerkleFactory, MerkleInstant, MerkleLL, and MerkleLT. ### Factories > [**MerkleInstant Reference**](./airdrops/contracts/contract.SablierFactoryMerkleInstant) > [**MerkleLL Reference**](./airdrops/contracts/contract.SablierFactoryMerkleLL) > [**MerkleLT Reference**](./airdrops/contracts/contract.SablierFactoryMerkleLT) > [**MerkleVCA Reference**](./airdrops/contracts/contract.SablierFactoryMerkleVCA) Factory contracts to deploy various Merkle campaigns. ### MerkleInstant > [**MerkleInstant Reference**](./airdrops/contracts/contract.SablierMerkleInstant) Enables airdrop distributions where the tokens are claimed directly to the users' wallets. ### MerkleLL > [**MerkleLL Reference**](./airdrops/contracts/contract.SablierMerkleLL) Enables airdrops with a vesting period powered by the Lockup Linear distribution model. ### MerkleLT > [**MerkleLT Reference**](./airdrops/contracts/contract.SablierMerkleLT) Enables airdrops with a vesting period powered by the Lockup Tranched distribution model. ### MerkleVCA > [**MerkleVCA Reference**](./airdrops/contracts/contract.SablierMerkleVCA) Enables airdrops where the claim amount increases linearly until the airdrop period ends. Claiming early results in forgoing the remaining amount, whereas claiming after the period grants the full amount that was allocated. ## Flow > [**Flow Source Code**](https://github.com/sablier-labs/flow/tree/release) The Flow repo consists of the Sablier Flow contract, and an NFT descriptor. ### NFTDescriptor > [**FlowNFTDescriptor Reference**](./flow/contracts/contract.FlowNFTDescriptor) Generates the URI describing the Sablier Flow stream NFTs which, currently, is the Sablier logo. ### SablierFlow > [**SablierFlow Reference**](./flow/contracts/contract.SablierFlow) Creates and manages payment streams. --- ## Errors ## Background The Sablier Protocol handles errors with the convenient and gas-efficient [custom error syntax](https://blog.soliditylang.org/2021/04/21/custom-errors) introduced in Solidity v0.8.4. The error data encoding is identical to the ABI encoding used for functions, e.g.: ```solidity error SablierLockupBase_WithdrawAmountZero(uint256 streamId); ``` Yields the following 4-byte selector in the contract's ABI: ```solidity bytes4(keccak256(bytes("SablierLockupBase_WithdrawAmountZero(uint256)"))) // 0xf747ab7c ``` ## Naming Pattern With the exception of a few generics, all errors in Sablier Protocol adhere to the naming pattern `_`. Incorporating the contract name as a prefix offers context, making it easier for end users to pinpoint the contract responsible for a reverted transaction. This approach is particularly helpful for complex transactions involving multiple contracts. ## Lockup Error List [Click here](lockup/contracts/libraries/library.Errors) to see the full error list in Lockup protocol. ## Airdrops Error List [Click here](airdrops/contracts/libraries/library.Errors) to see the full error list in Airdrops protocol. ## Flow Error List [Click here](flow/contracts/libraries/library.Errors) to see the full error list in Flow protocol. ## Resources - [Custom Errors in Solidity](https://blog.soliditylang.org/2021/04/21/custom-errors/): deep dive into the custom error syntax - [OpenChain](https://openchain.xyz/signatures): signature database - [4byte.directory](https://4byte.directory/): yet another signature database --- ## Diagrams ## Airstream Campaigns In an airstream campaign, there is a vesting of tokens which is powered by Sablier Lockup protocol. A typical airstream campaign creation flow looks like the following: ```mermaid sequenceDiagram actor Campaign admin Campaign admin ->> FactoryMerkleLL: createMerkleLL() FactoryMerkleLL -->> MerkleLL: Deploy a new contract ``` And this is how the claim flow looks like for recipients: ```mermaid sequenceDiagram actor Airdrop recipient Airdrop recipient ->> MerkleLL: claim() MerkleLL -->> SablierLockup: Create vesting stream MerkleLL -->> SablierLockup: Transfer tokens SablierLockup -->> Airdrop recipient: Mint Stream NFT ``` If recipient claims after the vesting end date, then no stream is created and the full allocation is transferred directly to the recipient's wallet. ```mermaid sequenceDiagram actor Airdrop recipient Airdrop recipient ->> MerkleLL: claim() MerkleLL -->> Airdrop recipient: Transfer tokens ``` ## Instant Airdrop Campaigns In an instant airdrop campaign, there is no vesting and airdropped tokens are claimed directly to the users' wallets. A typical instant airdrop campaign creation flow looks like the following: ```mermaid sequenceDiagram actor Campaign admin Campaign admin ->> FactoryMerkleInstant: createMerkleInstant() FactoryMerkleInstant -->> MerkleInstant: Deploy a new contract ``` And this is how the claim flow looks like for recipients: ```mermaid sequenceDiagram actor Airdrop recipient Airdrop recipient ->> MerkleInstant: claim() MerkleInstant -->> Airdrop recipient: Transfer tokens ``` ## Variable Claim Airdrop Campaigns In a variable claim airdrop campaign, there is a vesting of tokens similar to Airstream campaigns, however, user only receives an amount of token depending on the time elapsed since the start of the campaign. The forfeited amount of tokens is returned back the project. ```mermaid sequenceDiagram actor Campaign admin Campaign admin ->> FactoryMerkleVCA: createMerkleVCA() FactoryMerkleVCA -->> MerkleVCA: Deploy a new contract ``` And this is how a typical claim flow looks like for recipients: Transfer ```mermaid sequenceDiagram actor Airdrop recipient Airdrop recipient ->> MerkleVCA: claimTo() MerkleVCA -->> Airdrop recipient: Transfer vested tokens MerkleVCA -->> MerkleVCA: unvested tokens are kept for Campaign admin ``` ## Clawback For campaign admins, we offer `clawback` functionality which can be used to retrieve unclaimed funds after expiration. In case of variable claim campaign, `clawback` can be used to retrieve forfeited tokens. There is also a grace period that ends 7 days after the first claim is made. During the grace period, admin can `clawback` to return funds from the campaign contract. This is useful in case there had been an accidental transfer of funds. ```mermaid sequenceDiagram actor Campaign admin Campaign admin ->> Merkle Campaign: clawback() Merkle Campaign -->> Campaign admin: Transfer unclaimed/forfeited tokens ``` --- ## Access Control With the exception of the [Comptroller functions](/concepts/governance#merkle-factory), all functions in Merkle campaign can only be triggered either by the campaign creator or the airdrop recipients. The Comptroller has no control over any funds in the campaign contract. This article will provide a comprehensive overview of the actions that can be performed on a campaign contract. :::note Every campaign has a creator and a recipient. An "public" caller is any address outside of creator and recipient. Anyone can call `claim` function on a campaign but the tokens will be transferred to the recipient. ::: ## Overview The table below offers a quick overview of the access control for each action that can be performed on a campaign. | Action | Creator | Recipient | Public | Compatibility | | ----------- | :-----: | :-------: | :----: | ----------------------------------- | | Claim | ✅ | ✅ | ✅ | Airstreams, Instant | | ClaimTo | ❌ | ✅ | ❌ | Airstreams, Instant, Variable Claim | | ClaimViaSig | ✅ | ✅ | ✅ | Airstreams, Instant, Variable Claim | | Clawback | ✅ | ❌ | ❌ | Airstreams, Instant, Variable Claim | ## Claim Claiming an airdrop using `claim` function requires four values: 1. Address of the eligible user 1. Amount that the user is eligible for 1. Claim index in the bitmap 1. Merkle proof Anybody can `claim` function with the correct set of values. The `claim` then automatically transfers amount of tokens to the eligible user. If the campaign requires token vesting, then the `claim` function will create a Sablier stream on behalf of the eligible user. ```mermaid sequenceDiagram actor Anyone Anyone ->> Campaign: claim(..) Create actor Recipient Campaign -->> Recipient: Transfer tokens/Create Stream ``` :::important `claim` function is unavailable in a Variable Claim Airdrop Campaign. You can use either [`claimTo`](#claimto) or [`claimViaSig`](#claimviasig) to claim from it. ::: ## ClaimTo Claiming an airdrop using `claimTo` function requires four values: 1. Address to which the tokens should be sent on behalf of the eligible user 1. Amount that the user is eligible for 1. Claim index in the bitmap 1. Merkle proof Only eligible users can call `claimTo` function with the correct set of values. The `claimTo` then automatically transfers amount of tokens to the provided address (which could be different from the user address). If the campaign requires token vesting, then the `claimTo` function will create a Sablier stream on behalf of the eligible user. ```mermaid sequenceDiagram actor Recipient Recipient ->> Campaign: claimTo(..) Create actor Provided Address Campaign -->> Provided Address: Transfer tokens/Create Stream ``` ## ClaimViaSig Claiming an airdrop using `claimViaSig` function requires seven values: 1. Address to which the tokens should be sent on behalf of the eligible user 1. Amount that the user is eligible for 1. Claim index in the bitmap 1. Merkle proof 1. Address of the eligible user 1. EIP-712 or EIP-1271 signature from the eligible user 1. A UNIX timestamp from which above signature should be valid Anybody can call `claimViaSig` function as long as the EIP-721 (or EIP-1271) signature is valid and signed by the eligible user. The `claimViaSig` then automatically transfers amount of tokens to the provided address (which could be different from the user address). If the campaign requires token vesting, then the `claimViaSig` function will create a Sablier stream on behalf of the eligible user. ```mermaid sequenceDiagram actor Anybody Anybody ->> Campaign: claimViaSig(..) Create actor Provided Address Campaign -->> Provided Address: Transfer tokens/Create Stream ``` ## Clawback Only the campaign creator can clawback funds within grace period. ```mermaid sequenceDiagram actor Campaign Creator Campaign Creator ->> Campaign: clawback() Campaign -->> Campaign Creator: Transfer unclaimed tokens ``` --- ## Adminable [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/Adminable.sol) **Inherits:** IAdminable See the documentation in {IAdminable}. ## State Variables ### admin The address of the admin account or contract. ```solidity address public override admin; ``` ## Functions ### onlyAdmin Reverts if called by any account other than the admin. ```solidity modifier onlyAdmin(); ``` ### constructor _Emits a {TransferAdmin} event._ ```solidity constructor(address initialAdmin); ``` **Parameters** | Name | Type | Description | | -------------- | --------- | --------------------------------- | | `initialAdmin` | `address` | The address of the initial admin. | ### transferAdmin Transfers the contract admin to a new address. Notes: - Does not revert if the admin is the same. - This function can potentially leave the contract without an admin, thereby removing any functionality that is only available to the admin. Requirements: - `msg.sender` must be the contract admin. ```solidity function transferAdmin(address newAdmin) public virtual override onlyAdmin; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ----------------------------- | | `newAdmin` | `address` | The address of the new admin. | ### \_transferAdmin _An internal function to transfer the admin._ ```solidity function _transferAdmin(address oldAdmin, address newAdmin) internal; ``` ### \_onlyAdmin _A private function is used instead of inlining this logic in a modifier because Solidity copies modifiers into every function that uses them._ ```solidity function _onlyAdmin() private view; ``` --- ## Comptrollerable [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/Comptrollerable.sol) **Inherits:** IComptrollerable See the documentation in {IComptrollerable}. ## State Variables ### comptroller Retrieves the address of the comptroller contract. ```solidity ISablierComptroller public override comptroller; ``` ## Functions ### onlyComptroller Reverts if called by any account other than the comptroller. ```solidity modifier onlyComptroller(); ``` ### constructor ```solidity constructor(address initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### setComptroller Sets the comptroller to a new address. Emits a {SetComptroller} event. Requirements: - `msg.sender` must be the current comptroller. - The new comptroller must return `true` from {supportsInterface} with the comptroller's minimal interface ID which is defined as the XOR of the following function selectors: 1. {calculateMinFeeWeiFor} 2. {convertUSDFeeToWei} 3. {execute} 4. {getMinFeeUSDFor} ```solidity function setComptroller(ISablierComptroller newComptroller) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ---------------- | --------------------- | -------------------------------------------- | | `newComptroller` | `ISablierComptroller` | The address of the new comptroller contract. | ### transferFeesToComptroller Transfers the fees to the comptroller contract. _Emits a {TransferFeesToComptroller} event._ ```solidity function transferFeesToComptroller() external override; ``` ### \_checkComptroller _See the documentation for the user-facing functions that call this private function._ ```solidity function _checkComptroller() private view; ``` ### \_setComptroller _See the documentation for the user-facing functions that call this private function._ ```solidity function _setComptroller( ISablierComptroller previousComptroller, ISablierComptroller newComptroller, bytes4 minimalInterfaceId ) private; ``` --- ## SablierFactoryMerkleBase [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/abstracts/SablierFactoryMerkleBase.sol) **Inherits:** [Comptrollerable](/docs/reference/airdrops/contracts/abstracts/abstract.Comptrollerable.md), [ISablierFactoryMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md) See the documentation in [ISablierFactoryMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md). ## State Variables ### nativeToken Retrieves the address of the ERC-20 interface of the native token, if it exists. _The native tokens on some chains have a dual interface as ERC-20. For example, on Polygon the $POL token is the native token and has an ERC-20 version at 0x0000000000000000000000000000000000001010. This means that `address(this).balance` returns the same value as `balanceOf(address(this))`. To avoid any unintended behavior, these tokens cannot be used in Sablier. As an alternative, users can use the Wrapped version of the token, i.e. WMATIC, which is a standard ERC-20 token._ ```solidity address public override nativeToken; ``` ## Functions ### constructor ```solidity constructor(address initialComptroller) [Comptrollerable](/docs/reference/airdrops/contracts/abstracts/abstract.Comptrollerable.md)(initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### setNativeToken Sets the native token address. Once set, it cannot be changed. For more information, see the documentation for {nativeToken}. Emits a {SetNativeToken} event. Requirements: - `msg.sender` must be the comptroller. - `newNativeToken` must not be zero address. - The native token must not be already set. ```solidity function setNativeToken(address newNativeToken) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | -------------------------------- | | `newNativeToken` | `address` | The address of the native token. | ### \_forbidNativeToken Checks that the provided token is not the native token. _Reverts if the provided token is the native token._ ```solidity function _forbidNativeToken(address token) internal view; ``` --- ## SablierMerkleBase [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/abstracts/SablierMerkleBase.sol) **Inherits:** [ISablierMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md), [Adminable](/docs/reference/airdrops/contracts/abstracts/abstract.Adminable.md) See the documentation in [ISablierMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md). ## State Variables ### \_CACHED_CHAIN_ID _Cache the chain ID in order to invalidate the cached domain separator if the chain ID changes in case of a chain split._ ```solidity uint256 private immutable _CACHED_CHAIN_ID; ``` ### \_CACHED_DOMAIN_SEPARATOR _The domain separator, as required by EIP-712 and EIP-1271, used for signing claim to prevent replay attacks across different campaigns._ ```solidity bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; ``` ### CAMPAIGN_START_TIME The timestamp at which campaign starts and claim begins. _This is an immutable state variable._ ```solidity uint40 public immutable override CAMPAIGN_START_TIME; ``` ### COMPTROLLER Retrieves the address of the comptroller contract. ```solidity address public immutable override COMPTROLLER; ``` ### EXPIRATION The cut-off point for the campaign, as a Unix timestamp. A value of zero means there is no expiration. _This is an immutable state variable._ ```solidity uint40 public immutable override EXPIRATION; ``` ### IS_SABLIER_MERKLE Returns `true` indicating that this campaign contract is deployed using the Sablier Factory. _This is a constant state variable._ ```solidity bool public constant override IS_SABLIER_MERKLE = true; ``` ### MERKLE_ROOT The root of the Merkle tree used to validate the proofs of inclusion. _This is an immutable state variable._ ```solidity bytes32 public immutable override MERKLE_ROOT; ``` ### TOKEN The ERC-20 token to distribute. _This is an immutable state variable._ ```solidity IERC20 public immutable override TOKEN; ``` ### campaignName Retrieves the name of the campaign. ```solidity string public override campaignName; ``` ### firstClaimTime Retrieves the timestamp when the first claim is made, and zero if no claim was made yet. ```solidity uint40 public override firstClaimTime; ``` ### ipfsCID The content identifier for indexing the campaign on IPFS. _An empty value may break certain UI features that depend upon the IPFS CID._ ```solidity string public override ipfsCID; ``` ### minFeeUSD Retrieves the min USD fee required to claim the airdrop, denominated in 8 decimals. _The denomination is based on Chainlink's 8-decimal format for USD prices, where 1e8 is $1._ ```solidity uint256 public override minFeeUSD; ``` ### \_claimedBitMap _Packed booleans that record the history of claims._ ```solidity BitMaps.BitMap internal _claimedBitMap; ``` ## Functions ### notZeroAddress _Modifier to check that `to` is not zero address._ ```solidity modifier notZeroAddress(address to); ``` ### constructor Constructs the contract by initializing the immutable state variables. ```solidity constructor( address campaignCreator, string memory campaignName_, uint40 campaignStartTime, address comptroller, uint40 expiration, address initialAdmin, string memory ipfsCID_, bytes32 merkleRoot, IERC20 token ) [Adminable](/docs/reference/airdrops/contracts/abstracts/abstract.Adminable.md)(initialAdmin); ``` ### calculateMinFeeWei Calculates the minimum fee in wei required to claim the airdrop. ```solidity function calculateMinFeeWei() external view override returns (uint256); ``` ### domainSeparator The domain separator, as required by EIP-712 and EIP-1271, used for signing claim to prevent replay attacks across different campaigns. ```solidity function domainSeparator() external view override returns (bytes32); ``` ### hasClaimed Returns a flag indicating whether a claim has been made for a given index. _Uses a bitmap to save gas._ ```solidity function hasClaimed(uint256 index) public view override returns (bool); ``` **Parameters** | Name | Type | Description | | ------- | --------- | ------------------------------------ | | `index` | `uint256` | The index of the recipient to check. | ### hasExpired Returns a flag indicating whether the campaign has expired. ```solidity function hasExpired() public view override returns (bool); ``` ### clawback Claws back the unclaimed tokens. Emits a {Clawback} event. Requirements: - `msg.sender` must be the admin. - No claim must be made, OR The current timestamp must not exceed 7 days after the first claim, OR The campaign must be expired. ```solidity function clawback(address to, uint128 amount) external override onlyAdmin; ``` **Parameters** | Name | Type | Description | | -------- | --------- | ---------------------------------- | | `to` | `address` | The address to receive the tokens. | | `amount` | `uint128` | The amount of tokens to claw back. | ### lowerMinFeeUSD Lowers the min USD fee. Emits a {LowerMinFeeUSD} event. Requirements: - `msg.sender` must be the comptroller. - The new fee must be less than the current {minFeeUSD}. ```solidity function lowerMinFeeUSD(uint256 newMinFeeUSD) external override; ``` **Parameters** | Name | Type | Description | | -------------- | --------- | ------------------------------------------------------ | | `newMinFeeUSD` | `uint256` | The new min USD fee to set, denominated in 8 decimals. | ### \_checkSignature _Verifies the signature against the provided parameters. It supports both EIP-712 and EIP-1271 signatures._ ```solidity function _checkSignature( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes calldata signature ) internal view; ``` ### \_domainSeparator _Returns the domain separator for the current chain._ ```solidity function _domainSeparator() private view returns (bytes32); ``` ### \_hasGracePeriodPassed Returns a flag indicating whether the grace period has passed. _The grace period is 7 days after the first claim._ ```solidity function _hasGracePeriodPassed() private view returns (bool); ``` ### \_revertIfToZeroAddress _This function checks if `to` is zero address._ ```solidity function _revertIfToZeroAddress(address to) private pure; ``` ### \_preProcessClaim _See the documentation for the user-facing functions that call this internal function._ ```solidity function _preProcessClaim(uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof) internal; ``` --- ## SablierMerkleLockup [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/abstracts/SablierMerkleLockup.sol) **Inherits:** [ISablierMerkleLockup](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLockup.md), [SablierMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierMerkleBase.md) See the documentation in [ISablierMerkleLockup](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLockup.md). ## State Variables ### SABLIER_LOCKUP The address of the [SablierLockup](/reference/lockup/contracts/contract.SablierLockup.md) contract. ```solidity ISablierLockup public immutable override SABLIER_LOCKUP; ``` ### STREAM_CANCELABLE A flag indicating whether the streams can be canceled. _This is an immutable state variable._ ```solidity bool public immutable override STREAM_CANCELABLE; ``` ### STREAM_TRANSFERABLE A flag indicating whether the stream NFTs are transferable. _This is an immutable state variable._ ```solidity bool public immutable override STREAM_TRANSFERABLE; ``` ### streamShape Retrieves the shape of the Lockup stream created upon claiming. ```solidity string public override streamShape; ``` ### \_claimedStreams _A mapping between recipient addresses and Lockup streams created through the claim function._ ```solidity mapping(address recipient => uint256[] streamIds) internal _claimedStreams; ``` ## Functions ### constructor _Constructs the contract by initializing the immutable state vars, and max approving the Lockup contract._ ```solidity constructor( address campaignCreator, string memory campaignName, uint40 campaignStartTime, bool cancelable, address comptroller, ISablierLockup sablierLockup, uint40 expiration, address initialAdmin, string memory ipfsCID, bytes32 merkleRoot, string memory shape_, IERC20 token, bool transferable ) SablierMerkleBase( campaignCreator, campaignName, campaignStartTime, comptroller, expiration, initialAdmin, ipfsCID, merkleRoot, token ); ``` ### claimedStreams Retrieves the stream IDs associated with the airdrops claimed by the provided recipient. In practice, most campaigns will only have one stream per recipient. ```solidity function claimedStreams(address recipient) external view override returns (uint256[] memory); ``` --- ## SablierFactoryMerkleInstant [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierFactoryMerkleInstant.sol) **Inherits:** [ISablierFactoryMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleInstant.md), [SablierFactoryMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierFactoryMerkleBase.md) See the documentation in [ISablierFactoryMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleInstant.md). ## Functions ### constructor ```solidity constructor(address initialComptroller) SablierFactoryMerkleBase(initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### computeMerkleInstant Computes the deterministic address where [SablierMerkleInstant](/docs/reference/airdrops/contracts/contract.SablierMerkleInstant.md) campaign will be deployed. _Reverts if the requirements from {createMerkleInstant} are not met._ ```solidity function computeMerkleInstant( address campaignCreator, MerkleInstant.ConstructorParams calldata params ) external view override returns (address merkleInstant); ``` ### createMerkleInstant Creates a new MerkleInstant campaign for instant distribution of tokens. Emits a {CreateMerkleInstant} event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - A value of zero for `params.expiration` means the campaign does not expire. Requirements: - `params.token` must not be the forbidden native token. ```solidity function createMerkleInstant( MerkleInstant.ConstructorParams calldata params, uint256 aggregateAmount, uint256 recipientCount ) external override returns (ISablierMerkleInstant merkleInstant); ``` **Parameters** | Name | Type | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------- | | `params` | `MerkleInstant.ConstructorParams` | Struct encapsulating the input parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | --------------- | ----------------------- | -------------------------------------------------------- | | `merkleInstant` | `ISablierMerkleInstant` | The address of the newly created MerkleInstant contract. | --- ## SablierFactoryMerkleLL [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierFactoryMerkleLL.sol) **Inherits:** [ISablierFactoryMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLL.md), [SablierFactoryMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierFactoryMerkleBase.md) See the documentation in [ISablierFactoryMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLL.md). ## Functions ### constructor ```solidity constructor(address initialComptroller) SablierFactoryMerkleBase(initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### computeMerkleLL Computes the deterministic address where [SablierMerkleLL](/docs/reference/airdrops/contracts/contract.SablierMerkleLL.md) campaign will be deployed. _Reverts if the requirements from {createMerkleLL} are not met._ ```solidity function computeMerkleLL( address campaignCreator, MerkleLL.ConstructorParams calldata params ) external view override returns (address merkleLL); ``` ### createMerkleLL Creates a new Merkle Lockup campaign with a Lockup Linear distribution. Emits a {CreateMerkleLL} event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - A value of zero for `params.expiration` means the campaign does not expire. Requirements: - `params.token` must not be the forbidden native token. ```solidity function createMerkleLL( MerkleLL.ConstructorParams calldata params, uint256 aggregateAmount, uint256 recipientCount ) external override returns (ISablierMerkleLL merkleLL); ``` **Parameters** | Name | Type | Description | | ----------------- | ---------------------------- | ------------------------------------------------------------------------------- | | `params` | `MerkleLL.ConstructorParams` | Struct encapsulating the input parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | ---------- | ------------------ | -------------------------------------------------------- | | `merkleLL` | `ISablierMerkleLL` | The address of the newly created Merkle Lockup contract. | --- ## SablierFactoryMerkleLT [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierFactoryMerkleLT.sol) **Inherits:** [ISablierFactoryMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLT.md), [SablierFactoryMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierFactoryMerkleBase.md) See the documentation in [ISablierFactoryMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLT.md). ## Functions ### constructor ```solidity constructor(address initialComptroller) SablierFactoryMerkleBase(initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### computeMerkleLT Computes the deterministic address where [SablierMerkleLT](/docs/reference/airdrops/contracts/contract.SablierMerkleLT.md) campaign will be deployed. _Reverts if the requirements from {createMerkleLT} are not met._ ```solidity function computeMerkleLT( address campaignCreator, MerkleLT.ConstructorParams calldata params ) external view override returns (address merkleLT); ``` ### isPercentagesSum100 Verifies if the sum of percentages in `tranches` equals 100%, i.e., 1e18. _This is a helper function for the frontend. It is not used anywhere in the contracts._ ```solidity function isPercentagesSum100(MerkleLT.TrancheWithPercentage[] calldata tranches) external pure override returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | ---------------------------------- | ------------------------------------------------------ | | `tranches` | `MerkleLT.TrancheWithPercentage[]` | The tranches with their respective unlock percentages. | **Returns** | Name | Type | Description | | -------- | ------ | ------------------------------------------------------------ | | `result` | `bool` | True if the sum of percentages equals 100%, otherwise false. | ### createMerkleLT Creates a new Merkle Lockup campaign with a Lockup Tranched distribution. Emits a {CreateMerkleLT} event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - A value of zero for `params.expiration` means the campaign does not expire. Requirements: - `params.token` must not be the forbidden native token. - The sum of percentages of the tranches must equal 100%. ```solidity function createMerkleLT( MerkleLT.ConstructorParams calldata params, uint256 aggregateAmount, uint256 recipientCount ) external override returns (ISablierMerkleLT merkleLT); ``` **Parameters** | Name | Type | Description | | ----------------- | ---------------------------- | ------------------------------------------------------------------------------- | | `params` | `MerkleLT.ConstructorParams` | Struct encapsulating the input parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | ---------- | ------------------ | -------------------------------------------------------- | | `merkleLT` | `ISablierMerkleLT` | The address of the newly created Merkle Lockup contract. | ### \_calculateTrancheTotals _Calculate the total duration and total percentage of the tranches._ ```solidity function _calculateTrancheTotals(MerkleLT.TrancheWithPercentage[] memory tranches) private pure returns (uint256 totalDuration, uint64 totalPercentage); ``` ### \_checkDeploymentParams _Validate the token and the total percentage._ ```solidity function _checkDeploymentParams(address token, uint64 totalPercentage) private view; ``` --- ## SablierFactoryMerkleVCA [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierFactoryMerkleVCA.sol) **Inherits:** [ISablierFactoryMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleVCA.md), [SablierFactoryMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierFactoryMerkleBase.md) See the documentation in [ISablierFactoryMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleVCA.md). ## Functions ### constructor ```solidity constructor(address initialComptroller) SablierFactoryMerkleBase(initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### computeMerkleVCA Computes the deterministic address where [SablierMerkleVCA](/docs/reference/airdrops/contracts/contract.SablierMerkleVCA.md) campaign will be deployed. _Reverts if the requirements from {createMerkleVCA} are not met._ ```solidity function computeMerkleVCA( address campaignCreator, MerkleVCA.ConstructorParams calldata params ) external view override returns (address merkleVCA); ``` ### createMerkleVCA Creates a new MerkleVCA campaign for variable distribution of tokens. Emits a {CreateMerkleVCA} event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - Users interested into funding the campaign before its deployment must meet the below requirements, otherwise the campaign deployment will revert. Requirements: - `params.token` must not be the forbidden native token. - `params.expiration` must be greater than 0. - `params.expiration` must be at least 1 week beyond the end time to ensure loyal recipients have enough time to claim. - `params.vestingEndTime` must be greater than `params.vestingStartTime`. - Both `params.vestingStartTime` and `params.vestingEndTime` must be greater than 0. - `params.unlockPercentage` must not be greater than 1e18, equivalent to 100%. ```solidity function createMerkleVCA( MerkleVCA.ConstructorParams calldata params, uint256 aggregateAmount, uint256 recipientCount ) external returns (ISablierMerkleVCA merkleVCA); ``` **Parameters** | Name | Type | Description | | ----------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | `MerkleVCA.ConstructorParams` | Struct encapsulating the [SablierMerkleVCA](/docs/reference/airdrops/contracts/contract.SablierMerkleVCA.md) parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | ----------- | ------------------- | ---------------------------------------------------- | | `merkleVCA` | `ISablierMerkleVCA` | The address of the newly created MerkleVCA campaign. | ### \_checkDeploymentParams _Validate the deployment parameters._ ```solidity function _checkDeploymentParams( address token, uint40 vestingStartTime, uint40 vestingEndTime, uint40 expiration, UD60x18 unlockPercentage ) private view; ``` --- ## SablierMerkleInstant [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierMerkleInstant.sol) **Inherits:** [ISablierMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleInstant.md), [SablierMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierMerkleBase.md) See the documentation in [ISablierMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleInstant.md). ## Functions ### constructor _Constructs the contract by initializing the immutable state variables._ ```solidity constructor( MerkleInstant.ConstructorParams memory params, address campaignCreator, address comptroller ) SablierMerkleBase( campaignCreator, params.campaignName, params.campaignStartTime, comptroller, params.expiration, params.initialAdmin, params.ipfsCID, params.merkleRoot, params.token ); ``` ### claim Claim airdrop on behalf of eligible recipient and transfer it to the recipient address. It emits a {ClaimInstant} event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. ```solidity function claim( uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof ) external payable override; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimTo Claim airdrop and transfer the tokens to the `to` address. It emits a {ClaimInstant} event. Requirements: - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. - Refer to the requirements in {claim}. ```solidity function claimTo( uint256 index, address to, uint128 amount, bytes32[] calldata merkleProof ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------ | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of `msg.sender`. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the `msg.sender`. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature, and transfer the tokens to the `to` address. It emits a {ClaimInstant} event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claim}. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of the recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ### \_postProcessClaim _Post-processes the claim execution by handling the tokens transfer and emitting an event._ ```solidity function _postProcessClaim(uint256 index, address recipient, address to, uint128 amount, bool viaSig) private; ``` --- ## SablierMerkleLL [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierMerkleLL.sol) **Inherits:** [ISablierMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL.md), [SablierMerkleLockup](/docs/reference/airdrops/contracts/abstracts/abstract.SablierMerkleLockup.md) See the documentation in [ISablierMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL.md). ## State Variables ### VESTING_CLIFF_DURATION Retrieves the cliff duration of the vesting stream, in seconds. ```solidity uint40 public immutable override VESTING_CLIFF_DURATION; ``` ### VESTING_CLIFF_UNLOCK_PERCENTAGE Retrieves the percentage of the claim amount due to be unlocked at the vesting cliff time, as a fixed-point number where 1e18 is 100%. ```solidity UD60x18 public immutable override VESTING_CLIFF_UNLOCK_PERCENTAGE; ``` ### VESTING_START_TIME Retrieves the start time of the vesting stream, as a Unix timestamp. Zero is a sentinel value for `block.timestamp`. ```solidity uint40 public immutable override VESTING_START_TIME; ``` ### VESTING_START_UNLOCK_PERCENTAGE Retrieves the percentage of the claim amount due to be unlocked at the vesting start time, as a fixed-point number where 1e18 is 100%. ```solidity UD60x18 public immutable override VESTING_START_UNLOCK_PERCENTAGE; ``` ### VESTING_TOTAL_DURATION Retrieves the total duration of the vesting stream, in seconds. ```solidity uint40 public immutable override VESTING_TOTAL_DURATION; ``` ## Functions ### constructor _Constructs the contract by initializing the immutable state variables, and max approving the Lockup contract._ ```solidity constructor( MerkleLL.ConstructorParams memory params, address campaignCreator, address comptroller ) SablierMerkleLockup( campaignCreator, params.campaignName, params.campaignStartTime, params.cancelable, comptroller, params.lockup, params.expiration, params.initialAdmin, params.ipfsCID, params.merkleRoot, params.shape, params.token, params.transferable ); ``` ### claim Claim airdrop on behalf of eligible recipient. If the vesting end time is in the future, it creates a Lockup Linear stream, otherwise it transfers the tokens directly to the recipient address. It emits either {ClaimLLWithTransfer} or {ClaimLLWithVesting} event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. - All requirements from {ISablierLockupLinear.createWithTimestampsLL} must be met. ```solidity function claim( uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof ) external payable override; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimTo Claim airdrop. If the vesting end time is in the future, it creates a Lockup Linear stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either {ClaimLLWithTransfer} or {ClaimLLWithVesting} event. Requirements: - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. - Refer to the requirements in {claim}. ```solidity function claimTo( uint256 index, address to, uint128 amount, bytes32[] calldata merkleProof ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of `msg.sender`. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the `msg.sender`. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature. If the vesting end time is in the future, it creates a Lockup Linear stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either {ClaimLLWithTransfer} or {ClaimLLWithVesting} event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claim}. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of the recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ### \_postProcessClaim _Post-processes the claim execution by creating the stream or transferring the tokens directly and emitting an event._ ```solidity function _postProcessClaim(uint256 index, address recipient, address to, uint128 amount, bool viaSig) private; ``` --- ## SablierMerkleLT [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierMerkleLT.sol) **Inherits:** [ISablierMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLT.md), [SablierMerkleLockup](/docs/reference/airdrops/contracts/abstracts/abstract.SablierMerkleLockup.md) See the documentation in [ISablierMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLT.md). ## State Variables ### VESTING_START_TIME Retrieves the start time of the vesting stream, as a Unix timestamp. Zero is a sentinel value for `block.timestamp`. ```solidity uint40 public immutable override VESTING_START_TIME; ``` ### \_tranchesWithPercentages _The tranches with their respective unlock percentages and durations._ ```solidity MerkleLT.TrancheWithPercentage[] private _tranchesWithPercentages; ``` ## Functions ### constructor _Constructs the contract by initializing the immutable state variables, and max approving the Lockup contract._ ```solidity constructor( MerkleLT.ConstructorParams memory params, address campaignCreator, address comptroller ) SablierMerkleLockup( campaignCreator, params.campaignName, params.campaignStartTime, params.cancelable, comptroller, params.lockup, params.expiration, params.initialAdmin, params.ipfsCID, params.merkleRoot, params.shape, params.token, params.transferable ); ``` ### tranchesWithPercentages Retrieves the tranches with their respective unlock percentages and durations. ```solidity function tranchesWithPercentages() external view override returns (MerkleLT.TrancheWithPercentage[] memory); ``` ### claim Claim airdrop on behalf of eligible recipient. If the vesting end time is in the future, it creates a Lockup Tranched stream, otherwise it transfers the tokens directly to the recipient address. It emits either {ClaimLTWithTransfer} or {ClaimLTWithVesting} event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. - All requirements from {ISablierLockupTranched.createWithTimestampsLT} must be met. ```solidity function claim( uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof ) external payable override; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimTo Claim airdrop. If the vesting end time is in the future, it creates a Lockup Tranched stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either {ClaimLTWithTransfer} or {ClaimLTWithVesting} event. Requirements: - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. - Refer to the requirements in {claim}. ```solidity function claimTo( uint256 index, address to, uint128 amount, bytes32[] calldata merkleProof ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of `msg.sender`. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the `msg.sender`. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature. If the vesting end time is in the future, it creates a Lockup Tranched stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either {ClaimLTWithTransfer} or {ClaimLTWithVesting} event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claim}. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of the recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ### \_calculateStartTimeAndTranches _Calculates the vesting start time, and the tranches based on the claim amount and the unlock percentages for each tranche._ ```solidity function _calculateStartTimeAndTranches(uint128 claimAmount) private view returns (uint40 vestingStartTime, LockupTranched.Tranche[] memory tranches); ``` ### \_postProcessClaim _Post-processes the claim execution by creating the stream or transferring the tokens directly and emitting an event._ ```solidity function _postProcessClaim(uint256 index, address recipient, address to, uint128 amount, bool viaSig) private; ``` --- ## SablierMerkleVCA [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/SablierMerkleVCA.sol) **Inherits:** [ISablierMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleVCA.md), [SablierMerkleBase](/docs/reference/airdrops/contracts/abstracts/abstract.SablierMerkleBase.md) See the documentation in [ISablierMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleVCA.md). ## State Variables ### UNLOCK_PERCENTAGE Retrieves the percentage of the full amount that will unlock immediately at the start time. The value is denominated as a fixed-point number where 1e18 is 100%. ```solidity UD60x18 public immutable override UNLOCK_PERCENTAGE; ``` ### VESTING_END_TIME Retrieves the time when the VCA airdrop is fully vested, as a Unix timestamp. ```solidity uint40 public immutable override VESTING_END_TIME; ``` ### VESTING_START_TIME Retrieves the time when the VCA airdrop begins to unlock, as a Unix timestamp. ```solidity uint40 public immutable override VESTING_START_TIME; ``` ### totalForgoneAmount Retrieves the total amount of tokens forgone by early claimers. ```solidity uint256 public override totalForgoneAmount; ``` ## Functions ### constructor _Constructs the contract by initializing the immutable state variables._ ```solidity constructor( MerkleVCA.ConstructorParams memory params, address campaignCreator, address comptroller ) SablierMerkleBase( campaignCreator, params.campaignName, params.campaignStartTime, comptroller, params.expiration, params.initialAdmin, params.ipfsCID, params.merkleRoot, params.token ); ``` ### calculateClaimAmount Calculates the amount that would be claimed if the claim were made at `claimTime`. _This is for informational purposes only. To actually claim the airdrop, a Merkle proof is required._ ```solidity function calculateClaimAmount(uint128 fullAmount, uint40 claimTime) external view returns (uint128); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | ----------------------------------------------------------------------------------------------- | | `fullAmount` | `uint128` | The amount of tokens allocated to a user, denominated in the token's decimals. | | `claimTime` | `uint40` | A hypothetical time at which to make the claim. Zero is a sentinel value for `block.timestamp`. | **Returns** | Name | Type | Description | | -------- | --------- | ---------------------------------------------------------------------- | | `` | `uint128` | The amount that would be claimed, denominated in the token's decimals. | ### calculateForgoneAmount Calculates the amount that would be forgone if the claim were made at `claimTime`. _This is for informational purposes only. Reverts if the claim time is less than the vesting start time, since the claim cannot be made, no amount can be forgone._ ```solidity function calculateForgoneAmount(uint128 fullAmount, uint40 claimTime) external view returns (uint128); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | ----------------------------------------------------------------------------------------------- | | `fullAmount` | `uint128` | The amount of tokens allocated to a user, denominated in the token's decimals. | | `claimTime` | `uint40` | A hypothetical time at which to make the claim. Zero is a sentinel value for `block.timestamp`. | **Returns** | Name | Type | Description | | -------- | --------- | ---------------------------------------------------------------------- | | `` | `uint128` | The amount that would be forgone, denominated in the token's decimals. | ### claimTo Claim airdrop. If the vesting end time is in the future, it calculates the claim amount to transfer to the `to` address, otherwise it transfers the full amount. It emits a {ClaimVCA} event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. - The claim amount must be greater than zero. - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. ```solidity function claimTo( uint256 index, address to, uint128 fullAmount, bytes32[] calldata merkleProof ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------ | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of `msg.sender`. | | `fullAmount` | `uint128` | The total amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature. If the vesting end time is in the future, it calculates the claim amount to transfer to the `to` address, otherwise it transfers the full amount. It emits a {ClaimVCA} event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claimTo} except that there are no restrictions on `msg.sender`. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 fullAmount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable override notZeroAddress(to); ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of the recipient. | | `fullAmount` | `uint128` | The total amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ### \_calculateClaimAmount _See the documentation for the user-facing functions that call this internal function._ ```solidity function _calculateClaimAmount(uint128 fullAmount, uint40 claimTime) private view returns (uint128); ``` ### \_postProcessClaim _Post-processes the claim execution by handling the tokens transfer and emitting an event._ ```solidity function _postProcessClaim(uint256 index, address recipient, address to, uint128 fullAmount, bool viaSig) private; ``` --- ## ISablierFactoryMerkleBase [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierFactoryMerkleBase.sol) **Inherits:** IComptrollerable _Common interface between factories that deploy campaign contracts. The contracts are deployed using CREATE2._ ## Functions ### nativeToken Retrieves the address of the ERC-20 interface of the native token, if it exists. _The native tokens on some chains have a dual interface as ERC-20. For example, on Polygon the $POL token is the native token and has an ERC-20 version at 0x0000000000000000000000000000000000001010. This means that `address(this).balance` returns the same value as `balanceOf(address(this))`. To avoid any unintended behavior, these tokens cannot be used in Sablier. As an alternative, users can use the Wrapped version of the token, i.e. WMATIC, which is a standard ERC-20 token._ ```solidity function nativeToken() external view returns (address); ``` ### setNativeToken Sets the native token address. Once set, it cannot be changed. For more information, see the documentation for [nativeToken](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md#nativetoken). Emits a {SetNativeToken} event. Requirements: - `msg.sender` must be the comptroller. - `newNativeToken` must not be zero address. - The native token must not be already set. ```solidity function setNativeToken(address newNativeToken) external; ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | -------------------------------- | | `newNativeToken` | `address` | The address of the native token. | ## Events ### SetNativeToken Emitted when the native token address is set by the comptroller. ```solidity event SetNativeToken(address indexed comptroller, address nativeToken); ``` --- ## ISablierFactoryMerkleInstant [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierFactoryMerkleInstant.sol) **Inherits:** [ISablierFactoryMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md) A factory that deploys MerkleInstant campaign contracts. _See the documentation in [ISablierMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleInstant.md)._ ## Functions ### computeMerkleInstant Computes the deterministic address where [SablierMerkleInstant](/docs/reference/airdrops/contracts/contract.SablierMerkleInstant.md) campaign will be deployed. _Reverts if the requirements from [createMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleInstant.md#createmerkleinstant) are not met._ ```solidity function computeMerkleInstant( address campaignCreator, MerkleInstant.ConstructorParams memory params ) external view returns (address merkleInstant); ``` ### createMerkleInstant Creates a new MerkleInstant campaign for instant distribution of tokens. Emits a [CreateMerkleInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleInstant.md#createmerkleinstant) event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - A value of zero for `params.expiration` means the campaign does not expire. Requirements: - `params.token` must not be the forbidden native token. ```solidity function createMerkleInstant( MerkleInstant.ConstructorParams memory params, uint256 aggregateAmount, uint256 recipientCount ) external returns (ISablierMerkleInstant merkleInstant); ``` **Parameters** | Name | Type | Description | | ----------------- | --------------------------------- | ------------------------------------------------------------------------------- | | `params` | `MerkleInstant.ConstructorParams` | Struct encapsulating the input parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | --------------- | ----------------------- | -------------------------------------------------------- | | `merkleInstant` | `ISablierMerkleInstant` | The address of the newly created MerkleInstant contract. | ## Events ### CreateMerkleInstant Emitted when a [SablierMerkleInstant](/docs/reference/airdrops/contracts/contract.SablierMerkleInstant.md) campaign is created. ```solidity event CreateMerkleInstant( ISablierMerkleInstant indexed merkleInstant, MerkleInstant.ConstructorParams params, uint256 aggregateAmount, uint256 recipientCount, address comptroller, uint256 minFeeUSD ); ``` --- ## ISablierFactoryMerkleLL [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierFactoryMerkleLL.sol) **Inherits:** [ISablierFactoryMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md) A factory that deploys MerkleLL campaign contracts. _See the documentation in [ISablierMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL.md)._ ## Functions ### computeMerkleLL Computes the deterministic address where [SablierMerkleLL](/docs/reference/airdrops/contracts/contract.SablierMerkleLL.md) campaign will be deployed. _Reverts if the requirements from [createMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLL.md#createmerklell) are not met._ ```solidity function computeMerkleLL( address campaignCreator, MerkleLL.ConstructorParams memory params ) external view returns (address merkleLL); ``` ### createMerkleLL Creates a new Merkle Lockup campaign with a Lockup Linear distribution. Emits a [CreateMerkleLL](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLL.md#createmerklell) event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - A value of zero for `params.expiration` means the campaign does not expire. Requirements: - `params.token` must not be the forbidden native token. ```solidity function createMerkleLL( MerkleLL.ConstructorParams memory params, uint256 aggregateAmount, uint256 recipientCount ) external returns (ISablierMerkleLL merkleLL); ``` **Parameters** | Name | Type | Description | | ----------------- | ---------------------------- | ------------------------------------------------------------------------------- | | `params` | `MerkleLL.ConstructorParams` | Struct encapsulating the input parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | ---------- | ------------------ | -------------------------------------------------------- | | `merkleLL` | `ISablierMerkleLL` | The address of the newly created Merkle Lockup contract. | ## Events ### CreateMerkleLL Emitted when a [SablierMerkleLL](/docs/reference/airdrops/contracts/contract.SablierMerkleLL.md) campaign is created. ```solidity event CreateMerkleLL( ISablierMerkleLL indexed merkleLL, MerkleLL.ConstructorParams params, uint256 aggregateAmount, uint256 recipientCount, address comptroller, uint256 minFeeUSD ); ``` --- ## ISablierFactoryMerkleLT [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierFactoryMerkleLT.sol) **Inherits:** [ISablierFactoryMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md) A factory that deploys MerkleLT campaign contracts. _See the documentation in [ISablierMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLT.md)._ ## Functions ### isPercentagesSum100 Verifies if the sum of percentages in `tranches` equals 100%, i.e., 1e18. _This is a helper function for the frontend. It is not used anywhere in the contracts._ ```solidity function isPercentagesSum100(MerkleLT.TrancheWithPercentage[] calldata tranches) external pure returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | ---------------------------------- | ------------------------------------------------------ | | `tranches` | `MerkleLT.TrancheWithPercentage[]` | The tranches with their respective unlock percentages. | **Returns** | Name | Type | Description | | -------- | ------ | ------------------------------------------------------------ | | `result` | `bool` | True if the sum of percentages equals 100%, otherwise false. | ### computeMerkleLT Computes the deterministic address where [SablierMerkleLT](/docs/reference/airdrops/contracts/contract.SablierMerkleLT.md) campaign will be deployed. _Reverts if the requirements from [createMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLT.md#createmerklelt) are not met._ ```solidity function computeMerkleLT( address campaignCreator, MerkleLT.ConstructorParams memory params ) external view returns (address merkleLT); ``` ### createMerkleLT Creates a new Merkle Lockup campaign with a Lockup Tranched distribution. Emits a [CreateMerkleLT](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleLT.md#createmerklelt) event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - A value of zero for `params.expiration` means the campaign does not expire. Requirements: - `params.token` must not be the forbidden native token. - The sum of percentages of the tranches must equal 100%. ```solidity function createMerkleLT( MerkleLT.ConstructorParams memory params, uint256 aggregateAmount, uint256 recipientCount ) external returns (ISablierMerkleLT merkleLT); ``` **Parameters** | Name | Type | Description | | ----------------- | ---------------------------- | ------------------------------------------------------------------------------- | | `params` | `MerkleLT.ConstructorParams` | Struct encapsulating the input parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | ---------- | ------------------ | -------------------------------------------------------- | | `merkleLT` | `ISablierMerkleLT` | The address of the newly created Merkle Lockup contract. | ## Events ### CreateMerkleLT Emitted when a [SablierMerkleLT](/docs/reference/airdrops/contracts/contract.SablierMerkleLT.md) campaign is created. ```solidity event CreateMerkleLT( ISablierMerkleLT indexed merkleLT, MerkleLT.ConstructorParams params, uint256 aggregateAmount, uint256 totalDuration, uint256 recipientCount, address comptroller, uint256 minFeeUSD ); ``` --- ## ISablierFactoryMerkleVCA [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierFactoryMerkleVCA.sol) **Inherits:** [ISablierFactoryMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleBase.md) A factory that deploys MerkleVCA campaign contracts. _See the documentation in [ISablierMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleVCA.md)._ ## Functions ### computeMerkleVCA Computes the deterministic address where [SablierMerkleVCA](/docs/reference/airdrops/contracts/contract.SablierMerkleVCA.md) campaign will be deployed. _Reverts if the requirements from [createMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleVCA.md#createmerklevca) are not met._ ```solidity function computeMerkleVCA( address campaignCreator, MerkleVCA.ConstructorParams memory params ) external view returns (address merkleVCA); ``` ### createMerkleVCA Creates a new MerkleVCA campaign for variable distribution of tokens. Emits a [CreateMerkleVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierFactoryMerkleVCA.md#createmerklevca) event. Notes: - The contract is created with CREATE2. - The campaign's fee will be set to the min USD fee unless a custom fee is set for `msg.sender`. - Users interested into funding the campaign before its deployment must meet the below requirements, otherwise the campaign deployment will revert. Requirements: - `params.token` must not be the forbidden native token. - `params.expiration` must be greater than 0. - `params.expiration` must be at least 1 week beyond the end time to ensure loyal recipients have enough time to claim. - `params.vestingEndTime` must be greater than `params.vestingStartTime`. - Both `params.vestingStartTime` and `params.vestingEndTime` must be greater than 0. - `params.unlockPercentage` must not be greater than 1e18, equivalent to 100%. ```solidity function createMerkleVCA( MerkleVCA.ConstructorParams memory params, uint256 aggregateAmount, uint256 recipientCount ) external returns (ISablierMerkleVCA merkleVCA); ``` **Parameters** | Name | Type | Description | | ----------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | `MerkleVCA.ConstructorParams` | Struct encapsulating the [SablierMerkleVCA](/docs/reference/airdrops/contracts/contract.SablierMerkleVCA.md) parameters, which are documented in {DataTypes}. | | `aggregateAmount` | `uint256` | The total amount of ERC-20 tokens to be distributed to all recipients. | | `recipientCount` | `uint256` | The total number of recipient addresses eligible for the airdrop. | **Returns** | Name | Type | Description | | ----------- | ------------------- | ---------------------------------------------------- | | `merkleVCA` | `ISablierMerkleVCA` | The address of the newly created MerkleVCA campaign. | ## Events ### CreateMerkleVCA Emitted when a [SablierMerkleVCA](/docs/reference/airdrops/contracts/contract.SablierMerkleVCA.md) campaign is created. ```solidity event CreateMerkleVCA( ISablierMerkleVCA indexed merkleVCA, MerkleVCA.ConstructorParams params, uint256 aggregateAmount, uint256 recipientCount, address comptroller, uint256 minFeeUSD ); ``` --- ## ISablierMerkleBase [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierMerkleBase.sol) **Inherits:** IAdminable _Common interface between campaign contracts._ ## Functions ### CAMPAIGN_START_TIME The timestamp at which campaign starts and claim begins. _This is an immutable state variable._ ```solidity function CAMPAIGN_START_TIME() external view returns (uint40); ``` ### COMPTROLLER Retrieves the address of the comptroller contract. ```solidity function COMPTROLLER() external view returns (address); ``` ### EXPIRATION The cut-off point for the campaign, as a Unix timestamp. A value of zero means there is no expiration. _This is an immutable state variable._ ```solidity function EXPIRATION() external view returns (uint40); ``` ### IS_SABLIER_MERKLE Returns `true` indicating that this campaign contract is deployed using the Sablier Factory. _This is a constant state variable._ ```solidity function IS_SABLIER_MERKLE() external view returns (bool); ``` ### MERKLE_ROOT The root of the Merkle tree used to validate the proofs of inclusion. _This is an immutable state variable._ ```solidity function MERKLE_ROOT() external view returns (bytes32); ``` ### TOKEN The ERC-20 token to distribute. _This is an immutable state variable._ ```solidity function TOKEN() external view returns (IERC20); ``` ### calculateMinFeeWei Calculates the minimum fee in wei required to claim the airdrop. ```solidity function calculateMinFeeWei() external view returns (uint256); ``` ### campaignName Retrieves the name of the campaign. ```solidity function campaignName() external view returns (string memory); ``` ### domainSeparator The domain separator, as required by EIP-712 and EIP-1271, used for signing claim to prevent replay attacks across different campaigns. ```solidity function domainSeparator() external view returns (bytes32); ``` ### firstClaimTime Retrieves the timestamp when the first claim is made, and zero if no claim was made yet. ```solidity function firstClaimTime() external view returns (uint40); ``` ### hasClaimed Returns a flag indicating whether a claim has been made for a given index. _Uses a bitmap to save gas._ ```solidity function hasClaimed(uint256 index) external view returns (bool); ``` **Parameters** | Name | Type | Description | | ------- | --------- | ------------------------------------ | | `index` | `uint256` | The index of the recipient to check. | ### hasExpired Returns a flag indicating whether the campaign has expired. ```solidity function hasExpired() external view returns (bool); ``` ### ipfsCID The content identifier for indexing the campaign on IPFS. _An empty value may break certain UI features that depend upon the IPFS CID._ ```solidity function ipfsCID() external view returns (string memory); ``` ### minFeeUSD Retrieves the min USD fee required to claim the airdrop, denominated in 8 decimals. _The denomination is based on Chainlink's 8-decimal format for USD prices, where 1e8 is $1._ ```solidity function minFeeUSD() external view returns (uint256); ``` ### clawback Claws back the unclaimed tokens. Emits a [Clawback](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md#clawback) event. Requirements: - `msg.sender` must be the admin. - No claim must be made, OR The current timestamp must not exceed 7 days after the first claim, OR The campaign must be expired. ```solidity function clawback(address to, uint128 amount) external; ``` **Parameters** | Name | Type | Description | | -------- | --------- | ---------------------------------- | | `to` | `address` | The address to receive the tokens. | | `amount` | `uint128` | The amount of tokens to claw back. | ### lowerMinFeeUSD Lowers the min USD fee. Emits a [LowerMinFeeUSD](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md#lowerminfeeusd) event. Requirements: - `msg.sender` must be the comptroller. - The new fee must be less than the current {minFeeUSD}. ```solidity function lowerMinFeeUSD(uint256 newMinFeeUSD) external; ``` **Parameters** | Name | Type | Description | | -------------- | --------- | ------------------------------------------------------ | | `newMinFeeUSD` | `uint256` | The new min USD fee to set, denominated in 8 decimals. | ## Events ### Clawback Emitted when the admin claws back the unclaimed tokens. ```solidity event Clawback(address indexed admin, address indexed to, uint128 amount); ``` ### LowerMinFeeUSD Emitted when the min USD fee is lowered by the comptroller. ```solidity event LowerMinFeeUSD(address indexed comptroller, uint256 newMinFeeUSD, uint256 previousMinFeeUSD); ``` --- ## ISablierMerkleInstant [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierMerkleInstant.sol) **Inherits:** [ISablierMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md) MerkleInstant enables an airdrop model where eligible users receive the tokens as soon as they claim. ## Functions ### claim Claim airdrop on behalf of eligible recipient and transfer it to the recipient address. It emits a [ClaimInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleInstant.md#claiminstant) event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. ```solidity function claim(uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimTo Claim airdrop and transfer the tokens to the `to` address. It emits a [ClaimInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleInstant.md#claiminstant) event. Requirements: - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. - Refer to the requirements in {claim}. ```solidity function claimTo(uint256 index, address to, uint128 amount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------ | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of `msg.sender`. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the `msg.sender`. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature, and transfer the tokens to the `to` address. It emits a [ClaimInstant](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleInstant.md#claiminstant) event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claim}. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of the recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ## Events ### ClaimInstant Emitted when an airdrop is claimed on behalf of an eligible recipient. ```solidity event ClaimInstant(uint256 index, address indexed recipient, uint128 amount, address to, bool viaSig); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | -------------------------------------------------------------------------- | | `index` | `uint256` | The index of the airdrop recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens claimed. | | `to` | `address` | The address receiving the claim amount on behalf of the airdrop recipient. | | `viaSig` | `bool` | Bool indicating whether the claim is made via a signature. | --- ## ISablierMerkleLL [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierMerkleLL.sol) **Inherits:** [ISablierMerkleLockup](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLockup.md) MerkleLL enables an airdrop model with a vesting period powered by the Lockup Linear model. ## Functions ### VESTING_CLIFF_DURATION Retrieves the cliff duration of the vesting stream, in seconds. ```solidity function VESTING_CLIFF_DURATION() external view returns (uint40); ``` ### VESTING_CLIFF_UNLOCK_PERCENTAGE Retrieves the percentage of the claim amount due to be unlocked at the vesting cliff time, as a fixed-point number where 1e18 is 100%. ```solidity function VESTING_CLIFF_UNLOCK_PERCENTAGE() external view returns (UD60x18); ``` ### VESTING_START_TIME Retrieves the start time of the vesting stream, as a Unix timestamp. Zero is a sentinel value for `block.timestamp`. ```solidity function VESTING_START_TIME() external view returns (uint40); ``` ### VESTING_START_UNLOCK_PERCENTAGE Retrieves the percentage of the claim amount due to be unlocked at the vesting start time, as a fixed-point number where 1e18 is 100%. ```solidity function VESTING_START_UNLOCK_PERCENTAGE() external view returns (UD60x18); ``` ### VESTING_TOTAL_DURATION Retrieves the total duration of the vesting stream, in seconds. ```solidity function VESTING_TOTAL_DURATION() external view returns (uint40); ``` ### claim Claim airdrop on behalf of eligible recipient. If the vesting end time is in the future, it creates a Lockup Linear stream, otherwise it transfers the tokens directly to the recipient address. It emits either [ClaimLLWithTransfer](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL.md#claimllwithtransfer) or {ClaimLLWithVesting} event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. - All requirements from {ISablierLockupLinear.createWithTimestampsLL} must be met. ```solidity function claim(uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimTo Claim airdrop. If the vesting end time is in the future, it creates a Lockup Linear stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either [ClaimLLWithTransfer](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL.md#claimllwithtransfer) or {ClaimLLWithVesting} event. Requirements: - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. - Refer to the requirements in {claim}. ```solidity function claimTo(uint256 index, address to, uint128 amount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of `msg.sender`. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the `msg.sender`. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature. If the vesting end time is in the future, it creates a Lockup Linear stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either [ClaimLLWithTransfer](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLL.md#claimllwithtransfer) or {ClaimLLWithVesting} event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claim}. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of the recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ## Events ### ClaimLLWithTransfer Emitted when an airdrop is claimed using direct transfer on behalf of an eligible recipient. ```solidity event ClaimLLWithTransfer(uint256 index, address indexed recipient, uint128 amount, address to, bool viaSig); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | -------------------------------------------------------------------------- | | `index` | `uint256` | The index of the airdrop recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens claimed using direct transfer. | | `to` | `address` | The address receiving the claim amount on behalf of the airdrop recipient. | | `viaSig` | `bool` | Bool indicating whether the claim is made via a signature. | ### ClaimLLWithVesting Emitted when an airdrop is claimed using Lockup Linear stream on behalf of an eligible recipient. ```solidity event ClaimLLWithVesting( uint256 index, address indexed recipient, uint128 amount, uint256 indexed streamId, address to, bool viaSig ); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | --------------------------------------------------------------------------- | | `index` | `uint256` | The index of the airdrop recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens claimed using Lockup Linear stream. | | `streamId` | `uint256` | The ID of the Lockup stream. | | `to` | `address` | The address receiving the Lockup stream on behalf of the airdrop recipient. | | `viaSig` | `bool` | Bool indicating whether the claim is made via a signature. | --- ## ISablierMerkleLT [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierMerkleLT.sol) **Inherits:** [ISablierMerkleLockup](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLockup.md) MerkleLT enables an airdrop model with a vesting period powered by the Lockup Tranched model. ## Functions ### VESTING_START_TIME Retrieves the start time of the vesting stream, as a Unix timestamp. Zero is a sentinel value for `block.timestamp`. ```solidity function VESTING_START_TIME() external view returns (uint40); ``` ### tranchesWithPercentages Retrieves the tranches with their respective unlock percentages and durations. ```solidity function tranchesWithPercentages() external view returns (MerkleLT.TrancheWithPercentage[] memory); ``` ### claim Claim airdrop on behalf of eligible recipient. If the vesting end time is in the future, it creates a Lockup Tranched stream, otherwise it transfers the tokens directly to the recipient address. It emits either [ClaimLTWithTransfer](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLT.md#claimltwithtransfer) or {ClaimLTWithVesting} event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. - All requirements from {ISablierLockupTranched.createWithTimestampsLT} must be met. ```solidity function claim(uint256 index, address recipient, uint128 amount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimTo Claim airdrop. If the vesting end time is in the future, it creates a Lockup Tranched stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either [ClaimLTWithTransfer](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLT.md#claimltwithtransfer) or {ClaimLTWithVesting} event. Requirements: - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. - Refer to the requirements in {claim}. ```solidity function claimTo(uint256 index, address to, uint128 amount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of `msg.sender`. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the `msg.sender`. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature. If the vesting end time is in the future, it creates a Lockup Tranched stream with `to` address as the stream recipient, otherwise it transfers the tokens directly to the `to` address. It emits either [ClaimLTWithTransfer](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleLT.md#claimltwithtransfer) or {ClaimLTWithVesting} event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claim}. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 amount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address to which Lockup stream or ERC-20 tokens will be sent on behalf of the recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ## Events ### ClaimLTWithTransfer Emitted when an airdrop is claimed using direct transfer on behalf of an eligible recipient. ```solidity event ClaimLTWithTransfer(uint256 index, address indexed recipient, uint128 amount, address to, bool viaSig); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | -------------------------------------------------------------------------- | | `index` | `uint256` | The index of the airdrop recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens claimed using direct transfer. | | `to` | `address` | The address receiving the claim amount on behalf of the airdrop recipient. | | `viaSig` | `bool` | Bool indicating whether the claim is made via a signature. | ### ClaimLTWithVesting Emitted when an airdrop is claimed using Lockup Tranched stream on behalf of an eligible recipient. ```solidity event ClaimLTWithVesting( uint256 index, address indexed recipient, uint128 amount, uint256 indexed streamId, address to, bool viaSig ); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | --------------------------------------------------------------------------- | | `index` | `uint256` | The index of the airdrop recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `amount` | `uint128` | The amount of ERC-20 tokens claimed using Lockup Tranched stream. | | `streamId` | `uint256` | The ID of the Lockup stream. | | `to` | `address` | The address receiving the Lockup stream on behalf of the airdrop recipient. | | `viaSig` | `bool` | Bool indicating whether the claim is made via a signature. | --- ## ISablierMerkleLockup [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierMerkleLockup.sol) **Inherits:** [ISablierMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md) MerkleLockup enables Airstreams (a portmanteau of "airdrop" and "stream"), an airdrop model where the tokens are vested over time, as opposed to being unlocked at once. The vesting is provided by Sablier Lockup. _Common interface between MerkleLL and MerkleLT._ ## Functions ### SABLIER_LOCKUP The address of the [SablierLockup](/reference/lockup/contracts/contract.SablierLockup.md) contract. ```solidity function SABLIER_LOCKUP() external view returns (ISablierLockup); ``` ### STREAM_CANCELABLE A flag indicating whether the streams can be canceled. _This is an immutable state variable._ ```solidity function STREAM_CANCELABLE() external view returns (bool); ``` ### STREAM_TRANSFERABLE A flag indicating whether the stream NFTs are transferable. _This is an immutable state variable._ ```solidity function STREAM_TRANSFERABLE() external view returns (bool); ``` ### claimedStreams Retrieves the stream IDs associated with the airdrops claimed by the provided recipient. In practice, most campaigns will only have one stream per recipient. ```solidity function claimedStreams(address recipient) external view returns (uint256[] memory); ``` ### streamShape Retrieves the shape of the Lockup stream created upon claiming. ```solidity function streamShape() external view returns (string memory); ``` --- ## ISablierMerkleVCA [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/interfaces/ISablierMerkleVCA.sol) **Inherits:** [ISablierMerkleBase](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleBase.md) VCA stands for Variable Claim Amount, and is an airdrop model where the claim amount increases linearly until the airdrop period ends. Claiming early results in forgoing the remaining amount, whereas claiming after the period grants the full amount that was allocated. ## Functions ### UNLOCK_PERCENTAGE Retrieves the percentage of the full amount that will unlock immediately at the start time. The value is denominated as a fixed-point number where 1e18 is 100%. ```solidity function UNLOCK_PERCENTAGE() external view returns (UD60x18); ``` ### VESTING_END_TIME Retrieves the time when the VCA airdrop is fully vested, as a Unix timestamp. ```solidity function VESTING_END_TIME() external view returns (uint40); ``` ### VESTING_START_TIME Retrieves the time when the VCA airdrop begins to unlock, as a Unix timestamp. ```solidity function VESTING_START_TIME() external view returns (uint40); ``` ### calculateClaimAmount Calculates the amount that would be claimed if the claim were made at `claimTime`. _This is for informational purposes only. To actually claim the airdrop, a Merkle proof is required._ ```solidity function calculateClaimAmount(uint128 fullAmount, uint40 claimTime) external view returns (uint128); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | ----------------------------------------------------------------------------------------------- | | `fullAmount` | `uint128` | The amount of tokens allocated to a user, denominated in the token's decimals. | | `claimTime` | `uint40` | A hypothetical time at which to make the claim. Zero is a sentinel value for `block.timestamp`. | **Returns** | Name | Type | Description | | -------- | --------- | ---------------------------------------------------------------------- | | `` | `uint128` | The amount that would be claimed, denominated in the token's decimals. | ### calculateForgoneAmount Calculates the amount that would be forgone if the claim were made at `claimTime`. _This is for informational purposes only. Reverts if the claim time is less than the vesting start time, since the claim cannot be made, no amount can be forgone._ ```solidity function calculateForgoneAmount(uint128 fullAmount, uint40 claimTime) external view returns (uint128); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | ----------------------------------------------------------------------------------------------- | | `fullAmount` | `uint128` | The amount of tokens allocated to a user, denominated in the token's decimals. | | `claimTime` | `uint40` | A hypothetical time at which to make the claim. Zero is a sentinel value for `block.timestamp`. | **Returns** | Name | Type | Description | | -------- | --------- | ---------------------------------------------------------------------- | | `` | `uint128` | The amount that would be forgone, denominated in the token's decimals. | ### totalForgoneAmount Retrieves the total amount of tokens forgone by early claimers. ```solidity function totalForgoneAmount() external view returns (uint256); ``` ### claimTo Claim airdrop. If the vesting end time is in the future, it calculates the claim amount to transfer to the `to` address, otherwise it transfers the full amount. It emits a [ClaimVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleVCA.md#claimvca) event. Requirements: - The current time must be greater than or equal to the campaign start time. - The campaign must not have expired. - `msg.value` must not be less than the value returned by {COMPTROLLER.calculateMinFeeWei}. - The `index` must not be claimed already. - The Merkle proof must be valid. - The claim amount must be greater than zero. - `msg.sender` must be the airdrop recipient. - The `to` must not be the zero address. ```solidity function claimTo(uint256 index, address to, uint128 fullAmount, bytes32[] calldata merkleProof) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | ------------------------------------------------------------------ | | `index` | `uint256` | The index of the `msg.sender` in the Merkle tree. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of `msg.sender`. | | `fullAmount` | `uint128` | The total amount of ERC-20 tokens allocated to the recipient. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | ### claimViaSig Claim airdrop on behalf of eligible recipient using an EIP-712 or EIP-1271 signature. If the vesting end time is in the future, it calculates the claim amount to transfer to the `to` address, otherwise it transfers the full amount. It emits a [ClaimVCA](/docs/reference/airdrops/contracts/interfaces/interface.ISablierMerkleVCA.md#claimvca) event. Requirements: - If `recipient` is an EOA, it must match the recovered signer. - If `recipient` is a contract, it must implement the IERC-1271 interface. - The `to` must not be the zero address. - The `validFrom` must be less than or equal to the current block timestamp. - Refer to the requirements in {claimTo} except that there are no restrictions on `msg.sender`. Below is the example of typed data to be signed by the airdrop recipient, referenced from https://docs.metamask.io/wallet/how-to/sign-data/#example. ```json types: { EIP712Domain: [ { name: "name", type: "string" }, { name: "chainId", type: "uint256" }, { name: "verifyingContract", type: "address" }, ], Claim: [ { name: "index", type: "uint256" }, { name: "recipient", type: "address" }, { name: "to", type: "address" }, { name: "amount", type: "uint128" }, { name: "validFrom", type: "uint40" }, ], }, domain: { name: "Sablier Airdrops Protocol", chainId: 1, // Chain on which the contract is deployed verifyingContract: "0xTheAddressOfThisContract", // The address of this contract }, primaryType: "Claim", message: { index: 2, // The index of the signer in the Merkle tree recipient: "0xTheAddressOfTheRecipient", // The address of the airdrop recipient to: "0xTheAddressReceivingTheTokens", // The address where recipient wants to transfer the tokens amount: "1000000000000000000000", // The amount of tokens allocated to the recipient validFrom: 1752425637 // The timestamp from which the claim signature is valid }, ``` ```solidity function claimViaSig( uint256 index, address recipient, address to, uint128 fullAmount, uint40 validFrom, bytes32[] calldata merkleProof, bytes calldata signature ) external payable; ``` **Parameters** | Name | Type | Description | | ------------- | ----------- | -------------------------------------------------------------------- | | `index` | `uint256` | The index of the recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient who is providing the signature. | | `to` | `address` | The address receiving the ERC-20 tokens on behalf of the recipient. | | `fullAmount` | `uint128` | The total amount of ERC-20 tokens allocated to the recipient. | | `validFrom` | `uint40` | The timestamp from which the claim signature is valid. | | `merkleProof` | `bytes32[]` | The proof of inclusion in the Merkle tree. | | `signature` | `bytes` | The EIP-712 or EIP-1271 signature from the airdrop recipient. | ## Events ### ClaimVCA Emitted when an airdrop is claimed on behalf of an eligible recipient. ```solidity event ClaimVCA( uint256 index, address indexed recipient, uint128 claimAmount, uint128 forgoneAmount, address to, bool viaSig ); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------- | | `index` | `uint256` | The index of the airdrop recipient in the Merkle tree. | | `recipient` | `address` | The address of the airdrop recipient. | | `claimAmount` | `uint128` | The amount of ERC-20 tokens claimed. | | `forgoneAmount` | `uint128` | The amount of ERC-20 tokens forgone. | | `to` | `address` | The address receiving the claim amount on behalf of the airdrop recipient. | | `viaSig` | `bool` | Bool indicating whether the claim is made via a signature. | --- ## Errors(Libraries) [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/libraries/Errors.sol) Library containing all custom errors the protocol may revert with. ## Errors ### SablierFactoryMerkleBase_ForbidNativeToken Thrown when trying to create a campaign with native token. ```solidity error SablierFactoryMerkleBase_ForbidNativeToken(address nativeToken); ``` ### SablierFactoryMerkleBase_NativeTokenAlreadySet Thrown when trying to set the native token address when it is already set. ```solidity error SablierFactoryMerkleBase_NativeTokenAlreadySet(address nativeToken); ``` ### SablierFactoryMerkleBase_NativeTokenZeroAddress Thrown when trying to set zero address as native token. ```solidity error SablierFactoryMerkleBase_NativeTokenZeroAddress(); ``` ### SablierFactoryMerkleLT_TotalPercentageNotOneHundred Thrown when trying to create an LT campaign with tranches' unlock percentages not adding up to 100%. ```solidity error SablierFactoryMerkleLT_TotalPercentageNotOneHundred(uint64 totalPercentage); ``` ### SablierFactoryMerkleVCA_ExpirationTooEarly Thrown if expiration time is within 1 week from the vesting end time. ```solidity error SablierFactoryMerkleVCA_ExpirationTooEarly(uint40 vestingEndTime, uint40 expiration); ``` ### SablierFactoryMerkleVCA_ExpirationTimeZero Thrown if expiration time is zero. ```solidity error SablierFactoryMerkleVCA_ExpirationTimeZero(); ``` ### SablierFactoryMerkleVCA_VestingEndTimeNotGreaterThanVestingStartTime Thrown if vesting end time is not greater than the vesting start time. ```solidity error SablierFactoryMerkleVCA_VestingEndTimeNotGreaterThanVestingStartTime( uint40 vestingStartTime, uint40 vestingEndTime ); ``` ### SablierFactoryMerkleVCA_StartTimeZero Thrown if the start time is zero. ```solidity error SablierFactoryMerkleVCA_StartTimeZero(); ``` ### SablierFactoryMerkleVCA_UnlockPercentageTooHigh Thrown if the unlock percentage is greater than 100%. ```solidity error SablierFactoryMerkleVCA_UnlockPercentageTooHigh(UD60x18 unlockPercentage); ``` ### SablierMerkleBase_CallerNotComptroller Thrown when caller is not the comptroller. ```solidity error SablierMerkleBase_CallerNotComptroller(address comptroller, address caller); ``` ### SablierMerkleBase_CampaignExpired Thrown when trying to claim after the campaign has expired. ```solidity error SablierMerkleBase_CampaignExpired(uint256 blockTimestamp, uint40 expiration); ``` ### SablierMerkleBase_CampaignNotStarted Thrown when trying to claim before the campaign start time. ```solidity error SablierMerkleBase_CampaignNotStarted(uint256 blockTimestamp, uint40 campaignStartTime); ``` ### SablierMerkleBase_ClawbackNotAllowed Thrown when trying to clawback when the current timestamp is over the grace period and the campaign has not expired. ```solidity error SablierMerkleBase_ClawbackNotAllowed(uint256 blockTimestamp, uint40 expiration, uint40 firstClaimTime); ``` ### SablierMerkleBase_FeeTransferFailed Thrown if fee transfer fails. ```solidity error SablierMerkleBase_FeeTransferFailed(address feeRecipient, uint256 feeAmount); ``` ### SablierMerkleBase_IndexClaimed Thrown when trying to claim the same index more than once. ```solidity error SablierMerkleBase_IndexClaimed(uint256 index); ``` ### SablierMerkleBase_InsufficientFeePayment Thrown when trying to claim without paying the min fee. ```solidity error SablierMerkleBase_InsufficientFeePayment(uint256 feePaid, uint256 minFeeWei); ``` ### SablierMerkleBase_InvalidProof Thrown when trying to claim with an invalid Merkle proof. ```solidity error SablierMerkleBase_InvalidProof(); ``` ### SablierMerkleBase_InvalidSignature Thrown when claiming with an invalid EIP-712 or EIP-1271 signature. ```solidity error SablierMerkleBase_InvalidSignature(); ``` ### SablierMerkleBase_NewMinFeeUSDNotLower Thrown when trying to set a new min USD fee that is higher than the current fee. ```solidity error SablierMerkleBase_NewMinFeeUSDNotLower(uint256 currentMinFeeUSD, uint256 newMinFeeUSD); ``` ### SablierMerkleBase_SignatureNotYetValid Thrown when trying to claim with a signature that is not yet valid. ```solidity error SablierMerkleBase_SignatureNotYetValid(uint40 validFrom, uint40 blockTimestamp); ``` ### SablierMerkleBase_ToZeroAddress Thrown when trying to claim to the zero address. ```solidity error SablierMerkleBase_ToZeroAddress(); ``` ### SablierMerkleVCA_VestingNotStarted Thrown when calculating the forgone amount with claim time less than the vesting start time. ```solidity error SablierMerkleVCA_VestingNotStarted(uint40 claimTime, uint40 vestingStartTime); ``` ### SablierMerkleVCA_ClaimAmountZero Thrown when the claim amount is zero. ```solidity error SablierMerkleVCA_ClaimAmountZero(address recipient); ``` --- ## SignatureHash [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/libraries/SignatureHash.sol) Library containing the hashes for the EIP-712 and EIP-1271 signatures. ## State Variables ### CLAIM_TYPEHASH _The struct type hash for computing the domain separator for EIP-712 and EIP-1271 signatures._ ```solidity bytes32 public constant CLAIM_TYPEHASH = keccak256("Claim(uint256 index,address recipient,address to,uint128 amount,uint40 validFrom)"); ``` ### DOMAIN_TYPEHASH The domain type hash for computing the domain separator. ```solidity bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); ``` ### PROTOCOL_NAME The protocol name for the EIP-712 and EIP-1271 signatures. ```solidity bytes32 public constant PROTOCOL_NAME = keccak256("Sablier Airdrops Protocol"); ``` --- ## MerkleInstant [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/types/DataTypes.sol) ## Structs ### ConstructorParams Struct encapsulating the constructor parameters of Merkle Instant campaigns. _The fields are arranged alphabetically._ ```solidity struct ConstructorParams { string campaignName; uint40 campaignStartTime; uint40 expiration; address initialAdmin; string ipfsCID; bytes32 merkleRoot; IERC20 token; } ``` **Properties** | Name | Type | Description | | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `campaignName` | `string` | The name of the campaign. | | `campaignStartTime` | `uint40` | The start time of the campaign, as a Unix timestamp. | | `expiration` | `uint40` | The expiration of the campaign, as a Unix timestamp. A value of zero means the campaign does not expire. | | `initialAdmin` | `address` | The initial admin of the campaign. | | `ipfsCID` | `string` | The content identifier for indexing the contract on IPFS. An empty value may break certain UI features that depend upon the IPFS CID. | | `merkleRoot` | `bytes32` | The Merkle root of the claim data. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | --- ## MerkleLL [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/types/DataTypes.sol) ## Structs ### ConstructorParams Struct encapsulating the constructor parameters of Merkle Lockup Linear campaigns. _The fields are arranged alphabetically._ ```solidity struct ConstructorParams { string campaignName; uint40 campaignStartTime; bool cancelable; uint40 cliffDuration; UD60x18 cliffUnlockPercentage; uint40 expiration; address initialAdmin; string ipfsCID; ISablierLockup lockup; bytes32 merkleRoot; string shape; UD60x18 startUnlockPercentage; IERC20 token; uint40 totalDuration; bool transferable; uint40 vestingStartTime; } ``` **Properties** | Name | Type | Description | | ----------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `campaignName` | `string` | The name of the campaign. | | `campaignStartTime` | `uint40` | The start time of the campaign, as a Unix timestamp. | | `cancelable` | `bool` | Indicates if the Lockup stream will be cancelable after claiming. | | `cliffDuration` | `uint40` | The cliff duration of the vesting stream, in seconds. | | `cliffUnlockPercentage` | `UD60x18` | The percentage of the claim amount due to be unlocked at the vesting cliff time, as a fixed-point number where 1e18 is 100% | | `expiration` | `uint40` | The expiration of the campaign, as a Unix timestamp. A value of zero means the campaign does not expire. | | `initialAdmin` | `address` | The initial admin of the campaign. | | `ipfsCID` | `string` | The content identifier for indexing the contract on IPFS. An empty value may break certain UI features that depend upon the IPFS CID. | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `merkleRoot` | `bytes32` | The Merkle root of the claim data. | | `shape` | `string` | The shape of the vesting stream, used for differentiating between streams in the UI. | | `startUnlockPercentage` | `UD60x18` | The percentage of the claim amount due to be unlocked at the vesting start time, as a fixed-point number where 1e18 is 100%. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `totalDuration` | `uint40` | The total duration of the vesting stream, in seconds. | | `transferable` | `bool` | Indicates if the Lockup stream will be transferable after claiming. | | `vestingStartTime` | `uint40` | The start time of the vesting stream, as a Unix timestamp. Zero is a sentinel value for `block.timestamp`. | --- ## MerkleLT [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/types/DataTypes.sol) ## Structs ### ConstructorParams Struct encapsulating the constructor parameters of Merkle Lockup Tranched campaigns. _The fields are arranged alphabetically._ ```solidity struct ConstructorParams { string campaignName; uint40 campaignStartTime; bool cancelable; uint40 expiration; address initialAdmin; string ipfsCID; ISablierLockup lockup; bytes32 merkleRoot; string shape; IERC20 token; MerkleLT.TrancheWithPercentage[] tranchesWithPercentages; bool transferable; uint40 vestingStartTime; } ``` **Properties** | Name | Type | Description | | ------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `campaignName` | `string` | The name of the campaign. | | `campaignStartTime` | `uint40` | The start time of the campaign, as a Unix timestamp. | | `cancelable` | `bool` | Indicates if the Lockup stream will be cancelable after claiming. | | `expiration` | `uint40` | The expiration of the campaign, as a Unix timestamp. A value of zero means the campaign does not expire. | | `initialAdmin` | `address` | The initial admin of the campaign. | | `ipfsCID` | `string` | The content identifier for indexing the contract on IPFS. An empty value may break certain UI features that depend upon the IPFS CID. | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `merkleRoot` | `bytes32` | The Merkle root of the claim data. | | `shape` | `string` | The shape of Lockup stream, used for differentiating between streams in the UI. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `tranchesWithPercentages` | `MerkleLT.TrancheWithPercentage[]` | The tranches with their respective unlock percentages, which are documented in {MerkleLT.TrancheWithPercentage}. | | `transferable` | `bool` | Indicates if the Lockup stream will be transferable after claiming. | | `vestingStartTime` | `uint40` | The start time of the vesting stream, as a Unix timestamp. Zero is a sentinel value for `block.timestamp`. | ### TrancheWithPercentage Struct encapsulating the unlock percentage and duration of a tranche. _Since users may have different amounts allocated, this struct makes it possible to calculate the amounts at claim time. An 18-decimal format is used to represent percentages: 100% = 1e18. For more information, see the PRBMath documentation on UD2x18: https://github.com/PaulRBerg/prb-math_ ```solidity struct TrancheWithPercentage { UD2x18 unlockPercentage; uint40 duration; } ``` **Properties** | Name | Type | Description | | ------------------ | -------- | ------------------------------------------------------------------------- | | `unlockPercentage` | `UD2x18` | The percentage designated to be unlocked in this tranche. | | `duration` | `uint40` | The time difference in seconds between this tranche and the previous one. | --- ## MerkleVCA [Git Source](https://github.com/sablier-labs/airdrops/blob/077c6b9766ef7693ba9e82a9e001dc0097709c01/src/types/DataTypes.sol) ## Structs ### ConstructorParams Struct encapsulating the constructor parameters of Merkle VCA campaigns. _The fields are arranged alphabetically._ ```solidity struct ConstructorParams { string campaignName; uint40 campaignStartTime; uint40 expiration; address initialAdmin; string ipfsCID; bytes32 merkleRoot; IERC20 token; UD60x18 unlockPercentage; uint40 vestingEndTime; uint40 vestingStartTime; } ``` **Properties** | Name | Type | Description | | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `campaignName` | `string` | The name of the campaign. | | `campaignStartTime` | `uint40` | The start time of the campaign, as a Unix timestamp. | | `expiration` | `uint40` | The expiration of the campaign, as a Unix timestamp. | | `initialAdmin` | `address` | The initial admin of the campaign. | | `ipfsCID` | `string` | The content identifier for indexing the contract on IPFS. An empty value may break certain UI features that depend upon the IPFS CID. | | `merkleRoot` | `bytes32` | The Merkle root of the claim data. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `unlockPercentage` | `UD60x18` | The percentage of the full amount that will unlock immediately at the start time, denominated as fixed-point number where 1e18 is 100%. | | `vestingEndTime` | `uint40` | Vesting end time, as a Unix timestamp. | | `vestingStartTime` | `uint40` | Vesting start time, as a Unix timestamp. | --- ## Diagrams(Flow) ## Token Flows The following three functions lead to tokens flow in and out of a stream: ### Deposit Anyone can deposit into a stream. ```mermaid sequenceDiagram actor Anyone Anyone ->> Flow: deposit() Anyone -->> Flow: Transfer tokens ``` ### Refund Only sender can refund from the stream that he created. ```mermaid sequenceDiagram actor Sender Sender ->> Flow: refund() Flow -->> Sender: Transfer unstreamed tokens ``` ### Withdraw Anyone can call withdraw on a stream as long as `to` address matches the recipient. If recipient/operator is calling withdraw on a stream, they can choose to withdraw to any address. ```mermaid sequenceDiagram actor Anyone Anyone ->> Flow: withdraw() activate Flow Create actor Recipient Flow -->> Recipient: Transfer streamed tokens deactivate Flow Recipient ->> Flow: withdraw() activate Flow Create actor toAddress Flow -->> toAddress: Transfer streamed tokens deactivate Flow ``` ## Abbreviations | Abbreviation | Full name | Description | | ------------ | --------------- | ----------------------------------------------------------- | | bal | Stream balance | Balance of the stream | | cd | Covered debt | Portion of the total debt covered by the stream balance | | elt | Elapsed time | Time elapsed in seconds since the last snapshot | | od | Ongoing debt | Debt accumulated since the last snapshot | | now | Current time | Same as `block.timestamp` | | rps | Rate per second | Rate at which tokens are streamed per second | | sd | Snapshot debt | Debt accumulated until the last snapshot | | st | Snapshot time | Time of the last snapshot | | td | Total debt | Sum of sd and od, also same as sum of cd and ud | | ud | Uncovered debt | Portion of the total debt not covered by the stream balance | ## Storage Layout Flow is a singleton contract that stores all streams created by that contract's users. The following diagrams provide insight into the storage layout of each stream. To see the full list of storage variables, check out [this reference](/reference/flow/contracts/types/library.Flow#structs). ```mermaid flowchart TD; F["Flow contract"]; S0[(Stream 1)]; b0([bal]) r0([rps]) sd0([sd]) st0([st]) F --> S0; S0 --> b0; S0 --> r0; S0 --> sd0; S0 --> st0; S1[(Stream 2)]; b1([bal]) r1([rps]) sd1([sd]) st1([st]) F --> S1; S1 --> b1; S1 --> r1; S1 --> sd1; S1 --> st1; ``` ## Debts ### Covered debt ```mermaid flowchart TD di0{ }:::blue0 di1{ }:::blue0 cd([cd]) res_0([0 ]) res_bal([bal]) res_sum([td]) cd --> di0 di0 -- "bal = 0" --> res_0 di0 -- "bal > 0" --> di1 di1 -- "ud > 0" --> res_bal di1 -- "ud = 0" --> res_sum ``` ### Ongoing Debt ```mermaid flowchart TD rca([od]) di0{ } di1{ } res_00([0 ]) res_01([0 ]) res_rca(["rps ⋅ elt"]) rca --> di0 di0 -- "rps > 0" --> di1 di0 -- "rps == 0" --> res_00 di1 -- "now <= st" --> res_01 di1 -- "now > st" --> res_rca ``` ### Uncovered Debt ```mermaid flowchart TD di0{ }:::red1 sd([ud]) res_sd(["td - bal"]) res_zero([0]) sd --> di0 di0 -- "bal < td" --> res_sd di0 -- "bal >= td" --> res_zero ``` ### Total Debt ```mermaid flowchart TD rca([td]) di0{ } res_00([sd ]) res_01(["sd + od"]) rca --> di0 di0 -- "rps == 0" --> res_00 di0 -- "rps > 0" --> res_01 ``` ## Refundable Amount ```mermaid flowchart TD ra([Refundable Amount]) res_ra([bal - cd]) ra --> res_ra ``` --- ## Access Control(Flow) With the exception of the [admin functions](/concepts/governance#flow), all functions in Flow can only be triggered by users. The Comptroller has no control over any stream or any part of the protocol. This article will provide a comprehensive overview of the actions that can be performed on streams once they are created, as well as the corresponding user permissions for each action. :::note Every stream has a sender and a recipient. Recipients can approve third parties to take actions on their behalf. An 'public' caller is any address outside of sender and recipient. ::: ## Overview The table below offers a quick overview of the access control for each action that can be performed on a stream. | Action | Sender | Recipient / Approved third party | Public | | ----------------------- | :----: | :------------------------------: | :----: | | AdjustRatePerSecond | ✅ | ❌ | ❌ | | Deposit | ✅ | ✅ | ✅ | | Pause | ✅ | ❌ | ❌ | | Refund | ✅ | ❌ | ❌ | | Restart | ✅ | ❌ | ❌ | | Transfer NFT | ❌ | ✅ | ❌ | | Withdraw to any address | ❌ | ✅ | ❌ | | Withdraw to recipient | ✅ | ✅ | ✅ | | Void | ✅ | ✅ | ❌ | ## Adjust rate per second Only the sender can adjust the rate per second of a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Flow: adjustRatePerSecond() Flow -->> Flow: update rps ``` ## Create stream ```mermaid sequenceDiagram actor Sender Sender ->> Flow: create() Create actor Recipient Flow -->> Recipient: mint NFT ``` ## Deposit into a stream Anyone can deposit into a stream. ```mermaid sequenceDiagram actor Anyone Anyone ->> ERC20: approve() Anyone ->> Flow: deposit() Flow ->> ERC20: transferFrom() Anyone -->> Flow: Transfer tokens ``` ## Pause Only the sender can pause a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Flow: pause() Flow -->> Flow: set rps = 0 ``` ## Refund from a stream Only the sender can refund from a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Flow: refund() Flow ->> ERC20: transfer() Flow -->> Sender: Transfer unstreamed tokens ``` ## Restarting a stream Only the sender can restart a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Flow: restart() Flow -->> Flow: set rps > 0 ``` ## Voiding a stream Both Sender and Recipient can void a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Flow: void() activate Flow Flow -->> Flow: set rps = 0, Flow -->> Flow: set st = now & sd = cd deactivate Flow actor Recipient Recipient ->> Flow: void() activate Flow Flow -->> Flow: set rps = 0 Flow -->> Flow: set st = now & sd = cd deactivate Flow ``` ## Withdraw from a stream Anyone can call withdraw on a stream as long as `to` address matches the recipient. If recipient/operator is calling withdraw on a stream, they can choose to withdraw to any address. ```mermaid sequenceDiagram actor Anyone Anyone ->> Flow: withdraw() activate Flow Flow ->> ERC20: transfer() Create actor Recipient Flow -->> Recipient: Transfer tokens deactivate Flow Recipient ->> Flow: withdraw() activate Flow Flow ->> ERC20: transfer() Create actor Any Address Flow -->> Any Address : Transfer tokens deactivate Flow ``` --- ## Batch [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/Batch.sol) **Inherits:** IBatch See the documentation in {IBatch}. ## Functions ### batch Allows batched calls to self, i.e., `this` contract. _Since `msg.value` can be reused across calls, be VERY CAREFUL when using it. Refer to https://paradigm.xyz/2021/08/two-rights-might-make-a-wrong for more information._ ```solidity function batch(bytes[] calldata calls) external payable virtual override returns (bytes[] memory results); ``` **Parameters** | Name | Type | Description | | ------- | --------- | --------------------------------- | | `calls` | `bytes[]` | An array of inputs for each call. | **Returns** | Name | Type | Description | | --------- | --------- | -------------------------------------------------------------------------------- | | `results` | `bytes[]` | An array of results from each call. Empty when the calls do not return anything. | --- ## Comptrollerable(Abstracts) [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/Comptrollerable.sol) **Inherits:** IComptrollerable See the documentation in {IComptrollerable}. ## State Variables ### comptroller Retrieves the address of the comptroller contract. ```solidity ISablierComptroller public override comptroller; ``` ## Functions ### onlyComptroller Reverts if called by any account other than the comptroller. ```solidity modifier onlyComptroller(); ``` ### constructor ```solidity constructor(address initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### setComptroller Sets the comptroller to a new address. Emits a {SetComptroller} event. Requirements: - `msg.sender` must be the current comptroller. - The new comptroller must return `true` from {supportsInterface} with the comptroller's minimal interface ID which is defined as the XOR of the following function selectors: 1. {calculateMinFeeWeiFor} 2. {convertUSDFeeToWei} 3. {execute} 4. {getMinFeeUSDFor} ```solidity function setComptroller(ISablierComptroller newComptroller) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ---------------- | --------------------- | -------------------------------------------- | | `newComptroller` | `ISablierComptroller` | The address of the new comptroller contract. | ### transferFeesToComptroller Transfers the fees to the comptroller contract. _Emits a {TransferFeesToComptroller} event._ ```solidity function transferFeesToComptroller() external override; ``` ### \_checkComptroller _See the documentation for the user-facing functions that call this private function._ ```solidity function _checkComptroller() private view; ``` ### \_setComptroller _See the documentation for the user-facing functions that call this private function._ ```solidity function _setComptroller( ISablierComptroller previousComptroller, ISablierComptroller newComptroller, bytes4 minimalInterfaceId ) private; ``` --- ## NoDelegateCall [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/NoDelegateCall.sol) This contract implements logic to prevent delegate calls. ## State Variables ### ORIGINAL _The address of the original contract that was deployed._ ```solidity address private immutable ORIGINAL; ``` ## Functions ### noDelegateCall Prevents delegate calls. ```solidity modifier noDelegateCall(); ``` ### constructor _Sets the original contract address._ ```solidity constructor(); ``` ### \_preventDelegateCall This function checks whether the current call is a delegate call, and reverts if it is. - A private function is used instead of inlining this logic in a modifier because Solidity copies modifiers into every function that uses them. The `ORIGINAL` address would get copied in every place the modifier is used, which would increase the contract size. By using a function instead, we can avoid this duplication of code and reduce the overall size of the contract. ```solidity function _preventDelegateCall() private view; ``` --- ## SablierFlowState [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/abstracts/SablierFlowState.sol) **Inherits:** [ISablierFlowState](/docs/reference/flow/contracts/interfaces/interface.ISablierFlowState.md) See the documentation in [ISablierFlowState](/docs/reference/flow/contracts/interfaces/interface.ISablierFlowState.md). ## State Variables ### aggregateAmount Retrieves the aggregate amount across all streams, denoted in units of the token's decimals. _If tokens are directly transferred to the contract without using the stream creation functions, the ERC-20 balance may be greater than the aggregate amount._ ```solidity mapping(IERC20 token => uint256 amount) public override aggregateAmount; ``` ### nativeToken Retrieves the address of the ERC-20 interface of the native token, if it exists. _The native tokens on some chains have a dual interface as ERC-20. For example, on Polygon the $POL token is the native token and has an ERC-20 version at 0x0000000000000000000000000000000000001010. This means that `address(this).balance` returns the same value as `balanceOf(address(this))`. To avoid any unintended behavior, these tokens cannot be used in Sablier. As an alternative, users can use the Wrapped version of the token, i.e. WMATIC, which is a standard ERC-20 token._ ```solidity address public override nativeToken; ``` ### nextStreamId Counter for stream ids. ```solidity uint256 public override nextStreamId; ``` ### nftDescriptor Contract that generates the non-fungible token URI. ```solidity IFlowNFTDescriptor public override nftDescriptor; ``` ### \_streams _Sablier Flow streams mapped by unsigned integers._ ```solidity mapping(uint256 id => Flow.Stream stream) internal _streams; ``` ## Functions ### constructor ```solidity constructor(address initialNFTDescriptor); ``` **Parameters** | Name | Type | Description | | ---------------------- | --------- | ------------------------------------------ | | `initialNFTDescriptor` | `address` | The address of the initial NFT descriptor. | ### notNull _Checks that `streamId` does not reference a null stream._ ```solidity modifier notNull(uint256 streamId); ``` ### notPaused _Checks that `streamId` does not reference a paused stream. Note that this implicitly checks that the stream is not voided either._ ```solidity modifier notPaused(uint256 streamId); ``` ### notVoided _Checks that `streamId` does not reference a voided stream._ ```solidity modifier notVoided(uint256 streamId); ``` ### onlySender _Checks the `msg.sender` is the stream's sender._ ```solidity modifier onlySender(uint256 streamId); ``` ### getBalance Retrieves the balance of the stream, i.e. the total deposited amounts subtracted by the total withdrawn amounts, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function getBalance(uint256 streamId) external view override notNull(streamId) returns (uint128 balance); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRatePerSecond Retrieves the rate per second of the stream, denoted as a fixed-point number where 1e18 is 1 token per second. _Reverts if `streamId` references a null stream._ ```solidity function getRatePerSecond(uint256 streamId) external view override notNull(streamId) returns (UD21x18 ratePerSecond); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### getSender Retrieves the stream's sender. _Reverts if `streamId` references a null stream._ ```solidity function getSender(uint256 streamId) external view override notNull(streamId) returns (address sender); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getSnapshotDebtScaled Retrieves the snapshot debt of the stream, denoted as a fixed-point number where 1e18 is 1 token. _Reverts if `streamId` references a null stream._ ```solidity function getSnapshotDebtScaled(uint256 streamId) external view override notNull(streamId) returns (uint256 snapshotDebtScaled); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getSnapshotTime Retrieves the snapshot time of the stream, which is a Unix timestamp. _Reverts if `streamId` references a null stream._ ```solidity function getSnapshotTime(uint256 streamId) external view override notNull(streamId) returns (uint40 snapshotTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### getStream Retrieves the stream entity. _Reverts if `streamId` references a null stream._ ```solidity function getStream(uint256 streamId) external view override notNull(streamId) returns (Flow.Stream memory stream); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getToken Retrieves the token of the stream. _Reverts if `streamId` references a null stream._ ```solidity function getToken(uint256 streamId) external view override notNull(streamId) returns (IERC20 token); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### getTokenDecimals Retrieves the token decimals of the stream. _Reverts if `streamId` references a null stream._ ```solidity function getTokenDecimals(uint256 streamId) external view override notNull(streamId) returns (uint8 tokenDecimals); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### isStream Retrieves a flag indicating whether the stream exists. _Does not revert if `streamId` references a null stream._ ```solidity function isStream(uint256 streamId) external view override returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isTransferable Retrieves a flag indicating whether the stream NFT is transferable. _Reverts if `streamId` references a null stream._ ```solidity function isTransferable(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isVoided Retrieves a flag indicating whether the stream is voided. _Reverts if `streamId` references a null stream._ ```solidity function isVoided(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### \_notNull _A private function is used instead of inlining this logic in a modifier because Solidity copies modifiers into every function that uses them._ ```solidity function _notNull(uint256 streamId) private view; ``` --- ## FlowNFTDescriptor [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/FlowNFTDescriptor.sol) **Inherits:** [IFlowNFTDescriptor](/docs/reference/flow/contracts/interfaces/interface.IFlowNFTDescriptor.md) See the documentation in [IFlowNFTDescriptor](/docs/reference/flow/contracts/interfaces/interface.IFlowNFTDescriptor.md). ## Functions ### tokenURI Produces the URI describing a particular stream NFT. _Currently it returns the Sablier logo as an SVG. In the future, it will return an NFT SVG._ ```solidity function tokenURI(IERC721Metadata, uint256) external pure override returns (string memory uri); ``` **Parameters** | Name | Type | Description | | -------- | ----------------- | ----------- | | `` | `IERC721Metadata` | | | `` | `uint256` | | **Returns** | Name | Type | Description | | ----- | -------- | ----------------------------------------- | | `uri` | `string` | The URI of the ERC721-compliant metadata. | --- ## SablierFlow [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/SablierFlow.sol) **Inherits:** [Batch](/docs/reference/flow/contracts/abstracts/abstract.Batch.md), [Comptrollerable](/docs/reference/flow/contracts/abstracts/abstract.Comptrollerable.md), ERC721, [ISablierFlow](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md), [NoDelegateCall](/docs/reference/flow/contracts/abstracts/abstract.NoDelegateCall.md), [SablierFlowState](/docs/reference/flow/contracts/abstracts/abstract.SablierFlowState.md) See the documentation in [ISablierFlow](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md). ## Functions ### constructor ```solidity constructor( address initialComptroller, address initialNFTDescriptor ) [Comptrollerable](/docs/reference/flow/contracts/abstracts/abstract.Comptrollerable.md)(initialComptroller) ERC721("Sablier Flow NFT", "SAB-FLOW") SablierFlowState(initialNFTDescriptor); ``` **Parameters** | Name | Type | Description | | ---------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | | `initialNFTDescriptor` | `address` | The address of the initial NFT descriptor. | ### updateMetadata _Emits an ERC-4906 event to trigger an update of the NFT metadata._ ```solidity modifier updateMetadata(uint256 streamId); ``` ### calculateMinFeeWei Calculates the minimum fee in wei required to withdraw from the given stream ID. _Reverts if `streamId` references a null stream._ ```solidity function calculateMinFeeWei(uint256 streamId) external view override notNull(streamId) returns (uint256 minFeeWei); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### coveredDebtOf Returns the amount of debt covered by the stream balance, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function coveredDebtOf(uint256 streamId) external view override notNull(streamId) returns (uint128 coveredDebt); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### depletionTimeOf Returns the time at which the total debt exceeds stream balance. If the total debt exceeds the stream balance, it returns 0. Reverts on the following conditions: - If `streamId` references a paused or a null stream. - If stream balance is zero. ```solidity function depletionTimeOf(uint256 streamId) external view override notNull(streamId) notPaused(streamId) returns (uint256 depletionTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRecipient Retrieves the stream's recipient. _Reverts if `streamId` references a null stream._ ```solidity function getRecipient(uint256 streamId) external view override notNull(streamId) returns (address recipient); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### ongoingDebtScaledOf Returns the amount of debt accrued since the snapshot time until now, denoted as a fixed-point number where 1e18 is 1 token. If the stream is pending, it returns zero. _Reverts if `streamId` references a null stream._ ```solidity function ongoingDebtScaledOf(uint256 streamId) external view override notNull(streamId) returns (uint256 ongoingDebtScaled); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### refundableAmountOf Returns the amount that the sender can be refunded from the stream, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function refundableAmountOf(uint256 streamId) external view override notNull(streamId) returns (uint128 refundableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### statusOf Returns the stream's status. _Reverts if `streamId` references a null stream. Integrators should exercise caution when depending on the return value of this function as streams can be paused and resumed at any moment._ ```solidity function statusOf(uint256 streamId) external view override notNull(streamId) returns (Flow.Status status); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### totalDebtOf Returns the total amount owed by the sender to the recipient, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function totalDebtOf(uint256 streamId) external view override notNull(streamId) returns (uint256 totalDebt); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### uncoveredDebtOf Returns the amount of debt not covered by the stream balance, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function uncoveredDebtOf(uint256 streamId) external view override notNull(streamId) returns (uint256 uncoveredDebt); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### withdrawableAmountOf Calculates the amount that the recipient can withdraw from the stream, denoted in token decimals. This is an alias for `coveredDebtOf`. _Reverts if `streamId` references a null stream._ ```solidity function withdrawableAmountOf(uint256 streamId) external view override notNull(streamId) returns (uint128 withdrawableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------- | | `withdrawableAmount` | `uint128` | The amount that the recipient can withdraw. | ### adjustRatePerSecond Changes the stream's rate per second. Emits a {AdjustFlowStream} and {MetadataUpdate} event. Notes: - If the snapshot time is not in the future, it updates both the snapshot time and snapshot debt. Requirements: - Must not be delegate called. - `streamId` must not reference a null, paused, or voided stream. - `msg.sender` must be the stream's sender. - `newRatePerSecond` must be greater than zero and must be different from the current rate per second. ```solidity function adjustRatePerSecond( uint256 streamId, UD21x18 newRatePerSecond ) external payable override noDelegateCall notNull(streamId) notPaused(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ------------------ | --------- | ------------------------------------------------------------------------------------------ | | `streamId` | `uint256` | The ID of the stream to adjust. | | `newRatePerSecond` | `UD21x18` | The new rate per second, denoted as a fixed-point number where 1e18 is 1 token per second. | ### create Creates a new Flow stream by setting the snapshot time to `startTime` and leaving the balance to zero. The stream is wrapped in an ERC-721 NFT. Emits a {CreateFlowStream} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `sender` must not be the zero address. - `recipient` must not be the zero address. - If `startTime` is in the future, the `ratePerSecond` must be greater than zero. - The `token` must not be the native token. - The `token`'s decimals must be less than or equal to 18. ```solidity function create( address sender, address recipient, UD21x18 ratePerSecond, uint40 startTime, IERC20 token, bool transferable ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `sender` | `address` | The address streaming the tokens, which is able to adjust and pause the stream. It doesn't have to be the same as `msg.sender`. | | `recipient` | `address` | The address receiving the tokens. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `startTime` | `uint40` | The timestamp when the stream starts. A sentinel value of zero means the stream will be created with the snapshot time as `block.timestamp`. | | `token` | `IERC20` | The contract address of the ERC-20 token to be streamed. | | `transferable` | `bool` | Boolean indicating if the stream NFT is transferable. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createAndDeposit Creates a new Flow stream by setting the snapshot time to `startTime` and the balance to `amount`. The stream is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateFlowStream}, {DepositFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {create} and {deposit}. Requirements: - Refer to the requirements in {create} and {deposit}. ```solidity function createAndDeposit( address sender, address recipient, UD21x18 ratePerSecond, uint40 startTime, IERC20 token, bool transferable, uint128 amount ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `sender` | `address` | The address streaming the tokens. It doesn't have to be the same as `msg.sender`. | | `recipient` | `address` | The address receiving the tokens. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `startTime` | `uint40` | The timestamp when the stream starts. A sentinel value of zero means the stream will be created with the snapshot time as `block.timestamp`. | | `token` | `IERC20` | The contract address of the ERC-20 token to be streamed. | | `transferable` | `bool` | Boolean indicating if the stream NFT is transferable. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### deposit Makes a deposit in a stream. Emits a {Transfer}, {DepositFlowStream} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `streamId` must not reference a null or a voided stream. - `amount` must be greater than zero. - `sender` and `recipient` must match the stream's sender and recipient addresses. ```solidity function deposit( uint256 streamId, uint128 amount, address sender, address recipient ) external payable override noDelegateCall notNull(streamId) notVoided(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | ------------------------------------------------ | | `streamId` | `uint256` | The ID of the stream to deposit to. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | | `sender` | `address` | The stream's sender address. | | `recipient` | `address` | The stream's recipient address. | ### depositAndPause Deposits tokens in a stream and pauses it. Emits a {Transfer}, {DepositFlowStream}, {PauseFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {deposit} and {pause}. Requirements: - Refer to the requirements in {deposit} and {pause}. ```solidity function depositAndPause( uint256 streamId, uint128 amount ) external payable override noDelegateCall notNull(streamId) notPaused(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to deposit to, and then pause. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | ### pause Pauses the stream. Emits a {PauseFlowStream} and {MetadataUpdate} event. Notes: - It updates snapshot debt and snapshot time. - It sets the rate per second to zero. Requirements: - Must not be delegate called. - `streamId` must not reference a null, pending or paused stream. - `msg.sender` must be the stream's sender. ```solidity function pause(uint256 streamId) external payable override noDelegateCall notNull(streamId) notPaused(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------ | | `streamId` | `uint256` | The ID of the stream to pause. | ### recover Recover the surplus amount of tokens. Emits a {Recover} event. Notes: - The surplus amount is defined as the difference between the total balance of the contract for the provided ERC-20 token and the sum of balances of all streams created using the same ERC-20 token. Requirements: - `msg.sender` must be the comptroller contract. - The surplus amount must be greater than zero. ```solidity function recover(IERC20 token, address to) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ------- | --------- | -------------------------------------------------------- | | `token` | `IERC20` | The contract address of the ERC-20 token to recover for. | | `to` | `address` | The address to send the surplus amount. | ### refund Refunds the provided amount of tokens from the stream to the sender's address. Emits a {Transfer}, {RefundFromFlowStream} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `streamId` must not reference a null stream. - `msg.sender` must be the sender. - `amount` must be greater than zero and must not exceed the refundable amount. ```solidity function refund( uint256 streamId, uint128 amount ) external payable override noDelegateCall notNull(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | -------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to refund from. | | `amount` | `uint128` | The amount to refund, denoted in token's decimals. | ### refundAndPause Refunds the provided amount of tokens from the stream to the sender's address. Emits a {Transfer}, {RefundFromFlowStream}, {PauseFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {pause}. Requirements: - Refer to the requirements in {refund} and {pause}. ```solidity function refundAndPause( uint256 streamId, uint128 amount ) external payable override noDelegateCall notNull(streamId) notPaused(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to refund from and then pause. | | `amount` | `uint128` | The amount to refund, denoted in token's decimals. | ### refundMax Refunds the entire refundable amount of tokens from the stream to the sender's address. Emits a {Transfer}, {RefundFromFlowStream} and {MetadataUpdate} event. Requirements: - Refer to the requirements in {refund}. ```solidity function refundMax(uint256 streamId) external payable override noDelegateCall notNull(streamId) onlySender(streamId) updateMetadata(streamId) returns (uint128 refundedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------ | | `streamId` | `uint256` | The ID of the stream to refund from. | **Returns** | Name | Type | Description | | ---------------- | --------- | ---------------------------------------------------------------------- | | `refundedAmount` | `uint128` | The amount refunded to the stream sender, denoted in token's decimals. | ### restart Restarts the stream with the provided rate per second. Emits a {RestartFlowStream} and {MetadataUpdate} event. Notes: - It updates snapshot debt and snapshot time. Requirements: - Must not be delegate called. - `streamId` must not reference a null stream, must be paused, and must not be voided. - `msg.sender` must be the stream's sender. - `ratePerSecond` must be greater than zero. ```solidity function restart( uint256 streamId, UD21x18 ratePerSecond ) external payable override noDelegateCall notNull(streamId) notVoided(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to restart. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | ### restartAndDeposit Restarts the stream with the provided rate per second, and makes a deposit. Emits a {RestartFlowStream}, {Transfer}, {DepositFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {restart} and {deposit}. Requirements: - `amount` must be greater than zero. - Refer to the requirements in {restart}. ```solidity function restartAndDeposit( uint256 streamId, UD21x18 ratePerSecond, uint128 amount ) external payable override noDelegateCall notNull(streamId) notVoided(streamId) onlySender(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to restart. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | ### setNativeToken Sets the native token address. Once set, it cannot be changed. For more information, see the documentation for {nativeToken}. Emits a {SetNativeToken} event. Requirements: - `msg.sender` must be the comptroller contract. - `newNativeToken` must not be zero address. - The native token must not be already set. ```solidity function setNativeToken(address newNativeToken) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | -------------------------------- | | `newNativeToken` | `address` | The address of the native token. | ### setNFTDescriptor Sets a new NFT descriptor contract, which produces the URI describing the Sablier stream NFTs. Emits a {SetNFTDescriptor} and {BatchMetadataUpdate} event. Notes: - Does not revert if the NFT descriptor is the same. Requirements: - `msg.sender` must be the comptroller contract. ```solidity function setNFTDescriptor(IFlowNFTDescriptor newNFTDescriptor) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ------------------ | -------------------- | ----------------------------------------------- | | `newNFTDescriptor` | `IFlowNFTDescriptor` | The address of the new NFT descriptor contract. | ### supportsInterface _See {IERC165-supportsInterface}._ ```solidity function supportsInterface(bytes4 interfaceId) public view override(IERC165, ERC721) returns (bool); ``` ### tokenURI _See {IERC721Metadata-tokenURI}._ ```solidity function tokenURI(uint256 streamId) public view override(IERC721Metadata, ERC721) returns (string memory uri); ``` ### transferTokens A helper to transfer ERC-20 tokens from the caller to the provided address. Useful for paying one-time bonuses. Emits a {Transfer} event. Requirements: - `msg.sender` must have approved this contract to spend at least `amount` tokens. ```solidity function transferTokens(IERC20 token, address to, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | -------- | --------- | -------------------------------------------------------------- | | `token` | `IERC20` | The contract address of the ERC-20 token to be transferred. | | `to` | `address` | The address receiving the tokens. | | `amount` | `uint128` | The amount of tokens to transfer, denoted in token's decimals. | ### void Voids a stream. Emits a {VoidFlowStream} and {MetadataUpdate} event. Notes: - It sets snapshot time to the `block.timestamp`. - Voiding an insolvent stream sets the snapshot debt to the stream's balance making the uncovered debt to become zero. - Voiding a solvent stream updates the snapshot debt by adding up ongoing debt. - It sets the rate per second to zero. - A voided stream cannot be restarted. Requirements: - Must not be delegate called. - `streamId` must not reference a null or a voided stream. - `msg.sender` must either be the stream's sender, recipient or an approved third party. ```solidity function void(uint256 streamId) external payable override noDelegateCall notNull(streamId) notVoided(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ----------------------------- | | `streamId` | `uint256` | The ID of the stream to void. | ### withdraw Withdraws the provided `amount` to the provided `to` address. Emits a {Transfer}, {WithdrawFromFlowStream} and {MetadataUpdate} event. Notes: - It sets the snapshot time to the `block.timestamp` if `amount` is greater than snapshot debt. Requirements: - Must not be delegate called. - `streamId` must not reference a null stream. - `to` must not be the zero address. - `to` must be the recipient if `msg.sender` is not the stream's recipient or an approved third party. - `amount` must be greater than zero and must not exceed the withdrawable amount. ```solidity function withdraw( uint256 streamId, address to, uint128 amount ) external payable override noDelegateCall notNull(streamId) updateMetadata(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | | `amount` | `uint128` | The amount to withdraw, denoted in token's decimals. | ### withdrawMax Withdraws the entire withdrawable amount to the provided `to` address. Emits a {Transfer}, {WithdrawFromFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {withdraw}. Requirements: - Refer to the requirements in {withdraw}. ```solidity function withdrawMax( uint256 streamId, address to ) external payable override noDelegateCall notNull(streamId) updateMetadata(streamId) returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | **Returns** | Name | Type | Description | | ----------------- | --------- | ------------------------------------------------------------------- | | `withdrawnAmount` | `uint128` | The amount withdrawn to the recipient, denoted in token's decimals. | ### \_update Overrides the {ERC-721.\_update} function to check that the stream is transferable. _The transferable flag is ignored if the current owner is 0, as the update in this case is a mint and is allowed. Transfers to the zero address are not allowed, preventing accidental burns._ ```solidity function _update( address to, uint256 streamId, address auth ) internal override updateMetadata(streamId) returns (address); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `to` | `address` | The address of the new recipient of the stream. | | `streamId` | `uint256` | ID of the stream to update. | | `auth` | `address` | Optional parameter. If the value is not zero, the overridden implementation will check that `auth` is either the recipient of the stream, or an approved third party. | **Returns** | Name | Type | Description | | -------- | --------- | ----------------------------------------------------------- | | `` | `address` | The original recipient of the `streamId` before the update. | ### \_coveredDebtOf _Calculates the amount of covered debt by the stream balance._ ```solidity function _coveredDebtOf(uint256 streamId) private view returns (uint128); ``` ### \_isCallerStreamRecipientOrApproved Checks whether `msg.sender` is the stream's recipient or an approved third party. ```solidity function _isCallerStreamRecipientOrApproved(uint256 streamId, address recipient) private view returns (bool); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | | `recipient` | `address` | | ### \_ongoingDebtScaledOf _Calculates the ongoing debt, as a 18-decimals fixed point number, accrued since last snapshot. Return 0 if the stream is paused or `block.timestamp` is less than or equal to snapshot time._ ```solidity function _ongoingDebtScaledOf(uint256 streamId) private view returns (uint256); ``` ### \_refundableAmountOf _Calculates the refundable amount._ ```solidity function _refundableAmountOf(uint256 streamId) private view returns (uint128); ``` ### \_totalDebtOf _The total debt is the sum of the snapshot debt and the ongoing debt descaled to token's decimal. This value is independent of the stream's balance._ ```solidity function _totalDebtOf(uint256 streamId) private view returns (uint256); ``` ### \_uncoveredDebtOf _Calculates the uncovered debt._ ```solidity function _uncoveredDebtOf(uint256 streamId) private view returns (uint256); ``` ### \_verifyStreamSenderRecipient _Checks whether the provided addresses matches stream's sender and recipient._ ```solidity function _verifyStreamSenderRecipient(uint256 streamId, address sender, address recipient) private view; ``` ### \_adjustRatePerSecond _See the documentation for the user-facing functions that call this private function._ ```solidity function _adjustRatePerSecond(uint256 streamId, UD21x18 newRatePerSecond) private; ``` ### \_create _See the documentation for the user-facing functions that call this private function._ ```solidity function _create( address sender, address recipient, UD21x18 ratePerSecond, uint40 startTime, IERC20 token, bool transferable ) private returns (uint256 streamId); ``` ### \_deposit _See the documentation for the user-facing functions that call this private function._ ```solidity function _deposit(uint256 streamId, uint128 amount) private; ``` ### \_pause _See the documentation for the user-facing functions that call this private function._ ```solidity function _pause(uint256 streamId) private; ``` ### \_refund _See the documentation for the user-facing functions that call this private function._ ```solidity function _refund(uint256 streamId, uint128 amount) private; ``` ### \_restart _See the documentation for the user-facing functions that call this private function._ ```solidity function _restart(uint256 streamId, UD21x18 ratePerSecond) private; ``` ### \_void _See the documentation for the user-facing functions that call this private function._ ```solidity function _void(uint256 streamId) private; ``` ### \_withdraw _See the documentation for the user-facing functions that call this private function._ ```solidity function _withdraw(uint256 streamId, address to, uint128 amount) private; ``` --- ## IFlowNFTDescriptor [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/interfaces/IFlowNFTDescriptor.sol) This contract generates the URI describing the Sablier Flow stream NFTs. ## Functions ### tokenURI Produces the URI describing a particular stream NFT. _Currently it returns the Sablier logo as an SVG. In the future, it will return an NFT SVG._ ```solidity function tokenURI(IERC721Metadata sablierFlow, uint256 streamId) external view returns (string memory uri); ``` **Parameters** | Name | Type | Description | | ------------- | ----------------- | ---------------------------------------------------------- | | `sablierFlow` | `IERC721Metadata` | The address of the Sablier Flow the stream was created in. | | `streamId` | `uint256` | The ID of the stream for which to produce a description. | **Returns** | Name | Type | Description | | ----- | -------- | ----------------------------------------- | | `uri` | `string` | The URI of the ERC721-compliant metadata. | --- ## ISablierFlow [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/interfaces/ISablierFlow.sol) **Inherits:** IBatch, IComptrollerable, IERC4906, IERC721Metadata, [ISablierFlowState](/docs/reference/flow/contracts/interfaces/interface.ISablierFlowState.md) Creates and manages Flow streams with linear streaming functions. ## Functions ### calculateMinFeeWei Calculates the minimum fee in wei required to withdraw from the given stream ID. _Reverts if `streamId` references a null stream._ ```solidity function calculateMinFeeWei(uint256 streamId) external view returns (uint256 minFeeWei); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### coveredDebtOf Returns the amount of debt covered by the stream balance, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function coveredDebtOf(uint256 streamId) external view returns (uint128 coveredDebt); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### depletionTimeOf Returns the time at which the total debt exceeds stream balance. If the total debt exceeds the stream balance, it returns 0. Reverts on the following conditions: - If `streamId` references a paused or a null stream. - If stream balance is zero. ```solidity function depletionTimeOf(uint256 streamId) external view returns (uint256 depletionTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRecipient Retrieves the stream's recipient. _Reverts if `streamId` references a null stream._ ```solidity function getRecipient(uint256 streamId) external view returns (address recipient); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### ongoingDebtScaledOf Returns the amount of debt accrued since the snapshot time until now, denoted as a fixed-point number where 1e18 is 1 token. If the stream is pending, it returns zero. _Reverts if `streamId` references a null stream._ ```solidity function ongoingDebtScaledOf(uint256 streamId) external view returns (uint256 ongoingDebtScaled); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### refundableAmountOf Returns the amount that the sender can be refunded from the stream, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function refundableAmountOf(uint256 streamId) external view returns (uint128 refundableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### statusOf Returns the stream's status. _Reverts if `streamId` references a null stream. Integrators should exercise caution when depending on the return value of this function as streams can be paused and resumed at any moment._ ```solidity function statusOf(uint256 streamId) external view returns (Flow.Status status); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### totalDebtOf Returns the total amount owed by the sender to the recipient, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function totalDebtOf(uint256 streamId) external view returns (uint256 totalDebt); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### uncoveredDebtOf Returns the amount of debt not covered by the stream balance, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function uncoveredDebtOf(uint256 streamId) external view returns (uint256 uncoveredDebt); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### withdrawableAmountOf Calculates the amount that the recipient can withdraw from the stream, denoted in token decimals. This is an alias for `coveredDebtOf`. _Reverts if `streamId` references a null stream._ ```solidity function withdrawableAmountOf(uint256 streamId) external view returns (uint128 withdrawableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------- | | `withdrawableAmount` | `uint128` | The amount that the recipient can withdraw. | ### adjustRatePerSecond Changes the stream's rate per second. Emits a [AdjustFlowStream](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#adjustflowstream) and {MetadataUpdate} event. Notes: - If the snapshot time is not in the future, it updates both the snapshot time and snapshot debt. Requirements: - Must not be delegate called. - `streamId` must not reference a null, paused, or voided stream. - `msg.sender` must be the stream's sender. - `newRatePerSecond` must be greater than zero and must be different from the current rate per second. ```solidity function adjustRatePerSecond(uint256 streamId, UD21x18 newRatePerSecond) external payable; ``` **Parameters** | Name | Type | Description | | ------------------ | --------- | ------------------------------------------------------------------------------------------ | | `streamId` | `uint256` | The ID of the stream to adjust. | | `newRatePerSecond` | `UD21x18` | The new rate per second, denoted as a fixed-point number where 1e18 is 1 token per second. | ### create Creates a new Flow stream by setting the snapshot time to `startTime` and leaving the balance to zero. The stream is wrapped in an ERC-721 NFT. Emits a [CreateFlowStream](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#createflowstream) and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `sender` must not be the zero address. - `recipient` must not be the zero address. - If `startTime` is in the future, the `ratePerSecond` must be greater than zero. - The `token` must not be the native token. - The `token`'s decimals must be less than or equal to 18. ```solidity function create( address sender, address recipient, UD21x18 ratePerSecond, uint40 startTime, IERC20 token, bool transferable ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `sender` | `address` | The address streaming the tokens, which is able to adjust and pause the stream. It doesn't have to be the same as `msg.sender`. | | `recipient` | `address` | The address receiving the tokens. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `startTime` | `uint40` | The timestamp when the stream starts. A sentinel value of zero means the stream will be created with the snapshot time as `block.timestamp`. | | `token` | `IERC20` | The contract address of the ERC-20 token to be streamed. | | `transferable` | `bool` | Boolean indicating if the stream NFT is transferable. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createAndDeposit Creates a new Flow stream by setting the snapshot time to `startTime` and the balance to `amount`. The stream is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateFlowStream}, {DepositFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {create} and {deposit}. Requirements: - Refer to the requirements in {create} and {deposit}. ```solidity function createAndDeposit( address sender, address recipient, UD21x18 ratePerSecond, uint40 startTime, IERC20 token, bool transferable, uint128 amount ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `sender` | `address` | The address streaming the tokens. It doesn't have to be the same as `msg.sender`. | | `recipient` | `address` | The address receiving the tokens. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `startTime` | `uint40` | The timestamp when the stream starts. A sentinel value of zero means the stream will be created with the snapshot time as `block.timestamp`. | | `token` | `IERC20` | The contract address of the ERC-20 token to be streamed. | | `transferable` | `bool` | Boolean indicating if the stream NFT is transferable. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### deposit Makes a deposit in a stream. Emits a {Transfer}, {DepositFlowStream} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `streamId` must not reference a null or a voided stream. - `amount` must be greater than zero. - `sender` and `recipient` must match the stream's sender and recipient addresses. ```solidity function deposit(uint256 streamId, uint128 amount, address sender, address recipient) external payable; ``` **Parameters** | Name | Type | Description | | ----------- | --------- | ------------------------------------------------ | | `streamId` | `uint256` | The ID of the stream to deposit to. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | | `sender` | `address` | The stream's sender address. | | `recipient` | `address` | The stream's recipient address. | ### depositAndPause Deposits tokens in a stream and pauses it. Emits a {Transfer}, {DepositFlowStream}, {PauseFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {deposit} and {pause}. Requirements: - Refer to the requirements in {deposit} and {pause}. ```solidity function depositAndPause(uint256 streamId, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to deposit to, and then pause. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | ### pause Pauses the stream. Emits a [PauseFlowStream](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#pauseflowstream) and {MetadataUpdate} event. Notes: - It updates snapshot debt and snapshot time. - It sets the rate per second to zero. Requirements: - Must not be delegate called. - `streamId` must not reference a null, pending or paused stream. - `msg.sender` must be the stream's sender. ```solidity function pause(uint256 streamId) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------ | | `streamId` | `uint256` | The ID of the stream to pause. | ### recover Recover the surplus amount of tokens. Emits a [Recover](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#recover) event. Notes: - The surplus amount is defined as the difference between the total balance of the contract for the provided ERC-20 token and the sum of balances of all streams created using the same ERC-20 token. Requirements: - `msg.sender` must be the comptroller contract. - The surplus amount must be greater than zero. ```solidity function recover(IERC20 token, address to) external; ``` **Parameters** | Name | Type | Description | | ------- | --------- | -------------------------------------------------------- | | `token` | `IERC20` | The contract address of the ERC-20 token to recover for. | | `to` | `address` | The address to send the surplus amount. | ### refund Refunds the provided amount of tokens from the stream to the sender's address. Emits a {Transfer}, {RefundFromFlowStream} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `streamId` must not reference a null stream. - `msg.sender` must be the sender. - `amount` must be greater than zero and must not exceed the refundable amount. ```solidity function refund(uint256 streamId, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | -------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to refund from. | | `amount` | `uint128` | The amount to refund, denoted in token's decimals. | ### refundAndPause Refunds the provided amount of tokens from the stream to the sender's address. Emits a {Transfer}, {RefundFromFlowStream}, {PauseFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {pause}. Requirements: - Refer to the requirements in {refund} and {pause}. ```solidity function refundAndPause(uint256 streamId, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to refund from and then pause. | | `amount` | `uint128` | The amount to refund, denoted in token's decimals. | ### refundMax Refunds the entire refundable amount of tokens from the stream to the sender's address. Emits a {Transfer}, {RefundFromFlowStream} and {MetadataUpdate} event. Requirements: - Refer to the requirements in {refund}. ```solidity function refundMax(uint256 streamId) external payable returns (uint128 refundedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------ | | `streamId` | `uint256` | The ID of the stream to refund from. | **Returns** | Name | Type | Description | | ---------------- | --------- | ---------------------------------------------------------------------- | | `refundedAmount` | `uint128` | The amount refunded to the stream sender, denoted in token's decimals. | ### restart Restarts the stream with the provided rate per second. Emits a [RestartFlowStream](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#restartflowstream) and {MetadataUpdate} event. Notes: - It updates snapshot debt and snapshot time. Requirements: - Must not be delegate called. - `streamId` must not reference a null stream, must be paused, and must not be voided. - `msg.sender` must be the stream's sender. - `ratePerSecond` must be greater than zero. ```solidity function restart(uint256 streamId, UD21x18 ratePerSecond) external payable; ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to restart. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | ### restartAndDeposit Restarts the stream with the provided rate per second, and makes a deposit. Emits a [RestartFlowStream](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#restartflowstream), {Transfer}, {DepositFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {restart} and {deposit}. Requirements: - `amount` must be greater than zero. - Refer to the requirements in {restart}. ```solidity function restartAndDeposit(uint256 streamId, UD21x18 ratePerSecond, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to restart. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `amount` | `uint128` | The deposit amount, denoted in token's decimals. | ### setNativeToken Sets the native token address. Once set, it cannot be changed. For more information, see the documentation for {nativeToken}. Emits a {SetNativeToken} event. Requirements: - `msg.sender` must be the comptroller contract. - `newNativeToken` must not be zero address. - The native token must not be already set. ```solidity function setNativeToken(address newNativeToken) external; ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | -------------------------------- | | `newNativeToken` | `address` | The address of the native token. | ### setNFTDescriptor Sets a new NFT descriptor contract, which produces the URI describing the Sablier stream NFTs. Emits a [SetNFTDescriptor](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#setnftdescriptor) and {BatchMetadataUpdate} event. Notes: - Does not revert if the NFT descriptor is the same. Requirements: - `msg.sender` must be the comptroller contract. ```solidity function setNFTDescriptor(IFlowNFTDescriptor newNFTDescriptor) external; ``` **Parameters** | Name | Type | Description | | ------------------ | -------------------- | ----------------------------------------------- | | `newNFTDescriptor` | `IFlowNFTDescriptor` | The address of the new NFT descriptor contract. | ### transferTokens A helper to transfer ERC-20 tokens from the caller to the provided address. Useful for paying one-time bonuses. Emits a {Transfer} event. Requirements: - `msg.sender` must have approved this contract to spend at least `amount` tokens. ```solidity function transferTokens(IERC20 token, address to, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | -------- | --------- | -------------------------------------------------------------- | | `token` | `IERC20` | The contract address of the ERC-20 token to be transferred. | | `to` | `address` | The address receiving the tokens. | | `amount` | `uint128` | The amount of tokens to transfer, denoted in token's decimals. | ### void Voids a stream. Emits a [VoidFlowStream](/docs/reference/flow/contracts/interfaces/interface.ISablierFlow.md#voidflowstream) and {MetadataUpdate} event. Notes: - It sets snapshot time to the `block.timestamp`. - Voiding an insolvent stream sets the snapshot debt to the stream's balance making the uncovered debt to become zero. - Voiding a solvent stream updates the snapshot debt by adding up ongoing debt. - It sets the rate per second to zero. - A voided stream cannot be restarted. Requirements: - Must not be delegate called. - `streamId` must not reference a null or a voided stream. - `msg.sender` must either be the stream's sender, recipient or an approved third party. ```solidity function void(uint256 streamId) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ----------------------------- | | `streamId` | `uint256` | The ID of the stream to void. | ### withdraw Withdraws the provided `amount` to the provided `to` address. Emits a {Transfer}, {WithdrawFromFlowStream} and {MetadataUpdate} event. Notes: - It sets the snapshot time to the `block.timestamp` if `amount` is greater than snapshot debt. Requirements: - Must not be delegate called. - `streamId` must not reference a null stream. - `to` must not be the zero address. - `to` must be the recipient if `msg.sender` is not the stream's recipient or an approved third party. - `amount` must be greater than zero and must not exceed the withdrawable amount. ```solidity function withdraw(uint256 streamId, address to, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | | `amount` | `uint128` | The amount to withdraw, denoted in token's decimals. | ### withdrawMax Withdraws the entire withdrawable amount to the provided `to` address. Emits a {Transfer}, {WithdrawFromFlowStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {withdraw}. Requirements: - Refer to the requirements in {withdraw}. ```solidity function withdrawMax(uint256 streamId, address to) external payable returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | **Returns** | Name | Type | Description | | ----------------- | --------- | ------------------------------------------------------------------- | | `withdrawnAmount` | `uint128` | The amount withdrawn to the recipient, denoted in token's decimals. | ## Events ### AdjustFlowStream Emitted when the rate per second is updated by the sender. ```solidity event AdjustFlowStream(uint256 indexed streamId, uint256 totalDebt, UD21x18 oldRatePerSecond, UD21x18 newRatePerSecond); ``` **Parameters** | Name | Type | Description | | ------------------ | --------- | ------------------------------------------------------------------------------------------ | | `streamId` | `uint256` | The ID of the stream. | | `totalDebt` | `uint256` | The total debt at the time of the update, denoted in token's decimals. | | `oldRatePerSecond` | `UD21x18` | The old rate per second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `newRatePerSecond` | `UD21x18` | The new rate per second, denoted as a fixed-point number where 1e18 is 1 token per second. | ### CreateFlowStream Emitted when a Flow stream is created. ```solidity event CreateFlowStream( uint256 streamId, address creator, address indexed sender, address indexed recipient, UD21x18 ratePerSecond, uint40 snapshotTime, IERC20 indexed token, bool transferable ); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | | `creator` | `address` | The address creating the stream. | | `sender` | `address` | The address streaming the tokens, which is able to adjust and pause the stream. | | `recipient` | `address` | The address receiving the tokens, as well as the NFT owner. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | | `snapshotTime` | `uint40` | The timestamp when the stream begins accumulating debt. | | `token` | `IERC20` | The contract address of the ERC-20 token to be streamed. | | `transferable` | `bool` | Boolean indicating whether the stream NFT is transferable or not. | ### DepositFlowStream Emitted when a stream is funded. ```solidity event DepositFlowStream(uint256 indexed streamId, address indexed funder, uint128 amount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `funder` | `address` | The address that made the deposit. | | `amount` | `uint128` | The amount of tokens deposited into the stream, denoted in token's decimals. | ### PauseFlowStream Emitted when a stream is paused by the sender. ```solidity event PauseFlowStream(uint256 indexed streamId, address indexed sender, address indexed recipient, uint256 totalDebt); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | -------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `sender` | `address` | The stream's sender address. | | `recipient` | `address` | The stream's recipient address. | | `totalDebt` | `uint256` | The amount of tokens owed by the sender to the recipient, denoted in token's decimals. | ### Recover Emitted when the comptroller recovers the surplus amount of token. ```solidity event Recover(ISablierComptroller indexed comptroller, IERC20 indexed token, address to, uint256 surplus); ``` **Parameters** | Name | Type | Description | | ------------- | --------------------- | -------------------------------------------------------------------------- | | `comptroller` | `ISablierComptroller` | The address of the current comptroller. | | `token` | `IERC20` | The address of the ERC-20 token the surplus amount has been recovered for. | | `to` | `address` | The address the surplus amount has been sent to. | | `surplus` | `uint256` | The amount of surplus tokens recovered. | ### RefundFromFlowStream Emitted when a sender is refunded from a stream. ```solidity event RefundFromFlowStream(uint256 indexed streamId, address indexed sender, uint128 amount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `sender` | `address` | The stream's sender address. | | `amount` | `uint128` | The amount of tokens refunded to the sender, denoted in token's decimals. | ### RestartFlowStream Emitted when a stream is restarted by the sender. ```solidity event RestartFlowStream(uint256 indexed streamId, address indexed sender, UD21x18 ratePerSecond); ``` **Parameters** | Name | Type | Description | | --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `sender` | `address` | The stream's sender address. | | `ratePerSecond` | `UD21x18` | The amount by which the debt is increasing every second, denoted as a fixed-point number where 1e18 is 1 token per second. | ### SetNativeToken Emitted when the native token address is set by the comptroller. ```solidity event SetNativeToken(ISablierComptroller indexed comptroller, address nativeToken); ``` ### SetNFTDescriptor Emitted when the comptroller sets a new NFT descriptor contract. ```solidity event SetNFTDescriptor( ISablierComptroller indexed comptroller, IFlowNFTDescriptor oldNFTDescriptor, IFlowNFTDescriptor newNFTDescriptor ); ``` **Parameters** | Name | Type | Description | | ------------------ | --------------------- | ----------------------------------------------- | | `comptroller` | `ISablierComptroller` | The address of the current comptroller. | | `oldNFTDescriptor` | `IFlowNFTDescriptor` | The address of the old NFT descriptor contract. | | `newNFTDescriptor` | `IFlowNFTDescriptor` | The address of the new NFT descriptor contract. | ### VoidFlowStream Emitted when a stream is voided by the sender, recipient or an approved operator. ```solidity event VoidFlowStream( uint256 indexed streamId, address indexed sender, address indexed recipient, address caller, uint256 newTotalDebt, uint256 writtenOffDebt ); ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | ------------------------------------------------------------------------------------------------ | | `streamId` | `uint256` | The ID of the stream. | | `sender` | `address` | The stream's sender address. | | `recipient` | `address` | The stream's recipient address. | | `caller` | `address` | The address that performed the void, which can be the sender, recipient or an approved operator. | | `newTotalDebt` | `uint256` | The new total debt, denoted in token's decimals. | | `writtenOffDebt` | `uint256` | The amount of debt written off by the caller, denoted in token's decimals. | ### WithdrawFromFlowStream Emitted when tokens are withdrawn from a stream by a recipient or an approved operator. ```solidity event WithdrawFromFlowStream( uint256 indexed streamId, address indexed to, IERC20 indexed token, address caller, uint128 withdrawAmount ); ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | ---------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `to` | `address` | The address that received the withdrawn tokens. | | `token` | `IERC20` | The contract address of the ERC-20 token that was withdrawn. | | `caller` | `address` | The address that performed the withdrawal, which can be the recipient or an approved operator. | | `withdrawAmount` | `uint128` | The amount withdrawn to the recipient, denoted in token's decimals. | --- ## ISablierFlowState [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/interfaces/ISablierFlowState.sol) Contract with state variables (storage and constants) for the [SablierFlow](/docs/reference/flow/contracts/contract.SablierFlow.md) contract, their respective getters and helpful modifiers. ## Functions ### aggregateAmount Retrieves the aggregate amount across all streams, denoted in units of the token's decimals. _If tokens are directly transferred to the contract without using the stream creation functions, the ERC-20 balance may be greater than the aggregate amount._ ```solidity function aggregateAmount(IERC20 token) external view returns (uint256); ``` **Parameters** | Name | Type | Description | | ------- | -------- | ------------------------------- | | `token` | `IERC20` | The ERC-20 token for the query. | ### getBalance Retrieves the balance of the stream, i.e. the total deposited amounts subtracted by the total withdrawn amounts, denoted in token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function getBalance(uint256 streamId) external view returns (uint128 balance); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRatePerSecond Retrieves the rate per second of the stream, denoted as a fixed-point number where 1e18 is 1 token per second. _Reverts if `streamId` references a null stream._ ```solidity function getRatePerSecond(uint256 streamId) external view returns (UD21x18 ratePerSecond); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### getSender Retrieves the stream's sender. _Reverts if `streamId` references a null stream._ ```solidity function getSender(uint256 streamId) external view returns (address sender); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getSnapshotDebtScaled Retrieves the snapshot debt of the stream, denoted as a fixed-point number where 1e18 is 1 token. _Reverts if `streamId` references a null stream._ ```solidity function getSnapshotDebtScaled(uint256 streamId) external view returns (uint256 snapshotDebtScaled); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getSnapshotTime Retrieves the snapshot time of the stream, which is a Unix timestamp. _Reverts if `streamId` references a null stream._ ```solidity function getSnapshotTime(uint256 streamId) external view returns (uint40 snapshotTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### getStream Retrieves the stream entity. _Reverts if `streamId` references a null stream._ ```solidity function getStream(uint256 streamId) external view returns (Flow.Stream memory stream); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getToken Retrieves the token of the stream. _Reverts if `streamId` references a null stream._ ```solidity function getToken(uint256 streamId) external view returns (IERC20 token); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### getTokenDecimals Retrieves the token decimals of the stream. _Reverts if `streamId` references a null stream._ ```solidity function getTokenDecimals(uint256 streamId) external view returns (uint8 tokenDecimals); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to make the query for. | ### isStream Retrieves a flag indicating whether the stream exists. _Does not revert if `streamId` references a null stream._ ```solidity function isStream(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isTransferable Retrieves a flag indicating whether the stream NFT is transferable. _Reverts if `streamId` references a null stream._ ```solidity function isTransferable(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isVoided Retrieves a flag indicating whether the stream is voided. _Reverts if `streamId` references a null stream._ ```solidity function isVoided(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### nativeToken Retrieves the address of the ERC-20 interface of the native token, if it exists. _The native tokens on some chains have a dual interface as ERC-20. For example, on Polygon the $POL token is the native token and has an ERC-20 version at 0x0000000000000000000000000000000000001010. This means that `address(this).balance` returns the same value as `balanceOf(address(this))`. To avoid any unintended behavior, these tokens cannot be used in Sablier. As an alternative, users can use the Wrapped version of the token, i.e. WMATIC, which is a standard ERC-20 token._ ```solidity function nativeToken() external view returns (address); ``` ### nextStreamId Counter for stream ids. ```solidity function nextStreamId() external view returns (uint256); ``` **Returns** | Name | Type | Description | | -------- | --------- | ------------------- | | `` | `uint256` | The next stream ID. | ### nftDescriptor Contract that generates the non-fungible token URI. ```solidity function nftDescriptor() external view returns (IFlowNFTDescriptor); ``` --- ## Errors(3) [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/libraries/Errors.sol) Library with custom errors used across the Flow contract. ## Errors ### SablierFlow_CreateNativeToken Thrown when trying to create a stream with the native token. ```solidity error SablierFlow_CreateNativeToken(address nativeToken); ``` ### SablierFlow_CreateRatePerSecondZero Thrown when trying to create a pending stream with zero rate per second. ```solidity error SablierFlow_CreateRatePerSecondZero(); ``` ### SablierFlow_DepositAmountZero Thrown when trying to create a stream with a zero deposit amount. ```solidity error SablierFlow_DepositAmountZero(uint256 streamId); ``` ### SablierFlow_InsufficientFeePayment Thrown when trying to withdraw with a fee amount less than the minimum fee. ```solidity error SablierFlow_InsufficientFeePayment(uint256 feePaid, uint256 minFeeWei); ``` ### SablierFlow_InvalidCalculation Thrown when an unexpected error occurs during the calculation of an amount. ```solidity error SablierFlow_InvalidCalculation(uint256 streamId, uint128 availableAmount, uint128 amount); ``` ### SablierFlow_InvalidTokenDecimals Thrown when trying to create a stream with a token with decimals greater than 18. ```solidity error SablierFlow_InvalidTokenDecimals(address token); ``` ### SablierFlow_NativeTokenAlreadySet Thrown when trying to set the native token address when it is already set. ```solidity error SablierFlow_NativeTokenAlreadySet(address nativeToken); ``` ### SablierFlow_NativeTokenZeroAddress Thrown when trying to set zero address as native token. ```solidity error SablierFlow_NativeTokenZeroAddress(); ``` ### SablierFlow_NewRatePerSecondZero Thrown when trying to adjust the rate per second to zero. ```solidity error SablierFlow_NewRatePerSecondZero(uint256 streamId); ``` ### SablierFlow_NotStreamRecipient Thrown when the recipient address does not match the stream's recipient. ```solidity error SablierFlow_NotStreamRecipient(address recipient, address streamRecipient); ``` ### SablierFlow_NotStreamSender Thrown when the sender address does not match the stream's sender. ```solidity error SablierFlow_NotStreamSender(address sender, address streamSender); ``` ### SablierFlow_NotTransferable Thrown when trying to transfer Stream NFT when transferability is disabled. ```solidity error SablierFlow_NotTransferable(uint256 streamId); ``` ### SablierFlow_Overdraw Thrown when trying to withdraw an amount greater than the withdrawable amount. ```solidity error SablierFlow_Overdraw(uint256 streamId, uint128 amount, uint128 withdrawableAmount); ``` ### SablierFlow_RatePerSecondNotDifferent Thrown when trying to change the rate per second with the same rate per second. ```solidity error SablierFlow_RatePerSecondNotDifferent(uint256 streamId, UD21x18 ratePerSecond); ``` ### SablierFlow_RefundAmountZero Thrown when trying to refund zero tokens from a stream. ```solidity error SablierFlow_RefundAmountZero(uint256 streamId); ``` ### SablierFlow_RefundOverflow Thrown when trying to refund an amount greater than the refundable amount. ```solidity error SablierFlow_RefundOverflow(uint256 streamId, uint128 refundAmount, uint128 refundableAmount); ``` ### SablierFlow_SenderZeroAddress Thrown when trying to create a stream with the sender as the zero address. ```solidity error SablierFlow_SenderZeroAddress(); ``` ### SablierFlow_StreamBalanceZero Thrown when trying to get depletion time of a stream with zero balance. ```solidity error SablierFlow_StreamBalanceZero(uint256 streamId); ``` ### SablierFlow_StreamNotPaused Thrown when trying to perform a disallowed action on a non-paused stream. ```solidity error SablierFlow_StreamNotPaused(uint256 streamId); ``` ### SablierFlow_StreamPending Thrown when trying to perform a disallowed action on a pending stream. ```solidity error SablierFlow_StreamPending(uint256 streamId, uint40 snapshotTime); ``` ### SablierFlow_SurplusZero Thrown when trying to recover for a token with zero surplus. ```solidity error SablierFlow_SurplusZero(address token); ``` ### SablierFlow_Unauthorized Thrown when `msg.sender` lacks authorization to perform an action. ```solidity error SablierFlow_Unauthorized(uint256 streamId, address caller); ``` ### SablierFlow_WithdrawalAddressNotRecipient Thrown when trying to withdraw to an address other than the recipient's. ```solidity error SablierFlow_WithdrawalAddressNotRecipient(uint256 streamId, address caller, address to); ``` ### SablierFlow_WithdrawAmountZero Thrown when trying to withdraw zero tokens from a stream. ```solidity error SablierFlow_WithdrawAmountZero(uint256 streamId); ``` ### SablierFlow_WithdrawToZeroAddress Thrown when trying to withdraw to the zero address. ```solidity error SablierFlow_WithdrawToZeroAddress(uint256 streamId); ``` ### SablierFlowState_Null Thrown when the ID references a null stream. ```solidity error SablierFlowState_Null(uint256 streamId); ``` ### SablierFlowState_StreamPaused Thrown when trying to perform a disallowed action on a paused stream. ```solidity error SablierFlowState_StreamPaused(uint256 streamId); ``` ### SablierFlowState_StreamVoided Thrown when trying to perform a disallowed action on a voided stream. ```solidity error SablierFlowState_StreamVoided(uint256 streamId); ``` ### SablierFlowState_Unauthorized Thrown when `msg.sender` lacks authorization to perform an action. ```solidity error SablierFlowState_Unauthorized(uint256 streamId, address caller); ``` --- ## Helpers [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/libraries/Helpers.sol) Library with helper functions in [SablierFlow](/docs/reference/flow/contracts/contract.SablierFlow.md) contract. ## Functions ### descaleAmount Descales the provided `amount` from 18 decimals fixed-point number to token's decimals number. _If `decimals` exceeds 18, it will cause an underflow._ ```solidity function descaleAmount(uint256 amount, uint8 decimals) internal pure returns (uint256); ``` ### scaleAmount Scales the provided `amount` from token's decimals number to 18 decimals fixed-point number. _If `decimals` exceeds 18, it will cause an underflow. If `amount` exceeds max value of `uint128`, the result may overflow `uint256`._ ```solidity function scaleAmount(uint256 amount, uint8 decimals) internal pure returns (uint256); ``` --- ## Flow [Git Source](https://github.com/sablier-labs/flow/blob/a4143de45478f508bca8305fec2bd81b7ad25fe9/src/types/DataTypes.sol) ## Structs ### Stream Struct representing Flow streams. _The fields are arranged like this to save gas via tight variable packing._ ```solidity struct Stream { uint128 balance; UD21x18 ratePerSecond; address sender; uint40 snapshotTime; bool isStream; bool isTransferable; bool isVoided; IERC20 token; uint8 tokenDecimals; uint256 snapshotDebtScaled; } ``` **Properties** | Name | Type | Description | | -------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `balance` | `uint128` | The amount of tokens that are currently available in the stream, denoted in the token's decimals. This is the sum of deposited amounts minus the sum of withdrawn amounts. | | `ratePerSecond` | `UD21x18` | The payment rate per second, denoted as a fixed-point number where 1e18 is 1 token per second. For example, to stream 1000 tokens per week, this parameter would have the value $(1000 * 10^18) / (7 days in seconds)$. | | `sender` | `address` | The address streaming the tokens, with the ability to pause the stream. | | `snapshotTime` | `uint40` | The Unix timestamp used for the ongoing debt calculation. | | `isStream` | `bool` | Boolean indicating if the struct entity exists. | | `isTransferable` | `bool` | Boolean indicating if the stream NFT is transferable. | | `isVoided` | `bool` | Boolean indicating if the stream is voided. Voiding any stream is non-reversible and it cannot be restarted. Voiding an insolvent stream sets its uncovered debt to zero. | | `token` | `IERC20` | The contract address of the ERC-20 token to stream. | | `tokenDecimals` | `uint8` | The decimals of the ERC-20 token to stream. | | `snapshotDebtScaled` | `uint256` | The amount of tokens that the sender owed to the recipient at snapshot time, denoted as a 18-decimals fixed-point number. This, along with the ongoing debt, can be used to calculate the total debt at any given point in time. | ## Enums ### Status Enum representing the different statuses of a stream. **Notes:** - value0: PENDING Stream scheduled to start in the future. - value1: STREAMING_SOLVENT Streaming stream with no uncovered debt. - value2: STREAMING_INSOLVENT Streaming stream with uncovered debt. - value3: PAUSED_SOLVENT Paused stream with no uncovered debt. - value4: PAUSED_INSOLVENT Paused stream with uncovered debt. - value5: VOIDED Paused stream with no uncovered debt, which cannot be restarted. ```solidity enum Status { PENDING, STREAMING_SOLVENT, STREAMING_INSOLVENT, PAUSED_SOLVENT, PAUSED_INSOLVENT, VOIDED } ``` --- ## Constant Functions ## Get Stream Returns all properties for the provided stream id. ```solidity function getStream(uint256 streamId) view returns (address sender, address recipient, address tokenAddress, uint256 balance, uint256 startTime, uint256 stopTime, uint256 remainingBalance, uint256 ratePerSecond) ``` - `streamId`: The id of the stream to query. - `RETURN` - `sender`: The address that created and funded the stream. - `recipient`: The address towards which the tokens are streamed. - `tokenAddress`: The address of the ERC-20 token used as streaming currency. - `startTime`: The unix timestamp for when the stream starts, in seconds. - `stopTime`: The unix timestamp for when the stream stops, in seconds. - `remainingBalance`: How much tokens are still allocated to this stream, in the smart contract. - `ratePerSecond`: How much tokens are allocated from the sender to the recipient every second. ### Solidity ```solidity Sablier sablier = Sablier(0xabcd...); uint256 streamId = 42; (uint256 sender, uint256 recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime, uint256 remainingBalance, uint256 ratePerSecond) = sablier.getStream(streamId); ``` ### Ethers.js ```javascript const sablier = new ethers.Contract(0xabcd..., sablierABI, signerOrProvider); const streamId = 42; const stream = await sablier.getStream(streamId);‌ ``` --- ## Balance Of Returns the real-time balance of an account with regards to a specific stream. ```solidity function balanceOf(uint256 streamId, address who) view returns (uint256) ``` - `streamId`: The id of the stream for which to query the balance. - `who`: The address for which to query the balance. - `RETURN`: The available balance in units of the underlying ERC-20 token. :::info This is the amount of tokens that can be withdrawn from the contract, not the total amount of tokens streamed. If the contract streamed 1,000 tokens to Bob, but Bob withdrew 400 tokens already, this function will return 600 and not 1,000. ::: ### Solidity ```solidity Sablier sablier = Sablier(0xabcd...); uint256 streamId = 42; uint256 senderAddress = 0xcdef...; uint256 balance = sablier.balanceOf(streamId, senderAddress); ``` ### Javascript ```javascript const sablier = new ethers.Contract(0xabcd..., sablierABI, signerOrProvider); const streamId = 42; const senderAddress = 0xcdef...; const balance = await sablier.balanceOf(streamId, senderAddress); ``` --- ## Delta of Returns either the difference between now and the start time of the stream OR between the stop time and the start time of the stream, whichever is smaller. However, if the clock did not hit the start time of the stream, the value returned is 0 instead. ```solidity function deltaOf(uint256 streamId) view returns (uint256)‌ ``` `streamId`: The id of the stream for which to query the delta. `RETURN`: The time delta in seconds. ### Solidity ```solidity Sablier sablier = Sablier(0xabcd...); uint256 streamId = 42; uint256 delta = sablier.deltaOf(streamId);‌ ``` ### Ethers.js ```javascript const sablier = new ethers.Contract(0xabcd..., sablierABI, signerOrProvider); const streamId = 42; const delta = await sablier.deltaOf(streamId); ``` --- ## Error Table The table below lists all possible reasons for reverting a contract call that creates, withdraws from or cancels a stream. The "Id" column is just a counter used in this table - the smart contract does not yield error codes, just strings. | Number | Error | Reason | | ------ | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | 1 | stream does not exist | The provided stream id does not point to a valid stream | | 2 | caller is not the sender or the recipient of the stream | The contract call originates from an unauthorized third-party | | 3 | SafeERC20: low-level call failed | Possibly insufficient allowance, but not necessarily so | | 4 | stream to the zero address | Attempt to stream tokens to the [zero address](https://etherscan.io/address/0x0000000000000000000000000000000000000000) | | 5 | stream to the contract itself | Attempt to stream tokens to the Sablier contract | | 6 | stream to the caller | Happens when the caller attempts to stream tokens to herself | | 7 | deposit is zero | Attempt to stream 0 tokens | | 8 | start time before block.timestamp | Tokens cannot be streamed retroactively | | 9 | stop time before the start time | Negative streaming is not allowed | | 10 | deposit smaller than time delta | The deposit, measured in units of the token, is smaller than the time delta | | 11 | deposit not multiple of time delta | The deposit has a non-zero remainder when divided by the time delta | | 12 | amount is zero | Attempt to withdraw 0 tokens | | 13 | amount exceeds the available balance | Attempt to withdraw more tokens than the available balance | | 14 | recipient balance calculation error | Happens only when streaming an absurdly high number of tokens (close to 2^256) | :::info The contract call could revert with [no reason](https://vmexceptionwhileprocessingtransactionrevert.com/) provided. In this case, you probably did not approve the Lockup contract to spend your token balance, although this is not necessarily the case. Ping us on [Discord](https://discord.sablier.com) if you get stuck. ::: --- ## Non-Constant Functions ## Create stream The create stream function transfers the tokens into the Sablier smart contract, stamping the rules of the stream into the blockchain. As soon as the chain clock hits the start time of the stream, a small portion of tokens starts getting "transferred" from the sender to the recipient once every second. We used scare quotes because what actually happens is not a transfer, but rather an abstract allocation of funds. Every second, the in-contract allowance of the sender decreases. while the recipient's allocation increases, even if the tokens are not transferred to the recipient. Actually transferring the tokens would be excessively expensive in terms of gas costs. ```solidity function createStream(address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime) returns (uint256) ``` - `msg.sender`: The account who funds the stream, and pays the recipient in real-time. - `recipient`: The account toward which the tokens will be streamed. - `deposit`: The amount of tokens to be streamed, in units of the streaming currency. - `tokenAddress`: The address of the ERC-20 token to use as streaming currency. - `startTime`: The unix timestamp for when the stream starts, in seconds. - `stopTime`: The unix timestamp for when the stream stops, in seconds. - `RETURN`: The stream's id as an unsigned integer on success, reverts on error. :::caution Before creating a stream, users must first [approve](https://eips.ethereum.org/EIPS/eip-20#approve) the Sablier contract to access their token balance. ::: :::danger The transaction must be processed by the Ethereum blockchain before the start time of the stream, or otherwise the contract will revert with a "start time before block.timestamp" message. ::: ### The Deposit Gotcha The deposit must be a multiple of the difference between the stop time and the start time, or otherwise the contract reverts with a "deposit not multiple of time delta" message. In practice, this means that you may not able to always use exact amounts like 3,000. You may have to divide the fixed deposit by the time delta and subtract the remainder from the initial number. Thus you may have to stream a value that is very, very close to the fixed deposit, but not quite it. For example, if: - The token has 18 decimals - The time delta is 2592000 (30 days) You will have to stream 2999999999999998944000 instead of 3000000000000000000000. The former divides evenly by 2592000, but the latter doesn't. ### Solidity ```solidity Sablier sablier = Sablier(0xabcd...); // get a handle for the Sablier contract address recipient = 0xcdef...; uint256 deposit = 2999999999999998944000; // almost 3,000, but not quite uint256 startTime = block.timestamp + 3600; // 1 hour from now uint256 stopTime = block.timestamp + 2592000 + 3600; // 30 days and 1 hour from now Erc20 token = Erc20(0xcafe...); // get a handle for the token contract token.approve(address(sablier), deposit); // approve the transfer // the stream id is needed later to withdraw from or cancel the stream uint256 streamId = sablier.createStream(recipient, deposit, address(token), startTime, stopTime); ``` ### Ethers.js ```javascript const sablier = new ethers.Contract(0xabcd..., sablierABI, signerOrProvider); // get a handle for the Sablier contract const recipient = 0xcdef...; const deposit = "2999999999999998944000"; // almost 3,000, but not quite const now = Math.round(new Date().getTime() / 1000); // get seconds since unix epoch const startTime = now + 3600; // 1 hour from now const stopTime = now + 2592000 + 3600; // 30 days and 1 hour from now const token = new ethers.Contract(0xcafe..., erc20ABI, signerOrProvider); // get a handle for the token contract const approveTx = await token.approve(sablier.address, deposit); // approve the transfer await approveTx.wait(); const createStreamTx = await sablier.createStream(recipient, deposit, token.address, startTime, stopTime); await createStreamTx.wait(); ``` --- ## Withdraw from Stream The withdraw from stream function transfers an amount of tokens from the Sablier contract to the recipient's account. The withdrawn amount must be less than or equal to the available [balance](./constant-functions#balance-of). This function can only be called by the sender or the recipient of the stream, not any third-party. ```solidity function withdrawFromStream(uint256 streamId, uint256 amount) returns (bool); ``` - `streamId`: The id of the stream to withdraw tokens from. - `amount`: The amount of tokens to withdraw. - `RETURN`: True on success, reverts on error. :::info To be able to call this function, you have to wait until the clock goes past the start time of the stream. ::: ### Solidity ```solidity Sablier sablier = Sablier(0xabcd...); uint256 streamId = 42; uint256 amount = 100; require(sablier.withdrawFromStream(streamId, amount), "something went wrong");‌ ``` ### Ethers.js ```javascript ‌const sablier = new ethers.Contract(0xabcd..., sablierABI, signerOrProvider); const streamId = 42; const amount = 100; const withdrawFromStreamTx = await sablier.withdrawFromStream(streamId, amount); await withdrawFromStreamTx.wait(); ``` --- ## Cancel Stream The cancel stream function revokes a previously created stream and returns the tokens back to the sender and/or the recipient. If the chain clock did not hit the start time, all the tokens is returned to the sender. If the chain clock did go past the start time, but not past the stop time, the sender and the recipient each get a pro-rata amount. Finally, if the chain clock went past the stop time, all the tokens goes the recipient. This function can be called only by the sender. ```solidity function cancelStream(uint256 streamId) returns (bool); ``` - `streamId`: The id of the stream to cancel. - `RETURN`: True on success, reverts on error. ### Solidity ```solidity Sablier sablier = Sablier(0xabcd...); uint256 streamId = 42; require(sablier.cancelStream(streamId), "something went wrong"); ``` ### Ethers.js ```javascript const sablier = new ethers.Contract(0xabcd..., sablierABI, signerOrProvider); const streamId = 42; const cancelStreamTx = await sablier.cancelStream(streamId); await cancelStreamTx.wait(); ``` --- ## Diagrams(Lockup) ## Token Flows :::tip If you are interested into creating a stream with non-transferrable tokens, make sure to whitelist both `BatchLockup` and `Lockup` contracts. ::: ### Creating a Single Stream ```mermaid sequenceDiagram actor Sender Sender ->> Lockup: createWithDurations() Sender -->> Lockup: Transfer tokens Lockup -->> Sender: Mint Stream NFT ``` ### Creating a Batch of Streams ```mermaid sequenceDiagram actor Sender Sender ->> BatchLockup: createWithDurations() BatchLockup ->> Lockup: createWithDurations() Sender -->> BatchLockup: Transfer tokens BatchLockup -->> Lockup: Transfer tokens Lockup -->> Sender: Mint Stream NFT ``` ## Storage Layout ### Common Lockup is a singleton contract that stores all streams created by that contract's users. The following diagrams provide insight into the shared storage layout of each stream. To see the full list of storage variables, check out [this reference](/reference/lockup/contracts/types/library.Lockup#structs). ```mermaid flowchart TD; L["Lockup contract"]; S0[(Stream 1)]; S01([amounts]) S02([isCancelable]) S03([isTransferable]) S04([endTime]) S05([lockupModel]) S06([sender]) S07([startTime]) S08([token]) L --> S0; S0 --> S01; S0 --> S02; S0 --> S03; S0 --> S04; S0 --> S05; S0 --> S06; S0 --> S07; S0 --> S08; ``` Each [amounts storage](/reference/lockup/contracts/types/library.Lockup#amounts) is made of the following components: ```mermaid flowchart TD; S01([amounts]) A1([deposited]) A2([withdrawn]) A3([refunded]) S01 --> A1; S01 --> A2; S01 --> A3; ``` :::info Each stream belongs to one of the three models: Linear, Dynamic and Tranched. Each of these model has its own storage as outlined below. ::: ### Linear Stream Apart from the above storage layout, Linear stream requires storing [unlock amounts](/reference/lockup/contracts/types/library.LockupLinear#unlockamounts) and cliff time. ```mermaid flowchart TD; L[(Linear stream)]; S0([common storage]) S1([cliff]) S2([start amount]) S3([cliff amount]) L --> S0; L --> S1; L --> S2; L --> S3; ``` ### Dynamic Stream Similarly, Dynamic stream requires an array of [segments](/reference/lockup/contracts/types/library.LockupDynamic#segment). ```mermaid flowchart TD; L[(Dynamic stream)]; S0([common storage]) S1([segment 1]) S2([segment 2]) S3([segment 3]) L --> S0; L --> S1; L --> S2; L --> S3; ``` Where each segment is made of three components: ```mermaid flowchart TD; S1([segment 1]) S1 --> A01([amount]) S1 --> A02([exponent]) S1 --> A03([timestamp]) S2([segment 2]) S2 --> A11([amount]) S2 --> A12([exponent]) S2 --> A13([timestamp]) ``` ### Tranched Stream A Tranched stream requires an array of [tranches](/reference/lockup/contracts/types/library.LockupTranched#tranche). ```mermaid flowchart TD; L[(Tranched stream)]; S0([common storage]) S1([tranche 1]) S2([tranche 2]) S3([tranche 3]) L --> S0; L --> S1; L --> S2; L --> S3; ``` Where each tranche is made of two components: ```mermaid flowchart TD; S1([tranche 1]) S1 --> A01([amount]) S1 --> A02([timestamp]) S2([tranche 2]) S2 --> A11([amount]) S2 --> A12([timestamp]) ``` --- ## Access Control(Lockup) With the exception of the [admin functions](/concepts/governance#lockup), all functions in Lockup can only be triggered by users. The Comptroller has no control over any stream or any part of the protocol. This article will provide a comprehensive overview of the actions that can be performed on streams once they are created, as well as the corresponding user permissions for each action. :::note Every stream has a sender and a recipient. Recipients can approve third parties to take actions on their behalf. An 'public' caller is any address outside of sender and recipient. ::: ## Overview The table below offers a quick overview of the access control for each action that can be performed on a stream. | Action | Sender | Recipient / Approved third party | Public | | ----------------------- | :----: | :------------------------------: | :----: | | Burn NFT | ❌ | ✅ | ❌ | | Cancel | ✅ | ❌ | ❌ | | Cancel Multiple | ✅ | ❌ | ❌ | | Renounce | ✅ | ❌ | ❌ | | Transfer NFT | ❌ | ✅ | ❌ | | Withdraw to any address | ❌ | ✅ | ❌ | | Withdraw to recipient | ✅ | ✅ | ✅ | | Withdraw Multiple | ✅ | ✅ | ✅ | ## Burn NFT Either the recipient or an approved operator can burn the NFT associated with a stream. ```mermaid sequenceDiagram actor Recipient Recipient ->> Lockup: burn() Recipient -->> address(0): Transfer stream NFT ``` #### With Operator: ```mermaid sequenceDiagram actor Recipient actor Operator Recipient ->> Lockup: approve(operator) Operator ->> Lockup: burn() Recipient -->> address(0): Transfer stream NFT ``` ## Cancel Only the sender can cancel a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Lockup: cancel() Lockup -->> Sender: Transfer unvested tokens ``` ## Cancel Multiple Only the sender can cancel multiple streams. ```mermaid sequenceDiagram actor Sender Sender ->> Lockup: cancelMultiple() Lockup -->> Sender: Transfer unvested tokens from multiple streams ``` ## Renounce Only the sender can renounce a stream. ```mermaid sequenceDiagram actor Sender Sender ->> Lockup: renounce() ``` ## Transfer NFT Either the recipient or an approved operator can transfer the NFT associated with a stream. - Only if the stream is transferable. ```mermaid sequenceDiagram actor Recipient Recipient ->> Lockup: transfer(toAddress) Create actor toAddress Recipient -->> toAddress: Transfer NFT ``` #### With Operator: ```mermaid sequenceDiagram actor Recipient actor Operator Recipient ->> Lockup: approve(operator) Operator ->> Lockup: transfer(toAddress) Create actor toAddress Recipient -->> toAddress: Transfer NFT ``` ## Withdraw Multiple Anybody can withdraw tokens from multiple streams to the recipients of each stream. ```mermaid sequenceDiagram actor Anyone Anyone ->> Lockup: withdrawMultiple() Create actor getRecipient(1) Lockup -->> getRecipient(1): Transfer vested tokens from stream 1 Create actor getRecipient(2) Lockup -->> getRecipient(2): Transfer vested tokens from stream 2 Create actor getRecipient(3) Lockup -->> getRecipient(3): Transfer vested tokens from stream 3 ``` ## Withdraw to Any Address The tokens in a stream can be withdrawn to any address only by the recipient or an approved third party. ```mermaid sequenceDiagram actor Recipient Recipient ->> Lockup: withdraw(toAddress) Create actor toAddress Lockup -->> toAddress: Transfer vested tokens ``` #### With Operator: ```mermaid sequenceDiagram actor Recipient actor Operator Recipient ->> Lockup: approve(operator) Operator ->> Lockup: withdraw(toAddress) Create actor toAddress Lockup -->> toAddress: Transfer vested tokens ``` ## Withdraw to Recipient The tokens in a stream can be withdrawn to the recipient by anyone including the sender, recipient, or an approved third party. ```mermaid sequenceDiagram actor Anyone Anyone ->> Lockup: withdraw(recipient) Create actor Recipient Lockup -->> Recipient: Transfer vested tokens ``` --- ## Batch(Abstracts) [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/Batch.sol) **Inherits:** IBatch See the documentation in {IBatch}. ## Functions ### batch Allows batched calls to self, i.e., `this` contract. _Since `msg.value` can be reused across calls, be VERY CAREFUL when using it. Refer to https://paradigm.xyz/2021/08/two-rights-might-make-a-wrong for more information._ ```solidity function batch(bytes[] calldata calls) external payable virtual override returns (bytes[] memory results); ``` **Parameters** | Name | Type | Description | | ------- | --------- | --------------------------------- | | `calls` | `bytes[]` | An array of inputs for each call. | **Returns** | Name | Type | Description | | --------- | --------- | -------------------------------------------------------------------------------- | | `results` | `bytes[]` | An array of results from each call. Empty when the calls do not return anything. | --- ## Comptrollerable(3) [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/Comptrollerable.sol) **Inherits:** IComptrollerable See the documentation in {IComptrollerable}. ## State Variables ### comptroller Retrieves the address of the comptroller contract. ```solidity ISablierComptroller public override comptroller; ``` ## Functions ### onlyComptroller Reverts if called by any account other than the comptroller. ```solidity modifier onlyComptroller(); ``` ### constructor ```solidity constructor(address initialComptroller); ``` **Parameters** | Name | Type | Description | | -------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | ### setComptroller Sets the comptroller to a new address. Emits a {SetComptroller} event. Requirements: - `msg.sender` must be the current comptroller. - The new comptroller must return `true` from {supportsInterface} with the comptroller's minimal interface ID which is defined as the XOR of the following function selectors: 1. {calculateMinFeeWeiFor} 2. {convertUSDFeeToWei} 3. {execute} 4. {getMinFeeUSDFor} ```solidity function setComptroller(ISablierComptroller newComptroller) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ---------------- | --------------------- | -------------------------------------------- | | `newComptroller` | `ISablierComptroller` | The address of the new comptroller contract. | ### transferFeesToComptroller Transfers the fees to the comptroller contract. _Emits a {TransferFeesToComptroller} event._ ```solidity function transferFeesToComptroller() external override; ``` ### \_checkComptroller _See the documentation for the user-facing functions that call this private function._ ```solidity function _checkComptroller() private view; ``` ### \_setComptroller _See the documentation for the user-facing functions that call this private function._ ```solidity function _setComptroller( ISablierComptroller previousComptroller, ISablierComptroller newComptroller, bytes4 minimalInterfaceId ) private; ``` --- ## NoDelegateCall(Abstracts) [Git Source](https://github.com/sablier-labs/evm-utils/blob/0b3bc38ab8badd135fc178b757afaf6902f1f63c/src/NoDelegateCall.sol) This contract implements logic to prevent delegate calls. ## State Variables ### ORIGINAL _The address of the original contract that was deployed._ ```solidity address private immutable ORIGINAL; ``` ## Functions ### noDelegateCall Prevents delegate calls. ```solidity modifier noDelegateCall(); ``` ### constructor _Sets the original contract address._ ```solidity constructor(); ``` ### \_preventDelegateCall This function checks whether the current call is a delegate call, and reverts if it is. - A private function is used instead of inlining this logic in a modifier because Solidity copies modifiers into every function that uses them. The `ORIGINAL` address would get copied in every place the modifier is used, which would increase the contract size. By using a function instead, we can avoid this duplication of code and reduce the overall size of the contract. ```solidity function _preventDelegateCall() private view; ``` --- ## SablierLockupDynamic [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/abstracts/SablierLockupDynamic.sol) **Inherits:** [ISablierLockupDynamic](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupDynamic.md), [NoDelegateCall](/docs/reference/lockup/contracts/abstracts/abstract.NoDelegateCall.md), [SablierLockupState](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupState.md) See the documentation in [ISablierLockupDynamic](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupDynamic.md). ## Functions ### createWithDurationsLD Creates a stream by setting the start time to `block.timestamp`, and the end time to the sum of `block.timestamp` and all specified time durations. The segment timestamps are derived from these durations. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupDynamicStream} and {MetadataUpdate} event. Requirements: - All requirements in {createWithTimestampsLD} must be met for the calculated parameters. ```solidity function createWithDurationsLD( Lockup.CreateWithDurations calldata params, LockupDynamic.SegmentWithDuration[] calldata segmentsWithDuration ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithDurations` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `segmentsWithDuration` | `LockupDynamic.SegmentWithDuration[]` | Segments with durations used to compose the dynamic distribution function. Timestamps are calculated by starting from `block.timestamp` and adding each duration to the previous timestamp. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createWithTimestampsLD Creates a stream with the provided segment timestamps, implying the end time from the last timestamp. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupDynamicStream} and {MetadataUpdate} event. Notes: - As long as the segment timestamps are arranged in ascending order, it is not an error for some of them to be in the past. Requirements: - Must not be delegate called. - `params.depositAmount` must be greater than zero. - `params.timestamps.start` must be greater than zero and less than the first segment's timestamp. - `segments` must have at least one segment. - The segment timestamps must be arranged in ascending order. - `params.timestamps.end` must be equal to the last segment's timestamp. - The sum of the segment amounts must equal the deposit amount. - `params.recipient` must not be the zero address. - `params.sender` must not be the zero address. - `msg.sender` must have allowed this contract to spend at least `params.depositAmount` tokens. - `params.token` must not be the native token. - `params.shape.length` must not be greater than 32 characters. ```solidity function createWithTimestampsLD( Lockup.CreateWithTimestamps calldata params, LockupDynamic.Segment[] calldata segments ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------- | ----------------------------- | ------------------------------------------------------------------------------------ | | `params` | `Lockup.CreateWithTimestamps` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `segments` | `LockupDynamic.Segment[]` | Segments used to compose the dynamic distribution function. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### \_createLD _See the documentation for the user-facing functions that call this private function._ ```solidity function _createLD( bool cancelable, uint128 depositAmount, address recipient, LockupDynamic.Segment[] memory segments, address sender, string memory shape, Lockup.Timestamps memory timestamps, IERC20 token, bool transferable ) private returns (uint256 streamId); ``` --- ## SablierLockupLinear [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/abstracts/SablierLockupLinear.sol) **Inherits:** [ISablierLockupLinear](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupLinear.md), [NoDelegateCall](/docs/reference/lockup/contracts/abstracts/abstract.NoDelegateCall.md), [SablierLockupState](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupState.md) See the documentation in [ISablierLockupLinear](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupLinear.md). ## Functions ### createWithDurationsLL Creates a stream by setting the start time to `block.timestamp`, and the end time to the sum of `block.timestamp` and `durations.total`. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupLinearStream} and {MetadataUpdate} event. Requirements: - All requirements in {createWithTimestampsLL} must be met for the calculated parameters. ```solidity function createWithDurationsLL( Lockup.CreateWithDurations calldata params, LockupLinear.UnlockAmounts calldata unlockAmounts, LockupLinear.Durations calldata durations ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithDurations` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | Struct encapsulating (i) the amount to unlock at the start time and (ii) the amount to unlock at the cliff time. | | `durations` | `LockupLinear.Durations` | Struct encapsulating (i) cliff period duration and (ii) total stream duration, both in seconds. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createWithTimestampsLL Creates a stream with the provided start time and end time. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupLinearStream} and {MetadataUpdate} event. Notes: - A cliff time of zero means there is no cliff. - As long as the times are ordered, it is not an error for the start or the cliff time to be in the past. Requirements: - Must not be delegate called. - `params.depositAmount` must be greater than zero. - `params.timestamps.start` must be greater than zero and less than `params.timestamps.end`. - If set, `cliffTime` must be greater than `params.timestamps.start` and less than `params.timestamps.end`. - `params.recipient` must not be the zero address. - `params.sender` must not be the zero address. - The sum of `params.unlockAmounts.start` and `params.unlockAmounts.cliff` must be less than or equal to deposit amount. - If `params.timestamps.cliff` not set, the `params.unlockAmounts.cliff` must be zero. - `msg.sender` must have allowed this contract to spend at least `params.depositAmount` tokens. - `params.token` must not be the native token. - `params.shape.length` must not be greater than 32 characters. ```solidity function createWithTimestampsLL( Lockup.CreateWithTimestamps calldata params, LockupLinear.UnlockAmounts calldata unlockAmounts, uint40 cliffTime ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithTimestamps` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | Struct encapsulating (i) the amount to unlock at the start time and (ii) the amount to unlock at the cliff time. | | `cliffTime` | `uint40` | The Unix timestamp for the cliff period's end. A value of zero means there is no cliff. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### \_createLL _See the documentation for the user-facing functions that call this private function._ ```solidity function _createLL( bool cancelable, uint40 cliffTime, uint128 depositAmount, address recipient, address sender, string memory shape, Lockup.Timestamps memory timestamps, IERC20 token, bool transferable, LockupLinear.UnlockAmounts memory unlockAmounts ) private returns (uint256 streamId); ``` --- ## SablierLockupState [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/abstracts/SablierLockupState.sol) **Inherits:** [ISablierLockupState](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupState.md) See the documentation in [ISablierLockupState](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupState.md). ## State Variables ### aggregateAmount Retrieves the aggregate amount across all streams, denoted in units of the token's decimals. _If tokens are directly transferred to the contract without using the stream creation functions, the ERC-20 balance may be greater than the aggregate amount._ ```solidity mapping(IERC20 token => uint256 amount) public override aggregateAmount; ``` ### nativeToken Retrieves the address of the ERC-20 interface of the native token, if it exists. _The native tokens on some chains have a dual interface as ERC-20. For example, on Polygon the $POL token is the native token and has an ERC-20 version at 0x0000000000000000000000000000000000001010. This means that `address(this).balance` returns the same value as `balanceOf(address(this))`. To avoid any unintended behavior, these tokens cannot be used in Sablier. As an alternative, users can use the Wrapped version of the token, i.e. WMATIC, which is a standard ERC-20 token._ ```solidity address public override nativeToken; ``` ### nextStreamId Counter for stream IDs, used in the create functions. ```solidity uint256 public override nextStreamId; ``` ### nftDescriptor Contract that generates the non-fungible token URI. ```solidity ILockupNFTDescriptor public override nftDescriptor; ``` ### \_allowedToHook _Mapping of contracts allowed to hook to Sablier when a stream is canceled or when tokens are withdrawn._ ```solidity mapping(address recipient => bool allowed) internal _allowedToHook; ``` ### \_cliffs _Cliff timestamp mapped by stream IDs, used in LL streams._ ```solidity mapping(uint256 streamId => uint40 cliffTime) internal _cliffs; ``` ### \_segments _Stream segments mapped by stream IDs, used in LD streams._ ```solidity mapping(uint256 streamId => LockupDynamic.Segment[] segments) internal _segments; ``` ### \_streams _Lockup streams mapped by unsigned integers._ ```solidity mapping(uint256 id => Lockup.Stream stream) internal _streams; ``` ### \_tranches _Stream tranches mapped by stream IDs, used in LT streams._ ```solidity mapping(uint256 streamId => LockupTranched.Tranche[] tranches) internal _tranches; ``` ### \_unlockAmounts _Unlock amounts mapped by stream IDs, used in LL streams._ ```solidity mapping(uint256 streamId => LockupLinear.UnlockAmounts unlockAmounts) internal _unlockAmounts; ``` ## Functions ### notNull _Checks that `streamId` does not reference a null stream._ ```solidity modifier notNull(uint256 streamId); ``` ### constructor ```solidity constructor(address initialNFTDescriptor); ``` **Parameters** | Name | Type | Description | | ---------------------- | --------- | ------------------------------------------ | | `initialNFTDescriptor` | `address` | The address of the initial NFT descriptor. | ### getCliffTime Retrieves the stream's cliff time, which is a Unix timestamp. A value of zero means there is no cliff. _Reverts if `streamId` references either a null stream or a non-LL stream._ ```solidity function getCliffTime(uint256 streamId) external view override notNull(streamId) returns (uint40 cliffTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getDepositedAmount Retrieves the amount deposited in the stream, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function getDepositedAmount(uint256 streamId) external view override notNull(streamId) returns (uint128 depositedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getEndTime Retrieves the stream's end time, which is a Unix timestamp. _Reverts if `streamId` references a null stream._ ```solidity function getEndTime(uint256 streamId) external view override notNull(streamId) returns (uint40 endTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getLockupModel Retrieves the distribution models used to create the stream. _Reverts if `streamId` references a null stream._ ```solidity function getLockupModel(uint256 streamId) external view override notNull(streamId) returns (Lockup.Model lockupModel); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRefundedAmount Retrieves the amount refunded to the sender after a cancellation, denoted in units of the token's decimals. This amount is always zero unless the stream was canceled. _Reverts if `streamId` references a null stream._ ```solidity function getRefundedAmount(uint256 streamId) external view override notNull(streamId) returns (uint128 refundedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getSegments Retrieves the segments used to compose the dynamic distribution function. _Reverts if `streamId` references either a null stream or a non-LD stream._ ```solidity function getSegments(uint256 streamId) external view override notNull(streamId) returns (LockupDynamic.Segment[] memory segments); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | ---------- | ------------------------- | ---------------------------------------------- | | `segments` | `LockupDynamic.Segment[]` | See the documentation in {LockupDynamic} type. | ### getSender Retrieves the stream's sender. _Reverts if `streamId` references a null stream._ ```solidity function getSender(uint256 streamId) external view override notNull(streamId) returns (address sender); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getStartTime Retrieves the stream's start time, which is a Unix timestamp. _Reverts if `streamId` references a null stream._ ```solidity function getStartTime(uint256 streamId) external view override notNull(streamId) returns (uint40 startTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getTranches Retrieves the tranches used to compose the tranched distribution function. _Reverts if `streamId` references either a null stream or a non-LT stream._ ```solidity function getTranches(uint256 streamId) external view override notNull(streamId) returns (LockupTranched.Tranche[] memory tranches); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | ---------- | -------------------------- | ----------------------------------------------- | | `tranches` | `LockupTranched.Tranche[]` | See the documentation in {LockupTranched} type. | ### getUnderlyingToken Retrieves the address of the underlying ERC-20 token being distributed. _Reverts if `streamId` references a null stream._ ```solidity function getUnderlyingToken(uint256 streamId) external view override notNull(streamId) returns (IERC20 token); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getUnlockAmounts Retrieves the unlock amounts used to compose the linear distribution function. _Reverts if `streamId` references either a null stream or a non-LL stream._ ```solidity function getUnlockAmounts(uint256 streamId) external view override notNull(streamId) returns (LockupLinear.UnlockAmounts memory unlockAmounts); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | --------------- | ---------------------------- | --------------------------------------------- | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | See the documentation in {LockupLinear} type. | ### getWithdrawnAmount Retrieves the amount withdrawn from the stream, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function getWithdrawnAmount(uint256 streamId) external view override notNull(streamId) returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isAllowedToHook Retrieves a flag indicating whether the provided address is a contract allowed to hook to Sablier when a stream is canceled or when tokens are withdrawn. _See [ISablierLockupRecipient](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupRecipient.md) for more information._ ```solidity function isAllowedToHook(address recipient) external view returns (bool result); ``` ### isCancelable Retrieves a flag indicating whether the stream can be canceled. When the stream is cold, this flag is always `false`. _Reverts if `streamId` references a null stream._ ```solidity function isCancelable(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isDepleted Retrieves a flag indicating whether the stream is depleted. _Reverts if `streamId` references a null stream._ ```solidity function isDepleted(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isStream Retrieves a flag indicating whether the stream exists. _Does not revert if `streamId` references a null stream._ ```solidity function isStream(uint256 streamId) external view override returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isTransferable Retrieves a flag indicating whether the stream NFT can be transferred. _Reverts if `streamId` references a null stream._ ```solidity function isTransferable(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### wasCanceled Retrieves a flag indicating whether the stream was canceled. _Reverts if `streamId` references a null stream._ ```solidity function wasCanceled(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### \_statusOf _Retrieves the stream's status without performing a null check._ ```solidity function _statusOf(uint256 streamId) internal view returns (Lockup.Status); ``` ### \_streamedAmountOf Calculates the streamed amount of the stream. _This function is implemented by child contract. The logic varies according to the distribution model._ ```solidity function _streamedAmountOf(uint256 streamId) internal view virtual returns (uint128); ``` ### \_create This function is implemented by [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) and is used in the [SablierLockupDynamic](docs/reference/lockup/contracts/abstracts/abstract.SablierLockupDynamic.md), [SablierLockupLinear](docs/reference/lockup/contracts/abstracts/abstract.SablierLockupLinear.md) and [SablierLockupTranched](docs/reference/lockup/contracts/abstracts/abstract.SablierLockupTranched.md) contracts. _It updates state variables based on the stream parameters, mints an NFT to the recipient, bumps stream ID, and transfers the deposit amount._ ```solidity function _create( bool cancelable, uint128 depositAmount, Lockup.Model lockupModel, address recipient, address sender, uint256 streamId, Lockup.Timestamps memory timestamps, IERC20 token, bool transferable ) internal virtual; ``` ### \_notNull _A private function is used instead of inlining this logic in a modifier because Solidity copies modifiers into every function that uses them._ ```solidity function _notNull(uint256 streamId) private view; ``` --- ## SablierLockupTranched [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/abstracts/SablierLockupTranched.sol) **Inherits:** [ISablierLockupTranched](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupTranched.md), [NoDelegateCall](/docs/reference/lockup/contracts/abstracts/abstract.NoDelegateCall.md), [SablierLockupState](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupState.md) See the documentation in [ISablierLockupTranched](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupTranched.md). ## Functions ### createWithDurationsLT Creates a stream by setting the start time to `block.timestamp`, and the end time to the sum of `block.timestamp` and all specified time durations. The tranche timestamps are derived from these durations. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupTrancheStream} and {MetadataUpdate} event. Requirements: - All requirements in {createWithTimestampsLT} must be met for the calculated parameters. ```solidity function createWithDurationsLT( Lockup.CreateWithDurations calldata params, LockupTranched.TrancheWithDuration[] calldata tranchesWithDuration ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithDurations` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `tranchesWithDuration` | `LockupTranched.TrancheWithDuration[]` | Tranches with durations used to compose the tranched distribution function. Timestamps are calculated by starting from `block.timestamp` and adding each duration to the previous timestamp. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createWithTimestampsLT Creates a stream with the provided tranche timestamps, implying the end time from the last timestamp. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupTrancheStream} and {MetadataUpdate} event. Notes: - As long as the tranche timestamps are arranged in ascending order, it is not an error for some of them to be in the past. Requirements: - Must not be delegate called. - `params.depositAmount` must be greater than zero. - `params.timestamps.start` must be greater than zero and less than the first tranche's timestamp. - `tranches` must have at least one tranche. - The tranche timestamps must be arranged in ascending order. - `params.timestamps.end` must be equal to the last tranche's timestamp. - The sum of the tranche amounts must equal the deposit amount. - `params.recipient` must not be the zero address. - `params.sender` must not be the zero address. - `msg.sender` must have allowed this contract to spend at least `params.depositAmount` tokens. - `params.token` must not be the native token. - `params.shape.length` must not be greater than 32 characters. ```solidity function createWithTimestampsLT( Lockup.CreateWithTimestamps calldata params, LockupTranched.Tranche[] calldata tranches ) external payable override noDelegateCall returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------- | ----------------------------- | ------------------------------------------------------------------------------------ | | `params` | `Lockup.CreateWithTimestamps` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `tranches` | `LockupTranched.Tranche[]` | Tranches used to compose the tranched distribution function. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### \_createLT _See the documentation for the user-facing functions that call this private function._ ```solidity function _createLT( bool cancelable, uint128 depositAmount, address recipient, address sender, string memory shape, Lockup.Timestamps memory timestamps, IERC20 token, bool transferable, LockupTranched.Tranche[] memory tranches ) private returns (uint256 streamId); ``` --- ## LockupNFTDescriptor [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/LockupNFTDescriptor.sol) **Inherits:** [ILockupNFTDescriptor](/docs/reference/lockup/contracts/interfaces/interface.ILockupNFTDescriptor.md) See the documentation in [ILockupNFTDescriptor](/docs/reference/lockup/contracts/interfaces/interface.ILockupNFTDescriptor.md). ## Functions ### tokenURI Produces the URI describing a particular stream NFT. _This is a data URI with the JSON contents directly inlined._ ```solidity function tokenURI(IERC721Metadata lockup, uint256 streamId) external view override returns (string memory uri); ``` **Parameters** | Name | Type | Description | | ---------- | ----------------- | -------------------------------------------------------- | | `lockup` | `IERC721Metadata` | | | `streamId` | `uint256` | The ID of the stream for which to produce a description. | **Returns** | Name | Type | Description | | ----- | -------- | ----------------------------------------- | | `uri` | `string` | The URI of the ERC721-compliant metadata. | ### abbreviateAmount Creates an abbreviated representation of the provided amount, rounded down and prefixed with ">= ". The abbreviation uses these suffixes: - "K" for thousands - "M" for millions - "B" for billions - "T" for trillions For example, if the input is 1,234,567, the output is ">= 1.23M". ```solidity function abbreviateAmount(uint256 amount, uint256 decimals) internal pure returns (string memory); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | -------------------------------------------------------------- | | `amount` | `uint256` | The amount to abbreviate, denoted in units of `decimals`. | | `decimals` | `uint256` | The number of decimals to assume when abbreviating the amount. | **Returns** | Name | Type | Description | | -------- | -------- | -------------------------------------------------------------------------------- | | `` | `string` | abbreviation The abbreviated representation of the provided amount, as a string. | ### calculateDurationInDays Calculates the stream's duration in days, rounding down. ```solidity function calculateDurationInDays(uint256 startTime, uint256 endTime) internal pure returns (string memory); ``` ### calculateStreamedPercentage Calculates how much of the deposited amount has been streamed so far, as a percentage with 4 implied decimals. ```solidity function calculateStreamedPercentage(uint128 streamedAmount, uint128 depositedAmount) internal pure returns (uint256); ``` ### generateAccentColor Generates a pseudo-random HSL color by hashing together the `chainid`, the `sablier` address, and the `streamId`. This will be used as the accent color for the SVG. ```solidity function generateAccentColor(address sablier, uint256 streamId) internal view returns (string memory); ``` ### generateAttributes Generates an array of JSON objects that represent the NFT's attributes: - Token symbol - Sender address - Status _These attributes are useful for filtering and sorting the NFTs._ ```solidity function generateAttributes( string memory tokenSymbol, string memory sender, string memory status ) internal pure returns (string memory); ``` ### generateDescription Generates a string with the NFT's JSON metadata description, which provides a high-level overview. ```solidity function generateDescription( string memory tokenSymbol, string memory lockupStringified, string memory tokenAddress, string memory streamId, bool isTransferable ) internal pure returns (string memory); ``` ### isAllowedCharacter Checks whether the provided string contains only alphanumeric characters, spaces, and dashes. _Note that this returns true for empty strings._ ```solidity function isAllowedCharacter(string memory str) internal pure returns (bool); ``` ### safeTokenDecimals Retrieves the token's decimals safely, defaulting to "0" if an error occurs. _Performs a low-level call to handle tokens in which the decimals are not implemented._ ```solidity function safeTokenDecimals(address token) internal view returns (uint8); ``` ### safeTokenSymbol Retrieves the token's symbol safely, defaulting to a hard-coded value if an error occurs. _Performs a low-level call to handle tokens in which the symbol is not implemented or it is a bytes32 instead of a string._ ```solidity function safeTokenSymbol(address token) internal view returns (string memory); ``` ### stringifyFractionalAmount Converts the provided fractional amount to a string prefixed by a dot. ```solidity function stringifyFractionalAmount(uint256 fractionalAmount) internal pure returns (string memory); ``` **Parameters** | Name | Type | Description | | ------------------ | --------- | ------------------------------------------ | | `fractionalAmount` | `uint256` | A numerical value with 2 implied decimals. | ### stringifyPercentage Converts the provided percentage to a string. ```solidity function stringifyPercentage(uint256 percentage) internal pure returns (string memory); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | ------------------------------------------ | | `percentage` | `uint256` | A numerical value with 4 implied decimals. | ### stringifyStatus Retrieves the stream's status as a string. ```solidity function stringifyStatus(Lockup.Status status) internal pure returns (string memory); ``` ## Structs ### TokenURIVars _Needed to avoid Stack Too Deep._ ```solidity struct TokenURIVars { address token; string tokenSymbol; uint128 depositedAmount; string json; ISablierLockup lockup; string lockupStringified; string status; string svg; uint256 streamedPercentage; } ``` --- ## SablierBatchLockup [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/SablierBatchLockup.sol) **Inherits:** [ISablierBatchLockup](/docs/reference/lockup/contracts/interfaces/interface.ISablierBatchLockup.md) See the documentation in [ISablierBatchLockup](/docs/reference/lockup/contracts/interfaces/interface.ISablierBatchLockup.md). ## Functions ### createWithDurationsLD Creates a batch of LD streams using `createWithDurationsLD`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupDynamic.createWithDurationsLD} must be met for each stream. ```solidity function createWithDurationsLD( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithDurationsLD[] calldata batch ) external override returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithDurationsLD[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupDynamic.createWithDurationsLD}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithTimestampsLD Creates a batch of LD streams using `createWithTimestampsLD`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupDynamic.createWithTimestampsLD} must be met for each stream. ```solidity function createWithTimestampsLD( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithTimestampsLD[] calldata batch ) external override returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithTimestampsLD[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupDynamic.createWithTimestampsLD}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithDurationsLL Creates a batch of LL streams using `createWithDurationsLL`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupLinear.createWithDurationsLL} must be met for each stream. ```solidity function createWithDurationsLL( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithDurationsLL[] calldata batch ) external override returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithDurationsLL[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupLinear.createWithDurationsLL}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithTimestampsLL Creates a batch of LL streams using `createWithTimestampsLL`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupLinear.createWithTimestampsLL} must be met for each stream. ```solidity function createWithTimestampsLL( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithTimestampsLL[] calldata batch ) external override returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithTimestampsLL[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupLinear.createWithTimestampsLL}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithDurationsLT Creates a batch of LT streams using `createWithDurationsLT`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupTranched.createWithDurationsLT} must be met for each stream. ```solidity function createWithDurationsLT( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithDurationsLT[] calldata batch ) external override returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithDurationsLT[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupTranched.createWithDurationsLT}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithTimestampsLT Creates a batch of LT streams using `createWithTimestampsLT`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupTranched.createWithTimestampsLT} must be met for each stream. ```solidity function createWithTimestampsLT( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithTimestampsLT[] calldata batch ) external override returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithTimestampsLT[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupTranched.createWithTimestampsLT}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### \_approve _Helper function to approve a Lockup contract to spend funds from the batchLockup. If the current allowance is insufficient, this function approves Lockup to spend the exact `amount`. The {SafeERC20.forceApprove} function is used to handle special ERC-20 tokens (e.g. USDT) that require the current allowance to be zero before setting it to a non-zero value._ ```solidity function _approve(address lockup, IERC20 token, uint256 amount) internal; ``` ### \_handleTransfer _Helper function to transfer tokens from the caller to the batchLockup contract and approve the Lockup contract._ ```solidity function _handleTransfer(address lockup, IERC20 token, uint256 amount) internal; ``` --- ## SablierLockup [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/SablierLockup.sol) **Inherits:** [Batch](/docs/reference/lockup/contracts/abstracts/abstract.Batch.md), [Comptrollerable](/docs/reference/lockup/contracts/abstracts/abstract.Comptrollerable.md), ERC721, [ISablierLockup](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md), [SablierLockupDynamic](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupDynamic.md), [SablierLockupLinear](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupLinear.md), [SablierLockupTranched](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupTranched.md) See the documentation in [ISablierLockup](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md). ## Functions ### constructor ```solidity constructor( address initialComptroller, address initialNFTDescriptor ) [Comptrollerable](/docs/reference/lockup/contracts/abstracts/abstract.Comptrollerable.md)(initialComptroller) ERC721("Sablier Lockup NFT", "SAB-LOCKUP") SablierLockupState(initialNFTDescriptor); ``` **Parameters** | Name | Type | Description | | ---------------------- | --------- | ------------------------------------------------ | | `initialComptroller` | `address` | The address of the initial comptroller contract. | | `initialNFTDescriptor` | `address` | The address of the NFT descriptor contract. | ### calculateMinFeeWei Calculates the minimum fee in wei required to withdraw from the given stream ID. _Reverts if `streamId` references a null stream._ ```solidity function calculateMinFeeWei(uint256 streamId) external view override notNull(streamId) returns (uint256 minFeeWei); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRecipient Retrieves the stream's recipient. _Reverts if the NFT has been burned._ ```solidity function getRecipient(uint256 streamId) external view override returns (address recipient); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isCold Retrieves a flag indicating whether the stream is cold, i.e. settled, canceled, or depleted. _Reverts if `streamId` references a null stream._ ```solidity function isCold(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isWarm Retrieves a flag indicating whether the stream is warm, i.e. either pending or streaming. _Reverts if `streamId` references a null stream._ ```solidity function isWarm(uint256 streamId) external view override notNull(streamId) returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### refundableAmountOf Calculates the amount that the sender would be refunded if the stream were canceled, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function refundableAmountOf(uint256 streamId) external view override notNull(streamId) returns (uint128 refundableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### statusOf Retrieves the stream's status. _Reverts if `streamId` references a null stream._ ```solidity function statusOf(uint256 streamId) external view override notNull(streamId) returns (Lockup.Status status); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### streamedAmountOf Calculates the amount streamed to the recipient, denoted in units of the token's decimals. Reverts if `streamId` references a null stream. Notes: - Upon cancellation of the stream, the amount streamed is calculated as the difference between the deposited amount and the refunded amount. Ultimately, when the stream becomes depleted, the streamed amount is equivalent to the total amount withdrawn. ```solidity function streamedAmountOf(uint256 streamId) external view override notNull(streamId) returns (uint128 streamedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### supportsInterface _See {IERC165-supportsInterface}._ ```solidity function supportsInterface(bytes4 interfaceId) public view override(IERC165, ERC721) returns (bool); ``` ### tokenURI _See {IERC721Metadata-tokenURI}._ ```solidity function tokenURI(uint256 streamId) public view override(IERC721Metadata, ERC721) returns (string memory uri); ``` ### withdrawableAmountOf Calculates the amount that the recipient can withdraw from the stream, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function withdrawableAmountOf(uint256 streamId) external view override notNull(streamId) returns (uint128 withdrawableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### allowToHook Allows a recipient contract to hook to Sablier when a stream is canceled or when tokens are withdrawn. Useful for implementing contracts that hold streams on behalf of users, such as vaults or staking contracts. Emits an {AllowToHook} event. Notes: - Does not revert if the contract is already on the allowlist. - This is an irreversible operation. The contract cannot be removed from the allowlist. Requirements: - `msg.sender` must be the comptroller contract. - `recipient` must implement [ISablierLockupRecipient](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupRecipient.md). ```solidity function allowToHook(address recipient) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ----------- | --------- | ----------------------------------------------- | | `recipient` | `address` | The address of the contract to allow for hooks. | ### burn Burns the NFT associated with the stream. Emits a {Transfer} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `streamId` must reference a depleted stream. - The NFT must exist. - `msg.sender` must be either the NFT owner or an approved third party. ```solidity function burn(uint256 streamId) external payable override noDelegateCall notNull(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------- | | `streamId` | `uint256` | The ID of the stream NFT to burn. | ### cancel Cancels the stream and refunds any remaining tokens to the sender. Emits a {Transfer}, {CancelLockupStream} and {MetadataUpdate} event. Notes: - If there any tokens left for the recipient to withdraw, the stream is marked as canceled. Otherwise, the stream is marked as depleted. - If the address is on the allowlist, this function will invoke a hook on the recipient. Requirements: - Must not be delegate called. - The stream must be warm and cancelable. - `msg.sender` must be the stream's sender. ```solidity function cancel(uint256 streamId) public payable override noDelegateCall notNull(streamId) returns (uint128 refundedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------- | | `streamId` | `uint256` | The ID of the stream to cancel. | **Returns** | Name | Type | Description | | ---------------- | --------- | ---------------------------------------------------------------------------- | | `refundedAmount` | `uint128` | The amount refunded to the sender, denoted in units of the token's decimals. | ### cancelMultiple Cancels multiple streams and refunds any remaining tokens to the sender. Emits multiple {Transfer}, {CancelLockupStream} and {MetadataUpdate} events. For each reverted cancellation, it emits an [InvalidStreamInCancelMultiple](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#invalidstreamincancelmultiple) event. Notes: - This function as a whole will not revert if one or more cancellations revert. A zero amount is returned for reverted streams. - Refer to the notes and requirements from {cancel}. ```solidity function cancelMultiple(uint256[] calldata streamIds) external payable override noDelegateCall returns (uint128[] memory refundedAmounts); ``` **Parameters** | Name | Type | Description | | ----------- | ----------- | --------------------------------- | | `streamIds` | `uint256[]` | The IDs of the streams to cancel. | **Returns** | Name | Type | Description | | ----------------- | ----------- | ----------------------------------------------------------------------------- | | `refundedAmounts` | `uint128[]` | The amounts refunded to the sender, denoted in units of the token's decimals. | ### recover Recover the surplus amount of tokens. Notes: - The surplus amount is defined as the difference between the total balance of the contract for the provided ERC-20 token and the sum of balances of all streams created using the same ERC-20 token. Requirements: - `msg.sender` must be the comptroller contract. - The surplus amount must be greater than zero. ```solidity function recover(IERC20 token, address to) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ------- | --------- | -------------------------------------------------------- | | `token` | `IERC20` | The contract address of the ERC-20 token to recover for. | | `to` | `address` | The address to send the surplus amount. | ### renounce Removes the right of the stream's sender to cancel the stream. Emits a {RenounceLockupStream} event. Notes: - This is an irreversible operation. Requirements: - Must not be delegate called. - `streamId` must reference a warm stream. - `msg.sender` must be the stream's sender. - The stream must be cancelable. ```solidity function renounce(uint256 streamId) public payable override noDelegateCall notNull(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------- | | `streamId` | `uint256` | The ID of the stream to renounce. | ### setNativeToken Sets the native token address. Once set, it cannot be changed. For more information, see the documentation for {nativeToken}. Notes: - If `newNativeToken` is zero address, the function does not revert. Requirements: - `msg.sender` must be the comptroller contract. - The current native token must be zero address. ```solidity function setNativeToken(address newNativeToken) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | -------------------------------- | | `newNativeToken` | `address` | The address of the native token. | ### setNFTDescriptor Sets a new NFT descriptor contract, which produces the URI describing the Sablier stream NFTs. Emits a {SetNFTDescriptor} and {BatchMetadataUpdate} event. Notes: - Does not revert if the NFT descriptor is the same. Requirements: - `msg.sender` must be the comptroller contract. ```solidity function setNFTDescriptor(ILockupNFTDescriptor newNFTDescriptor) external override onlyComptroller; ``` **Parameters** | Name | Type | Description | | ------------------ | ---------------------- | ----------------------------------------------- | | `newNFTDescriptor` | `ILockupNFTDescriptor` | The address of the new NFT descriptor contract. | ### withdraw Withdraws the provided amount of tokens from the stream to the `to` address. Emits a {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} event. Notes: - If `msg.sender` is not the recipient and the address is on the allowlist, this function will invoke a hook on the recipient. - The minimum fee in wei is calculated for the stream's sender using the **SablierComptroller** contract. Requirements: - Must not be delegate called. - `streamId` must not reference a null or depleted stream. - `to` must not be the zero address. - `amount` must be greater than zero and must not exceed the withdrawable amount. - `to` must be the recipient if `msg.sender` is not the stream's recipient or an approved third party. - `msg.value` must be greater than or equal to the minimum fee in wei for the stream's sender. ```solidity function withdraw( uint256 streamId, address to, uint128 amount ) public payable override noDelegateCall notNull(streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ----------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | | `amount` | `uint128` | The amount to withdraw, denoted in units of the token's decimals. | ### withdrawMax Withdraws the maximum withdrawable amount from the stream to the provided address `to`. Emits a {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {withdraw}. Requirements: - Refer to the requirements in {withdraw}. ```solidity function withdrawMax(uint256 streamId, address to) external payable override returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | **Returns** | Name | Type | Description | | ----------------- | --------- | --------------------------------------------------------------- | | `withdrawnAmount` | `uint128` | The amount withdrawn, denoted in units of the token's decimals. | ### withdrawMaxAndTransfer Withdraws the maximum withdrawable amount from the stream to the current recipient, and transfers the NFT to `newRecipient`. Emits a {WithdrawFromLockupStream}, {Transfer} and {MetadataUpdate} event. Notes: - If the withdrawable amount is zero, the withdrawal is skipped. - Refer to the notes in {withdraw}. Requirements: - `msg.sender` must be either the NFT owner or an approved third party. - Refer to the requirements in {withdraw}. - Refer to the requirements in {IERC721.transferFrom}. ```solidity function withdrawMaxAndTransfer( uint256 streamId, address newRecipient ) external payable override noDelegateCall notNull(streamId) returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | -------------- | --------- | ----------------------------------------------- | | `streamId` | `uint256` | The ID of the stream NFT to transfer. | | `newRecipient` | `address` | The address of the new owner of the stream NFT. | **Returns** | Name | Type | Description | | ----------------- | --------- | --------------------------------------------------------------- | | `withdrawnAmount` | `uint128` | The amount withdrawn, denoted in units of the token's decimals. | ### withdrawMultiple Withdraws tokens from streams to the recipient of each stream. Emits multiple {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} events. For each reverting withdrawal, it emits an [InvalidWithdrawalInWithdrawMultiple](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#invalidwithdrawalinwithdrawmultiple) event. Notes: - This function as a whole will not revert if one or more withdrawals revert. - This function attempts to call a hook on the recipient of each stream, unless `msg.sender` is the recipient. - Refer to the notes and requirements from {withdraw}. Requirements: - Must not be delegate called. - There must be an equal number of `streamIds` and `amounts`. ```solidity function withdrawMultiple( uint256[] calldata streamIds, uint128[] calldata amounts ) external payable override noDelegateCall; ``` **Parameters** | Name | Type | Description | | ----------- | ----------- | ------------------------------------------------------------------ | | `streamIds` | `uint256[]` | The IDs of the streams to withdraw from. | | `amounts` | `uint128[]` | The amounts to withdraw, denoted in units of the token's decimals. | ### \_streamedAmountOf Calculates the streamed amount of the stream. _This function is implemented by child contract. The logic varies according to the distribution model._ ```solidity function _streamedAmountOf(uint256 streamId) internal view override returns (uint128 streamedAmount); ``` ### \_create This function is implemented by [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) and is used in the [SablierLockupDynamic](docs/reference/lockup/contracts/abstracts/abstract.SablierLockupDynamic.md), [SablierLockupLinear](docs/reference/lockup/contracts/abstracts/abstract.SablierLockupLinear.md) and [SablierLockupTranched](docs/reference/lockup/contracts/abstracts/abstract.SablierLockupTranched.md) contracts. _It updates state variables based on the stream parameters, mints an NFT to the recipient, bumps stream ID, and transfers the deposit amount._ ```solidity function _create( bool cancelable, uint128 depositAmount, Lockup.Model lockupModel, address recipient, address sender, uint256 streamId, Lockup.Timestamps memory timestamps, IERC20 token, bool transferable ) internal override; ``` ### \_update Overrides the {ERC-721.\_update} function to check that the stream is transferable, and emits an ERC-4906 event. There are two cases when the transferable flag is ignored: - If the current owner is 0, then the update is a mint and is allowed. - If `to` is 0, then the update is a burn and is also allowed. ```solidity function _update(address to, uint256 streamId, address auth) internal override returns (address); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `to` | `address` | The address of the new recipient of the stream. | | `streamId` | `uint256` | ID of the stream to update. | | `auth` | `address` | Optional parameter. If the value is not zero, the overridden implementation will check that `auth` is either the recipient of the stream, or an approved third party. | **Returns** | Name | Type | Description | | -------- | --------- | ----------------------------------------------------------- | | `` | `address` | The original recipient of the `streamId` before the update. | ### \_isCallerStreamRecipientOrApproved Checks whether `msg.sender` is the stream's recipient or an approved third party, when the `recipient` is known in advance. ```solidity function _isCallerStreamRecipientOrApproved(uint256 streamId, address recipient) private view returns (bool); ``` **Parameters** | Name | Type | Description | | ----------- | --------- | -------------------------------------- | | `streamId` | `uint256` | The stream ID for the query. | | `recipient` | `address` | The address of the stream's recipient. | ### \_withdrawableAmountOf _See the documentation for the user-facing functions that call this private function._ ```solidity function _withdrawableAmountOf(uint256 streamId) private view returns (uint128); ``` ### \_cancel _See the documentation for the user-facing functions that call this private function._ ```solidity function _cancel(uint256 streamId) private returns (uint128 senderAmount); ``` ### \_withdraw _See the documentation for the user-facing functions that call this private function._ ```solidity function _withdraw(uint256 streamId, address to, uint128 amount) private; ``` --- ## ILockupNFTDescriptor [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ILockupNFTDescriptor.sol) This contract generates the URI describing the Sablier stream NFTs. _Inspired by Uniswap V3 Positions NFTs._ ## Functions ### tokenURI Produces the URI describing a particular stream NFT. _This is a data URI with the JSON contents directly inlined._ ```solidity function tokenURI(IERC721Metadata sablier, uint256 streamId) external view returns (string memory uri); ``` **Parameters** | Name | Type | Description | | ---------- | ----------------- | -------------------------------------------------------------- | | `sablier` | `IERC721Metadata` | The address of the Sablier contract the stream was created in. | | `streamId` | `uint256` | The ID of the stream for which to produce a description. | **Returns** | Name | Type | Description | | ----- | -------- | ----------------------------------------- | | `uri` | `string` | The URI of the ERC721-compliant metadata. | --- ## ISablierBatchLockup [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierBatchLockup.sol) Helper to batch create Lockup streams. ## Functions ### createWithDurationsLD Creates a batch of LD streams using `createWithDurationsLD`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupDynamic.createWithDurationsLD} must be met for each stream. ```solidity function createWithDurationsLD( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithDurationsLD[] calldata batch ) external returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithDurationsLD[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupDynamic.createWithDurationsLD}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithTimestampsLD Creates a batch of LD streams using `createWithTimestampsLD`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupDynamic.createWithTimestampsLD} must be met for each stream. ```solidity function createWithTimestampsLD( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithTimestampsLD[] calldata batch ) external returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithTimestampsLD[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupDynamic.createWithTimestampsLD}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithDurationsLL Creates a batch of LL streams using `createWithDurationsLL`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupLinear.createWithDurationsLL} must be met for each stream. ```solidity function createWithDurationsLL( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithDurationsLL[] calldata batch ) external returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithDurationsLL[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupLinear.createWithDurationsLL}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithTimestampsLL Creates a batch of LL streams using `createWithTimestampsLL`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupLinear.createWithTimestampsLL} must be met for each stream. ```solidity function createWithTimestampsLL( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithTimestampsLL[] calldata batch ) external returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithTimestampsLL[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupLinear.createWithTimestampsLL}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithDurationsLT Creates a batch of LT streams using `createWithDurationsLT`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupTranched.createWithDurationsLT} must be met for each stream. ```solidity function createWithDurationsLT( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithDurationsLT[] calldata batch ) external returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithDurationsLT[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupTranched.createWithDurationsLT}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ### createWithTimestampsLT Creates a batch of LT streams using `createWithTimestampsLT`. Requirements: - There must be at least one element in `batch`. - All requirements from {ISablierLockupTranched.createWithTimestampsLT} must be met for each stream. ```solidity function createWithTimestampsLT( ISablierLockup lockup, IERC20 token, BatchLockup.CreateWithTimestampsLT[] calldata batch ) external returns (uint256[] memory streamIds); ``` **Parameters** | Name | Type | Description | | -------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract. | | `token` | `IERC20` | The contract address of the ERC-20 token to be distributed. | | `batch` | `BatchLockup.CreateWithTimestampsLT[]` | An array of structs, each encapsulating a subset of the parameters of {ISablierLockupTranched.createWithTimestampsLT}. | **Returns** | Name | Type | Description | | ----------- | ----------- | ------------------------------------- | | `streamIds` | `uint256[]` | The ids of the newly created streams. | ## Events ### CreateLockupBatch Emitted when a batch of Lockup streams are created. ```solidity event CreateLockupBatch(address indexed funder, ISablierLockup indexed lockup, uint256[] streamIds); ``` **Parameters** | Name | Type | Description | | ----------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `funder` | `address` | The address funding the streams. | | `lockup` | `ISablierLockup` | The address of the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract used to create the streams. | | `streamIds` | `uint256[]` | The ids of the newly created streams, the ones that were successfully created. | --- ## ISablierLockup [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierLockup.sol) **Inherits:** IBatch, IComptrollerable, IERC4906, IERC721Metadata, [ISablierLockupDynamic](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupDynamic.md), [ISablierLockupLinear](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupLinear.md), [ISablierLockupTranched](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupTranched.md) Interface to manage Lockup streams with various distribution models. ## Functions ### calculateMinFeeWei Calculates the minimum fee in wei required to withdraw from the given stream ID. _Reverts if `streamId` references a null stream._ ```solidity function calculateMinFeeWei(uint256 streamId) external view returns (uint256 minFeeWei); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRecipient Retrieves the stream's recipient. _Reverts if the NFT has been burned._ ```solidity function getRecipient(uint256 streamId) external view returns (address recipient); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isCold Retrieves a flag indicating whether the stream is cold, i.e. settled, canceled, or depleted. _Reverts if `streamId` references a null stream._ ```solidity function isCold(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isWarm Retrieves a flag indicating whether the stream is warm, i.e. either pending or streaming. _Reverts if `streamId` references a null stream._ ```solidity function isWarm(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### refundableAmountOf Calculates the amount that the sender would be refunded if the stream were canceled, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function refundableAmountOf(uint256 streamId) external view returns (uint128 refundableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### statusOf Retrieves the stream's status. _Reverts if `streamId` references a null stream._ ```solidity function statusOf(uint256 streamId) external view returns (Lockup.Status status); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### streamedAmountOf Calculates the amount streamed to the recipient, denoted in units of the token's decimals. Reverts if `streamId` references a null stream. Notes: - Upon cancellation of the stream, the amount streamed is calculated as the difference between the deposited amount and the refunded amount. Ultimately, when the stream becomes depleted, the streamed amount is equivalent to the total amount withdrawn. ```solidity function streamedAmountOf(uint256 streamId) external view returns (uint128 streamedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### withdrawableAmountOf Calculates the amount that the recipient can withdraw from the stream, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function withdrawableAmountOf(uint256 streamId) external view returns (uint128 withdrawableAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### allowToHook Allows a recipient contract to hook to Sablier when a stream is canceled or when tokens are withdrawn. Useful for implementing contracts that hold streams on behalf of users, such as vaults or staking contracts. Emits an [AllowToHook](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#allowtohook) event. Notes: - Does not revert if the contract is already on the allowlist. - This is an irreversible operation. The contract cannot be removed from the allowlist. Requirements: - `msg.sender` must be the comptroller contract. - `recipient` must implement [ISablierLockupRecipient](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupRecipient.md). ```solidity function allowToHook(address recipient) external; ``` **Parameters** | Name | Type | Description | | ----------- | --------- | ----------------------------------------------- | | `recipient` | `address` | The address of the contract to allow for hooks. | ### burn Burns the NFT associated with the stream. Emits a {Transfer} and {MetadataUpdate} event. Requirements: - Must not be delegate called. - `streamId` must reference a depleted stream. - The NFT must exist. - `msg.sender` must be either the NFT owner or an approved third party. ```solidity function burn(uint256 streamId) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------- | | `streamId` | `uint256` | The ID of the stream NFT to burn. | ### cancel Cancels the stream and refunds any remaining tokens to the sender. Emits a {Transfer}, {CancelLockupStream} and {MetadataUpdate} event. Notes: - If there any tokens left for the recipient to withdraw, the stream is marked as canceled. Otherwise, the stream is marked as depleted. - If the address is on the allowlist, this function will invoke a hook on the recipient. Requirements: - Must not be delegate called. - The stream must be warm and cancelable. - `msg.sender` must be the stream's sender. ```solidity function cancel(uint256 streamId) external payable returns (uint128 refundedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------- | | `streamId` | `uint256` | The ID of the stream to cancel. | **Returns** | Name | Type | Description | | ---------------- | --------- | ---------------------------------------------------------------------------- | | `refundedAmount` | `uint128` | The amount refunded to the sender, denoted in units of the token's decimals. | ### cancelMultiple Cancels multiple streams and refunds any remaining tokens to the sender. Emits multiple {Transfer}, {CancelLockupStream} and {MetadataUpdate} events. For each reverted cancellation, it emits an [InvalidStreamInCancelMultiple](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#invalidstreamincancelmultiple) event. Notes: - This function as a whole will not revert if one or more cancellations revert. A zero amount is returned for reverted streams. - Refer to the notes and requirements from {cancel}. ```solidity function cancelMultiple(uint256[] calldata streamIds) external payable returns (uint128[] memory refundedAmounts); ``` **Parameters** | Name | Type | Description | | ----------- | ----------- | --------------------------------- | | `streamIds` | `uint256[]` | The IDs of the streams to cancel. | **Returns** | Name | Type | Description | | ----------------- | ----------- | ----------------------------------------------------------------------------- | | `refundedAmounts` | `uint128[]` | The amounts refunded to the sender, denoted in units of the token's decimals. | ### recover Recover the surplus amount of tokens. Notes: - The surplus amount is defined as the difference between the total balance of the contract for the provided ERC-20 token and the sum of balances of all streams created using the same ERC-20 token. Requirements: - `msg.sender` must be the comptroller contract. - The surplus amount must be greater than zero. ```solidity function recover(IERC20 token, address to) external; ``` **Parameters** | Name | Type | Description | | ------- | --------- | -------------------------------------------------------- | | `token` | `IERC20` | The contract address of the ERC-20 token to recover for. | | `to` | `address` | The address to send the surplus amount. | ### renounce Removes the right of the stream's sender to cancel the stream. Emits a [RenounceLockupStream](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#renouncelockupstream) event. Notes: - This is an irreversible operation. Requirements: - Must not be delegate called. - `streamId` must reference a warm stream. - `msg.sender` must be the stream's sender. - The stream must be cancelable. ```solidity function renounce(uint256 streamId) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------------------- | | `streamId` | `uint256` | The ID of the stream to renounce. | ### setNativeToken Sets the native token address. Once set, it cannot be changed. For more information, see the documentation for {nativeToken}. Notes: - If `newNativeToken` is zero address, the function does not revert. Requirements: - `msg.sender` must be the comptroller contract. - The current native token must be zero address. ```solidity function setNativeToken(address newNativeToken) external; ``` **Parameters** | Name | Type | Description | | ---------------- | --------- | -------------------------------- | | `newNativeToken` | `address` | The address of the native token. | ### setNFTDescriptor Sets a new NFT descriptor contract, which produces the URI describing the Sablier stream NFTs. Emits a [SetNFTDescriptor](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#setnftdescriptor) and {BatchMetadataUpdate} event. Notes: - Does not revert if the NFT descriptor is the same. Requirements: - `msg.sender` must be the comptroller contract. ```solidity function setNFTDescriptor(ILockupNFTDescriptor newNFTDescriptor) external; ``` **Parameters** | Name | Type | Description | | ------------------ | ---------------------- | ----------------------------------------------- | | `newNFTDescriptor` | `ILockupNFTDescriptor` | The address of the new NFT descriptor contract. | ### withdraw Withdraws the provided amount of tokens from the stream to the `to` address. Emits a {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} event. Notes: - If `msg.sender` is not the recipient and the address is on the allowlist, this function will invoke a hook on the recipient. - The minimum fee in wei is calculated for the stream's sender using the **SablierComptroller** contract. Requirements: - Must not be delegate called. - `streamId` must not reference a null or depleted stream. - `to` must not be the zero address. - `amount` must be greater than zero and must not exceed the withdrawable amount. - `to` must be the recipient if `msg.sender` is not the stream's recipient or an approved third party. - `msg.value` must be greater than or equal to the minimum fee in wei for the stream's sender. ```solidity function withdraw(uint256 streamId, address to, uint128 amount) external payable; ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ----------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | | `amount` | `uint128` | The amount to withdraw, denoted in units of the token's decimals. | ### withdrawMax Withdraws the maximum withdrawable amount from the stream to the provided address `to`. Emits a {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} event. Notes: - Refer to the notes in {withdraw}. Requirements: - Refer to the requirements in {withdraw}. ```solidity function withdrawMax(uint256 streamId, address to) external payable returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------- | | `streamId` | `uint256` | The ID of the stream to withdraw from. | | `to` | `address` | The address receiving the withdrawn tokens. | **Returns** | Name | Type | Description | | ----------------- | --------- | --------------------------------------------------------------- | | `withdrawnAmount` | `uint128` | The amount withdrawn, denoted in units of the token's decimals. | ### withdrawMaxAndTransfer Withdraws the maximum withdrawable amount from the stream to the current recipient, and transfers the NFT to `newRecipient`. Emits a [WithdrawFromLockupStream](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#withdrawfromlockupstream), {Transfer} and {MetadataUpdate} event. Notes: - If the withdrawable amount is zero, the withdrawal is skipped. - Refer to the notes in {withdraw}. Requirements: - `msg.sender` must be either the NFT owner or an approved third party. - Refer to the requirements in {withdraw}. - Refer to the requirements in {IERC721.transferFrom}. ```solidity function withdrawMaxAndTransfer( uint256 streamId, address newRecipient ) external payable returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | -------------- | --------- | ----------------------------------------------- | | `streamId` | `uint256` | The ID of the stream NFT to transfer. | | `newRecipient` | `address` | The address of the new owner of the stream NFT. | **Returns** | Name | Type | Description | | ----------------- | --------- | --------------------------------------------------------------- | | `withdrawnAmount` | `uint128` | The amount withdrawn, denoted in units of the token's decimals. | ### withdrawMultiple Withdraws tokens from streams to the recipient of each stream. Emits multiple {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} events. For each reverting withdrawal, it emits an [InvalidWithdrawalInWithdrawMultiple](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockup.md#invalidwithdrawalinwithdrawmultiple) event. Notes: - This function as a whole will not revert if one or more withdrawals revert. - This function attempts to call a hook on the recipient of each stream, unless `msg.sender` is the recipient. - Refer to the notes and requirements from {withdraw}. Requirements: - Must not be delegate called. - There must be an equal number of `streamIds` and `amounts`. ```solidity function withdrawMultiple(uint256[] calldata streamIds, uint128[] calldata amounts) external payable; ``` **Parameters** | Name | Type | Description | | ----------- | ----------- | ------------------------------------------------------------------ | | `streamIds` | `uint256[]` | The IDs of the streams to withdraw from. | | `amounts` | `uint128[]` | The amounts to withdraw, denoted in units of the token's decimals. | ## Events ### AllowToHook Emitted when the comptroller allows a new recipient contract to hook to Sablier. ```solidity event AllowToHook(ISablierComptroller indexed comptroller, address indexed recipient); ``` **Parameters** | Name | Type | Description | | ------------- | --------------------- | ----------------------------------------------------------- | | `comptroller` | `ISablierComptroller` | The address of the current comptroller. | | `recipient` | `address` | The address of the recipient contract put on the allowlist. | ### CancelLockupStream Emitted when a stream is canceled. ```solidity event CancelLockupStream( uint256 streamId, address indexed sender, address indexed recipient, IERC20 indexed token, uint128 senderAmount, uint128 recipientAmount ); ``` **Parameters** | Name | Type | Description | | ----------------- | --------- | ----------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `sender` | `address` | The address of the stream's sender. | | `recipient` | `address` | The address of the stream's recipient. | | `token` | `IERC20` | The contract address of the ERC-20 token that has been distributed. | | `senderAmount` | `uint128` | The amount of tokens refunded to the stream's sender, denoted in units of the token's decimals. | | `recipientAmount` | `uint128` | The amount of tokens left for the stream's recipient to withdraw, denoted in units of the token's decimals. | ### InvalidStreamInCancelMultiple Emitted when canceling multiple streams and one particular cancellation reverts. ```solidity event InvalidStreamInCancelMultiple(uint256 indexed streamId, bytes revertData); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | ---------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream that reverted the cancellation. | | `revertData` | `bytes` | The error data returned by the reverted cancel. | ### InvalidWithdrawalInWithdrawMultiple Emitted when withdrawing from multiple streams and one particular withdrawal reverts. ```solidity event InvalidWithdrawalInWithdrawMultiple(uint256 indexed streamId, bytes revertData); ``` **Parameters** | Name | Type | Description | | ------------ | --------- | -------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream that reverted the withdrawal. | | `revertData` | `bytes` | The error data returned by the reverted withdraw. | ### RenounceLockupStream Emitted when a sender gives up the right to cancel a stream. ```solidity event RenounceLockupStream(uint256 indexed streamId); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | --------------------- | | `streamId` | `uint256` | The ID of the stream. | ### SetNFTDescriptor Emitted when the comptroller sets a new NFT descriptor contract. ```solidity event SetNFTDescriptor( ISablierComptroller indexed comptroller, ILockupNFTDescriptor indexed oldNFTDescriptor, ILockupNFTDescriptor indexed newNFTDescriptor ); ``` **Parameters** | Name | Type | Description | | ------------------ | ---------------------- | ----------------------------------------------- | | `comptroller` | `ISablierComptroller` | The address of the current comptroller. | | `oldNFTDescriptor` | `ILockupNFTDescriptor` | The address of the old NFT descriptor contract. | | `newNFTDescriptor` | `ILockupNFTDescriptor` | The address of the new NFT descriptor contract. | ### WithdrawFromLockupStream Emitted when tokens are withdrawn from a stream. ```solidity event WithdrawFromLockupStream(uint256 indexed streamId, address indexed to, IERC20 indexed token, uint128 amount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream. | | `to` | `address` | The address that has received the withdrawn tokens. | | `token` | `IERC20` | The contract address of the ERC-20 token that has been withdrawn. | | `amount` | `uint128` | The amount of tokens withdrawn, denoted in units of the token's decimals. | --- ## ISablierLockupDynamic [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierLockupDynamic.sol) **Inherits:** [ISablierLockupState](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupState.md) Creates Lockup streams with dynamic distribution model. ## Functions ### createWithDurationsLD Creates a stream by setting the start time to `block.timestamp`, and the end time to the sum of `block.timestamp` and all specified time durations. The segment timestamps are derived from these durations. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupDynamicStream} and {MetadataUpdate} event. Requirements: - All requirements in {createWithTimestampsLD} must be met for the calculated parameters. ```solidity function createWithDurationsLD( Lockup.CreateWithDurations calldata params, LockupDynamic.SegmentWithDuration[] calldata segmentsWithDuration ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithDurations` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `segmentsWithDuration` | `LockupDynamic.SegmentWithDuration[]` | Segments with durations used to compose the dynamic distribution function. Timestamps are calculated by starting from `block.timestamp` and adding each duration to the previous timestamp. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createWithTimestampsLD Creates a stream with the provided segment timestamps, implying the end time from the last timestamp. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupDynamicStream} and {MetadataUpdate} event. Notes: - As long as the segment timestamps are arranged in ascending order, it is not an error for some of them to be in the past. Requirements: - Must not be delegate called. - `params.depositAmount` must be greater than zero. - `params.timestamps.start` must be greater than zero and less than the first segment's timestamp. - `segments` must have at least one segment. - The segment timestamps must be arranged in ascending order. - `params.timestamps.end` must be equal to the last segment's timestamp. - The sum of the segment amounts must equal the deposit amount. - `params.recipient` must not be the zero address. - `params.sender` must not be the zero address. - `msg.sender` must have allowed this contract to spend at least `params.depositAmount` tokens. - `params.token` must not be the native token. - `params.shape.length` must not be greater than 32 characters. ```solidity function createWithTimestampsLD( Lockup.CreateWithTimestamps calldata params, LockupDynamic.Segment[] calldata segments ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------- | ----------------------------- | ------------------------------------------------------------------------------------ | | `params` | `Lockup.CreateWithTimestamps` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `segments` | `LockupDynamic.Segment[]` | Segments used to compose the dynamic distribution function. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ## Events ### CreateLockupDynamicStream Emitted when an LD stream is created. ```solidity event CreateLockupDynamicStream( uint256 indexed streamId, Lockup.CreateEventCommon commonParams, LockupDynamic.Segment[] segments ); ``` **Parameters** | Name | Type | Description | | -------------- | -------------------------- | ---------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | | `commonParams` | `Lockup.CreateEventCommon` | Common parameters emitted in Create events across all Lockup models. | | `segments` | `LockupDynamic.Segment[]` | The segments the protocol uses to compose the dynamic distribution function. | --- ## ISablierLockupLinear [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierLockupLinear.sol) **Inherits:** [ISablierLockupState](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupState.md) Creates Lockup streams with linear distribution model. ## Functions ### createWithDurationsLL Creates a stream by setting the start time to `block.timestamp`, and the end time to the sum of `block.timestamp` and `durations.total`. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupLinearStream} and {MetadataUpdate} event. Requirements: - All requirements in {createWithTimestampsLL} must be met for the calculated parameters. ```solidity function createWithDurationsLL( Lockup.CreateWithDurations calldata params, LockupLinear.UnlockAmounts calldata unlockAmounts, LockupLinear.Durations calldata durations ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithDurations` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | Struct encapsulating (i) the amount to unlock at the start time and (ii) the amount to unlock at the cliff time. | | `durations` | `LockupLinear.Durations` | Struct encapsulating (i) cliff period duration and (ii) total stream duration, both in seconds. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createWithTimestampsLL Creates a stream with the provided start time and end time. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupLinearStream} and {MetadataUpdate} event. Notes: - A cliff time of zero means there is no cliff. - As long as the times are ordered, it is not an error for the start or the cliff time to be in the past. Requirements: - Must not be delegate called. - `params.depositAmount` must be greater than zero. - `params.timestamps.start` must be greater than zero and less than `params.timestamps.end`. - If set, `cliffTime` must be greater than `params.timestamps.start` and less than `params.timestamps.end`. - `params.recipient` must not be the zero address. - `params.sender` must not be the zero address. - The sum of `params.unlockAmounts.start` and `params.unlockAmounts.cliff` must be less than or equal to deposit amount. - If `params.timestamps.cliff` not set, the `params.unlockAmounts.cliff` must be zero. - `msg.sender` must have allowed this contract to spend at least `params.depositAmount` tokens. - `params.token` must not be the native token. - `params.shape.length` must not be greater than 32 characters. ```solidity function createWithTimestampsLL( Lockup.CreateWithTimestamps calldata params, LockupLinear.UnlockAmounts calldata unlockAmounts, uint40 cliffTime ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | --------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithTimestamps` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | Struct encapsulating (i) the amount to unlock at the start time and (ii) the amount to unlock at the cliff time. | | `cliffTime` | `uint40` | The Unix timestamp for the cliff period's end. A value of zero means there is no cliff. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ## Events ### CreateLockupLinearStream Emitted when an LL stream is created. ```solidity event CreateLockupLinearStream( uint256 indexed streamId, Lockup.CreateEventCommon commonParams, uint40 cliffTime, LockupLinear.UnlockAmounts unlockAmounts ); ``` **Parameters** | Name | Type | Description | | --------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | | `commonParams` | `Lockup.CreateEventCommon` | Common parameters emitted in Create events across all Lockup models. | | `cliffTime` | `uint40` | The Unix timestamp for the cliff period's end. A value of zero means there is no cliff. | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | Struct encapsulating (i) the amount to unlock at the start time and (ii) the amount to unlock at the cliff time. | --- ## ISablierLockupRecipient [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierLockupRecipient.sol) **Inherits:** IERC165 Interface for recipient contracts capable of reacting to cancellations and withdrawals. For this to be able to hook into Sablier, it must fully implement this interface and it must have been allowlisted in the Lockup contract. _See [IERC165-supportsInterface](https://eips.ethereum.org/EIPS/eip-165). The implementation MUST implement the {IERC165-supportsInterface} method, which MUST return `true` when called with `0xf8ee98d3`, i.e. `type(ISablierLockupRecipient).interfaceId`._ ## Functions ### onSablierLockupCancel Responds to cancellations. Notes: - The function MUST return the selector `ISablierLockupRecipient.onSablierLockupCancel.selector`. - If this function reverts, the execution in the Lockup contract will revert as well. ```solidity function onSablierLockupCancel( uint256 streamId, address sender, uint128 senderAmount, uint128 recipientAmount ) external returns (bytes4 selector); ``` **Parameters** | Name | Type | Description | | ----------------- | --------- | ----------------------------------------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the canceled stream. | | `sender` | `address` | The stream's sender, who canceled the stream. | | `senderAmount` | `uint128` | The amount of tokens refunded to the stream's sender, denoted in units of the token's decimals. | | `recipientAmount` | `uint128` | The amount of tokens left for the stream's recipient to withdraw, denoted in units of the token's decimals. | **Returns** | Name | Type | Description | | ---------- | -------- | ---------------------------------------------------------- | | `selector` | `bytes4` | The selector of this function needed to validate the hook. | ### onSablierLockupWithdraw Responds to withdrawals triggered by any address except the contract implementing this interface. Notes: - The function MUST return the selector `ISablierLockupRecipient.onSablierLockupWithdraw.selector`. - If this function reverts, the execution in the Lockup contract will revert as well. ```solidity function onSablierLockupWithdraw( uint256 streamId, address caller, address to, uint128 amount ) external returns (bytes4 selector); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the stream being withdrawn from. | | `caller` | `address` | The original `msg.sender` address that triggered the withdrawal. | | `to` | `address` | The address receiving the withdrawn tokens. | | `amount` | `uint128` | The amount of tokens withdrawn, denoted in units of the token's decimals. | **Returns** | Name | Type | Description | | ---------- | -------- | ---------------------------------------------------------- | | `selector` | `bytes4` | The selector of this function needed to validate the hook. | --- ## ISablierLockupState [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierLockupState.sol) Contract with state variables (storage and constants) for the [SablierLockup](/docs/reference/lockup/contracts/contract.SablierLockup.md) contract, their respective getters and helpful modifiers. ## Functions ### aggregateAmount Retrieves the aggregate amount across all streams, denoted in units of the token's decimals. _If tokens are directly transferred to the contract without using the stream creation functions, the ERC-20 balance may be greater than the aggregate amount._ ```solidity function aggregateAmount(IERC20 token) external view returns (uint256); ``` **Parameters** | Name | Type | Description | | ------- | -------- | ------------------------------- | | `token` | `IERC20` | The ERC-20 token for the query. | ### getCliffTime Retrieves the stream's cliff time, which is a Unix timestamp. A value of zero means there is no cliff. _Reverts if `streamId` references either a null stream or a non-LL stream._ ```solidity function getCliffTime(uint256 streamId) external view returns (uint40 cliffTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getDepositedAmount Retrieves the amount deposited in the stream, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function getDepositedAmount(uint256 streamId) external view returns (uint128 depositedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getEndTime Retrieves the stream's end time, which is a Unix timestamp. _Reverts if `streamId` references a null stream._ ```solidity function getEndTime(uint256 streamId) external view returns (uint40 endTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getLockupModel Retrieves the distribution models used to create the stream. _Reverts if `streamId` references a null stream._ ```solidity function getLockupModel(uint256 streamId) external view returns (Lockup.Model lockupModel); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getRefundedAmount Retrieves the amount refunded to the sender after a cancellation, denoted in units of the token's decimals. This amount is always zero unless the stream was canceled. _Reverts if `streamId` references a null stream._ ```solidity function getRefundedAmount(uint256 streamId) external view returns (uint128 refundedAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getSegments Retrieves the segments used to compose the dynamic distribution function. _Reverts if `streamId` references either a null stream or a non-LD stream._ ```solidity function getSegments(uint256 streamId) external view returns (LockupDynamic.Segment[] memory segments); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | ---------- | ------------------------- | ---------------------------------------------- | | `segments` | `LockupDynamic.Segment[]` | See the documentation in {LockupDynamic} type. | ### getSender Retrieves the stream's sender. _Reverts if `streamId` references a null stream._ ```solidity function getSender(uint256 streamId) external view returns (address sender); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getStartTime Retrieves the stream's start time, which is a Unix timestamp. _Reverts if `streamId` references a null stream._ ```solidity function getStartTime(uint256 streamId) external view returns (uint40 startTime); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getTranches Retrieves the tranches used to compose the tranched distribution function. _Reverts if `streamId` references either a null stream or a non-LT stream._ ```solidity function getTranches(uint256 streamId) external view returns (LockupTranched.Tranche[] memory tranches); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | ---------- | -------------------------- | ----------------------------------------------- | | `tranches` | `LockupTranched.Tranche[]` | See the documentation in {LockupTranched} type. | ### getUnderlyingToken Retrieves the address of the underlying ERC-20 token being distributed. _Reverts if `streamId` references a null stream._ ```solidity function getUnderlyingToken(uint256 streamId) external view returns (IERC20 token); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### getUnlockAmounts Retrieves the unlock amounts used to compose the linear distribution function. _Reverts if `streamId` references either a null stream or a non-LL stream._ ```solidity function getUnlockAmounts(uint256 streamId) external view returns (LockupLinear.UnlockAmounts memory unlockAmounts); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | **Returns** | Name | Type | Description | | --------------- | ---------------------------- | --------------------------------------------- | | `unlockAmounts` | `LockupLinear.UnlockAmounts` | See the documentation in {LockupLinear} type. | ### getWithdrawnAmount Retrieves the amount withdrawn from the stream, denoted in units of the token's decimals. _Reverts if `streamId` references a null stream._ ```solidity function getWithdrawnAmount(uint256 streamId) external view returns (uint128 withdrawnAmount); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isAllowedToHook Retrieves a flag indicating whether the provided address is a contract allowed to hook to Sablier when a stream is canceled or when tokens are withdrawn. _See [ISablierLockupRecipient](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupRecipient.md) for more information._ ```solidity function isAllowedToHook(address recipient) external view returns (bool result); ``` ### isCancelable Retrieves a flag indicating whether the stream can be canceled. When the stream is cold, this flag is always `false`. _Reverts if `streamId` references a null stream._ ```solidity function isCancelable(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isDepleted Retrieves a flag indicating whether the stream is depleted. _Reverts if `streamId` references a null stream._ ```solidity function isDepleted(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isStream Retrieves a flag indicating whether the stream exists. _Does not revert if `streamId` references a null stream._ ```solidity function isStream(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### isTransferable Retrieves a flag indicating whether the stream NFT can be transferred. _Reverts if `streamId` references a null stream._ ```solidity function isTransferable(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | ### nativeToken Retrieves the address of the ERC-20 interface of the native token, if it exists. _The native tokens on some chains have a dual interface as ERC-20. For example, on Polygon the $POL token is the native token and has an ERC-20 version at 0x0000000000000000000000000000000000001010. This means that `address(this).balance` returns the same value as `balanceOf(address(this))`. To avoid any unintended behavior, these tokens cannot be used in Sablier. As an alternative, users can use the Wrapped version of the token, i.e. WMATIC, which is a standard ERC-20 token._ ```solidity function nativeToken() external view returns (address); ``` ### nextStreamId Counter for stream IDs, used in the create functions. ```solidity function nextStreamId() external view returns (uint256); ``` ### nftDescriptor Contract that generates the non-fungible token URI. ```solidity function nftDescriptor() external view returns (ILockupNFTDescriptor); ``` ### wasCanceled Retrieves a flag indicating whether the stream was canceled. _Reverts if `streamId` references a null stream._ ```solidity function wasCanceled(uint256 streamId) external view returns (bool result); ``` **Parameters** | Name | Type | Description | | ---------- | --------- | ---------------------------- | | `streamId` | `uint256` | The stream ID for the query. | --- ## ISablierLockupTranched [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/interfaces/ISablierLockupTranched.sol) **Inherits:** [ISablierLockupState](/docs/reference/lockup/contracts/interfaces/interface.ISablierLockupState.md) Creates Lockup streams with tranched distribution model. ## Functions ### createWithDurationsLT Creates a stream by setting the start time to `block.timestamp`, and the end time to the sum of `block.timestamp` and all specified time durations. The tranche timestamps are derived from these durations. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupTrancheStream} and {MetadataUpdate} event. Requirements: - All requirements in {createWithTimestampsLT} must be met for the calculated parameters. ```solidity function createWithDurationsLT( Lockup.CreateWithDurations calldata params, LockupTranched.TrancheWithDuration[] calldata tranchesWithDuration ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | `Lockup.CreateWithDurations` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `tranchesWithDuration` | `LockupTranched.TrancheWithDuration[]` | Tranches with durations used to compose the tranched distribution function. Timestamps are calculated by starting from `block.timestamp` and adding each duration to the previous timestamp. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ### createWithTimestampsLT Creates a stream with the provided tranche timestamps, implying the end time from the last timestamp. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. Emits a {Transfer}, {CreateLockupTrancheStream} and {MetadataUpdate} event. Notes: - As long as the tranche timestamps are arranged in ascending order, it is not an error for some of them to be in the past. Requirements: - Must not be delegate called. - `params.depositAmount` must be greater than zero. - `params.timestamps.start` must be greater than zero and less than the first tranche's timestamp. - `tranches` must have at least one tranche. - The tranche timestamps must be arranged in ascending order. - `params.timestamps.end` must be equal to the last tranche's timestamp. - The sum of the tranche amounts must equal the deposit amount. - `params.recipient` must not be the zero address. - `params.sender` must not be the zero address. - `msg.sender` must have allowed this contract to spend at least `params.depositAmount` tokens. - `params.token` must not be the native token. - `params.shape.length` must not be greater than 32 characters. ```solidity function createWithTimestampsLT( Lockup.CreateWithTimestamps calldata params, LockupTranched.Tranche[] calldata tranches ) external payable returns (uint256 streamId); ``` **Parameters** | Name | Type | Description | | ---------- | ----------------------------- | ------------------------------------------------------------------------------------ | | `params` | `Lockup.CreateWithTimestamps` | Struct encapsulating the function parameters, which are documented in {Lockup} type. | | `tranches` | `LockupTranched.Tranche[]` | Tranches used to compose the tranched distribution function. | **Returns** | Name | Type | Description | | ---------- | --------- | ----------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | ## Events ### CreateLockupTranchedStream Emitted when an LT stream is created. ```solidity event CreateLockupTranchedStream( uint256 indexed streamId, Lockup.CreateEventCommon commonParams, LockupTranched.Tranche[] tranches ); ``` **Parameters** | Name | Type | Description | | -------------- | -------------------------- | ----------------------------------------------------------------------------- | | `streamId` | `uint256` | The ID of the newly created stream. | | `commonParams` | `Lockup.CreateEventCommon` | Common parameters emitted in Create events across all Lockup models. | | `tranches` | `LockupTranched.Tranche[]` | The tranches the protocol uses to compose the tranched distribution function. | --- ## Errors(4) [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/libraries/Errors.sol) Library containing all custom errors the protocol may revert with. ## Errors ### SablierBatchLockup_BatchSizeZero ```solidity error SablierBatchLockup_BatchSizeZero(); ``` ### SablierHelpers_CliffTimeNotLessThanEndTime Thrown when trying to create a linear stream with a cliff time not strictly less than the end time. ```solidity error SablierHelpers_CliffTimeNotLessThanEndTime(uint40 cliffTime, uint40 endTime); ``` ### SablierHelpers_CliffTimeZeroUnlockAmountNotZero Thrown when trying to create a stream with a non zero cliff unlock amount when the cliff time is zero. ```solidity error SablierHelpers_CliffTimeZeroUnlockAmountNotZero(uint128 cliffUnlockAmount); ``` ### SablierHelpers_CreateNativeToken Thrown when trying to create a stream with the native token. ```solidity error SablierHelpers_CreateNativeToken(address nativeToken); ``` ### SablierHelpers_DepositAmountNotEqualToSegmentAmountsSum Thrown when trying to create a dynamic stream with a deposit amount not equal to the sum of the segment amounts. ```solidity error SablierHelpers_DepositAmountNotEqualToSegmentAmountsSum(uint128 depositAmount, uint128 segmentAmountsSum); ``` ### SablierHelpers_DepositAmountNotEqualToTrancheAmountsSum Thrown when trying to create a tranched stream with a deposit amount not equal to the sum of the tranche amounts. ```solidity error SablierHelpers_DepositAmountNotEqualToTrancheAmountsSum(uint128 depositAmount, uint128 trancheAmountsSum); ``` ### SablierHelpers_DepositAmountZero Thrown when trying to create a stream with a zero deposit amount. ```solidity error SablierHelpers_DepositAmountZero(); ``` ### SablierHelpers_EndTimeNotEqualToLastSegmentTimestamp Thrown when trying to create a dynamic stream with end time not equal to the last segment's timestamp. ```solidity error SablierHelpers_EndTimeNotEqualToLastSegmentTimestamp(uint40 endTime, uint40 lastSegmentTimestamp); ``` ### SablierHelpers_EndTimeNotEqualToLastTrancheTimestamp Thrown when trying to create a tranched stream with end time not equal to the last tranche's timestamp. ```solidity error SablierHelpers_EndTimeNotEqualToLastTrancheTimestamp(uint40 endTime, uint40 lastTrancheTimestamp); ``` ### SablierHelpers_SegmentCountZero Thrown when trying to create a dynamic stream with no segments. ```solidity error SablierHelpers_SegmentCountZero(); ``` ### SablierHelpers_SegmentTimestampsNotOrdered Thrown when trying to create a dynamic stream with unordered segment timestamps. ```solidity error SablierHelpers_SegmentTimestampsNotOrdered(uint256 index, uint40 previousTimestamp, uint40 currentTimestamp); ``` ### SablierHelpers_SenderZeroAddress Thrown when trying to create a stream with the sender as the zero address. ```solidity error SablierHelpers_SenderZeroAddress(); ``` ### SablierHelpers_ShapeExceeds32Bytes Thrown when trying to create a stream with a shape string exceeding 32 bytes. ```solidity error SablierHelpers_ShapeExceeds32Bytes(uint256 shapeLength); ``` ### SablierHelpers_StartTimeNotLessThanCliffTime Thrown when trying to create a linear stream with a start time not strictly less than the cliff time, when the cliff time does not have a zero value. ```solidity error SablierHelpers_StartTimeNotLessThanCliffTime(uint40 startTime, uint40 cliffTime); ``` ### SablierHelpers_StartTimeNotLessThanEndTime Thrown when trying to create a linear stream with a start time not strictly less than the end time. ```solidity error SablierHelpers_StartTimeNotLessThanEndTime(uint40 startTime, uint40 endTime); ``` ### SablierHelpers_StartTimeNotLessThanFirstSegmentTimestamp Thrown when trying to create a dynamic stream with a start time not strictly less than the first segment timestamp. ```solidity error SablierHelpers_StartTimeNotLessThanFirstSegmentTimestamp(uint40 startTime, uint40 firstSegmentTimestamp); ``` ### SablierHelpers_StartTimeNotLessThanFirstTrancheTimestamp Thrown when trying to create a tranched stream with a start time not strictly less than the first tranche timestamp. ```solidity error SablierHelpers_StartTimeNotLessThanFirstTrancheTimestamp(uint40 startTime, uint40 firstTrancheTimestamp); ``` ### SablierHelpers_StartTimeZero Thrown when trying to create a stream with a zero start time. ```solidity error SablierHelpers_StartTimeZero(); ``` ### SablierHelpers_TrancheCountZero Thrown when trying to create a tranched stream with no tranches. ```solidity error SablierHelpers_TrancheCountZero(); ``` ### SablierHelpers_TrancheTimestampsNotOrdered Thrown when trying to create a tranched stream with unordered tranche timestamps. ```solidity error SablierHelpers_TrancheTimestampsNotOrdered(uint256 index, uint40 previousTimestamp, uint40 currentTimestamp); ``` ### SablierHelpers_UnlockAmountsSumTooHigh Thrown when trying to create a stream with the sum of the unlock amounts greater than the deposit amount. ```solidity error SablierHelpers_UnlockAmountsSumTooHigh( uint128 depositAmount, uint128 startUnlockAmount, uint128 cliffUnlockAmount ); ``` ### SablierLockup_AllowToHookUnsupportedInterface Thrown when trying to allow to hook a contract that doesn't implement the interface correctly. ```solidity error SablierLockup_AllowToHookUnsupportedInterface(address recipient); ``` ### SablierLockup_AllowToHookZeroCodeSize Thrown when trying to allow to hook an address with no code. ```solidity error SablierLockup_AllowToHookZeroCodeSize(address recipient); ``` ### SablierLockup_InsufficientFeePayment Thrown when trying to withdraw with a fee amount less than the minimum fee. ```solidity error SablierLockup_InsufficientFeePayment(uint256 feePaid, uint256 minFeeWei); ``` ### SablierLockup_FeeTransferFailed Thrown when the fee transfer fails. ```solidity error SablierLockup_FeeTransferFailed(address comptroller, uint256 feeAmount); ``` ### SablierLockup_InvalidHookSelector Thrown when the hook does not return the correct selector. ```solidity error SablierLockup_InvalidHookSelector(address recipient); ``` ### SablierLockup_NativeTokenAlreadySet Thrown when trying to set the native token address when it is already set. ```solidity error SablierLockup_NativeTokenAlreadySet(address nativeToken); ``` ### SablierLockup_NotTransferable Thrown when trying to transfer Stream NFT when transferability is disabled. ```solidity error SablierLockup_NotTransferable(uint256 tokenId); ``` ### SablierLockup_Overdraw Thrown when trying to withdraw an amount greater than the withdrawable amount. ```solidity error SablierLockup_Overdraw(uint256 streamId, uint128 amount, uint128 withdrawableAmount); ``` ### SablierLockup_StreamCanceled Thrown when trying to cancel or renounce a canceled stream. ```solidity error SablierLockup_StreamCanceled(uint256 streamId); ``` ### SablierLockup_StreamDepleted Thrown when trying to cancel, renounce, or withdraw from a depleted stream. ```solidity error SablierLockup_StreamDepleted(uint256 streamId); ``` ### SablierLockup_StreamNotCancelable Thrown when trying to cancel or renounce a stream that is not cancelable. ```solidity error SablierLockup_StreamNotCancelable(uint256 streamId); ``` ### SablierLockup_StreamNotDepleted Thrown when trying to burn a stream that is not depleted. ```solidity error SablierLockup_StreamNotDepleted(uint256 streamId); ``` ### SablierLockup_StreamSettled Thrown when trying to cancel or renounce a settled stream. ```solidity error SablierLockup_StreamSettled(uint256 streamId); ``` ### SablierLockup_Unauthorized Thrown when `msg.sender` lacks authorization to perform an action. ```solidity error SablierLockup_Unauthorized(uint256 streamId, address caller); ``` ### SablierLockup_WithdrawalAddressNotRecipient Thrown when trying to withdraw to an address other than the recipient's. ```solidity error SablierLockup_WithdrawalAddressNotRecipient(uint256 streamId, address caller, address to); ``` ### SablierLockup_WithdrawAmountZero Thrown when trying to withdraw zero tokens from a stream. ```solidity error SablierLockup_WithdrawAmountZero(uint256 streamId); ``` ### SablierLockup_WithdrawArrayCountsNotEqual Thrown when trying to withdraw from multiple streams and the number of stream IDs does not match the number of withdraw amounts. ```solidity error SablierLockup_WithdrawArrayCountsNotEqual(uint256 streamIdsCount, uint256 amountsCount); ``` ### SablierLockup_WithdrawToZeroAddress Thrown when trying to withdraw to the zero address. ```solidity error SablierLockup_WithdrawToZeroAddress(uint256 streamId); ``` ### SablierLockupState_NotExpectedModel Thrown when a function is called on a stream that does not use the expected Lockup model. ```solidity error SablierLockupState_NotExpectedModel(Lockup.Model actualLockupModel, Lockup.Model expectedLockupModel); ``` ### SablierLockupState_Null Thrown when the ID references a null stream. ```solidity error SablierLockupState_Null(uint256 streamId); ``` --- ## Helpers(Libraries) [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/libraries/Helpers.sol) Library with functions needed to validate input parameters across Lockup streams. ## Functions ### calculateSegmentTimestamps _Calculate the timestamps and return the segments._ ```solidity function calculateSegmentTimestamps( LockupDynamic.SegmentWithDuration[] memory segmentsWithDuration, uint40 startTime ) public pure returns (LockupDynamic.Segment[] memory segmentsWithTimestamps); ``` ### calculateTrancheTimestamps _Calculate the timestamps and return the tranches._ ```solidity function calculateTrancheTimestamps( LockupTranched.TrancheWithDuration[] memory tranchesWithDuration, uint40 startTime ) public pure returns (LockupTranched.Tranche[] memory tranchesWithTimestamps); ``` ### checkCreateLD _Checks the parameters of the [SablierLockup-\_createLD](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupDynamic.md#_createld) function._ ```solidity function checkCreateLD( address sender, Lockup.Timestamps memory timestamps, uint128 depositAmount, LockupDynamic.Segment[] memory segments, address token, address nativeToken, string memory shape ) public pure; ``` ### checkCreateLL _Checks the parameters of the [SablierLockup-\_createLL](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupLinear.md#_createll) function._ ```solidity function checkCreateLL( address sender, Lockup.Timestamps memory timestamps, uint40 cliffTime, uint128 depositAmount, LockupLinear.UnlockAmounts memory unlockAmounts, address token, address nativeToken, string memory shape ) public pure; ``` ### checkCreateLT _Checks the parameters of the [SablierLockup-\_createLT](/docs/reference/lockup/contracts/abstracts/abstract.SablierLockupTranched.md#_createlt) function._ ```solidity function checkCreateLT( address sender, Lockup.Timestamps memory timestamps, uint128 depositAmount, LockupTranched.Tranche[] memory tranches, address token, address nativeToken, string memory shape ) public pure; ``` ### \_checkTimestampsAndUnlockAmounts _Checks the user-provided cliff, end times, and unlock amounts of an LL stream._ ```solidity function _checkTimestampsAndUnlockAmounts( uint128 depositAmount, Lockup.Timestamps memory timestamps, uint40 cliffTime, LockupLinear.UnlockAmounts memory unlockAmounts ) private pure; ``` ### \_checkCreateStream _Checks the user-provided common parameters across Lockup streams._ ```solidity function _checkCreateStream( address sender, uint128 depositAmount, uint40 startTime, address token, address nativeToken, string memory shape ) private pure; ``` ### \_checkSegments Checks: 1. The first timestamp is strictly greater than the start time. 2. The timestamps are ordered chronologically. 3. There are no duplicate timestamps. 4. The deposit amount is equal to the sum of all segment amounts. 5. The end time equals the last segment's timestamp. ```solidity function _checkSegments( LockupDynamic.Segment[] memory segments, uint128 depositAmount, Lockup.Timestamps memory timestamps ) private pure; ``` ### \_checkTranches Checks: 1. The first timestamp is strictly greater than the start time. 2. The timestamps are ordered chronologically. 3. There are no duplicate timestamps. 4. The deposit amount is equal to the sum of all tranche amounts. 5. The end time equals the last tranche's timestamp. ```solidity function _checkTranches( LockupTranched.Tranche[] memory tranches, uint128 depositAmount, Lockup.Timestamps memory timestamps ) private pure; ``` --- ## LockupMath [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/libraries/LockupMath.sol) Provides functions for calculating the streamed amounts in Lockup streams. Note that 'streamed' is synonymous with 'vested'. ## Functions ### calculateStreamedAmountLD Calculates the streamed amount of LD streams. The LD streaming model uses the following distribution function: $$ f(x) = x^{exp} * csa + \Sigma(esa) $$ Where: - $x$ is the elapsed time divided by the total duration of the current segment. - $exp$ is the current segment exponent. - $csa$ is the current segment amount. - $\Sigma(esa)$ is the sum of all streamed segments' amounts. Notes: 1. Normalization to 18 decimals is not needed because there is no mix of amounts with different decimals. 2. The stream's start time must be in the past so that the calculations below do not overflow. 3. The stream's end time must be in the future so that the loop below does not panic with an "index out of bounds" error. Assumptions: 4. The sum of all segment amounts does not overflow uint128 and equals the deposited amount. 5. The first segment's timestamp is greater than the start time. 6. The last segment's timestamp equals the end time. 7. The segment timestamps are arranged in ascending order. ```solidity function calculateStreamedAmountLD( uint128 depositedAmount, uint40 endTime, LockupDynamic.Segment[] calldata segments, uint40 startTime, uint128 withdrawnAmount ) external view returns (uint128); ``` ### calculateStreamedAmountLL Calculates the streamed amount of LL streams. The LL streaming model uses the following distribution function: $$ ( x * sa + s, block timestamp < cliff time f(x) = ( ( x * sa + s + c, block timestamp => cliff time $$ Where: - $x$ is the elapsed time in the streamable range divided by the total streamable range. - $sa$ is the streamable amount, i.e. deposited amount minus unlock amounts' sum. - $s$ is the start unlock amount. - $c$ is the cliff unlock amount. Assumptions: 1. The sum of the unlock amounts (start and cliff) does not overflow uint128 and is less than or equal to the deposit amount. 2. The start time is before the end time. 3. If the cliff time is not zero, it is after the start time and before the end time. ```solidity function calculateStreamedAmountLL( uint40 cliffTime, uint128 depositedAmount, uint40 endTime, uint40 startTime, LockupLinear.UnlockAmounts calldata unlockAmounts, uint128 withdrawnAmount ) external view returns (uint128); ``` ### calculateStreamedAmountLT Calculates the streamed amount of LT streams. The LT streaming model uses the following distribution function: $$ f(x) = \Sigma(eta) $$ Where: - $\Sigma(eta)$ is the sum of all streamed tranches' amounts. Assumptions: 1. The sum of all tranche amounts does not overflow uint128, and equals the deposited amount. 2. The first tranche's timestamp is greater than the start time. 3. The last tranche's timestamp equals the end time. 4. The tranche timestamps are arranged in ascending order. ```solidity function calculateStreamedAmountLT( uint128 depositedAmount, uint40 endTime, uint40 startTime, LockupTranched.Tranche[] calldata tranches ) external view returns (uint128); ``` --- ## NFTSVG [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/libraries/NFTSVG.sol) ## State Variables ### CARD_MARGIN ```solidity uint256 internal constant CARD_MARGIN = 16; ``` ## Functions ### generateSVG ```solidity function generateSVG(SVGParams memory params) internal pure returns (string memory); ``` ### generateDefs ```solidity function generateDefs( string memory accentColor, string memory status, string memory cards ) internal pure returns (string memory); ``` ### generateFloatingText ```solidity function generateFloatingText( string memory lockupAddress, string memory tokenAddress, string memory tokenSymbol ) internal pure returns (string memory); ``` ### generateHrefs ```solidity function generateHrefs( uint256 progressXPosition, uint256 statusXPosition, uint256 amountXPosition, uint256 durationXPosition ) internal pure returns (string memory); ``` ## Structs ### SVGParams ```solidity struct SVGParams { string accentColor; string amount; string tokenAddress; string tokenSymbol; string duration; string lockupAddress; string progress; uint256 progressNumerical; string status; } ``` ### SVGVars ```solidity struct SVGVars { string amountCard; uint256 amountWidth; uint256 amountXPosition; string cards; uint256 cardsWidth; string durationCard; uint256 durationWidth; uint256 durationXPosition; string progressCard; uint256 progressWidth; uint256 progressXPosition; string statusCard; uint256 statusWidth; uint256 statusXPosition; } ``` --- ## SVGElements [Git Source](https://github.com/sablier-labs/lockup/blob/58eaac45c20c57a93b73d887c714e68f061ec3e6/src/libraries/SVGElements.sol) ## State Variables ### BACKGROUND ```solidity string internal constant BACKGROUND = ''; ``` ### BACKGROUND_COLOR ```solidity string internal constant BACKGROUND_COLOR = "hsl(230,21%,11%)"; ``` ### FLOATING_TEXT ```solidity string internal constant FLOATING_TEXT = ''; ``` ### GLOW ```solidity string internal constant GLOW = ''; ``` ### LOGO ```solidity string internal constant LOGO = '