Skip to content

Commit

Permalink
set governor to factory and set manager to input
Browse files Browse the repository at this point in the history
  • Loading branch information
aazhou1 committed Nov 18, 2024
1 parent eb0b299 commit 6b19639
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy-sepolia-strategy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
description: 'Yearn strategy name'
required: true
default: '0x'
strategyManagementAddress:
description: 'Strategy management address'
required: true
default: '0x'
discountRateMarkup:
description: 'Discount rate markup'
required: false
Expand Down Expand Up @@ -60,6 +64,6 @@ jobs:
ADMIN_ADDRESS: ${{ vars.ADMIN_ADDRESS }}
DEVOPS_ADDRESS: ${{ vars.DEVOPS_ADDRESS }}
GOVERNOR_ROLE_ADDRESS: ${{ vars.GOVERNANCE_FACTORY }}
STRATEGY_MANAGEMENT_ADDRESS: ${{ vars.GOVERNANCE_FACTORY }}
STRATEGY_MANAGEMENT_ADDRESS: ${{ github.events.strategyManagementAddress }}
NEW_REQUIRED_RESERVE_RATIO: ${{ github.event.inputs.requiredReserveRatio }}

3 changes: 0 additions & 3 deletions script/DeployGovernance.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ contract DeployGovernance is Script {
address governor = vm.envAddress("GOVERNOR");
uint256 saltNonce = block.number;

Strategy strategyContract = Strategy(strategy);
strategyContract.setPendingGovernor(factory);

factory.deploySafe(proposer, strategy, governor, saltNonce);

vm.stopBroadcast();
Expand Down
8 changes: 3 additions & 5 deletions script/Strategy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,11 @@ contract DeployStrategy is Script {
// Retrieve environment variables
string memory name = vm.envString("STRATEGY_NAME");
address strategyManagement = vm.envAddress("STRATEGY_MANAGEMENT_ADDRESS");
address governorRoleAddress = vm.envAddress("GOVERNOR_ROLE_ADDRESS");
bool isTest = vm.envBool("IS_TEST");


TermVaultEventEmitter eventEmitter = _deployEventEmitter();

address deployer = vm.addr(governorDeployerPK);

Strategy.StrategyParams memory params = buildStrategyParams(address(eventEmitter), deployer);

Strategy strategy = new Strategy(
Expand All @@ -168,12 +165,13 @@ contract DeployStrategy is Script {
vm.stopBroadcast();
}

function buildStrategyParams(address eventEmitter, address deployer) internal returns(Strategy.StrategyParams memory) {
function buildStrategyParams(address eventEmitter) internal returns(Strategy.StrategyParams memory) {
address asset = vm.envAddress("ASSET_ADDRESS");
address yearnVaultAddress = vm.envAddress("YEARN_VAULT_ADDRESS");
address discountRateAdapterAddress = vm.envAddress("DISCOUNT_RATE_ADAPTER_ADDRESS");
address termController = vm.envAddress("TERM_CONTROLLER_ADDRESS");
uint256 discountRateMarkup = vm.envUint("DISCOUNT_RATE_MARKUP");
address governorRoleAddress = vm.envAddress("GOVERNOR_ROLE_ADDRESS");
uint256 timeToMaturityThreshold = vm.envUint("TIME_TO_MATURITY_THRESHOLD");
uint256 repoTokenConcentrationLimit = vm.envUint("REPOTOKEN_CONCENTRATION_LIMIT");
uint256 newRequiredReserveRatio = vm.envUint("NEW_REQUIRED_RESERVE_RATIO");
Expand All @@ -185,7 +183,7 @@ contract DeployStrategy is Script {
yearnVaultAddress,
discountRateAdapterAddress,
address(eventEmitter),
deployer,
governorRoleAddress,
termController,
repoTokenConcentrationLimit,
timeToMaturityThreshold,
Expand Down

0 comments on commit 6b19639

Please sign in to comment.