Skip to content

sablier-labs/multichain-deployer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sablier Utility: Deploy multi chain

A Rust-based utility script for deploying Sablier contracts on multiple chains via a single CLI, meant to be used by the Sablier team.

About

This script offers a CLI tool designed to enhance the experience of deploying Solidity smart contracts across multiple chains. It streamlines the deployment of Sablier contracts by automating the forge script command with the appropriate flags for targeting specific chains.

Installation

Prerequisites

  • Rust and Cargo installed on your machine. See the installation guide here.
  • Foundry toolchain installed on your machine. See the installation guide here.

Steps

git clone https://github.com/sablier-labs/deploy-multi-chain.git
cd deploy-multi-chain
cargo install --path . # Install the CLI locally

Usage

deploy-multi-chain <chain_name> [OPTIONS]

Flags:

  • --all - deploy on all chains declared in the foundry.toml file
  • --cp-bf - copy the broadcasts generated by foundry from to the deployments directory
  • --script - the script to run for deployment
  • --broadcast - wether the deployment should be broadcasted or not
  • --gas-price - the gas price to use for the deployment in wei

Example:

deploy-multi-chain sepolia --script DeployFlow.s.sol

Output:

Deploying to the chains: sepolia
Running the deployment command: FOUNDRY_PROFILE=optimized forge script script/DeployFlow.s.sol --rpc-url sepolia

Assumptions:

  • The script is run within a Foundry project, with a script directory declared at the root of the project.
  • Chain names match the ones declared in the foundry.toml file
  • If the --cp-bf flag is used, the deployments directory is expected to exist at ../deployments
  • If the --verify flag is used, Etherscan API keys must be set in the .env file in the format: <chain_name_from_foundry_toml>_API_KEY.
    • e.g. 1. mainnet --> MAINNET_API_KEY 2. avalanche --> AVALANCHE_API_KEY

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages