Skip to main content

Custom Deployments

Reach Out

We are unable to deploy the Sablier Protocols on every EVM chain. However, we would be happy to consider your project if you fill out this form and meet the requirements below.

Requirements

Prerequisites

Lockup Deployment Guide

Step 1: Clone the Lockup repo and switch to the release branch

git switch release

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 Guide

Step 1: Clone the Merkle Airdrops repo and switch to the release branch

git switch release

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 Guide

Step 1: Clone the Flow repo and switch to the release branch

git switch release

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/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.

Submit your deployment

After the contracts are deployed, submit the deployment details:

  1. Open a PR in the docs repo to add the deployment addresses.
  2. Open a PR in the deployments repo to add the broadcast file (JSON). You can find it in the broadcast directory.