Skip to content

Commit

Permalink
set profit max unlock time for strategy deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aazhou1 committed Nov 21, 2024
1 parent c1ed8c6 commit 51e7032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy-sepolia-strategy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
description: 'Required reserve ratio'
required: false
default: '0.01'
profitMaxUnlock:
description: 'Profit max unlock time'
required: false
default: '0'
collateralTokens:
description: 'Collateral tokens comma separated'
required: false
Expand Down Expand Up @@ -76,4 +80,5 @@ jobs:
NEW_REQUIRED_RESERVE_RATIO: ${{ github.event.inputs.requiredReserveRatio }}
COLLATERAL_TOKEN_ADDRESSES: ${{ github.event.inputs.collateralTokens }}
MIN_COLLATERAL_RATIOS: ${{ github.event.inputs.minCollateralRatios }}
PROFIT_MAX_UNLOCK_TIME: ${{ github.event.inputs.profitMaxUnlock }}

4 changes: 4 additions & 0 deletions script/Strategy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ contract DeployStrategy is Script {
address[] memory collateralTokens = stringToAddressArray(vm.envString("COLLATERAL_TOKEN_ADDRESSES"));
uint256[] memory minCollateralRatios = stringToUintArray(vm.envString("MIN_COLLATERAL_RATIOS"));
address governorRoleAddress = vm.envAddress("GOVERNOR_ROLE_ADDRESS");
uint256 profitMaxUnlockTime = vm.envUint("PROFIT_MAX_UNLOCK_TIME");

bool isTest = vm.envBool("IS_TEST");

Expand All @@ -166,6 +167,8 @@ contract DeployStrategy is Script {
console.log("deployed strategy contract to");
console.log(address(strategy));

ITokenizedStrategy(address(strategy)).setProfitMaxUnlockTime(profitMaxUnlockTime);

ITokenizedStrategy(address(strategy)).setPendingManagement(strategyManagement);
console.log("set pending management");
console.log(strategyManagement);
Expand All @@ -179,6 +182,7 @@ contract DeployStrategy is Script {
strategy.setCollateralTokenParams(collateralTokens[i], minCollateralRatios[i]);
}


strategy.setPendingGovernor(governorRoleAddress);
console.log("set pending governor");
console.log(governorRoleAddress);
Expand Down

0 comments on commit 51e7032

Please sign in to comment.