Skip to content

Commit

Permalink
use up exec npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
godzillaba committed Oct 15, 2024
1 parent 0d210c6 commit 51db9a3
Show file tree
Hide file tree
Showing 25 changed files with 28 additions and 237 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"@arbitrum/nitro-contracts": "1.1.1",
"@arbitrum/token-bridge-contracts": "1.0.0-beta.0",
"@gnosis.pm/safe-contracts": "1.3.0",
"@offchainlabs/upgrade-executor": "1.1.0-beta.0",
"@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts-upgradeable": "4.7.3",
"@types/yargs": "^17.0.17",
Expand Down
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
forge-std/=lib/forge-std/src/
solady/=lib/solady/src/
@offchainlabs/upgrade-executor/=node_modules/@offchainlabs/upgrade-executor/
@arbitrum/token-bridge-contracts/=node_modules/@arbitrum/token-bridge-contracts/
@arbitrum/nitro-contracts/=node_modules/@arbitrum/nitro-contracts/
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/
Expand Down
2 changes: 1 addition & 1 deletion src/L1GovernanceFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.16;

import "./L1ArbitrumTimelock.sol";
import "./UpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/UpgradeExecutor.sol";

import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/L2GovernanceFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.16;
import "./L2ArbitrumToken.sol";
import "./L2ArbitrumGovernor.sol";
import "./ArbitrumTimelock.sol";
import "./UpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/UpgradeExecutor.sol";
import "./FixedDelegateErc20Wallet.sol";
import "./ArbitrumDAOConstitution.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
Expand Down
4 changes: 2 additions & 2 deletions src/UpgradeExecRouteBuilder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.16;

import "@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol";
import "./UpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/IUpgradeExecutor.sol";
import "./L1ArbitrumTimelock.sol";
import "./security-council-mgmt/Common.sol";

Expand Down Expand Up @@ -136,7 +136,7 @@ contract UpgradeExecRouteBuilder {
}

bytes memory executorData = abi.encodeWithSelector(
UpgradeExecutor.execute.selector, actionAddresses[i], actionDatas[i]
IUpgradeExecutor.execute.selector, actionAddresses[i], actionDatas[i]
);

// for L1, inbox is set to address(0):
Expand Down
60 changes: 0 additions & 60 deletions src/UpgradeExecutor.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "../../../security-council-mgmt/interfaces/IGnosisSafe.sol";
import "../../address-registries/L2AddressRegistryInterfaces.sol";
import "./SecurityCouncilMgmtUpgradeLib.sol";
import "../../../interfaces/IArbitrumDAOConstitution.sol";
import "../../../interfaces/IUpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/UpgradeExecutor.sol";
import "../../../interfaces/ICoreTimelock.sol";
import "@openzeppelin/contracts/utils/Address.sol";

Expand Down Expand Up @@ -49,7 +49,7 @@ contract GovernanceChainSCMgmtActivationAction {
}

