Skip to content

Commit

Permalink
governance input removed from deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
aazhou1 committed Nov 18, 2024
1 parent ca32eaf commit f5bea30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-sepolia-strategy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
env:
RPC_URL: ${{ secrets.RPC_URL }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
GOVERNOR_DEPLOYER_KEY: ${{ secrets.GOVERNANCE_DEPLOYER_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ASSET_ADDRESS: ${{ github.event.inputs.asset }}
YEARN_VAULT_ADDRESS: ${{ vars.YEARN_VAULT_ADDRESS }}
Expand Down
4 changes: 4 additions & 0 deletions script/DeployGovernance.s.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "forge-std/Script.sol";
import "../src/Strategy.sol";

interface TermVaultGovernanceFactory {
function deploySafe(
Expand All @@ -25,6 +26,9 @@ contract DeployGovernance is Script {
address governor = vm.envAddress("GOVERNOR");
uint256 saltNonce = block.number;

Strategy strategy = Strategy(strategy);
strategy.setPendingGovernor(governor);

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

vm.stopBroadcast();
Expand Down
5 changes: 2 additions & 3 deletions script/Strategy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ contract DeployStrategy is Script {

function run() external {
uint256 deployerPK = vm.envUint("PRIVATE_KEY");
uint256 governorDeployerPK = vm.envUint("GOVERNOR_DEPLOYER_KEY");

// Set up the RPC URL (optional if you're using the default foundry config)
string memory rpcUrl = vm.envString("RPC_URL");
Expand All @@ -143,7 +144,7 @@ contract DeployStrategy is Script {

TermVaultEventEmitter eventEmitter = _deployEventEmitter();

address deployer = vm.addr(deployerPK);
address deployer = vm.addr(governorDeployerPK);

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

Expand All @@ -159,8 +160,6 @@ contract DeployStrategy is Script {
console.log("set pending management");
console.log(strategyManagement);

strategy.setPendingGovernor(governorRoleAddress);

if (isTest) {
eventEmitter.pairVaultContract(address(strategy));
console.log("paired strategy contract with event emitter");
Expand Down

0 comments on commit f5bea30

Please sign in to comment.