Skip to content

sablier-labs/sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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 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, sablier } from "sablier";

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

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

// Get chain by slug
const polygon = sablier.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.