function perform() external {
IUpgradeExecutor upgradeExecutor = IUpgradeExecutor(l2AddressRegistry.coreGov().owner());
UpgradeExecutor upgradeExecutor = UpgradeExecutor(l2AddressRegistry.coreGov().owner());

// swap in new emergency security council
SecurityCouncilMgmtUpgradeLib.replaceEmergencySecurityCouncil({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
pragma solidity 0.8.16;

import "../../../security-council-mgmt/interfaces/IGnosisSafe.sol";
import "../../../interfaces/IUpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/IUpgradeExecutor.sol";
import "../../../interfaces/ICoreTimelock.sol";
import "./SecurityCouncilMgmtUpgradeLib.sol";

contract L1SCMgmtActivationAction {
IGnosisSafe public immutable newEmergencySecurityCouncil;
IGnosisSafe public immutable prevEmergencySecurityCouncil;
uint256 public immutable emergencySecurityCouncilThreshold;
IUpgradeExecutor public immutable l1UpgradeExecutor;
UpgradeExecutor public immutable l1UpgradeExecutor;
ICoreTimelock public immutable l1Timelock;

constructor(
IGnosisSafe _newEmergencySecurityCouncil,
IGnosisSafe _prevEmergencySecurityCouncil,
uint256 _emergencySecurityCouncilThreshold,
IUpgradeExecutor _l1UpgradeExecutor,
UpgradeExecutor _l1UpgradeExecutor,
ICoreTimelock _l1Timelock
) {
newEmergencySecurityCouncil = _newEmergencySecurityCouncil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ contract NonGovernanceChainSCMgmtActivationAction {
IGnosisSafe public immutable newEmergencySecurityCouncil;
IGnosisSafe public immutable prevEmergencySecurityCouncil;
uint256 public immutable emergencySecurityCouncilThreshold;
IUpgradeExecutor public immutable upgradeExecutor;
UpgradeExecutor public immutable upgradeExecutor;

constructor(
IGnosisSafe _newEmergencySecurityCouncil,
IGnosisSafe _prevEmergencySecurityCouncil,
uint256 _emergencySecurityCouncilThreshold,
IUpgradeExecutor _upgradeExecutor
UpgradeExecutor _upgradeExecutor
) {
newEmergencySecurityCouncil = _newEmergencySecurityCouncil;
prevEmergencySecurityCouncil = _prevEmergencySecurityCouncil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
pragma solidity 0.8.16;

import "../../../security-council-mgmt/interfaces/IGnosisSafe.sol";
import "../../../interfaces/IUpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/UpgradeExecutor.sol";

library SecurityCouncilMgmtUpgradeLib {
function replaceEmergencySecurityCouncil(
IGnosisSafe _prevSecurityCouncil,
IGnosisSafe _newSecurityCouncil,
uint256 _threshold,
IUpgradeExecutor _upgradeExecutor
UpgradeExecutor _upgradeExecutor
) internal {
requireSafesEquivalent(_prevSecurityCouncil, _newSecurityCouncil, _threshold);
bytes32 EXECUTOR_ROLE = _upgradeExecutor.EXECUTOR_ROLE();
Expand Down
10 changes: 0 additions & 10 deletions src/interfaces/IUpgradeExecutor.sol

This file was deleted.

2 changes: 1 addition & 1 deletion src/security-council-mgmt/SecurityCouncilManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.16;

import "../ArbitrumTimelock.sol";
import "../UpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/IUpgradeExecutor.sol";
import "../L1ArbitrumTimelock.sol";
import "./SecurityCouncilMgmtUtils.sol";
import "./interfaces/ISecurityCouncilManager.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity 0.8.16;
import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorSettingsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./modules/SecurityCouncilMemberElectionGovernorCountingUpgradeable.sol";
import "../interfaces/ISecurityCouncilMemberElectionGovernor.sol";
import "../interfaces/ISecurityCouncilNomineeElectionGovernor.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import
"@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorSettingsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./../interfaces/ISecurityCouncilManager.sol";
import "../Common.sol";
import "./modules/ArbitrumGovernorVotesQuorumFractionUpgradeable.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity 0.8.16;

import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorSettingsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../interfaces/ISecurityCouncilMemberElectionGovernor.sol";
import "../interfaces/ISecurityCouncilNomineeElectionGovernor.sol";
import "./modules/SecurityCouncilNomineeElectionGovernorCountingUpgradeable.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/L2GovernanceFactory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import "../src/L2GovernanceFactory.sol";
import "../src/L2ArbitrumGovernor.sol";
import "../src/UpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/UpgradeExecutor.sol";
import "../src/ArbitrumTimelock.sol";
import "../src/ArbitrumDAOConstitution.sol";

Expand Down
145 changes: 0 additions & 145 deletions test/UpgradeExecutor.t.sol

This file was deleted.

2 changes: 1 addition & 1 deletion test/gov-actions/AIPNovaFeeRoutingAction.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pragma solidity 0.8.16;
import "forge-std/Test.sol";

import "../../src/gov-action-contracts/AIPs/AIPNovaFeeRoutingAction.sol";
import "../../src/UpgradeExecutor.sol";
import "@offchainlabs/upgrade-executor/src/UpgradeExecutor.sol";

contract AIPNovaFeeRoutingActionTest is Test {
UpgradeExecutor constant upExec = UpgradeExecutor(0x86a02dD71363c440b21F4c0E5B2Ad01Ffe1A7482);
Expand Down
Loading

0 comments on commit 51db9a3

Please sign in to comment.