Skip to content

sablier-labs/sdk

Repository files navigation

Sablier Branding

Sablier SDK Github Actions Discord Twitter

Contract addresses, chain data, and deployment information for Sablier, the token distribution protocol for Ethereum and EVM-compatible chains.

This package provides:

  • Contract addresses across all supported protocols and chains
  • Release management for multiple protocol versions
  • Chain data with RPC endpoints and explorer URLs
  • TypeScript SDK for accessing deployment data programmatically

Installation 📦

bun add sablier
# or
npm install sablier
# or
pnpm add sablier
# or
yarn add sablier

Protocol Overview 🎯

Sablier supports multiple protocols across versions:

Current Protocols

  • 💧 Sablier Airdrops - Merkle-based airdrop distributions with an optional vesting module
  • 🔒 Sablier Lockup - Time-locked token vesting with cliffs
  • 🔄 Sablier Flow - Token streaming with continuous payments
  • ⚡ Sablier Legacy - Old release similar to Lockup, deployed between 2019-2021

Supported Chains

Mainnets: Ethereum, Arbitrum, Optimism, Polygon, Base, BSC, Avalanche, and 20+ more.

Testnets: Sepolia, Base Sepolia, Optimism Sepolia, and more.

Addresses

The addresses are provided in this package, but you can also view the deployment addresses on the Sablier Docs website:

API Reference 📖

Chains

Our chain types extend upon Viem's Chain.

import { chains } from "sablier";

// Get by name
const ethereum = chains.ethereum;

// Get chain by ID
const arbitrum = chains.queries.get({ chainId: 42161 });

// Get chain by slug
const polygon = chains.queries.get({ slug: "polygon" });

// Check if chain supports Sablier UI
if (arbitrum.isSupportedByUI) {
  console.log("Arbitrum available on app.sablier.com");
}

Contracts

import { releases, sablier } from "sablier";

// Get contract by name and chain
const lockup = sablier.contracts.get({
  name: "SablierLockup",
  release: releases.lockup["v2.0"],
});

Releases

import { releases, sablier } from "sablier";

// Get specific releases
const airdropsV1_3 = releases.airdrops["v1.3"];
const lockupV2_0 = releases.lockup["v2.0"];
const flowV1_1 = releases.flow["v1.1"]";

// Get all Lockup releases
const allLockups = sablier.releases.getAll({ protocol: "lockup" });

Data Structure 📊

Release Object

See the types for more information.

interface Release {
  protocol: "flow" | "lockup" | "airdrops" | "legacy";
  version: "v1.0" | "v1.1" | "v2.0" | ...;
  isLatest: boolean;
  contractNames: string[];
  deployments: Deployment[];
}

Deployment Broadcasts

The deployment broadcasts (generated with Foundry) are located under the deployments directory.

Each deployment is stored as JSON with a structure like this, which is generated by Foundry:

{
  "transactions": [...],      // Deployment transactions
  "receipts": [...],          // Transaction receipts
  "libraries": [...],         // Linked libraries
  "returns": {                // Deployed contract addresses
    "flow": "0x...",
    "nftDescriptor": "0x..."
  },
  "timestamp": 1738015038,    // Deployment timestamp
  "chain": 1,                 // Chain ID
  "commit": "a0fa33d"         // Git commit hash
}

Contributing 🤝

We welcome contributions!

For guidance on how to make PRs, see the CONTRIBUTING guide.

Links 📚

License 📄

This project is licensed under GPL-3.0-or-later.

About

Contract addresses, chain data, and deployment information for the Sablier Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages