diff --git a/contracts/scripts/runlogs/2025_10.s.sol b/contracts/scripts/runlogs/2025_10.s.sol index 79a86be0a0..2e640c323a 100644 --- a/contracts/scripts/runlogs/2025_10.s.sol +++ b/contracts/scripts/runlogs/2025_10.s.sol @@ -8,60 +8,131 @@ import { SetupMainnet } from "./utils/Setup.sol"; import { CrossChain } from "./utils/Addresses.sol"; +import { Cluster } from "contracts/contracts/interfaces/ISSVNetwork.sol"; +import { Mainnet } from "./utils/Addresses.sol"; + // Foundry import { console } from "forge-std/console.sol"; contract Runlogs_2025_10_Mainnet is SetupMainnet { - function run() public { - _2025_10_01(); - //_2025_10_02(); - } - - // ------------------------------------------------------------------ - // Oct 3, 2025 - Yield Forward to Computed Merkl Pool Booster - // ------------------------------------------------------------------ - function _2025_10_01() internal { - bytes memory campaignData = - hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; - - vm.startBroadcast(strategist); - - console.log("-----"); - console.log("strategist address", address(strategist)); - console.log("poolBoosterFactoryMerkl address", address(poolBoosterFactoryMerkl)); - - address poolBoosterAddress = poolBoosterFactoryMerkl.computePoolBoosterAddress({ - _campaignType: 45, - _ammPoolAddress: CrossChain.MORPHO_BLUE, - _campaignDuration: 7 days, - campaignData: campaignData, - _salt: uint256(keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1"))) - }); - - console.log("computed address", poolBoosterAddress); - - // Run yield forward - oeth.delegateYield(CrossChain.MORPHO_BLUE, poolBoosterAddress); - vm.stopBroadcast(); - } - -// ------------------------------------------------------------------ - // Oct 3+ TODO, 2025 - Create Merkl Pool Booster once Central Registry governance passes - // ------------------------------------------------------------------ - function _2025_10_02() internal { - bytes memory campaignData = - hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; - - vm.startBroadcast(strategist); - // Create the pool booster - poolBoosterFactoryMerkl.createPoolBoosterMerkl({ - _campaignType: 45, // Incentivise Borrow rate of OETH/USDC - _ammPoolAddress: CrossChain.MORPHO_BLUE, - _campaignDuration: 7 days, - campaignData: campaignData, - _salt: uint256(keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1"))) - }); - - vm.stopBroadcast(); - } -} \ No newline at end of file + function run() public { + // _2025_10_01(); + //_2025_10_02(); + _2025_10_07(); + } + + // ------------------------------------------------------------------ + // Oct 3, 2025 - Yield Forward to Computed Merkl Pool Booster + // ------------------------------------------------------------------ + function _2025_10_01() internal { + bytes + memory campaignData = hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + + vm.startBroadcast(strategist); + + console.log("-----"); + console.log("strategist address", address(strategist)); + console.log( + "poolBoosterFactoryMerkl address", + address(poolBoosterFactoryMerkl) + ); + + address poolBoosterAddress = poolBoosterFactoryMerkl + .computePoolBoosterAddress({ + _campaignType: 45, + _ammPoolAddress: CrossChain.MORPHO_BLUE, + _campaignDuration: 7 days, + campaignData: campaignData, + _salt: uint256( + keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1")) + ) + }); + + console.log("computed address", poolBoosterAddress); + + // Run yield forward + oeth.delegateYield(CrossChain.MORPHO_BLUE, poolBoosterAddress); + vm.stopBroadcast(); + } + + // ------------------------------------------------------------------ + // Oct 3+ TODO, 2025 - Create Merkl Pool Booster once Central Registry governance passes + // ------------------------------------------------------------------ + function _2025_10_02() internal { + bytes + memory campaignData = hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + + vm.startBroadcast(strategist); + // Create the pool booster + poolBoosterFactoryMerkl.createPoolBoosterMerkl({ + _campaignType: 45, // Incentivise Borrow rate of OETH/USDC + _ammPoolAddress: CrossChain.MORPHO_BLUE, + _campaignDuration: 7 days, + campaignData: campaignData, + _salt: uint256( + keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1")) + ) + }); + + vm.stopBroadcast(); + } + + // ------------------------------------------------------------------ + // Oct 7, 2025 - Deposit 400 SSV to the second SSV cluster and + // 200 SSV to the third SSV cluster + // ------------------------------------------------------------------ + function _2025_10_07() internal { + vm.startBroadcast(strategist); + + console.log("-----"); + console.log("strategist address", address(strategist)); + console.log("SSV token address", address(ssv)); + console.log("SSV Network address", address(ssvNetwork)); + + uint256 ssvDepositAmount = 600 * 1e18; // 600 SSV + + ssv.approve(address(ssvNetwork), ssvDepositAmount); + + uint64[] memory operatorIds = new uint64[](4); + operatorIds[0] = 752; + operatorIds[1] = 753; + operatorIds[2] = 754; + operatorIds[3] = 755; + + // Get the SSV Cluster data from the following Hardhat task + // npx hardhat getClusterInfo --operatorids 752,753,754,755 --network mainnet --owner 0x4685dB8bF2Df743c861d71E6cFb5347222992076 + ssvNetwork.deposit( + Mainnet.NATIVE_STAKING_STRATEGY_2, + operatorIds, + 400 * 1e18, // 400 SSV, + Cluster({ + validatorCount: 500, + networkFeeIndex: 97648369159, + index: 9585132, + active: true, + balance: 1066288969170302776597 + }) + ); + + operatorIds[0] = 338; + operatorIds[1] = 339; + operatorIds[2] = 340; + operatorIds[3] = 341; + + // npx hardhat getClusterInfo --operatorids 338,339,340,341 --network mainnet --owner 0xE98538A0e8C2871C2482e1Be8cC6bd9F8E8fFD63 + ssvNetwork.deposit( + Mainnet.NATIVE_STAKING_STRATEGY_3, + operatorIds, + 200 * 1e18, // 200 SSV, + Cluster({ + validatorCount: 436, + networkFeeIndex: 226592732593, + index: 0, + active: true, + balance: 419059922731900000000 + }) + ); + + vm.stopBroadcast(); + } +} diff --git a/contracts/scripts/runlogs/README.md b/contracts/scripts/runlogs/README.md index 197260223c..070fc65dcc 100644 --- a/contracts/scripts/runlogs/README.md +++ b/contracts/scripts/runlogs/README.md @@ -1,7 +1,9 @@ # How to use foundry runlogs? ## 1. Ensure all dependencies are installed + At the root of the repo run: + ```bash forge soldeer install cd contract @@ -9,38 +11,48 @@ yarn install ``` ## 2. Execute runlogs + In the `contracts` folder run: + ```bash forge script Runlogs_2025_08_Mainnet ``` + > Note: adjust the year, month and chain accordingly. This generates 2 files (that are `broadcast-ready` for execution) under `contracts/broadcast`: + - run-latest.json - run-1755456667783.json (with the timestamp corresponding to the execution time) ## 3. Convert runlogs into Safe-compatible JSON + Since these transactions are meant to be executed from the Safe, it is not possible to use `cast`. -To convert a `broadcast-ready` into a Safe-compatible JSON file, use the forge script: `scripts/runlogs/utils/BroadcastConvertor.sol`. +To convert a `broadcast-ready` into a Safe-compatible JSON file, use the forge script: `scripts/runlogs/utils/BroadcastConvertor.sol`. In the `contracts` folder run: + ```bash -forge script BroadcastConvertor --sig "run(string)" contracts/broadcast/2025_09.sol/146/dry-run/ +forge script BroadcastConvertor --sig "run(string)" contracts/broadcast/2025_09.s.sol/146/dry-run/ ``` + > Note adjust the input accordingly: > first the path to the run file, but stop at the dry-run folder. This creates, by default, a file named `run-latest-safe.json` in the same location as the input file, ready to be imported into the Safe UI. ### Timelock targeted ? + If on the script, the address used inside `startBroadcast()` is a `Timelock`: -- the Safe-compatible JSON will be adjusted to target the `scheduleBatch` and `executeBatch` functions on the `Timelock` contract. -- two files will be generated: `run-latest-schedule` and `run-latest-execute`. +- the Safe-compatible JSON will be adjusted to target the `scheduleBatch` and `executeBatch` functions on the `Timelock` contract. +- two files will be generated: `run-latest-schedule` and `run-latest-execute`. ## 4. How generates Safe JSON in just one command? + In the `contracts` folder: + ```makefile make script or diff --git a/contracts/scripts/runlogs/utils/Addresses.sol b/contracts/scripts/runlogs/utils/Addresses.sol index 281dfdbe68..0d56515837 100644 --- a/contracts/scripts/runlogs/utils/Addresses.sol +++ b/contracts/scripts/runlogs/utils/Addresses.sol @@ -2,89 +2,121 @@ pragma solidity ^0.8.0; library CrossChain { - // Governance - address public constant STRATEGIST = 0x4FF1b9D9ba8558F5EAfCec096318eA0d8b541971; + // Governance + address public constant STRATEGIST = + 0x4FF1b9D9ba8558F5EAfCec096318eA0d8b541971; - // Protocols - address public constant MORPHO_BLUE = 0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb; + // Protocols + address public constant MORPHO_BLUE = + 0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb; } library Mainnet { - uint256 public constant CHAIN_ID = 1; // Mainnet chain ID - - // Governance - address public constant TIMELOCK = 0x35918cDE7233F2dD33fA41ae3Cb6aE0e42E0e69F; - - // OUSD - address public constant OUSD = 0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86; - - // OETH - address public constant OETH = 0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3; - address public constant WOETH = 0xDcEe70654261AF21C44c093C300eD3Bb97b78192; - address public constant OETH_VAULT = 0x39254033945AA2E4809Cc2977E7087BEE48bd7Ab; - address public constant OETH_VAULT_VALUE_CHECKER = 0x31FD8618379D8e473Ec2B1540B906E8e11D2A99b; - - // OETH Strategies - address public constant OETH_WETH_CURVE_AMO = 0xba0e352AB5c13861C26e4E773e7a833C3A223FE6; - - // Pool Booster - address public constant POOL_BOOSTER_FACTORY_MERKL = 0x0FC66355B681503eFeE7741BD848080d809FD6db; - address public constant POOL_BOOSTER_CENTRAL_REGISTRY = 0xAA8af8Db4B6a827B51786334d26349eb03569731; - - // Other token - address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; - address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; - - // Curve pools - address public constant OETH_WETH_CURVE_POOL = 0xcc7d5785AD5755B6164e21495E07aDb0Ff11C2A8; + uint256 public constant CHAIN_ID = 1; // Mainnet chain ID + + // Governance + address public constant TIMELOCK = + 0x35918cDE7233F2dD33fA41ae3Cb6aE0e42E0e69F; + + // OUSD + address public constant OUSD = 0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86; + + // OETH + address public constant OETH = 0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3; + address public constant WOETH = 0xDcEe70654261AF21C44c093C300eD3Bb97b78192; + address public constant OETH_VAULT = + 0x39254033945AA2E4809Cc2977E7087BEE48bd7Ab; + address public constant OETH_VAULT_VALUE_CHECKER = + 0x31FD8618379D8e473Ec2B1540B906E8e11D2A99b; + address public constant NATIVE_STAKING_STRATEGY_2 = + 0x4685dB8bF2Df743c861d71E6cFb5347222992076; + address public constant NATIVE_STAKING_STRATEGY_3 = + 0xE98538A0e8C2871C2482e1Be8cC6bd9F8E8fFD63; + + // OETH Strategies + address public constant OETH_WETH_CURVE_AMO = + 0xba0e352AB5c13861C26e4E773e7a833C3A223FE6; + + // Pool Booster + address public constant POOL_BOOSTER_FACTORY_MERKL = + 0x0FC66355B681503eFeE7741BD848080d809FD6db; + address public constant POOL_BOOSTER_CENTRAL_REGISTRY = + 0xAA8af8Db4B6a827B51786334d26349eb03569731; + + // Other token + address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; + address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; + + // Curve pools + address public constant OETH_WETH_CURVE_POOL = + 0xcc7d5785AD5755B6164e21495E07aDb0Ff11C2A8; + + // SSV + address public constant SSV = 0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54; + address public constant SSV_NETWORK = + 0xDD9BC35aE942eF0cFa76930954a156B3fF30a4E1; } library Base { - uint256 public constant CHAIN_ID = 5483; // Base chain ID - - // Governance - address public constant TIMELOCK = 0xf817cb3092179083c48c014688D98B72fB61464f; - - // OETHb - address public constant OETHB = 0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3; - address public constant WOETHB = 0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6; - address public constant OETHB_VAULT = 0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93; - address public constant OETHB_VAULT_VALUE_CHECKER = 0x9D98Cf85B65Fa1ACef5e9AAA2300753aDF7bcf6A; - - // OETHb Strategies - address public constant OETHB_WETH_CURVE_AMO = 0x9cfcAF81600155e01c63e4D2993A8A81A8205829; - address public constant OETHB_WETH_AERODROME_POOL = 0xF611cC500eEE7E4e4763A05FE623E2363c86d2Af; - - // Pool Booster - address public constant POOL_BOOSTER_FACTORY_MERKL = 0x1ADB902Ece465cA681C66187627a622a631a0a63; - address public constant POOL_BOOSTER_CENTRAL_REGISTRY = 0x157f0B239D7F83D153E6c95F8AD9d341694376E3; - - // Other token - address public constant WETH = 0x4200000000000000000000000000000000000006; - - // Curve pools - address public constant OETHB_WETH_CURVE_POOL = 0x302A94E3C28c290EAF2a4605FC52e11Eb915f378; + uint256 public constant CHAIN_ID = 5483; // Base chain ID + + // Governance + address public constant TIMELOCK = + 0xf817cb3092179083c48c014688D98B72fB61464f; + + // OETHb + address public constant OETHB = 0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3; + address public constant WOETHB = 0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6; + address public constant OETHB_VAULT = + 0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93; + address public constant OETHB_VAULT_VALUE_CHECKER = + 0x9D98Cf85B65Fa1ACef5e9AAA2300753aDF7bcf6A; + + // OETHb Strategies + address public constant OETHB_WETH_CURVE_AMO = + 0x9cfcAF81600155e01c63e4D2993A8A81A8205829; + address public constant OETHB_WETH_AERODROME_POOL = + 0xF611cC500eEE7E4e4763A05FE623E2363c86d2Af; + + // Pool Booster + address public constant POOL_BOOSTER_FACTORY_MERKL = + 0x1ADB902Ece465cA681C66187627a622a631a0a63; + address public constant POOL_BOOSTER_CENTRAL_REGISTRY = + 0x157f0B239D7F83D153E6c95F8AD9d341694376E3; + + // Other token + address public constant WETH = 0x4200000000000000000000000000000000000006; + + // Curve pools + address public constant OETHB_WETH_CURVE_POOL = + 0x302A94E3C28c290EAF2a4605FC52e11Eb915f378; } library Sonic { - uint256 public constant CHAIN_ID = 146; // Sonic chain ID - - // Governance - address public constant GOVERNOR = 0xAdDEA7933Db7d83855786EB43a238111C69B00b6; - address public constant TIMELOCK = 0x31a91336414d3B955E494E7d485a6B06b55FC8fB; - address public constant STRATEGIST = 0x63cdd3072F25664eeC6FAEFf6dAeB668Ea4de94a; - - // OS - address public constant OS = 0xb1e25689D55734FD3ffFc939c4C3Eb52DFf8A794; - address public constant OS_VAULT = 0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186; - address public constant OS_VAULT_VALUE_CHECKER = 0x06f172e6852085eCa886B7f9fd8f7B21Db3D2c40; - - // ARM - address public constant ARM = 0x2F872623d1E1Af5835b08b0E49aAd2d81d649D30; - - // Strategies - address public constant STAKING_STRATEGY = 0x596B0401479f6DfE1cAF8c12838311FeE742B95c; - - // Other token - address public constant WS = 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38; + uint256 public constant CHAIN_ID = 146; // Sonic chain ID + + // Governance + address public constant GOVERNOR = + 0xAdDEA7933Db7d83855786EB43a238111C69B00b6; + address public constant TIMELOCK = + 0x31a91336414d3B955E494E7d485a6B06b55FC8fB; + address public constant STRATEGIST = + 0x63cdd3072F25664eeC6FAEFf6dAeB668Ea4de94a; + + // OS + address public constant OS = 0xb1e25689D55734FD3ffFc939c4C3Eb52DFf8A794; + address public constant OS_VAULT = + 0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186; + address public constant OS_VAULT_VALUE_CHECKER = + 0x06f172e6852085eCa886B7f9fd8f7B21Db3D2c40; + + // ARM + address public constant ARM = 0x2F872623d1E1Af5835b08b0E49aAd2d81d649D30; + + // Strategies + address public constant STAKING_STRATEGY = + 0x596B0401479f6DfE1cAF8c12838311FeE742B95c; + + // Other token + address public constant WS = 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38; } diff --git a/contracts/scripts/runlogs/utils/Setup.sol b/contracts/scripts/runlogs/utils/Setup.sol index cd09a4d079..e8bb5eae40 100644 --- a/contracts/scripts/runlogs/utils/Setup.sol +++ b/contracts/scripts/runlogs/utils/Setup.sol @@ -24,21 +24,20 @@ import { OSonic } from "contracts/contracts/token/OSonic.sol"; import { CurveAMOStrategy } from "contracts/contracts/strategies/CurveAMOStrategy.sol"; import { BaseCurveAMOStrategy } from "contracts/contracts/strategies/BaseCurveAMOStrategy.sol"; import { SonicStakingStrategy } from "contracts/contracts/strategies/sonic/SonicStakingStrategy.sol"; -import { AerodromeAMOStrategy } from - "contracts/contracts/strategies/aerodrome/AerodromeAMOStrategy.sol"; +import { AerodromeAMOStrategy } from "contracts/contracts/strategies/aerodrome/AerodromeAMOStrategy.sol"; // Contracts - ARM import { ISonicARM } from "contracts/contracts/interfaces/arm/ISonicARM.sol"; // Contracts - Pool Booster -import { PoolBoosterFactoryMerkl } from - "contracts/contracts/poolBooster/PoolBoosterFactoryMerkl.sol"; -import { PoolBoostCentralRegistry } from - "contracts/contracts/poolBooster/PoolBoostCentralRegistry.sol"; +import { PoolBoosterFactoryMerkl } from "contracts/contracts/poolBooster/PoolBoosterFactoryMerkl.sol"; +import { PoolBoostCentralRegistry } from "contracts/contracts/poolBooster/PoolBoostCentralRegistry.sol"; // Interfaces +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IWETH9 } from "contracts/contracts/interfaces/IWETH9.sol"; import { ICurveStableSwapNG } from "contracts/contracts/interfaces/ICurveStableSwapNG.sol"; +import { ISSVNetwork } from "contracts/contracts/interfaces/ISSVNetwork.sol"; // Helpers import { CrossChain, Mainnet, Base, Sonic } from "./Addresses.sol"; @@ -48,94 +47,102 @@ import { Script } from "forge-std/Script.sol"; import { Test } from "forge-std/Test.sol"; abstract contract SetupMainnet is Test, Script { - // Governance - address public strategist = CrossChain.STRATEGIST; - - // OUSD - OUSD public ousd = OUSD(Mainnet.OUSD); - - // OETH - OETH public oeth = OETH(Mainnet.OETH); - WOETH public woeth = WOETH(Mainnet.WOETH); - OETHVaultCore public oethVaultCore = OETHVaultCore(Mainnet.OETH_VAULT); - OETHVaultAdmin public oethVaultAdmin = OETHVaultAdmin(Mainnet.OETH_VAULT); - CurveAMOStrategy public oethWethCurveAMO = CurveAMOStrategy(Mainnet.OETH_WETH_CURVE_AMO); - OETHVaultValueChecker public oethVaultValueChecker = - OETHVaultValueChecker(Mainnet.OETH_VAULT_VALUE_CHECKER); - - // Pool Booster - PoolBoosterFactoryMerkl public poolBoosterFactoryMerkl = - PoolBoosterFactoryMerkl(Mainnet.POOL_BOOSTER_FACTORY_MERKL); - PoolBoostCentralRegistry public poolBoosterCentralRegistry = - PoolBoostCentralRegistry(Mainnet.POOL_BOOSTER_CENTRAL_REGISTRY); - - // Interfaces - IWETH9 public weth = IWETH9(Mainnet.WETH); - ICurveStableSwapNG public oethWethCurvePool = ICurveStableSwapNG(Mainnet.OETH_WETH_CURVE_POOL); - - function setUp() public { - // Note: to ensure perfect simulation, don't fix block number, it will be automatically set to the latest block - vm.createSelectFork(vm.envString("PROVIDER_URL")); - } + // Governance + address public strategist = CrossChain.STRATEGIST; + + // OUSD + OUSD public ousd = OUSD(Mainnet.OUSD); + + // OETH + OETH public oeth = OETH(Mainnet.OETH); + WOETH public woeth = WOETH(Mainnet.WOETH); + OETHVaultCore public oethVaultCore = OETHVaultCore(Mainnet.OETH_VAULT); + OETHVaultAdmin public oethVaultAdmin = OETHVaultAdmin(Mainnet.OETH_VAULT); + CurveAMOStrategy public oethWethCurveAMO = + CurveAMOStrategy(Mainnet.OETH_WETH_CURVE_AMO); + OETHVaultValueChecker public oethVaultValueChecker = + OETHVaultValueChecker(Mainnet.OETH_VAULT_VALUE_CHECKER); + + // Pool Booster + PoolBoosterFactoryMerkl public poolBoosterFactoryMerkl = + PoolBoosterFactoryMerkl(Mainnet.POOL_BOOSTER_FACTORY_MERKL); + PoolBoostCentralRegistry public poolBoosterCentralRegistry = + PoolBoostCentralRegistry(Mainnet.POOL_BOOSTER_CENTRAL_REGISTRY); + + // Interfaces + IWETH9 public weth = IWETH9(Mainnet.WETH); + ICurveStableSwapNG public oethWethCurvePool = + ICurveStableSwapNG(Mainnet.OETH_WETH_CURVE_POOL); + IERC20 public ssv = IERC20(Mainnet.SSV); + ISSVNetwork public ssvNetwork = ISSVNetwork(Mainnet.SSV_NETWORK); + + function setUp() public { + // Note: to ensure perfect simulation, don't fix block number, it will be automatically set to the latest block + vm.createSelectFork(vm.envString("PROVIDER_URL")); + } } abstract contract SetupBase is Test, Script { - // Governance - address public strategist = CrossChain.STRATEGIST; - - // OETH - OETHBase public oeth = OETHBase(Base.OETHB); - WOETHBase public woeth = WOETHBase(Base.WOETHB); - OETHBaseVaultCore public oethVaultCore = OETHBaseVaultCore(Base.OETHB_VAULT); - OETHBaseVaultAdmin public oethVaultAdmin = OETHBaseVaultAdmin(Base.OETHB_VAULT); - BaseCurveAMOStrategy public oethWethCurveAMO = BaseCurveAMOStrategy(Base.OETHB_WETH_CURVE_AMO); - AerodromeAMOStrategy public oethWethAerodromeAMO = - AerodromeAMOStrategy(Base.OETHB_WETH_AERODROME_POOL); - OETHVaultValueChecker public oethVaultValueChecker = - OETHVaultValueChecker(Base.OETHB_VAULT_VALUE_CHECKER); - - // Pool Booster - PoolBoosterFactoryMerkl public poolBoosterFactoryMerkl = - PoolBoosterFactoryMerkl(Base.POOL_BOOSTER_FACTORY_MERKL); - PoolBoostCentralRegistry public poolBoosterCentralRegistry = - PoolBoostCentralRegistry(Base.POOL_BOOSTER_CENTRAL_REGISTRY); - - // Interfaces - IWETH9 public weth = IWETH9(Base.WETH); - ICurveStableSwapNG public oethWethCurvePool = ICurveStableSwapNG(Base.OETHB_WETH_CURVE_POOL); - - function setUp() public { - // Note: to ensure perfect simulation, don't fix block number, it will be automatically set to the latest block - vm.createSelectFork(vm.envString("BASE_PROVIDER_URL")); - } + // Governance + address public strategist = CrossChain.STRATEGIST; + + // OETH + OETHBase public oeth = OETHBase(Base.OETHB); + WOETHBase public woeth = WOETHBase(Base.WOETHB); + OETHBaseVaultCore public oethVaultCore = + OETHBaseVaultCore(Base.OETHB_VAULT); + OETHBaseVaultAdmin public oethVaultAdmin = + OETHBaseVaultAdmin(Base.OETHB_VAULT); + BaseCurveAMOStrategy public oethWethCurveAMO = + BaseCurveAMOStrategy(Base.OETHB_WETH_CURVE_AMO); + AerodromeAMOStrategy public oethWethAerodromeAMO = + AerodromeAMOStrategy(Base.OETHB_WETH_AERODROME_POOL); + OETHVaultValueChecker public oethVaultValueChecker = + OETHVaultValueChecker(Base.OETHB_VAULT_VALUE_CHECKER); + + // Pool Booster + PoolBoosterFactoryMerkl public poolBoosterFactoryMerkl = + PoolBoosterFactoryMerkl(Base.POOL_BOOSTER_FACTORY_MERKL); + PoolBoostCentralRegistry public poolBoosterCentralRegistry = + PoolBoostCentralRegistry(Base.POOL_BOOSTER_CENTRAL_REGISTRY); + + // Interfaces + IWETH9 public weth = IWETH9(Base.WETH); + ICurveStableSwapNG public oethWethCurvePool = + ICurveStableSwapNG(Base.OETHB_WETH_CURVE_POOL); + + function setUp() public { + // Note: to ensure perfect simulation, don't fix block number, it will be automatically set to the latest block + vm.createSelectFork(vm.envString("BASE_PROVIDER_URL")); + } } abstract contract SetupSonic is Test, Script { - // Governance - address public governor = Sonic.GOVERNOR; - address public timelock = Sonic.TIMELOCK; - address public strategist = CrossChain.STRATEGIST; - address public localStrategist = Sonic.STRATEGIST; - - // OS - OSonic public os = OSonic(Sonic.OS); - OSonicVaultCore public osVaultCore = OSonicVaultCore(Sonic.OS_VAULT); - OSonicVaultAdmin public osVaultAdmin = OSonicVaultAdmin(Sonic.OS_VAULT); - OETHVaultValueChecker public osVaultValueChecker = - OETHVaultValueChecker(Sonic.OS_VAULT_VALUE_CHECKER); - - // Interfaces - IWETH9 public ws = IWETH9(Sonic.WS); - - // ARM - ISonicARM public arm = ISonicARM(Sonic.ARM); - - // Staking strategy - SonicStakingStrategy public stakingStrategy = - SonicStakingStrategy(payable(Sonic.STAKING_STRATEGY)); - - function setUp() public { - // Note: to ensure perfect simulation, don't fix block number, it will be automatically set to the latest block - vm.createSelectFork(vm.envString("SONIC_PROVIDER_URL")); - } + // Governance + address public governor = Sonic.GOVERNOR; + address public timelock = Sonic.TIMELOCK; + address public strategist = CrossChain.STRATEGIST; + address public localStrategist = Sonic.STRATEGIST; + + // OS + OSonic public os = OSonic(Sonic.OS); + OSonicVaultCore public osVaultCore = OSonicVaultCore(Sonic.OS_VAULT); + OSonicVaultAdmin public osVaultAdmin = OSonicVaultAdmin(Sonic.OS_VAULT); + OETHVaultValueChecker public osVaultValueChecker = + OETHVaultValueChecker(Sonic.OS_VAULT_VALUE_CHECKER); + + // Interfaces + IWETH9 public ws = IWETH9(Sonic.WS); + + // ARM + ISonicARM public arm = ISonicARM(Sonic.ARM); + + // Staking strategy + SonicStakingStrategy public stakingStrategy = + SonicStakingStrategy(payable(Sonic.STAKING_STRATEGY)); + + function setUp() public { + // Note: to ensure perfect simulation, don't fix block number, it will be automatically set to the latest block + vm.createSelectFork(vm.envString("SONIC_PROVIDER_URL")); + } }