Doppler Protocol: A Step-by-Step Guide to Deploying Core Contracts on Multiple Blockchains
Doppler Protocol provides core contracts and Airlock contracts. This guide walks you through installation, testing, and deployment. Get ready to deploy across various networks.
Quick Start: Installing Doppler Protocol on Your System
Ready to dive in? Here's how to get Doppler Protocol up and running:
- Clone the Repository: Start by cloning the Doppler repository to your local machine.
- Install Dependencies: Next, resolve and install project dependencies.
Rigorous Testing: Ensuring Robustness and Reliability
Testing ensures that the protocol behaves as expected under various conditions.
- Configuration: Begin by creating a
.env
file from the example, configure it to include an RPC endpoint for Mainnet. - Run Tests: execute the below command to extensively test the contracts using the
forge test
command. - Tweaking. The .env file allows you to try different testing scenarios without recompiling the contracts.
Deployment Strategies: Tailoring to Your Specific Needs
Ready to deploy? Doppler Protocol offers flexibility, with options for deploying the entire protocol, specific periphery contracts, or individual modules.
Three primary deployment methods:
- Deploying the full protocol on any testnet or a new production chain.
- Deploying a new periphery contract like a Bundler.
- Deploying a new module like UniswapV4Initializer.
Setting Up Your Environment: Preparing for Deployment
Before deploying, configure your environment with the necessary credentials.
- Create .env File: If you haven't already, create your own
.env
file by copying the provided example: - Edit the .env File: Using your preferred editor, modify the
.env
file and set the following variable:PRIVATE_KEY
: The private key of the wallet used to deploy the contracts (starts with0x
).
Deploying the Complete Protocol
For deploying all contracts simultaneously, use the Deploy.s.sol
script.
Deploying Periphery Contracts
Deploying a new periphery contract can be easily done via running its specific script.
Deploying Individual Modules: Step-by-Step Instructions
Deploying a new module needs an additional step: registering the module in the Airlock contract.
-
Register the Module: Call the
setModuleState
function of the Airlock contract. Pass the address of the new module along with its type (e.g.,TokenFactory
orPoolInitializer
). -
Execute via Safe Interface: Because the protocol multisig is the admin of the Airlock, the transaction must be executed via the Safe interface.
Deployment Examples: Across Various Blockchains
Here are examples of how to deploy the contracts on different networks:
-
Load Environment Variables:
-
Ink Mainnet Deployment:
-
Base Mainnet Deployment:
-
Unichain Sepolia Deployment:
-
Base Sepolia Deployment:
-
World Sepolia Deployment:
-
Ink Sepolia Deployment:
-
Arbitrum Sepolia Deployment:
-
Monad Testnet Deployment:
Contributing and Staying Updated
Stay up-to-date with the latest improvements, updates, and security patches by regularly checking the GitHub repository.