From ea81c8d73a99b18ba16cb8f0ef001c95992ff667 Mon Sep 17 00:00:00 2001 From: Van0k Date: Wed, 17 Apr 2024 15:19:46 +0400 Subject: [PATCH 1/2] fix: lrt test configs --- .../test/config/USDC_Arbitrum_config.sol | 107 ++- contracts/test/config/USDC_Mainnet_config.sol | 619 ++++++++++++++++-- .../test/config/USDC_Optimism_config.sol | 134 +++- contracts/test/config/WBTC_Mainnet_config.sol | 534 +++++++++++++-- .../test/config/WETH_Arbitrum_config.sol | 122 +++- contracts/test/config/WETH_Mainnet_config.sol | 599 +++++++++++++++-- .../test/config/WETH_Optimism_config.sol | 131 +++- contracts/test/suites/LiveTestHelper.sol | 18 + package.json | 4 +- yarn.lock | 16 +- 10 files changed, 2015 insertions(+), 269 deletions(-) diff --git a/contracts/test/config/USDC_Arbitrum_config.sol b/contracts/test/config/USDC_Arbitrum_config.sol index ef92e978..929d4de7 100644 --- a/contracts/test/config/USDC_Arbitrum_config.sol +++ b/contracts/test/config/USDC_Arbitrum_config.sol @@ -98,14 +98,65 @@ contract CONFIG_ARBITRUM_USDC_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.cbETH, lt: 94_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WBTC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.ARB, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.ARB, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.wstETH, token1: Tokens.WETH, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.ARB, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WBTC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.ARB, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.ARB, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.wstETH, + token1: Tokens.WETH, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.ARB, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + } cs.push(Contracts.BALANCER_VAULT); BalancerPool[] storage bp = cp.balancerPools; @@ -151,11 +202,41 @@ contract CONFIG_ARBITRUM_USDC_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.PENDLE, lt: 80_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.PENDLE, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.GMX, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.LINK, token1: Tokens.WETH, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.PENDLE, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.GMX, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LINK, + token1: Tokens.WETH, + fee: 3000 + }) + ); + } } } diff --git a/contracts/test/config/USDC_Mainnet_config.sol b/contracts/test/config/USDC_Mainnet_config.sol index 0d10458d..cec5bc85 100644 --- a/contracts/test/config/USDC_Mainnet_config.sol +++ b/contracts/test/config/USDC_Mainnet_config.sol @@ -200,23 +200,137 @@ contract CONFIG_MAINNET_USDC_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDe, token1: Tokens.USDT, fee: 100})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDe, + token1: Tokens.USDT, + fee: 100 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -312,23 +426,137 @@ contract CONFIG_MAINNET_USDC_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.UNI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.MKR, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.LINK, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.MKR, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.LDO, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.UNI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.MKR, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LINK, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.MKR, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LDO, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -410,26 +638,161 @@ contract CONFIG_MAINNET_USDC_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.FRAX, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.FRAX, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.APE, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CVX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.FXS, token1: Tokens.FRAX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.FXS, token1: Tokens.FRAX, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FRAX, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.FRAX, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.APE, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CVX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FXS, + token1: Tokens.FRAX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FXS, + token1: Tokens.FRAX, + fee: 10000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -521,23 +884,137 @@ contract CONFIG_MAINNET_USDC_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.crvUSD, lt: 0})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.FRAX, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.FRAX, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CVX, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FRAX, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.FRAX, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CVX, + fee: 10000 + }) + ); + } cs.push(Contracts.CURVE_CVXETH_POOL); cs.push(Contracts.CURVE_TRI_CRV_POOL); cs.push(Contracts.CURVE_3CRV_POOL); diff --git a/contracts/test/config/USDC_Optimism_config.sol b/contracts/test/config/USDC_Optimism_config.sol index 21ef79fd..1398ec4c 100644 --- a/contracts/test/config/USDC_Optimism_config.sol +++ b/contracts/test/config/USDC_Optimism_config.sol @@ -118,16 +118,81 @@ contract CONFIG_OPTIMISM_USDC_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens._3CRV, lt: 0})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.OP, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WBTC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.wstETH, token1: Tokens.WETH, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WBTC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.OP, token1: Tokens.USDC_e, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.OP, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC_e, token1: Tokens.USDT, fee: 100})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.OP, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WBTC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.wstETH, + token1: Tokens.WETH, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WBTC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.OP, + token1: Tokens.USDC_e, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.OP, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC_e, + token1: Tokens.USDT, + fee: 100 + }) + ); + } cs.push(Contracts.BALANCER_VAULT); BalancerPool[] storage bp = cp.balancerPools; @@ -230,12 +295,49 @@ contract CONFIG_OPTIMISM_USDC_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.SNX, lt: 85_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC_e, token1: Tokens.WLD, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WLD, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.SNX, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC_e, + token1: Tokens.WLD, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WLD, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.SNX, + fee: 3000 + }) + ); + } cs.push(Contracts.VELODROME_V2_ROUTER); VelodromeV2Pool[] storage vv2p = cp.velodromeV2Pools; vv2p.push( diff --git a/contracts/test/config/WBTC_Mainnet_config.sol b/contracts/test/config/WBTC_Mainnet_config.sol index 9938a8db..63c1e289 100644 --- a/contracts/test/config/WBTC_Mainnet_config.sol +++ b/contracts/test/config/WBTC_Mainnet_config.sol @@ -150,22 +150,129 @@ contract CONFIG_MAINNET_WBTC_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -253,27 +360,169 @@ contract CONFIG_MAINNET_WBTC_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.UNI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.MKR, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.LINK, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.MKR, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.LDO, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDT, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.UNI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.MKR, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LINK, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.MKR, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LDO, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDT, + fee: 3000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -366,30 +615,193 @@ contract CONFIG_MAINNET_WBTC_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.FRAX, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.FRAX, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.APE, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CVX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.FXS, token1: Tokens.FRAX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.FXS, token1: Tokens.FRAX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDT, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FRAX, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.FRAX, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.APE, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CVX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FXS, + token1: Tokens.FRAX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FXS, + token1: Tokens.FRAX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDT, + fee: 3000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; diff --git a/contracts/test/config/WETH_Arbitrum_config.sol b/contracts/test/config/WETH_Arbitrum_config.sol index aa8c7b56..b0b05d29 100644 --- a/contracts/test/config/WETH_Arbitrum_config.sol +++ b/contracts/test/config/WETH_Arbitrum_config.sol @@ -91,7 +91,9 @@ contract CONFIG_ARBITRUM_WETH_V3 is IPoolV3DeployConfig { _quotaLimits.push( PoolQuotaLimit({token: Tokens.sfrxETH, quotaIncreaseFee: 0, limit: 2_500_000_000_000_000_000_000}) ); - _quotaLimits.push(PoolQuotaLimit({token: Tokens.ezETH, quotaIncreaseFee: 0, limit: 0})); + _quotaLimits.push( + PoolQuotaLimit({token: Tokens.ezETH, quotaIncreaseFee: 0, limit: 500_000_000_000_000_000_000}) + ); { /// CREDIT_MANAGER_0 @@ -127,15 +129,73 @@ contract CONFIG_ARBITRUM_WETH_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.ezETH, lt: 90_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WBTC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.ARB, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.ARB, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.wstETH, token1: Tokens.WETH, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.ARB, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WBTC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.ARB, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.ARB, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.wstETH, + token1: Tokens.WETH, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.ARB, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + } cs.push(Contracts.BALANCER_VAULT); BalancerPool[] storage bp = cp.balancerPools; @@ -150,6 +210,17 @@ contract CONFIG_ARBITRUM_WETH_V3 is IPoolV3DeployConfig { bp.push( BalancerPool({poolId: 0x4a2f6ae7f3e5d715689530873ec35593dc28951b000000000000000000000481, status: 2}) ); + + bp.push( + BalancerPool({poolId: 0xb61371ab661b1acec81c699854d2f911070c059e000000000000000000000516, status: 2}) + ); + cs.push(Contracts.CAMELOT_V3_ROUTER); + { + GenericSwapPair[] storage gsp = cp.genericSwapPairs; + gsp.push( + GenericSwapPair({router: Contracts.CAMELOT_V3_ROUTER, token0: Tokens.ezETH, token1: Tokens.WETH}) + ); + } } { /// CREDIT_MANAGER_1 @@ -175,10 +246,33 @@ contract CONFIG_ARBITRUM_WETH_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.LINK, lt: 90_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.PENDLE, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.GMX, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.LINK, token1: Tokens.WETH, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.PENDLE, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.GMX, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LINK, + token1: Tokens.WETH, + fee: 3000 + }) + ); + } } } diff --git a/contracts/test/config/WETH_Mainnet_config.sol b/contracts/test/config/WETH_Mainnet_config.sol index 7cc8e3b6..96c25365 100644 --- a/contracts/test/config/WETH_Mainnet_config.sol +++ b/contracts/test/config/WETH_Mainnet_config.sol @@ -76,6 +76,8 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { _gaugeRates.push(GaugeRate({token: Tokens.weETH, minRate: 5, maxRate: 30_00})); _gaugeRates.push(GaugeRate({token: Tokens.ezETH, minRate: 5, maxRate: 30_00})); _gaugeRates.push(GaugeRate({token: Tokens.rsETH, minRate: 5, maxRate: 30_00})); + _gaugeRates.push(GaugeRate({token: Tokens.pufETH, minRate: 5, maxRate: 30_00})); + _gaugeRates.push(GaugeRate({token: Tokens.rswETH, minRate: 5, maxRate: 30_00})); _quotaLimits.push( PoolQuotaLimit({token: Tokens.WBTC, quotaIncreaseFee: 1, limit: 15_000_000_000_000_000_000_000}) ); @@ -127,10 +129,16 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { PoolQuotaLimit({token: Tokens.weETH, quotaIncreaseFee: 0, limit: 20_000_000_000_000_000_000_000}) ); _quotaLimits.push( - PoolQuotaLimit({token: Tokens.ezETH, quotaIncreaseFee: 0, limit: 30_000_000_000_000_000_000_000}) + PoolQuotaLimit({token: Tokens.ezETH, quotaIncreaseFee: 0, limit: 40_000_000_000_000_000_000_000}) ); _quotaLimits.push( - PoolQuotaLimit({token: Tokens.rsETH, quotaIncreaseFee: 0, limit: 2_000_000_000_000_000_000_000}) + PoolQuotaLimit({token: Tokens.rsETH, quotaIncreaseFee: 0, limit: 10_000_000_000_000_000_000_000}) + ); + _quotaLimits.push( + PoolQuotaLimit({token: Tokens.pufETH, quotaIncreaseFee: 0, limit: 10_000_000_000_000_000_000_000}) + ); + _quotaLimits.push( + PoolQuotaLimit({token: Tokens.rswETH, quotaIncreaseFee: 0, limit: 10_000_000_000_000_000_000_000}) ); { @@ -197,22 +205,129 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -293,23 +408,137 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.UNI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.MKR, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.LINK, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.MKR, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.LDO, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.UNI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.MKR, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LINK, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.MKR, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.LDO, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -391,26 +620,161 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { ); } cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.FRAX, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.USDC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.FRAX, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.USDT, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.DAI, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WETH, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.APE, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CVX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.FXS, token1: Tokens.FRAX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.FXS, token1: Tokens.FRAX, fee: 10000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FRAX, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.USDC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.FRAX, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.USDT, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.DAI, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WETH, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.APE, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CVX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FXS, + token1: Tokens.FRAX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.FXS, + token1: Tokens.FRAX, + fee: 10000 + }) + ); + } cs.push(Contracts.SUSHISWAP_ROUTER); { GenericSwapPair[] storage gsp = cp.genericSwapPairs; @@ -502,13 +866,57 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.rETH_f, lt: 0})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CRV, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.CVX, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WBTC, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.SWISE, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CRV, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.CVX, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WBTC, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.SWISE, + fee: 3000 + }) + ); + } cs.push(Contracts.BALANCER_VAULT); BalancerPool[] storage bp = cp.balancerPools; @@ -564,16 +972,72 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.ezETH, lt: 91_50})); - cts.push(CollateralTokenHuman({token: Tokens.rsETH, lt: 91_50})); + cts.push(CollateralTokenHuman({token: Tokens.rsETH, lt: 90_00})); + + cts.push(CollateralTokenHuman({token: Tokens.pufETH, lt: 90_00})); + + cts.push(CollateralTokenHuman({token: Tokens.rswETH, lt: 90_00})); + + cts.push(CollateralTokenHuman({token: Tokens.STETH, lt: 0})); + + cts.push(CollateralTokenHuman({token: Tokens.wstETH, lt: 0})); cts.push(CollateralTokenHuman({token: Tokens.rETH, lt: 0})); cts.push(CollateralTokenHuman({token: Tokens.rETH_f, lt: 0})); + + cts.push(CollateralTokenHuman({token: Tokens.steCRV, lt: 0})); + + cts.push(CollateralTokenHuman({token: Tokens.pufETHwstE, lt: 0})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.rETH, token1: Tokens.WETH, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.rETH, token1: Tokens.WETH, fee: 100})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.pufETH, + token1: Tokens.WETH, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.weETH, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.rETH, + token1: Tokens.WETH, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.rETH, + token1: Tokens.WETH, + fee: 100 + }) + ); + } + cs.push(Contracts.PANCAKESWAP_V3_ROUTER); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.PANCAKESWAP_V3_ROUTER, + token0: Tokens.rswETH, + token1: Tokens.WETH, + fee: 500 + }) + ); + } cs.push(Contracts.BALANCER_VAULT); BalancerPool[] storage bp = cp.balancerPools; @@ -597,6 +1061,9 @@ contract CONFIG_MAINNET_WETH_V3 is IPoolV3DeployConfig { BalancerPool({poolId: 0x58aadfb1afac0ad7fca1148f3cde6aedf5236b6d00000000000000000000067f, status: 2}) ); cs.push(Contracts.CURVE_RETH_ETH_POOL); + cs.push(Contracts.CURVE_PUFETH_WSTETH_POOL); + cs.push(Contracts.CURVE_STETH_GATEWAY); + cs.push(Contracts.LIDO_WSTETH); } } diff --git a/contracts/test/config/WETH_Optimism_config.sol b/contracts/test/config/WETH_Optimism_config.sol index a9257896..1d09fbfa 100644 --- a/contracts/test/config/WETH_Optimism_config.sol +++ b/contracts/test/config/WETH_Optimism_config.sol @@ -38,9 +38,9 @@ contract CONFIG_OPTIMISM_WETH_V3 is IPoolV3DeployConfig { U_1: 70_00, U_2: 90_00, R_base: 0, - R_slope1: 1_00, - R_slope2: 1_25, - R_slope3: 100_00, + R_slope1: 2_00, + R_slope2: 2_50, + R_slope3: 60_00, _isBorrowingMoreU2Forbidden: true }); @@ -109,15 +109,73 @@ contract CONFIG_OPTIMISM_WETH_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.yvWETH, lt: 94_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.OP, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WBTC, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.wstETH, token1: Tokens.WETH, fee: 100})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WBTC, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.OP, token1: Tokens.USDC_e, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.OP, fee: 500})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.OP, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WBTC, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.wstETH, + token1: Tokens.WETH, + fee: 100 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WBTC, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.OP, + token1: Tokens.USDC_e, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.OP, + fee: 500 + }) + ); + } cs.push(Contracts.BALANCER_VAULT); BalancerPool[] storage bp = cp.balancerPools; @@ -193,12 +251,49 @@ contract CONFIG_OPTIMISM_WETH_V3 is IPoolV3DeployConfig { cts.push(CollateralTokenHuman({token: Tokens.SNX, lt: 85_00})); Contracts[] storage cs = cp.contracts; cs.push(Contracts.UNISWAP_V3_ROUTER); - UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 500})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.USDC_e, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.USDC, token1: Tokens.WLD, fee: 10000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.WLD, fee: 3000})); - uv3p.push(UniswapV3Pair({token0: Tokens.WETH, token1: Tokens.SNX, fee: 3000})); + { + UniswapV3Pair[] storage uv3p = cp.uniswapV3Pairs; + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 500 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.USDC_e, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.USDC, + token1: Tokens.WLD, + fee: 10000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.WLD, + fee: 3000 + }) + ); + uv3p.push( + UniswapV3Pair({ + router: Contracts.UNISWAP_V3_ROUTER, + token0: Tokens.WETH, + token1: Tokens.SNX, + fee: 3000 + }) + ); + } cs.push(Contracts.VELODROME_V2_ROUTER); VelodromeV2Pool[] storage vv2p = cp.velodromeV2Pools; vv2p.push( diff --git a/contracts/test/suites/LiveTestHelper.sol b/contracts/test/suites/LiveTestHelper.sol index f2bef9fa..e7942cbf 100644 --- a/contracts/test/suites/LiveTestHelper.sol +++ b/contracts/test/suites/LiveTestHelper.sol @@ -212,6 +212,7 @@ contract LiveTestHelper is IntegrationTestHelper { UniswapV3PoolStatus[] memory pools = new UniswapV3PoolStatus[](uniV3Pools.length); for (uint256 i = 0; i < uniV3Pools.length; ++i) { + if (uniV3Pools[i].router != Contracts.UNISWAP_V3_ROUTER) continue; pools[i] = UniswapV3PoolStatus({ token0: tokenTestSuite.addressOf(uniV3Pools[i].token0), token1: tokenTestSuite.addressOf(uniV3Pools[i].token1), @@ -224,6 +225,23 @@ contract LiveTestHelper is IntegrationTestHelper { vm.prank(CONFIGURATOR); UniswapV3Adapter(uniV3Adapter).setPoolStatusBatch(pools); + + pools = new UniswapV3PoolStatus[](uniV3Pools.length); + + for (uint256 i = 0; i < uniV3Pools.length; ++i) { + if (uniV3Pools[i].router != Contracts.PANCAKESWAP_V3_ROUTER) continue; + pools[i] = UniswapV3PoolStatus({ + token0: tokenTestSuite.addressOf(uniV3Pools[i].token0), + token1: tokenTestSuite.addressOf(uniV3Pools[i].token1), + fee: uniV3Pools[i].fee, + allowed: true + }); + } + + address pancakeswapV3Adapter = getAdapter(creditManager, Contracts.PANCAKESWAP_V3_ROUTER); + + vm.prank(CONFIGURATOR); + UniswapV3Adapter(pancakeswapV3Adapter).setPoolStatusBatch(pools); } // SIMPLE INTERFACE SWAPPERS GenericSwapPair[] memory genericPairs = creditManagerParams.genericSwapPairs; diff --git a/package.json b/package.json index b7834dd4..266eb479 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,11 @@ "@commitlint/cli": "^17.1.2", "@commitlint/config-conventional": "^17.1.0", "@gearbox-protocol/core-v2": "1.19.0-base.10", - "@gearbox-protocol/core-v3": "^1.49.4", + "@gearbox-protocol/core-v3": "^1.49.7", "@gearbox-protocol/eslint-config": "^1.6.1", "@gearbox-protocol/oracles-v3": "^1.10.3", "@gearbox-protocol/prettier-config": "^1.5.0", - "@gearbox-protocol/sdk-gov": "^1.57.0", + "@gearbox-protocol/sdk-gov": "^1.64.2", "@openzeppelin/contracts": "4.9.3", "@redstone-finance/evm-connector": "0.2.5", "@typechain/ethers-v5": "^10.1.0", diff --git a/yarn.lock b/yarn.lock index 345c971d..f03b4ccf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1367,10 +1367,10 @@ resolved "https://registry.yarnpkg.com/@gearbox-protocol/core-v2/-/core-v2-1.19.0-base.10.tgz#a21bce9eac4ca1783f5fcb4322b1c1257158d2de" integrity sha512-S9reS5zGt+cKxEdQppVCU0cZEmnSqx8DaoloY6KXqCsAedVJvwNUoCHnLjh9s/oWyOHa37qExN1QohntNQyB2Q== -"@gearbox-protocol/core-v3@^1.49.4": - version "1.49.4" - resolved "https://registry.yarnpkg.com/@gearbox-protocol/core-v3/-/core-v3-1.49.4.tgz#96995f350755939dcc0556b3d492bdc1aa1d5251" - integrity sha512-qU0EZ3RvToGxY35Q2Llg1Rm2L0p7TWqU/CB5G6bynHW4mbWo3ROrprXizGkTRvQIbC4+oW3+aBXnPA6vcR6fCQ== +"@gearbox-protocol/core-v3@^1.49.7": + version "1.49.7" + resolved "https://registry.yarnpkg.com/@gearbox-protocol/core-v3/-/core-v3-1.49.7.tgz#2e1743355649733f53486063703f7160a61ef454" + integrity sha512-Ovl5FNv6eL8CdsvFcjABFELBij/uP8HpPnn8gCW/BxFPK4TRhufnIoOM4RjhmN4pA2AxYbwpXyXC51Jynv5Cxg== "@gearbox-protocol/eslint-config@^1.6.1": version "1.6.1" @@ -1399,10 +1399,10 @@ resolved "https://registry.yarnpkg.com/@gearbox-protocol/prettier-config/-/prettier-config-1.5.0.tgz#4df8e9fd2305fee6ab8c1417a02e31343836932a" integrity sha512-FUoprSsBdZyBjgxXCKL6mTkbeUJytaLzPJqIOoQpDmBRTX0seCc2o5I9PI9tySoRIlNnd/XXnKCXq1xHDEGbxw== -"@gearbox-protocol/sdk-gov@^1.57.0": - version "1.57.0" - resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk-gov/-/sdk-gov-1.57.0.tgz#024611df70f2be62abe01b86407992daf1c7e7d8" - integrity sha512-srvjr0Njjo+e86i+ltpzR4HM1oL2gOdZRpHHyKF5jtiT8ZN4KxImBSUXJY34WRj1VndueIWD6oivphp4R/924Q== +"@gearbox-protocol/sdk-gov@^1.64.2": + version "1.64.2" + resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk-gov/-/sdk-gov-1.64.2.tgz#c0d70d8b6911c1515500076f85f052952b621b11" + integrity sha512-bhLQji3Fshgqk0Zh+QGfI8e7v7p8BK8B/hZkAr4PqZcQPEMifcdnNMNq7TFYVlQ8sAReYe4IX2SjFb55ko6t7A== dependencies: "@types/yaml" "^1.9.7" add "^2.0.6" From a8286f456ffce339ca01e59236a608f3d603e8e9 Mon Sep 17 00:00:00 2001 From: Van0k Date: Wed, 17 Apr 2024 16:39:03 +0400 Subject: [PATCH 2/2] fix: pancakeswap test fix --- contracts/test/suites/LiveTestHelper.sol | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contracts/test/suites/LiveTestHelper.sol b/contracts/test/suites/LiveTestHelper.sol index e7942cbf..7c8ab12d 100644 --- a/contracts/test/suites/LiveTestHelper.sol +++ b/contracts/test/suites/LiveTestHelper.sol @@ -223,8 +223,10 @@ contract LiveTestHelper is IntegrationTestHelper { address uniV3Adapter = getAdapter(creditManager, Contracts.UNISWAP_V3_ROUTER); - vm.prank(CONFIGURATOR); - UniswapV3Adapter(uniV3Adapter).setPoolStatusBatch(pools); + if (uniV3Adapter != address(0)) { + vm.prank(CONFIGURATOR); + UniswapV3Adapter(uniV3Adapter).setPoolStatusBatch(pools); + } pools = new UniswapV3PoolStatus[](uniV3Pools.length); @@ -240,8 +242,10 @@ contract LiveTestHelper is IntegrationTestHelper { address pancakeswapV3Adapter = getAdapter(creditManager, Contracts.PANCAKESWAP_V3_ROUTER); - vm.prank(CONFIGURATOR); - UniswapV3Adapter(pancakeswapV3Adapter).setPoolStatusBatch(pools); + if (pancakeswapV3Adapter != address(0)) { + vm.prank(CONFIGURATOR); + UniswapV3Adapter(pancakeswapV3Adapter).setPoolStatusBatch(pools); + } } // SIMPLE INTERFACE SWAPPERS GenericSwapPair[] memory genericPairs = creditManagerParams.genericSwapPairs;