chore: .gitignore and README updates
Made-with: Cursor
This commit is contained in:
@@ -7,9 +7,10 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||
|
||||
/**
|
||||
* @title AddLiquidityPMMPoolsChain138
|
||||
* @notice Add liquidity to the three DODO PMM pools on Chain 138 (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC).
|
||||
* @notice Add liquidity to the canonical DODO PMM pools on Chain 138, including the stable/WETH lanes.
|
||||
* @dev Env: PRIVATE_KEY, RPC_URL_138, DODO_PMM_INTEGRATION_ADDRESS (or DODO_PMM_INTEGRATION),
|
||||
* POOL_CUSDTCUSDC, POOL_CUSDTUSDT, POOL_CUSDCUSDC,
|
||||
* optional POOL_CUSDTWETH, POOL_CUSDCWETH, POOL_CEURTWETH,
|
||||
* ADD_LIQUIDITY_BASE_AMOUNT, ADD_LIQUIDITY_QUOTE_AMOUNT (e.g. 1000000e6 for 1M units, 6 decimals).
|
||||
* Optional: ADD_LIQUIDITY_CUSDTCUSDC_BASE, ADD_LIQUIDITY_CUSDTCUSDC_QUOTE, etc. for per-pool amounts.
|
||||
* Optional: NEXT_NONCE — set to pending nonce (e.g. after mints) to avoid -32001 "Nonce too low" on broadcast.
|
||||
@@ -31,6 +32,9 @@ contract AddLiquidityPMMPoolsChain138 is Script {
|
||||
address poolCusdtCusdc = vm.envOr("POOL_CUSDTCUSDC", address(0));
|
||||
address poolCusdtUsdt = vm.envOr("POOL_CUSDTUSDT", address(0));
|
||||
address poolCusdcUsdc = vm.envOr("POOL_CUSDCUSDC", address(0));
|
||||
address poolCusdtWeth = vm.envOr("POOL_CUSDTWETH", address(0));
|
||||
address poolCusdcWeth = vm.envOr("POOL_CUSDCWETH", address(0));
|
||||
address poolCeurtWeth = vm.envOr("POOL_CEURTWETH", address(0));
|
||||
|
||||
uint256 defaultBase = vm.envOr("ADD_LIQUIDITY_BASE_AMOUNT", uint256(0));
|
||||
uint256 defaultQuote = vm.envOr("ADD_LIQUIDITY_QUOTE_AMOUNT", uint256(0));
|
||||
@@ -40,6 +44,8 @@ contract AddLiquidityPMMPoolsChain138 is Script {
|
||||
address cusdc = integration.compliantUSDC();
|
||||
address usdt = integration.officialUSDT();
|
||||
address usdc = integration.officialUSDC();
|
||||
address ceurt = vm.envOr("CEURT_ADDRESS_138", address(0xdf4b71c61E5912712C1Bdd451416B9aC26949d72));
|
||||
address weth = vm.envOr("WETH9_ADDRESS_138", vm.envOr("WETH_ADDRESS_138", address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)));
|
||||
|
||||
// On Chain 138, cUSDT/USDT and cUSDC/USDC should point at live local mirror quote tokens.
|
||||
// If the configured quote-side addresses have no code on 138, skip those pools to avoid "call to non-contract".
|
||||
@@ -73,6 +79,30 @@ contract AddLiquidityPMMPoolsChain138 is Script {
|
||||
console.log("Added liquidity to cUSDC/USDC pool:", poolCusdcUsdc);
|
||||
}
|
||||
}
|
||||
if (poolCusdtWeth != address(0) && (defaultBase > 0 || defaultQuote > 0)) {
|
||||
uint256 b = vm.envOr("ADD_LIQUIDITY_CUSDTWETH_BASE", defaultBase);
|
||||
uint256 q = vm.envOr("ADD_LIQUIDITY_CUSDTWETH_QUOTE", defaultQuote);
|
||||
if (b > 0 && q > 0) {
|
||||
_approveAndAdd(integration, cusdt, weth, poolCusdtWeth, b, q);
|
||||
console.log("Added liquidity to cUSDT/WETH pool:", poolCusdtWeth);
|
||||
}
|
||||
}
|
||||
if (poolCusdcWeth != address(0) && (defaultBase > 0 || defaultQuote > 0)) {
|
||||
uint256 b = vm.envOr("ADD_LIQUIDITY_CUSDCWETH_BASE", defaultBase);
|
||||
uint256 q = vm.envOr("ADD_LIQUIDITY_CUSDCWETH_QUOTE", defaultQuote);
|
||||
if (b > 0 && q > 0) {
|
||||
_approveAndAdd(integration, cusdc, weth, poolCusdcWeth, b, q);
|
||||
console.log("Added liquidity to cUSDC/WETH pool:", poolCusdcWeth);
|
||||
}
|
||||
}
|
||||
if (poolCeurtWeth != address(0) && (defaultBase > 0 || defaultQuote > 0)) {
|
||||
uint256 b = vm.envOr("ADD_LIQUIDITY_CEURTWETH_BASE", defaultBase);
|
||||
uint256 q = vm.envOr("ADD_LIQUIDITY_CEURTWETH_QUOTE", defaultQuote);
|
||||
if (b > 0 && q > 0) {
|
||||
_approveAndAdd(integration, ceurt, weth, poolCeurtWeth, b, q);
|
||||
console.log("Added liquidity to cEURT/WETH pool:", poolCeurtWeth);
|
||||
}
|
||||
}
|
||||
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user