Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yahgwai committed Oct 7, 2024
1 parent 315f7f2 commit 057638b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ contract RotateMembersUpgradeAction {
address public immutable secCouncilManagerImpl;
uint256 public immutable minRotationPeriod;
address public immutable minRotationPeriodSetter;

constructor(IL2AddressRegistry _l2AddressRegistry, address _secCouncilManagerImpl, uint256 _minRotationPeriod, address _minRotationPeriodSetter) {

constructor(
IL2AddressRegistry _l2AddressRegistry,
address _secCouncilManagerImpl,
uint256 _minRotationPeriod,
address _minRotationPeriodSetter
) {
l2AddressRegistry = _l2AddressRegistry;
secCouncilManagerImpl = _secCouncilManagerImpl;
minRotationPeriod = _minRotationPeriod;
Expand All @@ -24,10 +29,21 @@ contract RotateMembersUpgradeAction {
l2AddressRegistry.govProxyAdmin().upgradeAndCall(
TransparentUpgradeableProxy(payable(address(secCouncilManager))),
secCouncilManagerImpl,
abi.encodeCall(ISecurityCouncilManager(secCouncilManagerImpl).postUpgradeInit, (minRotationPeriod, minRotationPeriodSetter))
abi.encodeCall(
ISecurityCouncilManager(secCouncilManagerImpl).postUpgradeInit,
(minRotationPeriod, minRotationPeriodSetter)
)
);

require(minRotationPeriod == secCouncilManager.minRotationPeriod(), "RotateMembersUpgradeAction: Min rotation period not set");
require(IAccessControlUpgradeable(address(secCouncilManager)).hasRole(secCouncilManager.MIN_ROTATION_PERIOD_SETTER_ROLE(), minRotationPeriodSetter), "RotateMembersUpgradeAction: Min rotation period setter not set");
require(
minRotationPeriod == secCouncilManager.minRotationPeriod(),
"RotateMembersUpgradeAction: Min rotation period not set"
);
require(
IAccessControlUpgradeable(address(secCouncilManager)).hasRole(
secCouncilManager.MIN_ROTATION_PERIOD_SETTER_ROLE(), minRotationPeriodSetter
),
"RotateMembersUpgradeAction: Min rotation period setter not set"
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ contract CancelTimelockAndRemoveMemberOAction {
// then cancel the rotation operation in the timelock
CancelTimelockOperation.cancel(l2AddressRegistry.coreGov(), operationId);
}
}
}

0 comments on commit 057638b

Please sign in to comment.