From 2c64ef11c081358bfaa8bb7040c3a1a147468a3e Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Fri, 19 Jul 2024 11:25:02 +0200 Subject: [PATCH] Review fixes --- .../child-chain/stylus/AddWasmCacheManagerAction.sol | 2 +- .../NitroContracts2Point0Point0UpgradeAction.sol | 11 ++--------- scripts/foundry/contract-upgrades/2.0.0/README.md | 4 ---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/contracts/child-chain/stylus/AddWasmCacheManagerAction.sol b/contracts/child-chain/stylus/AddWasmCacheManagerAction.sol index 333a08fd..c2023755 100644 --- a/contracts/child-chain/stylus/AddWasmCacheManagerAction.sol +++ b/contracts/child-chain/stylus/AddWasmCacheManagerAction.sol @@ -1,4 +1,4 @@ - // SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.16; import "@arbitrum/nitro-contracts-2.0.0/src/precompiles/ArbSys.sol"; diff --git a/contracts/parent-chain/contract-upgrades/NitroContracts2Point0Point0UpgradeAction.sol b/contracts/parent-chain/contract-upgrades/NitroContracts2Point0Point0UpgradeAction.sol index 272e3440..5b38028b 100644 --- a/contracts/parent-chain/contract-upgrades/NitroContracts2Point0Point0UpgradeAction.sol +++ b/contracts/parent-chain/contract-upgrades/NitroContracts2Point0Point0UpgradeAction.sol @@ -36,11 +36,6 @@ contract NitroContracts2Point0Point0UpgradeAction { address public immutable newRollupAdminLogic; address public immutable newRollupUserLogic; - bytes32 private constant _IMPLEMENTATION_PRIMARY_SLOT = - 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - bytes32 internal constant _IMPLEMENTATION_SECONDARY_SLOT = - 0x2b1dbce74324248c222f0ec2d5ed7bd323cfc425b336f0253c5ccfda7265546d; - constructor( bytes32 _newWasmModuleRoot, address _newChallengeManagerImpl, @@ -125,12 +120,10 @@ contract NitroContracts2Point0Point0UpgradeAction { function _upgradeRollup(address rollupProxy) internal { IRollupUpgrade rollup = IRollupUpgrade(rollupProxy); - address _newAdminLogic = newRollupAdminLogic; - address _newUserLogic = newRollupUserLogic; // set new logic contracts - rollup.upgradeTo(_newAdminLogic); - rollup.upgradeSecondaryTo(_newUserLogic); + rollup.upgradeTo(newRollupAdminLogic); + rollup.upgradeSecondaryTo(newRollupUserLogic); // verify require( diff --git a/scripts/foundry/contract-upgrades/2.0.0/README.md b/scripts/foundry/contract-upgrades/2.0.0/README.md index 5d094fd6..de6d009c 100644 --- a/scripts/foundry/contract-upgrades/2.0.0/README.md +++ b/scripts/foundry/contract-upgrades/2.0.0/README.md @@ -49,7 +49,3 @@ If you have a multisig as executor, you can still run the above command without ```bash cast call --rpc-url $PARENT_CHAIN_RPC $ROLLUP "wasmModuleRoot()" ``` - - - -forge script --private-key XXX --rpc-url $PARENT_CHAIN_RPC --slow --broadcast ./DeployNitroContracts2Point0Point0UpgradeAction.s.sol:DeployNitroContracts2Point0Point0UpgradeActionScript -vvv \ No newline at end of file