Custom Deployments
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.
- Blockchain explorer with instructions for verifying contracts
- Functional JSON-RPC endpoint, preferably listed on ChainList
- GraphQL indexer: specifically, either The Graph or Envio
- Bridge, and instructions for how to obtain gas tokens (e.g., ETH) and ERC-20 tokens to the target chain
- Foundry's Deterministic Deployer contract at
0x4e59b44847b379578588920cA78FbF26c0B4956C
- Multicall3 contract at
0xcA11bde05977b3631167028862bE2a173976CA11
Making a Deployment
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
- Check here if the deployment is not already made
- Follow the contributing guides for Lockup, Airdrops and Flow.
- RPC endpoint, e.g., a paid Infura or Alchemy account
- Have enough ETH in your deployer account
- Have an Etherscan API key (for source code verification)
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:
- Open a PR in the docs repo by following the listing instructions below.
- 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:
- Contract Deployments, e.g. for Lockup
- API Endpoints, e.g. for Lockup
- Governance
- Fees