From d19f2bfd591668e50440ab85baa53b55f1aeef49 Mon Sep 17 00:00:00 2001 From: Gautham Anant <32277907+gpsanant@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:26:56 -0800 Subject: [PATCH] Deploy strategies 2024 1 (#385) * feat: new mainnet strat config * feat: deployed new strats * feat: deployed goerli strats * fix: lsETH -> LsETH --- .../strategy_deployment_goerli_2024_1_10.json | 10 +++++++++ .../strategy_deployment_mainnet_2024_1_5.json | 11 ++++++++++ script/strategy/DeployStrategies.s.sol | 3 +-- .../strategy_deployment_goerli_2024_1.json | 16 ++++++++++++++ .../strategy_deployment_mainnet_2024_1.json | 22 +++++++++++++++++++ script/utils/ExistingDeploymentParser.sol | 9 +++++--- 6 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 script/output/strategy/strategy_deployment_goerli_2024_1_10.json create mode 100644 script/output/strategy/strategy_deployment_mainnet_2024_1_5.json create mode 100644 script/strategy/configs/strategy_deployment_goerli_2024_1.json create mode 100644 script/strategy/configs/strategy_deployment_mainnet_2024_1.json diff --git a/script/output/strategy/strategy_deployment_goerli_2024_1_10.json b/script/output/strategy/strategy_deployment_goerli_2024_1_10.json new file mode 100644 index 0000000000..1add42a1ba --- /dev/null +++ b/script/output/strategy/strategy_deployment_goerli_2024_1_10.json @@ -0,0 +1,10 @@ +{ + "chainInfo": { + "chainId": 5, + "deploymentBlock": 10352822 + }, + "strategies": { + "LsETH": "0xa9DC3c93ae59B8d26AF17Ae63c96Be78793537A9", + "mETH": "0x1fB89fa0Eb825Ee89b12e00947c092A8F20f2242" + } +} \ No newline at end of file diff --git a/script/output/strategy/strategy_deployment_mainnet_2024_1_5.json b/script/output/strategy/strategy_deployment_mainnet_2024_1_5.json new file mode 100644 index 0000000000..88881abfec --- /dev/null +++ b/script/output/strategy/strategy_deployment_mainnet_2024_1_5.json @@ -0,0 +1,11 @@ +{ + "chainInfo": { + "chainId": 1, + "deploymentBlock": 18943374 + }, + "strategies": { + "lsETH": "0xAe60d8180437b5C34bB956822ac2710972584473", + "mETH": "0x298aFB19A105D59E74658C4C334Ff360BadE6dd2", + "sfrxETH": "0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6" + } +} \ No newline at end of file diff --git a/script/strategy/DeployStrategies.s.sol b/script/strategy/DeployStrategies.s.sol index 547dd78bfa..ede5d12078 100644 --- a/script/strategy/DeployStrategies.s.sol +++ b/script/strategy/DeployStrategies.s.sol @@ -27,10 +27,9 @@ contract DeployStrategies is ExistingDeploymentParser { StrategyBaseTVLLimits[] public deployedStrategyArray; string public configPath = string(bytes("script/strategy/configs/config.json")); - string public deploymentPath = string(bytes("script/output/M1_deployment_mainnet_2023_6_9.json")); function run() external { - _parseDeployedContracts(deploymentPath); + _parseDeployedContracts(); // READ JSON CONFIG/DEPLOYMENT FILE string memory config_data = vm.readFile(configPath); diff --git a/script/strategy/configs/strategy_deployment_goerli_2024_1.json b/script/strategy/configs/strategy_deployment_goerli_2024_1.json new file mode 100644 index 0000000000..c7b5521a35 --- /dev/null +++ b/script/strategy/configs/strategy_deployment_goerli_2024_1.json @@ -0,0 +1,16 @@ +{ + "strategies": [ + { + "token_address": "0x3ecCAdA3e11c1Cc3e9B5a53176A67cc3ABDD3E46", + "token_symbol": "lsETH", + "max_per_deposit": 115792089237316195423570985008687907853269984665640564039457584007913129639935, + "max_deposits": 115792089237316195423570985008687907853269984665640564039457584007913129639935 + }, + { + "token_address": "0x8E412276c6da0eD07179C23B19A62e8CD44D2552", + "token_symbol": "mETH", + "max_per_deposit": 115792089237316195423570985008687907853269984665640564039457584007913129639935, + "max_deposits": 115792089237316195423570985008687907853269984665640564039457584007913129639935 + } + ] +} diff --git a/script/strategy/configs/strategy_deployment_mainnet_2024_1.json b/script/strategy/configs/strategy_deployment_mainnet_2024_1.json new file mode 100644 index 0000000000..500cee23c4 --- /dev/null +++ b/script/strategy/configs/strategy_deployment_mainnet_2024_1.json @@ -0,0 +1,22 @@ +{ + "strategies": [ + { + "token_address": "0xac3E018457B222d93114458476f3E3416Abbe38F", + "token_symbol": "sfrxETH", + "max_per_deposit": 200000000000000000000000, + "max_deposits": 200000000000000000000000 + }, + { + "token_address": "0x8c1bed5b9a0928467c9b1341da1d7bd5e10b6549", + "token_symbol": "LsETH", + "max_per_deposit": 200000000000000000000000, + "max_deposits": 200000000000000000000000 + }, + { + "token_address": "0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa", + "token_symbol": "mETH", + "max_per_deposit": 200000000000000000000000, + "max_deposits": 200000000000000000000000 + } + ] +} diff --git a/script/utils/ExistingDeploymentParser.sol b/script/utils/ExistingDeploymentParser.sol index 7946e02d7f..253f517131 100644 --- a/script/utils/ExistingDeploymentParser.sol +++ b/script/utils/ExistingDeploymentParser.sol @@ -47,13 +47,14 @@ contract ExistingDeploymentParser is Script, Test { address operationsMultisig; string chainName; + string existingDeploymentInfoPath; - function _parseDeployedContracts(string memory existingDeploymentInfoPath) internal { + function _parseDeployedContracts() internal { // read and log the chainID uint256 currentChainId = block.chainid; emit log_named_uint("You are parsing on ChainID", currentChainId); - _setCurrentChainName(); + _setCurrentChainInfo(); // READ JSON CONFIG DATA string memory existingDeploymentData = vm.readFile(existingDeploymentInfoPath); @@ -100,12 +101,14 @@ contract ExistingDeploymentParser is Script, Test { */ } - function _setCurrentChainName() internal returns (string memory) { + function _setCurrentChainInfo() internal returns (string memory) { uint256 currentChainId = block.chainid; if (currentChainId == 1) { chainName = "mainnet"; + existingDeploymentInfoPath = "script/output/M1_deployment_mainnet_2023_6_9.json"; } else if (currentChainId == 5) { chainName = "goerli"; + existingDeploymentInfoPath = "script/output/M1_deployment_goerli_2023_3_23.json"; } else { chainName = "unknown"; }