Skip to content

Commit

Permalink
Merge pull request #170 from ArbitrumFoundation/arbos-upgrade-actions
Browse files Browse the repository at this point in the history
upgrade arbos action contracts
  • Loading branch information
DZGoldman authored Jan 11, 2024
2 parents 0805791 + b7be9da commit c454713
Show file tree
Hide file tree
Showing 27 changed files with 425 additions and 36 deletions.
16 changes: 8 additions & 8 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ L1ArbitrumTokenTest:testInitZeroNovaGateway() (gas: 3177301)
L1ArbitrumTokenTest:testInitZeroNovaRouter() (gas: 3177235)
L1ArbitrumTokenTest:testRegisterTokenOnL2() (gas: 4568612)
L1ArbitrumTokenTest:testRegisterTokenOnL2NotEnoughVal() (gas: 4425799)
L1GovernanceFactoryTest:testL1GovernanceFactory() (gas: 10771117)
L1GovernanceFactoryTest:testL1GovernanceFactory() (gas: 10771109)
L1GovernanceFactoryTest:testSetMinDelay() (gas: 10746003)
L1GovernanceFactoryTest:testSetMinDelayRevertsForCoreAddress() (gas: 10798958)
L2AddressRegistryTest:testAddressRegistryAddress() (gas: 54658)
Expand Down Expand Up @@ -98,11 +98,11 @@ L2SecurityCouncilMgmtFactoryTest:testNomineeElectionGovDeployment() (gas: 303673
L2SecurityCouncilMgmtFactoryTest:testOnlyOwnerCanDeploy() (gas: 25498765)
L2SecurityCouncilMgmtFactoryTest:testRemovalGovDeployment() (gas: 30365353)
L2SecurityCouncilMgmtFactoryTest:testSecurityCouncilManagerDeployment() (gas: 30384446)
OutboxActionsTest:testAddOutbxesAction() (gas: 651591)
OutboxActionsTest:testCantAddEOA() (gas: 969161)
OutboxActionsTest:testCantReAddOutbox() (gas: 974559)
OutboxActionsTest:testRemoveAllOutboxes() (gas: 693238)
OutboxActionsTest:testRemoveOutboxes() (gas: 854205)
OutboxActionsTest:testAddOutbxesAction() (gas: 651420)
OutboxActionsTest:testCantAddEOA() (gas: 968990)
OutboxActionsTest:testCantReAddOutbox() (gas: 974388)
OutboxActionsTest:testRemoveAllOutboxes() (gas: 692972)
OutboxActionsTest:testRemoveOutboxes() (gas: 853926)
ProxyUpgradeAndCallActionTest:testUpgrade() (gas: 137095)
ProxyUpgradeAndCallActionTest:testUpgradeAndCall() (gas: 143042)
SecurityCouncilManagerTest:testAddMemberAffordances() (gas: 249651)
Expand Down Expand Up @@ -142,7 +142,7 @@ SecurityCouncilMemberElectionGovernorTest:testOnlyNomineeElectionGovernorCanProp
SecurityCouncilMemberElectionGovernorTest:testProperInitialization() (gas: 49388)
SecurityCouncilMemberElectionGovernorTest:testProposeReverts() (gas: 32916)
SecurityCouncilMemberElectionGovernorTest:testRelay() (gas: 42229)
SecurityCouncilMemberElectionGovernorTest:testSelectTopNominees(uint256) (runs: 256, μ: 340004, ~: 339432)
SecurityCouncilMemberElectionGovernorTest:testSelectTopNominees(uint256) (runs: 256, μ: 339959, ~: 339349)
SecurityCouncilMemberElectionGovernorTest:testSelectTopNomineesFails() (gas: 273335)
SecurityCouncilMemberElectionGovernorTest:testSetFullWeightDuration() (gas: 34951)
SecurityCouncilMemberElectionGovernorTest:testVotesToWeight() (gas: 152898)
Expand Down Expand Up @@ -191,7 +191,7 @@ SecurityCouncilNomineeElectionGovernorTest:testProperInitialization() (gas: 7809
SecurityCouncilNomineeElectionGovernorTest:testProposeFails() (gas: 19744)
SecurityCouncilNomineeElectionGovernorTest:testRelay() (gas: 42365)
SecurityCouncilNomineeElectionGovernorTest:testSetNomineeVetter() (gas: 40019)
SequencerActionsTest:testAddAndRemoveSequencer() (gas: 483356)
SequencerActionsTest:testAddAndRemoveSequencer() (gas: 483444)
SequencerActionsTest:testCantAddZeroAddress() (gas: 235614)
SetInitialGovParamsActionTest:testL1() (gas: 259904)
SetInitialGovParamsActionTest:testL2() (gas: 688888)
Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion files/mainnet/deployedContracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"l1ProxyAdmin": "0x5613AF0474EB9c528A34701A5b1662E3C8FA0678",
"l1Timelock": "0xE6841D92B0C345144506576eC13ECf5103aC7f49",
"l1AddressRegistry": "0xd514C2b3aaBDBfa10800B9C96dc1eB25427520A0",
"l2AddressRegistry":"0x56C4E9Eb6c63aCDD19AeC2b1a00e4f0d7aBda9d3"
"l2AddressRegistry":"0x56C4E9Eb6c63aCDD19AeC2b1a00e4f0d7aBda9d3",
"novaL1AddressRegistry":"0x2F06643fc2CC18585Ae790b546388F0DE4Ec6635"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"typescript": "^4.8.4"
},
"dependencies": {
"@arbitrum/nitro-contracts": "1.0.1",
"@arbitrum/nitro-contracts": "1.0.3-beta.0",
"@arbitrum/token-bridge-contracts": "1.0.0-beta.0",
"@gnosis.pm/safe-contracts": "1.3.0",
"@openzeppelin/contracts": "4.7.3",
Expand Down
52 changes: 52 additions & 0 deletions scripts/deployNovaAddressRegistry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Wallet } from "@ethersproject/wallet";
import { JsonRpcProvider } from "@ethersproject/providers";
import { L1AddressRegistry__factory } from "../typechain-types";

import { ContractVerifier } from "./contractVerifier";
import dotenv from "dotenv";
import { utils } from "ethers";
const abi = utils.defaultAbiCoder;

dotenv.config();

const ETH_URL = process.env.ETH_URL;
const ETH_KEY = process.env.ETH_KEY;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;

if (!ETH_URL) throw new Error("ETH_URL required");
if (!ETH_KEY) throw new Error("ETH_KEY required");
if (!ETHERSCAN_API_KEY) throw new Error("ETHERSCAN_API_KEY required");

const main = async () => {
const l1Provider = new JsonRpcProvider(ETH_URL);
const signer = new Wallet(ETH_KEY, l1Provider);

const l1Verifier = new ContractVerifier(1, ETHERSCAN_API_KEY, {});

const NOVA_INBOX = "0xc4448b71118c9071Bcb9734A0EAc55D18A153949";
const L1_GOV_TIMELOCK = "0xE6841D92B0C345144506576eC13ECf5103aC7f49";
const NOVA_L1_CUSTOM_GATEWAY = "0x23122da8C581AA7E0d07A36Ff1f16F799650232f";
const NOVA_L1_GATEWAY_ROUTER = "0xC840838Bc438d73C16c2f8b22D2Ce3669963cD48";

const novaL1AddressRegistry = await new L1AddressRegistry__factory(signer).deploy(
NOVA_INBOX, // nova inbox
L1_GOV_TIMELOCK, // l1 gov timelock
NOVA_L1_CUSTOM_GATEWAY, // nova l1 custom gateway
NOVA_L1_GATEWAY_ROUTER // nova l1 gateway router
);
await novaL1AddressRegistry.deployed();
console.log("L1AddressRegistry deployed at", novaL1AddressRegistry.address);

await l1Verifier.verifyWithAddress(
"L1AddressRegistry",
novaL1AddressRegistry.address,
abi.encode(
["address", "address", "address", "address"],
[NOVA_INBOX, L1_GOV_TIMELOCK, NOVA_L1_CUSTOM_GATEWAY, NOVA_L1_GATEWAY_ROUTER]
)
);
};

main().then(() => {
console.log("Done");
});
Loading

0 comments on commit c454713

Please sign in to comment.