Master the Doppler Protocol: A Step-by-Step Guide to Installation, Testing, and Deployment
Doppler Protocol offers powerful core contracts. This guide simplifies how to install, test, and deploy them, making the process accessible. You'll discover how to set up your environment, run tests, and deploy the protocol to various networks.
Quick Start: Installing the Doppler Protocol
Get Doppler Protocol up and running quickly with these simple steps. Ensure you have Foundry installed before proceeding.
- Clone the Repository: Use the following command to clone the Doppler Protocol repository:
- Install Dependencies: Navigate into the cloned directory and install dependencies.
Robust Testing: Ensuring Reliability
Guarantee the integrity of your Doppler Protocol implementation through rigorous testing. Configuration is key to tailoring tests to your needs.
- Configure Your Environment:
- Create a
.env
file by copying the example. - Add an RPC endpoint for Mainnet in your
.env
file.
- Create a
- Run Tests: Execute the tests.
- Tweak Tests (Optional): Modify the
.env
file to try different testing scenarios. This allows you to test diverse conditions without recompiling. Example parameters you can modify:IS_TOKEN_0=FALSE
USING_ETH=FALSE
FEE=30
Deployment Strategies: Tailoring to Your Needs
Deploy the Doppler Protocol flexibly based on your specific goals. Whether deploying the entire protocol, a new periphery contract, or a new module.
- Essential Setup: Prior to any deployment, create and configure your
.env
file: Edit the.env
file with your preferred editor, setting thePRIVATE_KEY
variable:PRIVATE_KEY=0x... # Private key of the deployment wallet
Deploying the Complete Protocol
For deploying the entire protocol on a testnet or new production chain, refer to the Deploy.s.sol
script in the repository. This contains the comprehensive steps needed.
Deploying a New Periphery Contract
Deploying a new periphery contract should be as straightforward as running its dedicated script. Find the relevant script in the script
directory.
Deploying a New Module: A Step-by-Step Approach
Deploying a new module requires registering it within the Airlock contract.
- Deploy the Module: Execute the module deployment script.
- Register the Module: Call the
setModuleState
function of the Airlock contract. You'll need the module's address and its type (e.g.,TokenFactory
orPoolInitializer
). Since the protocol multisig usually controls the Airlock, use a Safe interface to execute the transaction.
Example Deployment Commands: Network-Specific Instructions
Here are examples of deployment commands for various networks:
- Ink Mainnet
- Base Mainnet
- Unichain Sepolia
- Base Sepolia
- World Sepolia
- Ink Sepolia
- Arbitrum Sepolia
- Monad Testnet
Before running these commands, remember to source your .env
file: