Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
55e52cf
Added first pass of self rotation
yahgwai Sep 27, 2024
1685791
Commented out old rotation test
yahgwai Sep 27, 2024
68a5a52
Added tests and min rotation setter
yahgwai Oct 2, 2024
2a30471
Formatting
yahgwai Oct 2, 2024
30f79eb
Formatted tests
yahgwai Oct 2, 2024
e6e3c80
Updated snapshot
yahgwai Oct 2, 2024
066c5b8
Gas checks
yahgwai Oct 2, 2024
821ea93
Merge from main
yahgwai Oct 3, 2024
5b12e6d
First draft of rotation upgrade action
yahgwai Oct 3, 2024
5c871aa
Added member removal action
yahgwai Oct 3, 2024
cd3608e
Added 712 init to postupgradeinit
yahgwai Oct 3, 2024
956d707
Merge remote-tracking branch 'ArbitrumFoundation/main' into sc-rotation
gzeoneth Oct 3, 2024
5d37f89
chore: update storage and 4bytes
gzeoneth Oct 3, 2024
3dd1d3f
Own 712 update
yahgwai Oct 3, 2024
e6b9e80
Merge branch 'sc-rotation' of https://github.com/ArbitrumFoundation/g…
yahgwai Oct 3, 2024
717b0e7
Snapshot update
yahgwai Oct 3, 2024
bb72192
Updated test.bash to include arb timelock
yahgwai Oct 3, 2024
cb5dae1
Reduced the storage gap
yahgwai Oct 3, 2024
d1ff738
Updated gap storage file
yahgwai Oct 3, 2024
b057634
Updated sigs
yahgwai Oct 3, 2024
162f0a2
Merge branch 'sc-rotation' into sc-rotation-upgrade
yahgwai Oct 3, 2024
7ba9c8a
Rotate members test
yahgwai Oct 4, 2024
d8a3cd4
Formatting
yahgwai Oct 4, 2024
1c58ab9
Added cancel timelock and rotate test
yahgwai Oct 4, 2024
91cc2a8
Updated test
yahgwai Oct 4, 2024
d4e204e
File rename
yahgwai Oct 7, 2024
315f7f2
Removed dao constitution
yahgwai Oct 7, 2024
057638b
Formatting
yahgwai Oct 7, 2024
9fc3dd5
Updates from code review
yahgwai Oct 7, 2024
73593e4
Updated snapshot
yahgwai Oct 7, 2024
bc7bfa8
Merge branch 'sc-rotation' into sc-rotation-upgrade
yahgwai Oct 7, 2024
2728de6
Updated snapshot
yahgwai Oct 7, 2024
003401f
Removed block fork
yahgwai Oct 7, 2024
538b2a2
Removed the roll block forking
yahgwai Oct 7, 2024
34a2b6b
Inlined proxy util
yahgwai Oct 10, 2024
65d95fa
Merge pull request #318 from ArbitrumFoundation/sc-rotation-upgrade
yahgwai Oct 10, 2024
2838626
Updated reference
yahgwai Oct 11, 2024
c7b9a69
Set 712 vars as constants
yahgwai Nov 1, 2024
19f7347
Snapshot update
yahgwai Nov 1, 2024
0de0668
Updated storage doc
yahgwai Nov 1, 2024
2e871d7
Add rotatedTo mapping
Nov 8, 2024
ba71a22
Added tests for member rotation
yahgwai Nov 25, 2024
e8c8311
Formatting
yahgwai Nov 25, 2024
1fe27a7
Check is nominee in when rotating
yahgwai Nov 25, 2024
11080e0
Reduced gap
yahgwai Nov 26, 2024
16ca9a9
Updated storage bash
yahgwai Nov 26, 2024
8b0d3a0
Updated comments
yahgwai Nov 26, 2024
43a469a
Updated gas snapshot and signatures
yahgwai Dec 17, 2024
c61f23c
Storage format change
yahgwai Dec 17, 2024
622562a
Merge remote-tracking branch 'ArbitrumFoundation/main' into sc-rotati…
gzeoneth Dec 18, 2024
1c5e027
Merge remote-tracking branch 'ArbitrumFoundation/main' into sc-rotation
gzeoneth Dec 18, 2024
f365d26
Merge branch 'sc-rotation' into sc-rotation-update
gzeoneth Dec 18, 2024
5baddae
chore: update storage
gzeoneth Dec 18, 2024
4b2abc5
Switched test node runs to release
yahgwai Dec 20, 2024
1d35f86
ci: nitro-testnode-ref
gzeoneth Dec 27, 2024
11d61fd
ci: same fix
gzeoneth Dec 27, 2024
cf10f6e
fix: propmon redeemed ticket race condition
gzeoneth Dec 27, 2024
9defeb4
fix: parse error instead
gzeoneth Dec 27, 2024
f1fa549
perf: reduce the retry time to 5000ms
gzeoneth Dec 27, 2024
0e9304d
chore: remove unnecessary diffs
gzeoneth Dec 27, 2024
519976e
fix: typo
gzeoneth Dec 27, 2024
481d801
Updated rotateTo logic
yahgwai Feb 6, 2025
24a0b52
Updated formatting
yahgwai Feb 6, 2025
1fd6125
Updated to stable foundry
yahgwai Feb 6, 2025
9a5ffc6
Updated gas snapshot
yahgwai Feb 6, 2025
406bebe
poc: mid election change
gzeoneth Feb 6, 2025
7f38f4b
fix: disallow rotate in the change target
gzeoneth Feb 6, 2025
5bdfba3
feat: rotateForFutureMember
gzeoneth Feb 7, 2025
712956e
fix: checks
gzeoneth Feb 7, 2025
6f3a1f1
fix: _checkNotRotatingSrcOrTarget
gzeoneth Feb 7, 2025
2f22b01
Updated function names and added rotatingToNonce
yahgwai Feb 7, 2025
a56fed7
Change name to rotationNonce and use it standard rotation
yahgwai Feb 11, 2025
050a0cf
Test updates for new nonce
yahgwai Feb 12, 2025
94bb769
Test formatting
yahgwai Feb 12, 2025
27ef32a
Test updates
yahgwai Feb 12, 2025
20cf16d
Updated comments
yahgwai Feb 12, 2025
8e41005
Gap update
yahgwai Feb 12, 2025
4bd4692
Gas snapshot
yahgwai Feb 12, 2025
18b137f
Updated sigs
yahgwai Feb 12, 2025
bda0169
Updated remove member action test for new nonce
yahgwai Feb 12, 2025
42f1348
Merge pull request #331 from ArbitrumFoundation/poc-mid-election
yahgwai Feb 12, 2025
57f495c
Inline the digest
yahgwai Feb 13, 2025
5bb2f89
chore: whitelist audit ci
gzeoneth Mar 3, 2025
0d6bf1c
chore: bump dependencies
gzeoneth Mar 3, 2025
25b4777
chore: remove from audit whitelist
gzeoneth Mar 3, 2025
631d3be
fix: foundry pretty is now default and new format
gzeoneth Mar 3, 2025
e6ea921
fix: workaround different ethers version
gzeoneth Mar 3, 2025
3023a3a
Merge pull request #322 from ArbitrumFoundation/sc-rotation-update
gzeoneth Mar 10, 2025
1513bd2
Merge remote-tracking branch 'ArbitrumFoundation/main' into sc-rotation
gzeoneth Mar 10, 2025
e4e6ddf
Merge remote-tracking branch 'ArbitrumFoundation/main' into sc-rotation
gzeoneth Mar 11, 2025
6b1dda7
fix: use new inspect script
gzeoneth Mar 11, 2025
99a007a
chore: update storage
gzeoneth Mar 11, 2025
f2f478f
chore: update 4bytes
gzeoneth Mar 11, 2025
97b97e2
format: forge fmt
gzeoneth Mar 11, 2025
7d13573
fmt: more fmt
gzeoneth Mar 11, 2025
bf20d99
chore: whitelist yarn audit issue
gzeoneth Mar 11, 2025
8231da1
chore: update gas snapshot
gzeoneth Mar 11, 2025
dba2054
chore: new l2AddressRegistry deployment
gzeoneth Mar 13, 2025
207876e
chore: sec council rotate payload
gzeoneth Mar 13, 2025
ea13503
Small SC Rotation Fixes (#335)
godzillaba Mar 19, 2025
975c428
Merge remote-tracking branch 'origin/main' into sc-rotation
gzeoneth Jul 17, 2025
00aa9b5
feat: outgoing members automatically become nominees (#350)
godzillaba Jul 31, 2025
9092fd6
Merge remote-tracking branch 'origin/main' into sc-rotation
gzeoneth Aug 7, 2025
273150a
Merge branch 'sc-rotation' into more-change-to-sc
gzeoneth Aug 7, 2025
8737f43
feat: setCadence (#349)
gzeoneth Aug 12, 2025
049d47b
feat: SecurityCouncilUpgradeAction (#357)
gzeoneth Aug 12, 2025
7c83695
feat: rotateNominee (#358)
gzeoneth Aug 14, 2025
d89b171
Merge pull request #354 from ArbitrumFoundation/more-change-to-sc
gzeoneth Aug 14, 2025
2cd220c
fix: prevent duplicate members
gzeoneth Sep 4, 2025
56d9fa2
feat: _requireNotInOtherCohort
gzeoneth Sep 4, 2025
5a315ba
test: cannot rotate to existing nominee
gzeoneth Sep 4, 2025
f1902f5
chore: update gas snapshot
gzeoneth Sep 4, 2025
36d17e2
fix: check new nominee address excluded
gzeoneth Sep 4, 2025
38c9efd
chore: update gas snapshot for new foundry version
gzeoneth Sep 4, 2025
d2c1533
mark _requireNotInOtherCohort as view and fix comment
godzillaba Sep 4, 2025
d437696
Merge branch 'main' into sc-rotation
gzeoneth May 11, 2026
b085833
fix: prevent duplicate members (#361)
gzeoneth Jul 21, 2026
c0dfc29
Remove nominee bypass
TucksonDev Jul 21, 2026
32ff7e8
Merge branch 'sc-rotation' into sc-rotation-remove-nominee-bypass
TucksonDev Jul 21, 2026
4936cdd
Fix merge
TucksonDev Jul 21, 2026
1450984
Fix merged snapshots
TucksonDev Jul 21, 2026
99df3a5
Update expected election counter and comments
TucksonDev Jul 22, 2026
2b2d605
Fix tests
TucksonDev Jul 22, 2026
6807ab4
Add payload
TucksonDev Jul 24, 2026
3529990
Fix nominee rotation
TucksonDev Jul 24, 2026
1b44cb7
Add new proposal data
TucksonDev Jul 24, 2026
67bf2a4
Fix gas snapshot
TucksonDev Jul 24, 2026
add199d
[SC rotation] Remove nominee bypass and create proposal payload (#380)
gzeoneth Jul 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
374 changes: 196 additions & 178 deletions .gas-snapshot

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ coverage :; forge coverage
gas :; forge test --gas-report
gas-check :; forge snapshot --check --tolerance 1
snapshot :; forge snapshot
test-unit :; forge test -vvv
test-unit :; ARB_RPC_URL=https://arb1.arbitrum.io/rpc forge test -vvv
clean :; forge clean
fmt :; forge fmt
gen-network :; yarn gen:network
Expand Down
2 changes: 1 addition & 1 deletion files/mainnet/deployedContracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"l1ProxyAdmin": "0x5613AF0474EB9c528A34701A5b1662E3C8FA0678",
"l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49",
"l1AddressRegistry": "0xd514C2b3aaBDBfa10800B9C96dc1eB25427520A0",
"l2AddressRegistry":"0x56C4E9Eb6c63aCDD19AeC2b1a00e4f0d7aBda9d3",
"l2AddressRegistry":"0x1dFA102bc097446bb2B836082367991dE24A1c64",
"novaL1AddressRegistry":"0x2F06643fc2CC18585Ae790b546388F0DE4Ec6635"
}
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ via_ir = false
solc_version = '0.8.16'

[profile.sec_council_mgmt]
optimizer_runs = 750
optimizer_runs = 200

[fmt]
number_underscore = 'thousands'
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const solidityProfiles = {
settings: {
optimizer: {
enabled: true,
runs: 750
runs: 200
},
}
}
Expand Down
12 changes: 12 additions & 0 deletions scripts/proposals/sec-council-rotate/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"actionChainIds": [
42161
],
"actionAddresses": [
"0x86E93E21AD108CaE7ADe482C34C230Bfd94D4A8B"
],
"arbSysSendTxToL1Args": {
"l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49",
"calldata": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000008e40c6e3e3ea77546fc470efab6a7eb5b3896023b6a7c80fd8a11ea1920a2710000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd00000000000000000000000086e93e21ad108cae7ade482c34c230bfd94d4a8b00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
8 changes: 8 additions & 0 deletions scripts/proposals/sec-council-rotate/generate.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

yarn gen:proposalData \
--govChainProviderRPC https://arb1.arbitrum.io/rpc \
--actionChainIds 42161 \
--actionAddresses \
0x86E93E21AD108CaE7ADe482C34C230Bfd94D4A8B \
--writeToJsonPath ./scripts/proposals/sec-council-rotate/data.json
12 changes: 12 additions & 0 deletions scripts/proposals/sec-council-upgrade-rotation/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"actionChainIds": [
42161
],
"actionAddresses": [
"0xeF98Fc7A7F08De47Ed01f3F11f07319c22106445"
],
"arbSysSendTxToL1Args": {
"l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49",
"calldata": "0x8f2a0bb000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000d078d01ffb5a3a5eac98137cbe898b2f21c1114069936d04a90b74ee9806e3f5000000000000000000000000000000000000000000000000000000000003f4800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a723c008e76e379c55599d2e4d93879beafda79c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001800000000000000000000000004dbd4fc535ac27206064b68ffcf827b0a60bab3f000000000000000000000000cf57572261c7c2bcf21ffd220ea7d1a27d40a82700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000841cff79cd000000000000000000000000ef98fc7a7f08de47ed01f3f11f07319c2210644500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b147f40c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
}
6 changes: 4 additions & 2 deletions src/gov-action-contracts/AIPs/AIPNovaFeeRoutingAction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ contract AIPNovaFeeRoutingAction {
// upgrade executor should have at least 3 * fullWeight ETH to fund the distributors
// we need each of the reward distributors to have at least fullWeight in balance
// otherwise we may get NoFundsToDistribute() errors
require(address(this).balance >= 3 * fullWeight, "AIPNovaFeeRoutingAction: insufficient balance");
require(
address(this).balance >= 3 * fullWeight, "AIPNovaFeeRoutingAction: insufficient balance"
);
_fundDistributor(novaL1SurplusFeeDistr);
_fundDistributor(novaL2SurplusFeeDistr);
_fundDistributor(novaL2BaseFeeDistr);
Expand Down Expand Up @@ -134,7 +136,7 @@ contract AIPNovaFeeRoutingAction {
}

function _fundDistributor(address recipient) internal {
(bool b, ) = recipient.call{value: fullWeight}("");
(bool b,) = recipient.call{value: fullWeight}("");
require(b, "AIPNovaFeeRoutingAction: funding failed");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "../../address-registries/L2AddressRegistryInterfaces.sol";
import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol";
import
"@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";
import "../../../security-council-mgmt/governors/SecurityCouncilNomineeElectionGovernor.sol";

/// @notice Perform the following upgrade proposed by the Arbitrum Foundation:
/// - Upgrade the sec council manager to allow member rotation and sets min rotation vars
/// - Upgrade the sec council nominee election governor to allow modifying the cadence of election
/// - Adjusting the qualification threshold of the Member Election phase from 0.2% to 0.1%
/// - Updating the ArbitrumDAO Constitution to reflect these changes
contract SecurityCouncilUpgradeAction {
IL2AddressRegistry public immutable l2AddressRegistry;
address public immutable secCouncilManagerImpl;
address public immutable scNomineeElectionGovernorImpl;
uint256 public immutable minRotationPeriod;
address public immutable minRotationPeriodSetter;
uint256 public immutable cadenceInMonths;
bytes32 public immutable newConstitutionHash;

constructor(
IL2AddressRegistry _l2AddressRegistry,
address _secCouncilManagerImpl,
address _scNomineeElectionGovernorImpl,
uint256 _minRotationPeriod,
address _minRotationPeriodSetter,
uint256 _cadenceInMonths,
bytes32 _newConstitutionHash
) {
l2AddressRegistry = _l2AddressRegistry;
secCouncilManagerImpl = _secCouncilManagerImpl;
scNomineeElectionGovernorImpl = _scNomineeElectionGovernorImpl;
minRotationPeriod = _minRotationPeriod;
minRotationPeriodSetter = _minRotationPeriodSetter;
cadenceInMonths = _cadenceInMonths;
newConstitutionHash = _newConstitutionHash;
}

function perform() external {
SecurityCouncilNomineeElectionGovernor scNomineeElectionGovernor =
SecurityCouncilNomineeElectionGovernor(
payable(address(l2AddressRegistry.scNomineeElectionGovernor()))
);
require(
scNomineeElectionGovernor.electionCount() == 6,
"SecurityCouncilUpgradeAction: not expected timing"
);

// Upgrade the sec council manager to allow member rotation and sets min rotation vars
ISecurityCouncilManager secCouncilManager = l2AddressRegistry.securityCouncilManager();
l2AddressRegistry.govProxyAdmin().upgradeAndCall(
TransparentUpgradeableProxy(payable(address(secCouncilManager))),
secCouncilManagerImpl,
abi.encodeCall(
ISecurityCouncilManager(secCouncilManagerImpl).postUpgradeInit,
(minRotationPeriod, minRotationPeriodSetter)
)
);
require(
minRotationPeriod == secCouncilManager.minRotationPeriod(),
"SecurityCouncilUpgradeAction: Min rotation period not set"
);
require(
IAccessControlUpgradeable(address(secCouncilManager)).hasRole(
secCouncilManager.MIN_ROTATION_PERIOD_SETTER_ROLE(), minRotationPeriodSetter
),
"SecurityCouncilUpgradeAction: Min rotation period setter not set"
);

// Upgrade the sec council nominee election governor to allow modifying the cadence of election
l2AddressRegistry.govProxyAdmin().upgradeAndCall(
TransparentUpgradeableProxy(payable(address(scNomineeElectionGovernor))),
scNomineeElectionGovernorImpl,
abi.encodeCall(scNomineeElectionGovernor.postUpgradeInit, ())
);

scNomineeElectionGovernor.relay(
address(scNomineeElectionGovernor),
0,
abi.encodeCall(scNomineeElectionGovernor.setCadence, (cadenceInMonths))
);
require(
scNomineeElectionGovernor.cadenceInMonths() == cadenceInMonths,
"SecurityCouncilUpgradeAction: Cadence not set"
);

// Adjusting the qualification threshold of the Member Election phase from 0.2% to 0.1%
scNomineeElectionGovernor.relay(
address(scNomineeElectionGovernor),
0,
abi.encodeCall(scNomineeElectionGovernor.updateQuorumNumerator, (10))
);
require(
scNomineeElectionGovernor.quorumNumerator() == 10,
"SecurityCouncilUpgradeAction: Quorum numerator not set"
);

// Updating the ArbitrumDAO Constitution to reflect these changes
IArbitrumDAOConstitution arbitrumDaoConstitution =
l2AddressRegistry.arbitrumDAOConstitution();
arbitrumDaoConstitution.setConstitutionHash(newConstitutionHash);
require(
arbitrumDaoConstitution.constitutionHash() == newConstitutionHash,
"SecurityCouncilUpgradeAction: new constitution hash not set"
);
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "./L2AddressRegistryInterfaces.sol";

contract L2AddressRegistry is IL2AddressRegistry {
IL2ArbitrumGoverner public immutable coreGov;
IL2ArbitrumGoverner public immutable treasuryGov;
IFixedDelegateErc20Wallet public immutable treasuryWallet;
IArbitrumDAOConstitution public immutable arbitrumDAOConstitution;
ProxyAdmin public immutable govProxyAdmin;
ISecurityCouncilNomineeElectionGovernor public immutable scNomineeElectionGovernor;

constructor(
IL2ArbitrumGoverner _coreGov,
IL2ArbitrumGoverner _treasuryGov,
IFixedDelegateErc20Wallet _treasuryWallet,
IArbitrumDAOConstitution _arbitrumDAOConstitution
IArbitrumDAOConstitution _arbitrumDAOConstitution,
ProxyAdmin _govProxyAdmin,
ISecurityCouncilNomineeElectionGovernor _scNomineeElectionGovernor
) {
require(
_treasuryWallet.owner() == _treasuryGov.timelock(),
Expand All @@ -27,6 +32,13 @@ contract L2AddressRegistry is IL2AddressRegistry {
treasuryGov = _treasuryGov;
treasuryWallet = _treasuryWallet;
arbitrumDAOConstitution = _arbitrumDAOConstitution;
require(
_govProxyAdmin.getProxyAdmin(TransparentUpgradeableProxy(payable(address(_coreGov))))
== address(_govProxyAdmin),
"GovProxyAdmin must be proxy admin of the core governor"
);
govProxyAdmin = _govProxyAdmin;
scNomineeElectionGovernor = _scNomineeElectionGovernor;
}

function coreGovTimelock() external view returns (IArbitrumTimelock) {
Expand All @@ -40,4 +52,16 @@ contract L2AddressRegistry is IL2AddressRegistry {
function l2ArbitrumToken() external view returns (IL2ArbitrumToken) {
return IL2ArbitrumGoverner(address(coreGov)).token();
}

function scMemberElectionGovernor()
external
view
returns (ISecurityCouncilMemberElectionGovernor)
{
return scNomineeElectionGovernor.securityCouncilMemberElectionGovernor();
}

function securityCouncilManager() external view returns (ISecurityCouncilManager) {
return scNomineeElectionGovernor.securityCouncilManager();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
pragma solidity 0.8.16;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "../../interfaces/IArbitrumTimelock.sol";
import "../../interfaces/IFixedDelegateErc20Wallet.sol";
import "../../interfaces/IL2ArbitrumToken.sol";
import "../../interfaces/IL2ArbitrumGovernor.sol";
import "../../interfaces/IArbitrumDAOConstitution.sol";
import "../../security-council-mgmt/interfaces/ISecurityCouncilManager.sol";
import "../../security-council-mgmt/interfaces/ISecurityCouncilNomineeElectionGovernor.sol";
import "../../security-council-mgmt/interfaces/ISecurityCouncilMemberElectionGovernor.sol";

interface ICoreGovTimelockGetter {
function coreGovTimelock() external view returns (IArbitrumTimelock);
Expand Down Expand Up @@ -36,12 +40,30 @@ interface IArbitrumDAOConstitutionGetter {
function arbitrumDAOConstitution() external view returns (IArbitrumDAOConstitution);
}

interface IGovProxyAdminGetter {
function govProxyAdmin() external view returns (ProxyAdmin);
}

interface ISecurityCouncilGetters {
function securityCouncilManager() external view returns (ISecurityCouncilManager);
function scNomineeElectionGovernor()
external
view
returns (ISecurityCouncilNomineeElectionGovernor);
function scMemberElectionGovernor()
external
view
returns (ISecurityCouncilMemberElectionGovernor);
}

interface IL2AddressRegistry is
ICoreGovGetter,
ICoreGovTimelockGetter,
ITreasuryGovTimelockGetter,
IDaoTreasuryGetter,
ITreasuryGovGetter,
IL2ArbitrumTokenGetter,
IArbitrumDAOConstitutionGetter
IArbitrumDAOConstitutionGetter,
IGovProxyAdminGetter,
ISecurityCouncilGetters
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.16;

import "../address-registries/L2AddressRegistry.sol";
import "./CancelTimelockOperation.sol";

contract CancelTimelockAndRemoveMemberAction {
IL2AddressRegistry public immutable l2AddressRegistry;

constructor(IL2AddressRegistry _l2AddressRegistry) {
l2AddressRegistry = _l2AddressRegistry;
}

function perform(address memberToRemove, bytes32 operationId) public {
// first remove the council member
ISecurityCouncilManager scm = l2AddressRegistry.securityCouncilManager();
IAccessControlUpgradeable(address(scm)).grantRole(scm.MEMBER_REMOVER_ROLE(), address(this));
scm.removeMember(memberToRemove);
IAccessControlUpgradeable(address(scm)).revokeRole(scm.MEMBER_REMOVER_ROLE(), address(this));

// then cancel the rotation operation in the timelock
CancelTimelockOperation.cancel(l2AddressRegistry.coreGov(), operationId);
}
}
1 change: 1 addition & 0 deletions src/interfaces/IArbitrumTimelock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ interface IArbitrumTimelock {
) external;
function getMinDelay() external view returns (uint256 duration);
function updateDelay(uint256 newDelay) external;
function isOperation(bytes32 id) external view returns (bool registered);
}
Loading
Loading