Skip to content

Commit

Permalink
chore: modularize
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Sep 14, 2024
1 parent 24e588a commit 6394432
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions script/deploy/mainnet/v0.4.3-upgrade_rewardsCoordinator.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,19 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc
if (chainId != 1) {
revert("Chain not supported");
}


// 1. Deploy Rewards Coordinator
deployRewardsCoordinator();

emit log_named_address("New Rewards Coordinator Implementation", address(rewardsCoordinatorImplementation));

// 2. Create upgrade txs via Operations Multisig to Timelock
queueRewardsCoordinatorUpgradeAndOwnerChange();
}

function deployRewardsCoordinator() public {
RewardsCoordinator oldRewardsCoordinator = rewardsCoordinatorImplementation;

// Deploy Rewards Coordinator
vm.startBroadcast();
rewardsCoordinatorImplementation = new RewardsCoordinator(
delegationManager,
Expand All @@ -57,9 +66,9 @@ contract Upgrade_Mainnet_RewardsCoordinator is ExistingDeploymentParser, Timeloc
vm.stopBroadcast();

_sanityCheckImplementations(oldRewardsCoordinator, rewardsCoordinatorImplementation);
}

emit log_named_address("Rewards Coordinator Implementation", address(rewardsCoordinatorImplementation));

function queueRewardsCoordinatorUpgradeAndOwnerChange() public {
// Create Upgrade Txs via Operations Multisig to Timelock to:
// 1. Upgrade RewardsCoordinator
// 2. Set owner of RewardsCoordinator to OperationsMultisig
Expand Down

0 comments on commit 6394432

Please sign in to comment.