This is a repo built on top of Doppler. You can find here the:
- smart contracts built on top of Doppler
- test suite for integration tests and simulating full token launch flow
| Contract Name | Chain | Address |
|---|---|---|
| UniswapV4MulticurveInitializerFeeHook | BaseSepolia | 0x7b71bD11cB29A9c9C3775de1bf7fe568d0A7653D |
# Clone the repository
git clone <repository-url>
cd Launch-contracts
# Install Foundry (if not already installed)
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Install dependencies
make install
# Run tests
make testPlease specify respective environment variables in .env when
fork testing:
BASE_RPC_URL: Base Mainnet RPC endpoint
running forge script:
BASE_RPC_URL: Base Mainnet RPC endpointPRIVATE_KEY: To run forge script for deploying contracts, keystore can be used as well
Multicurve Hook Configs
Specify the deployConfig in respective *MulticurveHook.s.sol which * refers to respective network like Base or BaseSepolia:
deployConfig = DeployConfig({
airlock: Constants.BASE_SEPOLIA_AIRLOCK,
manager: Constants.BASE_SEPOLIA_POOL_MANAGER,
hookFeeWad: 0.01 ether // 1% fee
});airlock: Doppler Airlock contract address
manager: Uniswap v4 Pool Manager contract address
hookFeeWad: Percentage of the hook fee taken in numeraire that will be split to all beneficiaries in WAD (0.1e18 = 10%)
P.S.: You may specify initializerName and hookName for the name of the markdown files generated from the deployment as well.
-
Run
cp .env.example .env -
Specify
PRIVATE_KEYandBASE_RPC_URLin.env
# may need to specify Etherscan API Key for certain network by --etherscan-api-key
# deploy UniswapV4MulticurveFeeHook to Base Sepolia
make deploy-base-sepolia-hook
# deploy SSLMilestoneUnlockHook to Base Sepolia
make deploy-base-sepolia-milestone-unlock-hook
# generate standard json input from the contract as `<CONTRACT_NAME>.json`
make verify <CONTRACT_ADDRESS> <CONTRACT_NAME>-
Run
cp .env.example .env -
Specify
PRIVATE_KEYandBASE_RPC_URLin.env -
Specify addresses for
INTEGRATORandCREATOR, name and symbol for the token if necessary inCreateTokenWithNewInitializer.s.sol:
// TODO: change to newly deployed Initializer address that adopts the new hook
address constant NEW_BASE_SEPOLIA_INITIALIZER = 0x6278211660DCfCc030521e8adBbc92b9630eEa50;
// TODO: change to desired integrator address
address constant INTEGRATOR = address(0);
// TODO: change to desired creator address
address constant CREATOR = address(0);make create-token-
Run
cp .env.example .env -
Inside
.env- Put true for
IS_NUMERAIRE_NATIVEif numeraire token will be native ETH (truewill makeIS_ASSET_TOKEN0alwaysfalsegiven native ETH will always betoken0) - Put true for
IS_ASSET_TOKEN0if asset token is always token0
- Put true for
-
Run
cp .env.example .env -
Inside
.env- Put a Tenderly Virtual testnet / Node RPC URL for
BASE_RPC_URL
- Put a Tenderly Virtual testnet / Node RPC URL for
For unlocking one SSL position via Milestone Unlock Hook
forge test --mt test_afterSwap_HitOneMilestone_unlockOnePosition -vvvFor buying asset with numeraire with ExactInput via Multicurve Fee Hook
forge test --mt test_beforeSwap_buyAssetExactIn_takesFeeFromNumeraire -vvv