From 6af99301530fdbbb70a50b028af4bcefa73a52f0 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:53:10 -0600 Subject: [PATCH] update constitution hash --- src/gov-action-contracts/AIPs/AIPXAction.sol | 13 ++++++++++++- test/gov-actions/AIPXAction.t.sol | 12 +++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/gov-action-contracts/AIPs/AIPXAction.sol b/src/gov-action-contracts/AIPs/AIPXAction.sol index da3dae61..e098de48 100644 --- a/src/gov-action-contracts/AIPs/AIPXAction.sol +++ b/src/gov-action-contracts/AIPs/AIPXAction.sol @@ -9,6 +9,7 @@ import { SecurityCouncilNomineeElectionGovernor, GovernorSettingsUpgradeable } from "../../security-council-mgmt/governors/SecurityCouncilNomineeElectionGovernor.sol"; +import {IArbitrumDAOConstitution} from "../../interfaces/IArbitrumDAOConstitution.sol"; contract AIPXAction { address public immutable proxyAdmin; @@ -16,16 +17,23 @@ contract AIPXAction { address public immutable newNomineeElectionGovernorImplementation; uint256 public immutable votingDelay; + address public immutable constitution; + bytes32 public immutable newConstitutionHash; + constructor( address _proxyAdmin, address _nomineeElectionGovernorProxy, address _newNomineeElectionGovernorImplementation, - uint256 _votingDelay + uint256 _votingDelay, + address _constitution, + bytes32 _newConstitutionHash ) { proxyAdmin = _proxyAdmin; nomineeElectionGovernorProxy = _nomineeElectionGovernorProxy; newNomineeElectionGovernorImplementation = _newNomineeElectionGovernorImplementation; votingDelay = _votingDelay; + constitution = _constitution; + newConstitutionHash = _newConstitutionHash; } function perform() external { @@ -41,5 +49,8 @@ contract AIPXAction { 0, abi.encodeWithSelector(GovernorSettingsUpgradeable.setVotingDelay.selector, votingDelay) ); + + // set the new constitution hash + IArbitrumDAOConstitution(constitution).setConstitutionHash(newConstitutionHash); } } diff --git a/test/gov-actions/AIPXAction.t.sol b/test/gov-actions/AIPXAction.t.sol index 93edb034..39837c35 100644 --- a/test/gov-actions/AIPXAction.t.sol +++ b/test/gov-actions/AIPXAction.t.sol @@ -12,6 +12,8 @@ contract AIPXActionTest is Test { ProxyAdmin proxyAdmin = ProxyAdmin(0xdb216562328215E010F819B5aBe947bad4ca961e); UpgradeExecutor arbOneUe = UpgradeExecutor(0xCF57572261c7c2BCF21ffD220ea7d1a27D40A827); address council = 0x423552c0F05baCCac5Bfa91C6dCF1dc53a0A1641; + IArbitrumDAOConstitution constitution = IArbitrumDAOConstitution(0x1D62fFeB72e4c360CcBbacf7c965153b00260417); + bytes32 newConstitutionHash = 0x0101010101010101010101010101010101010101010101010101010101010101; address newImplementation = address(new SecurityCouncilNomineeElectionGovernor()); uint256 votingDelay = 7 days; @@ -19,7 +21,9 @@ contract AIPXActionTest is Test { address(proxyAdmin), address(gov), newImplementation, - votingDelay + votingDelay, + address(constitution), + newConstitutionHash ); function testAction() external { @@ -47,6 +51,12 @@ contract AIPXActionTest is Test { newImplementation, "implementation not set" ); + + assertEq( + constitution.constitutionHash(), + newConstitutionHash, + "constitution hash not set" + ); } function _getImplementation() internal view returns (address) {