Skip to content

Commit

Permalink
Deploy strategies 2024 1 (Layr-Labs#385)
Browse files Browse the repository at this point in the history
* feat: new mainnet strat config

* feat: deployed new strats

* feat: deployed goerli strats

* fix: lsETH -> LsETH
  • Loading branch information
gpsanant authored Jan 11, 2024
1 parent 3a013db commit d19f2bf
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 5 deletions.
10 changes: 10 additions & 0 deletions script/output/strategy/strategy_deployment_goerli_2024_1_10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"chainInfo": {
"chainId": 5,
"deploymentBlock": 10352822
},
"strategies": {
"LsETH": "0xa9DC3c93ae59B8d26AF17Ae63c96Be78793537A9",
"mETH": "0x1fB89fa0Eb825Ee89b12e00947c092A8F20f2242"
}
}
11 changes: 11 additions & 0 deletions script/output/strategy/strategy_deployment_mainnet_2024_1_5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"chainInfo": {
"chainId": 1,
"deploymentBlock": 18943374
},
"strategies": {
"lsETH": "0xAe60d8180437b5C34bB956822ac2710972584473",
"mETH": "0x298aFB19A105D59E74658C4C334Ff360BadE6dd2",
"sfrxETH": "0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6"
}
}
3 changes: 1 addition & 2 deletions script/strategy/DeployStrategies.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 16 additions & 0 deletions script/strategy/configs/strategy_deployment_goerli_2024_1.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
22 changes: 22 additions & 0 deletions script/strategy/configs/strategy_deployment_mainnet_2024_1.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
9 changes: 6 additions & 3 deletions script/utils/ExistingDeploymentParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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";
}
Expand Down

0 comments on commit d19f2bf

Please sign in to comment.