Skip to main content

Custom Deployments

Reach Out

Want to get Sablier deployed on your chain? If you meet the requirements listed below, feel 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.

Making a Deployment

NOTE

The rest of the guide applies ONLY IF you have you been granted a BUSL license to deploy the protocol. Otherwise, this section is not relevant to you.

Prerequisites

Lockup Deployment

Step 1: Clone the Lockup repo and checkout to the v2.0.0 tag

git checkout v2.0.0

Step 2: Create an .env file

touch .env

Add the following variables to .env file:

EOA="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:

source .env

Step 3: Build the contracts

bun install --frozen-lockfile
bun run build:optimized

Step 4: Run the following deployment command

For deterministic deployment:

FOUNDRY_PROFILE=optimized \
forge script script/DeployDeterministicProtocol.s.sol \
--broadcast \
--etherscan-api-key $ETHERSCAN_API_KEY \
--rpc-url $RPC_URL \
--private-key $PRIVATE_KEY \
--sig "run()" \
--verifier-url $VERIFIER_URL \
--verify \
-vvv

For non-deterministic deployment:

FOUNDRY_PROFILE=optimized \
forge script script/DeployProtocol.s.sol \
--broadcast \
--etherscan-api-key $ETHERSCAN_API_KEY \
--private-key $PRIVATE_KEY \
--rpc-url $RPC_URL \
--sig "run()" \
--verifier-url $VERIFIER_URL \
--verify \
-vvv

If you are using a mnemonic or a hardware device for your deployer address, refer to forge-script page from foundry book for different wallet options.

Merkle Airdrops Deployment

Step 1: Clone the Merkle Airdrops repo and checkout to v1.3.0 tag

git checkout v1.3.0

Step 2: Create an .env file

touch .env

Add the following variables to .env file:

EOA="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:

source .env

Step 3: Build the contracts

bun install --frozen-lockfile
bun run build:optimized

Step 4: Run the following command to deploy all merkle airdrop contracts

For deterministic deployments, meaning that CREATE2 is used:

FOUNDRY_PROFILE=optimized \
forge script script/DeployDeterministicMerkleFactory.s.sol \
--broadcast \
--etherscan-api-key $ETHERSCAN_API_KEY \
--private-key $PRIVATE_KEY \
--rpc-url $RPC_URL \
--sig "run()" \
--verifier-url $VERIFIER_URL \
--verify \
-vvv

For non-deterministic deployments:

FOUNDRY_PROFILE=optimized \
forge script script/DeployMerkleFactory.s.sol \
--broadcast \
--etherscan-api-key $ETHERSCAN_API_KEY \
--private-key $PRIVATE_KEY \
--rpc-url $RPC_URL \
--sig "run()" \
--verifier-url $VERIFIER_URL \
--verify \
-vvv

If you are using a mnemonic or a hardware device for your deployer address, refer to forge-script page from the Foundry Book.

Flow Deployment

Step 1: Clone the Flow repo and checkout to v1.1.0 tag

git checkout v1.1.0

Step 2: Create an .env file

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:

source .env

Step 3: Build the contracts

bun install --frozen-lockfile
bun run build:optimized

Step 4: Run the following deployment command

For deterministic deployment:

FOUNDRY_PROFILE=optimized \
forge script script/DeployDeterministicFlow.s.sol \
--broadcast \
--etherscan-api-key $ETHERSCAN_API_KEY \
--rpc-url $RPC_URL \
--private-key $PRIVATE_KEY \
--sig "run()" \
--verifier-url $VERIFIER_URL \
--verify \
-vvv

For non-deterministic deployment:

FOUNDRY_PROFILE=optimized \
forge script script/DeployFlow.s.sol \
--broadcast \
--etherscan-api-key $ETHERSCAN_API_KEY \
--private-key $PRIVATE_KEY \
--rpc-url $RPC_URL \
--sig "run()" \
--verifier-url $VERIFIER_URL \
--verify \
-vvv

If you are using a mnemonic or a hardware device for your deployer address, refer to forge-script page from foundry book for different wallet options.

List your deployment

After the contracts are deployed, you can submit your deployment like so:

  1. Open a PR in the docs repo by following the listing instructions below.
  2. Open a PR in the deployments repo to add the broadcast file (JSON). You can find it in the broadcast directory.

Listing instructions

When listing a new chain, you need to update the following sections of this documentation site: