From 66a6358d9a4797594f77b309fb96224b22645559 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Thu, 9 Apr 2026 14:40:23 -0600 Subject: [PATCH 01/12] scaffold --- ...troContracts3Point2Point0UpgradeAction.sol | 12 ++++ .../contract-upgrades/3.2.0/.env.sample | 12 ++++ ...oContracts3Point2Point0UpgradeAction.s.sol | 31 ++++++++++ ...teNitroContracts3Point2Point0Upgrade.s.sol | 32 +++++++++++ .../foundry/contract-upgrades/3.2.0/README.md | 57 +++++++++++++++++++ 5 files changed, 144 insertions(+) create mode 100644 contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol create mode 100644 scripts/foundry/contract-upgrades/3.2.0/.env.sample create mode 100644 scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol create mode 100644 scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol create mode 100644 scripts/foundry/contract-upgrades/3.2.0/README.md diff --git a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol new file mode 100644 index 00000000..4d9d533e --- /dev/null +++ b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +/** + * @title NitroContracts3Point2Point0UpgradeAction + * @notice Upgrade action for nitro contracts v3.2.0 + */ +contract NitroContracts3Point2Point0UpgradeAction { + function perform() external { + // TODO: implement upgrade logic + } +} diff --git a/scripts/foundry/contract-upgrades/3.2.0/.env.sample b/scripts/foundry/contract-upgrades/3.2.0/.env.sample new file mode 100644 index 00000000..033b3889 --- /dev/null +++ b/scripts/foundry/contract-upgrades/3.2.0/.env.sample @@ -0,0 +1,12 @@ +## Forge configuration (uncomment/adjust as needed) +## All FOUNDRY_* env vars are supported: https://book.getfoundry.sh/reference/config/ +# FOUNDRY_BROADCAST=true +# ETH_PRIVATE_KEY=0x... + +## Chain and contract addresses +PARENT_CHAIN_RPC= +PARENT_CHAIN_IS_ARBITRUM=true +ROLLUP_ADDRESS= +UPGRADE_ACTION_ADDRESS= +PROXY_ADMIN_ADDRESS= +PARENT_UPGRADE_EXECUTOR_ADDRESS= diff --git a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol new file mode 100644 index 00000000..36871413 --- /dev/null +++ b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import { + NitroContracts3Point2Point0UpgradeAction +} from "../../../../contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol"; +import {MockArbSys} from "../../helper/MockArbSys.sol"; + +/** + * @title DeployNitroContracts3Point2Point0UpgradeActionScript + * @notice Deploys implementation contracts and the NitroContracts3Point2Point0UpgradeAction contract. + */ +contract DeployNitroContracts3Point2Point0UpgradeActionScript is DeploymentHelpersScript { + function run() public { + bool isArbitrum = vm.envBool("PARENT_CHAIN_IS_ARBITRUM"); + if (isArbitrum) { + bytes memory mockArbSysCode = address(new MockArbSys()).code; + vm.etch(address(100), mockArbSysCode); + } + + vm.startBroadcast(); + + // TODO: deploy new implementation contracts + + // Deploy the action contract last. The CLI identifies the deployed action + // by taking the last CREATE from the broadcast file. + new NitroContracts3Point2Point0UpgradeAction(); + + vm.stopBroadcast(); + } +} diff --git a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol new file mode 100644 index 00000000..453113ae --- /dev/null +++ b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "forge-std/Script.sol"; +import { + NitroContracts3Point2Point0UpgradeAction, + ProxyAdmin +} from "../../../../contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol"; +import {IUpgradeExecutor} from "@offchainlabs/upgrade-executor/src/IUpgradeExecutor.sol"; + +/** + * @title ExecuteNitroContracts3Point2Point0UpgradeScript + * @notice Executes nitro contracts 3.2.0 upgrade through UpgradeExecutor + */ +contract ExecuteNitroContracts3Point2Point0UpgradeScript is Script { + function run() public { + NitroContracts3Point2Point0UpgradeAction upgradeAction = + NitroContracts3Point2Point0UpgradeAction(vm.envAddress("UPGRADE_ACTION_ADDRESS")); + + // TODO: load and validate env parameters + + // prepare upgrade calldata + bytes memory upgradeCalldata = + abi.encodeCall(NitroContracts3Point2Point0UpgradeAction.perform, ()); + + // execute the upgrade + IUpgradeExecutor executor = IUpgradeExecutor(vm.envAddress("PARENT_UPGRADE_EXECUTOR_ADDRESS")); + vm.startBroadcast(); + executor.execute(address(upgradeAction), upgradeCalldata); + vm.stopBroadcast(); + } +} diff --git a/scripts/foundry/contract-upgrades/3.2.0/README.md b/scripts/foundry/contract-upgrades/3.2.0/README.md new file mode 100644 index 00000000..d1a4725f --- /dev/null +++ b/scripts/foundry/contract-upgrades/3.2.0/README.md @@ -0,0 +1,57 @@ +# Nitro contracts 3.2.0 upgrade + +These scripts deploy and execute the `NitroContracts3Point2Point0UpgradeAction` contract which allows Orbit chains to upgrade to [3.2.0 release](https://github.com/OffchainLabs/nitro-contracts/releases/tag/v3.2.0). + +`NitroContracts3Point2Point0UpgradeAction` will perform the following action: + +1. TODO: describe upgrade steps + +## Requirements + +This upgrade only supports upgrading from the following [nitro-contract release](https://github.com/OffchainLabs/nitro-contracts/releases): + +- TODO: list supported source versions per contract + +Please refer to the top [README](/README.md#check-version-and-upgrade-path) `Check Version and Upgrade Path` on how to determine your current nitro contracts version. + +## Deployed instances + +### Mainnets +- TODO + +### Testnets +- TODO + +## How to use it + +1. Setup .env according to the example files, make sure you have everything correctly defined. The .env file must be in project root for recent foundry versions. + +> [!CAUTION] +> The .env file must be in project root. + +2. (Skip this step if you can use the deployed instances of action contract) + `DeployNitroContracts3Point2Point0UpgradeActionScript.s.sol` script deploys templates, and upgrade action itself. It can be executed in this directory like this: + +```bash +forge script --sender $DEPLOYER --rpc-url $PARENT_CHAIN_RPC --broadcast --slow DeployNitroContracts3Point2Point0UpgradeActionScript -vvv --verify --skip-simulation +# use --account XXX / --private-key XXX / --interactive / --ledger to set the account to send the transaction from +``` + +As a result, all templates and upgrade action are deployed. Note the last deployed address - that's the upgrade action. + +3. `ExecuteNitroContracts3Point2Point0Upgrade.s.sol` script uses previously deployed upgrade action to execute the upgrade. It makes following assumptions - L1UpgradeExecutor is the rollup owner, and there is an EOA which has executor rights on the L1UpgradeExecutor. Proceed with upgrade using the owner account (the one with executor rights on L1UpgradeExecutor): + +```bash +forge script --sender $EXECUTOR --rpc-url $PARENT_CHAIN_RPC --broadcast ExecuteNitroContracts3Point2Point0UpgradeScript -vvv +# use --account XXX / --private-key XXX / --interactive / --ledger to set the account to send the transaction from +``` + +If you have a multisig as executor, you can still run the above command without broadcasting to get the payload for the multisig transaction. + +4. That's it, upgrade has been performed. TODO: add verification instructions. + +## FAQ + +### Q: intrinsic gas too low when running foundry script + +A: try to add -g 1000 to the command From 0f0114328a9d831dbf36b17ff7465edbfb0dcdca Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Fri, 17 Apr 2026 09:13:50 -0600 Subject: [PATCH 02/12] implement 3.2.0 action --- ...troContracts3Point2Point0UpgradeAction.sol | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol index 4d9d533e..4a9c925c 100644 --- a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol +++ b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol @@ -1,12 +1,33 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.16; +pragma solidity ^0.8.16; +interface IRollupAdminLogic { + function upgradeSecondaryTo(address newImplementation) external; + function upgradeTo(address newImplementation) external; +} /** * @title NitroContracts3Point2Point0UpgradeAction * @notice Upgrade action for nitro contracts v3.2.0 + * @dev Only upgrades Rollup contract, other diff between v3.2.0 and v3.1.0 are irrelevant. */ contract NitroContracts3Point2Point0UpgradeAction { - function perform() external { - // TODO: implement upgrade logic + address public immutable newRollupAdminLogicImpl; + address public immutable newRollupUserLogicImpl; + + constructor(address _newRollupAdminLogicImpl, address _newRollupUserLogicImpl) { + newRollupAdminLogicImpl = _newRollupAdminLogicImpl; + newRollupUserLogicImpl = _newRollupUserLogicImpl; + } + + function perform(address rollup) external { + // skip sequencer inbox upgrade since it only adds custom DA header support + // skip OSP upgrade since it only adds custom DA validation support + + // RollupAdminLogic is the primary implementation + // RollupUserLogic is the secondary implementation + // see: https://github.com/OffchainLabs/nitro-contracts/blob/d9a2f3353ff13c706b7807b097e7ba591d970d85/src/libraries/AdminFallbackProxy.sol#L141-L143 + + IRollupAdminLogic(rollup).upgradeTo(newRollupAdminLogicImpl); + IRollupAdminLogic(rollup).upgradeSecondaryTo(newRollupUserLogicImpl); } } From d0b32141675e3e3efd0f6becc4032e7069644161 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 18:24:35 -0600 Subject: [PATCH 03/12] deploy action script --- ...roContracts3Point2Point0UpgradeAction.s.sol | 18 ++++++++++-------- ...uteNitroContracts3Point2Point0Upgrade.s.sol | 3 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol index 36871413..86797df9 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.16; +import {DeploymentHelpersScript} from "../../helper/DeploymentHelpers.s.sol"; import { NitroContracts3Point2Point0UpgradeAction } from "../../../../contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol"; @@ -12,19 +13,20 @@ import {MockArbSys} from "../../helper/MockArbSys.sol"; */ contract DeployNitroContracts3Point2Point0UpgradeActionScript is DeploymentHelpersScript { function run() public { - bool isArbitrum = vm.envBool("PARENT_CHAIN_IS_ARBITRUM"); - if (isArbitrum) { - bytes memory mockArbSysCode = address(new MockArbSys()).code; - vm.etch(address(100), mockArbSysCode); - } - vm.startBroadcast(); - // TODO: deploy new implementation contracts + address newAdminLogic = deployBytecodeWithConstructorFromJSON( + "/node_modules/@arbitrum/nitro-contracts-3.2.0/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.json", + "" + ); + address newUserLogic = deployBytecodeWithConstructorFromJSON( + "/node_modules/@arbitrum/nitro-contracts-3.2.0/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json", + "" + ); // Deploy the action contract last. The CLI identifies the deployed action // by taking the last CREATE from the broadcast file. - new NitroContracts3Point2Point0UpgradeAction(); + new NitroContracts3Point2Point0UpgradeAction(newAdminLogic, newUserLogic); vm.stopBroadcast(); } diff --git a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol index 453113ae..dde27893 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol @@ -3,8 +3,7 @@ pragma solidity 0.8.16; import "forge-std/Script.sol"; import { - NitroContracts3Point2Point0UpgradeAction, - ProxyAdmin + NitroContracts3Point2Point0UpgradeAction } from "../../../../contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol"; import {IUpgradeExecutor} from "@offchainlabs/upgrade-executor/src/IUpgradeExecutor.sol"; From ba17299532575ae4fbdf8c5867f2887993ced526 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 18:29:52 -0600 Subject: [PATCH 04/12] execute script --- scripts/foundry/contract-upgrades/3.2.0/.env.sample | 1 - .../3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/foundry/contract-upgrades/3.2.0/.env.sample b/scripts/foundry/contract-upgrades/3.2.0/.env.sample index 033b3889..0f21e340 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/.env.sample +++ b/scripts/foundry/contract-upgrades/3.2.0/.env.sample @@ -8,5 +8,4 @@ PARENT_CHAIN_RPC= PARENT_CHAIN_IS_ARBITRUM=true ROLLUP_ADDRESS= UPGRADE_ACTION_ADDRESS= -PROXY_ADMIN_ADDRESS= PARENT_UPGRADE_EXECUTOR_ADDRESS= diff --git a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol index dde27893..1836f039 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol @@ -16,11 +16,9 @@ contract ExecuteNitroContracts3Point2Point0UpgradeScript is Script { NitroContracts3Point2Point0UpgradeAction upgradeAction = NitroContracts3Point2Point0UpgradeAction(vm.envAddress("UPGRADE_ACTION_ADDRESS")); - // TODO: load and validate env parameters - // prepare upgrade calldata bytes memory upgradeCalldata = - abi.encodeCall(NitroContracts3Point2Point0UpgradeAction.perform, ()); + abi.encodeCall(NitroContracts3Point2Point0UpgradeAction.perform, (vm.envAddress("ROLLUP_ADDRESS"))); // execute the upgrade IUpgradeExecutor executor = IUpgradeExecutor(vm.envAddress("PARENT_UPGRADE_EXECUTOR_ADDRESS")); From a082f44b03ad0018b5298659b0837fe0485a494d Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 18:55:44 -0600 Subject: [PATCH 05/12] add versioner route to 3.2.0 --- scripts/orbit-versioner/orbitVersioner.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/orbit-versioner/orbitVersioner.ts b/scripts/orbit-versioner/orbitVersioner.ts index f6e88ccf..5aa8604a 100644 --- a/scripts/orbit-versioner/orbitVersioner.ts +++ b/scripts/orbit-versioner/orbitVersioner.ts @@ -274,7 +274,20 @@ function _canBeUpgradedToTargetVersion( let supportedSourceVersionsPerContract: { [key: string]: string[] } = {} - if (targetVersion === 'v3.1.0') { + if (targetVersion === 'v3.2.0') { + supportedSourceVersionsPerContract = { + Inbox: ['v3.1.0'], + Outbox: ['v3.1.0'], + Bridge: ['v3.1.0'], + RollupEventInbox: ['any'], + RollupProxy: ['any'], + RollupAdminLogic: ['v3.1.0'], + RollupUserLogic: ['v3.1.0'], + ChallengeManager: ['v3.1.0'], + SequencerInbox: ['v3.1.0'], + } + } + else if (targetVersion === 'v3.1.0') { // todo: remove once nitro supports bold for L3's if (parentChainId !== 1n && parentChainId !== 11155111n) { supportedSourceVersionsPerContract = { From f0c81bfa20963fef02aaab3fb8f0e16d33e1621b Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:21:47 -0600 Subject: [PATCH 06/12] versioner works post 3.2.0 --- scripts/orbit-versioner/orbitVersioner.ts | 118 +++++++++++------- .../referentContractAddresses.json | 60 +++++++++ 2 files changed, 131 insertions(+), 47 deletions(-) create mode 100644 scripts/orbit-versioner/referentContractAddresses.json diff --git a/scripts/orbit-versioner/orbitVersioner.ts b/scripts/orbit-versioner/orbitVersioner.ts index 5aa8604a..dd9bb169 100644 --- a/scripts/orbit-versioner/orbitVersioner.ts +++ b/scripts/orbit-versioner/orbitVersioner.ts @@ -1,5 +1,6 @@ import { ethers } from 'hardhat' import metadataHashes from './referentMetadataHashes.json' +import contractAddresses from './referentContractAddresses.json' import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider' import { IBridge__factory, @@ -55,6 +56,7 @@ export interface OrbitVersionerReport { */ const referentMetadataHashes: MetadataHashesByVersion = metadataHashes +const referentContractAddresses: MetadataHashesByVersion = contractAddresses /** * Script will @@ -84,64 +86,53 @@ async function main(): Promise { const challengeManagerAddress = await rollup.challengeManager() const rollupEventInboxAddress = await rollup.rollupEventInbox() - // get metadata hashes - const metadataHashes: { [key: string]: string } = { - Inbox: await _getMetadataHash( - await _getLogicAddress(inboxAddress, provider), - provider - ), - Outbox: await _getMetadataHash( - await _getLogicAddress(outboxAddress, provider), - provider - ), - SequencerInbox: await _getMetadataHash( - await _getLogicAddress(seqInboxAddress, provider), - provider - ), - Bridge: await _getMetadataHash( - await _getLogicAddress(bridgeAddress, provider), - provider - ), - RollupEventInbox: await _getMetadataHash( - await _getLogicAddress(rollupEventInboxAddress, provider), - provider - ), - RollupProxy: await _getMetadataHash(rollupAddress, provider), - RollupAdminLogic: await _getMetadataHash( - await _getLogicAddress(rollupAddress, provider), - provider - ), - RollupUserLogic: await _getMetadataHash( - await _getAddressAtStorageSlot( - rollupAddress, - provider, - '0x2b1dbce74324248c222f0ec2d5ed7bd323cfc425b336f0253c5ccfda7265546d' - ), - provider - ), - ChallengeManager: await _getMetadataHash( - await _getLogicAddress(challengeManagerAddress, provider), - provider + // get logic addresses for each contract + const logicAddresses: { [key: string]: string } = { + Inbox: await _getLogicAddress(inboxAddress, provider), + Outbox: await _getLogicAddress(outboxAddress, provider), + SequencerInbox: await _getLogicAddress(seqInboxAddress, provider), + Bridge: await _getLogicAddress(bridgeAddress, provider), + RollupEventInbox: await _getLogicAddress(rollupEventInboxAddress, provider), + RollupProxy: rollupAddress, + RollupAdminLogic: await _getLogicAddress(rollupAddress, provider), + RollupUserLogic: await _getAddressAtStorageSlot( + rollupAddress, + provider, + '0x2b1dbce74324248c222f0ec2d5ed7bd323cfc425b336f0253c5ccfda7265546d' ), + ChallengeManager: await _getLogicAddress(challengeManagerAddress, provider), } if (process.env.DEV === 'true') { - console.log('\nMetadataHashes of deployed contracts:', metadataHashes, '\n') + console.log('\nLogic addresses of deployed contracts:', logicAddresses, '\n') } let isFeeTokenChain = false const versions: { [key: string]: string | null } = {} - // get and print version per bridge contract - Object.keys(metadataHashes).forEach(key => { - const { version, isErc20 } = _getVersionOfDeployedContract( - metadataHashes[key] - ) - versions[key] = version - if (key === 'Bridge' && isErc20) isFeeTokenChain = true + + for (const key of Object.keys(logicAddresses)) { + // try address-based lookup first (for create2 deployments like v3.2.0+) + let result = _getVersionOfDeployedContractByAddress(logicAddresses[key]) + + if (!result.version) { + // fall back to metadata hash lookup + try { + const metadataHash = await _getMetadataHash(logicAddresses[key], provider) + if (process.env.DEV === 'true') { + console.log(`MetadataHash of deployed ${key}:`, metadataHash) + } + result = _getVersionOfDeployedContract(metadataHash) + } catch { + // metadata hash extraction can fail for contracts without standard metadata + } + } + + versions[key] = result.version + if (key === 'Bridge' && result.isErc20) isFeeTokenChain = true console.log( `Version of deployed ${key}: ${versions[key] ? versions[key] : 'unknown'}` ) - }) + } // TODO: make this more generic to support other other upgrade paths in the future // TODO: also check osp @@ -168,6 +159,10 @@ function _checkForPossibleUpgrades( ): UpgradeRecommendation { // version need to be in descending order const targetVersionsDescending = [ + { + version: 'v3.2.0', + actionName: 'NitroContracts3Point2Point0UpgradeAction', + }, { version: 'v3.1.0', actionName: 'BOLD UpgradeAction', @@ -491,6 +486,35 @@ function _canBeUpgradedToTargetVersion( return true } +function _getVersionOfDeployedContractByAddress(logicAddress: string): { + version: string | null + isErc20: boolean +} { + const normalized = logicAddress.toLowerCase() + for (const [version] of Object.entries(referentContractAddresses).reverse()) { + const versionAddresses = referentContractAddresses[version] + const allAddresses = [ + ...Object.values(versionAddresses.eth).flat(), + ...Object.values(versionAddresses.erc20).flat(), + ...versionAddresses.RollupProxy, + ...versionAddresses.RollupAdminLogic, + ...versionAddresses.RollupUserLogic, + ...versionAddresses.ChallengeManager, + ].map(a => a.toLowerCase()) + + if (allAddresses.includes(normalized)) { + const erc20Addresses = [ + ...Object.values(versionAddresses.erc20).flat(), + ].map(a => a.toLowerCase()) + if (erc20Addresses.includes(normalized)) { + return { version, isErc20: true } + } + return { version, isErc20: false } + } + } + return { version: null, isErc20: false } +} + function _getVersionOfDeployedContract(metadataHash: string): { version: string | null isErc20: boolean diff --git a/scripts/orbit-versioner/referentContractAddresses.json b/scripts/orbit-versioner/referentContractAddresses.json new file mode 100644 index 00000000..6645d8a7 --- /dev/null +++ b/scripts/orbit-versioner/referentContractAddresses.json @@ -0,0 +1,60 @@ +{ + "v3.2.0": { + "eth": { + "Inbox": [ + "0x2c358843740dB38a40f96FD627D4DA1dd859E554", + "0x8D3b93dfFFf4842E7B61FB553b383db2C6BC91c6" + ], + "Outbox": [ + "0x396765AEbE540575ef927F769b0d7b89594f931c" + ], + "SequencerInbox": [ + "0xDA2e941cc4C7D8166Ec207CB7f7B09bA4f94406c", + "0x3636c0bB4Cfd072d06cbf59754A2830D05fD3419", + "0x17d9a7f836cB3A97aCcf96E59f56504457044945", + "0xF6995BDC439B27deEA5d5d08e95E92451a7d36F5", + "0x41e2B560F0B41FBc4A063Eac5298da4C246BEA1B", + "0xb015D78fb9B890e96FD3E23819b2C8D9fffA3cC5" + ], + "Bridge": [ + "0xC678f7B95A7D1F77c6024c0086301D21402854b1" + ], + "RollupEventInbox": [ + "0x796FeE4adceD1cb47a3e3d1B6925472F8fC8f1f9" + ] + }, + "erc20": { + "Inbox": [ + "0x02E5bFcF09Cc317EDDCaca72a1b1265A57197Db5", + "0xBfd8916b9DCB60B3b437D2B3a6FF56F78DcD9Ff2" + ], + "Outbox": [ + "0x5128805C5331A3D445B72545d2461B2C3B05218c" + ], + "SequencerInbox": [ + "0xB8594C833f519126B614979867216EB4BAE82B6d", + "0x5Bf5D77bed887dC32beE7852920A6C93A3D950f1", + "0xD5396bCeE766352B4f87E75708E35E4844883Fb5", + "0xC7FeB25D44D87F753C4ecCb974426Aea8c817f72", + "0xE3E3A0EeFe4f3388eaf4AAA9A77Df0D0d489b776", + "0x2D721E1704c48c9F16353a3b346Aa1EFEc9aA86c" + ], + "Bridge": [ + "0x0124687D1F2869b0C2335B98ddc7FCf59DA2CEa1" + ], + "RollupEventInbox": [ + "0x2706682dD3bD709b055E0266D98BA380FE22B807" + ] + }, + "RollupProxy": [], + "RollupAdminLogic": [ + "0xAb7A44CE7e66963d2116dCe74AB63eeF88266C82" + ], + "RollupUserLogic": [ + "0xedC23dFC7D1e57EC07eA5ff7419634DbAe08Ed2C" + ], + "ChallengeManager": [ + "0xCAaa9332F940362aEAAADD1B0A59c229C4fD8f79" + ] + } +} From 5bbd8d93a6fb53684a5b80764332a8b43171e56e Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:24:21 -0600 Subject: [PATCH 07/12] fix deployment script for create2 --- scripts/foundry/contract-upgrades/3.2.0/.env.sample | 1 - ...loyNitroContracts3Point2Point0UpgradeAction.s.sol | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/foundry/contract-upgrades/3.2.0/.env.sample b/scripts/foundry/contract-upgrades/3.2.0/.env.sample index 0f21e340..f868a405 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/.env.sample +++ b/scripts/foundry/contract-upgrades/3.2.0/.env.sample @@ -5,7 +5,6 @@ ## Chain and contract addresses PARENT_CHAIN_RPC= -PARENT_CHAIN_IS_ARBITRUM=true ROLLUP_ADDRESS= UPGRADE_ACTION_ADDRESS= PARENT_UPGRADE_EXECUTOR_ADDRESS= diff --git a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol index 86797df9..1c7262f3 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol @@ -15,14 +15,10 @@ contract DeployNitroContracts3Point2Point0UpgradeActionScript is DeploymentHelpe function run() public { vm.startBroadcast(); - address newAdminLogic = deployBytecodeWithConstructorFromJSON( - "/node_modules/@arbitrum/nitro-contracts-3.2.0/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.json", - "" - ); - address newUserLogic = deployBytecodeWithConstructorFromJSON( - "/node_modules/@arbitrum/nitro-contracts-3.2.0/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json", - "" - ); + // see scripts/orbit-versioner/referentContractAddresses.json + // there is only one address shared across all chains + address newAdminLogic = 0xAb7A44CE7e66963d2116dCe74AB63eeF88266C82; + address newUserLogic = 0xedC23dFC7D1e57EC07eA5ff7419634DbAe08Ed2C; // Deploy the action contract last. The CLI identifies the deployed action // by taking the last CREATE from the broadcast file. From c1c968c5deb92a588518b057b98884ddc6192596 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:40:28 -0600 Subject: [PATCH 08/12] deterministic action address --- scripts/foundry/contract-upgrades/3.2.0/.env.sample | 2 +- .../3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol | 2 +- .../3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/foundry/contract-upgrades/3.2.0/.env.sample b/scripts/foundry/contract-upgrades/3.2.0/.env.sample index f868a405..a94cbe15 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/.env.sample +++ b/scripts/foundry/contract-upgrades/3.2.0/.env.sample @@ -6,5 +6,5 @@ ## Chain and contract addresses PARENT_CHAIN_RPC= ROLLUP_ADDRESS= -UPGRADE_ACTION_ADDRESS= +UPGRADE_ACTION_ADDRESS=0x352b46fc500757e07a7e6063870c3a2b2c72da90 PARENT_UPGRADE_EXECUTOR_ADDRESS= diff --git a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol index 1c7262f3..6370bf12 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/DeployNitroContracts3Point2Point0UpgradeAction.s.sol @@ -22,7 +22,7 @@ contract DeployNitroContracts3Point2Point0UpgradeActionScript is DeploymentHelpe // Deploy the action contract last. The CLI identifies the deployed action // by taking the last CREATE from the broadcast file. - new NitroContracts3Point2Point0UpgradeAction(newAdminLogic, newUserLogic); + new NitroContracts3Point2Point0UpgradeAction{salt: 0}(newAdminLogic, newUserLogic); vm.stopBroadcast(); } diff --git a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol index 1836f039..8b434606 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol @@ -16,6 +16,8 @@ contract ExecuteNitroContracts3Point2Point0UpgradeScript is Script { NitroContracts3Point2Point0UpgradeAction upgradeAction = NitroContracts3Point2Point0UpgradeAction(vm.envAddress("UPGRADE_ACTION_ADDRESS")); + require(address(upgradeAction).code.length > 0, "Upgrade action contract not found at provided address, run deployment script first"); + // prepare upgrade calldata bytes memory upgradeCalldata = abi.encodeCall(NitroContracts3Point2Point0UpgradeAction.perform, (vm.envAddress("ROLLUP_ADDRESS"))); From bd0f6b7408dda2bea24066a41a59f1bc1d6a8331 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:57:33 -0600 Subject: [PATCH 09/12] add verification script and update readme --- .../foundry/contract-upgrades/3.2.0/README.md | 29 +++++++++++++++---- ...fyNitroContracts3Point2Point0Upgrade.s.sol | 26 +++++++++++++++++ 2 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 scripts/foundry/contract-upgrades/3.2.0/VerifyNitroContracts3Point2Point0Upgrade.s.sol diff --git a/scripts/foundry/contract-upgrades/3.2.0/README.md b/scripts/foundry/contract-upgrades/3.2.0/README.md index d1a4725f..082e2682 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/README.md +++ b/scripts/foundry/contract-upgrades/3.2.0/README.md @@ -1,23 +1,36 @@ # Nitro contracts 3.2.0 upgrade -These scripts deploy and execute the `NitroContracts3Point2Point0UpgradeAction` contract which allows Orbit chains to upgrade to [3.2.0 release](https://github.com/OffchainLabs/nitro-contracts/releases/tag/v3.2.0). +These scripts deploy and execute the `NitroContracts3Point2Point0UpgradeAction` contract which allows Orbit chains to upgrade to [3.2.0 release](https://github.com/OffchainLabs/nitro-contracts/releases/tag/v3.2.0). Predeployed instances of the upgrade action exist on the chains listed in the following section. `NitroContracts3Point2Point0UpgradeAction` will perform the following action: -1. TODO: describe upgrade steps +1. Upgrade `RollupAdminLogic` (primary proxy implementation) to v3.2.0 +2. Upgrade `RollupUserLogic` (secondary proxy implementation) to v3.2.0 + +Note that only the rollup logic contracts are upgraded. Other contracts (bridge, inbox, sequencer inbox, outbox, challenge manager) are unchanged as the diff between v3.2.0 and v3.1.0 for those contracts is not relevant for existing chains. There is no associated ArbOS upgrade for this version. ## Requirements This upgrade only supports upgrading from the following [nitro-contract release](https://github.com/OffchainLabs/nitro-contracts/releases): -- TODO: list supported source versions per contract +- Inbox: v3.1.0 +- Outbox: v3.1.0 +- SequencerInbox: v3.1.0 +- Bridge: v3.1.0 +- RollupEventInbox: any +- RollupProxy: any +- RollupAdminLogic: v3.1.0 +- RollupUserLogic: v3.1.0 +- ChallengeManager: v3.1.0 Please refer to the top [README](/README.md#check-version-and-upgrade-path) `Check Version and Upgrade Path` on how to determine your current nitro contracts version. ## Deployed instances ### Mainnets -- TODO +- L1 Mainnet: TODO +- L2 Arb1: TODO +- L2 Base: TODO ### Testnets - TODO @@ -48,7 +61,13 @@ forge script --sender $EXECUTOR --rpc-url $PARENT_CHAIN_RPC --broadcast ExecuteN If you have a multisig as executor, you can still run the above command without broadcasting to get the payload for the multisig transaction. -4. That's it, upgrade has been performed. TODO: add verification instructions. +4. Verify the upgrade was successful by running the verify script against the rollup: + +```bash +forge script --rpc-url $PARENT_CHAIN_RPC VerifyNitroContracts3Point2Point0Upgrade -vvv +``` + +This pranks the rollup owner and calls `increaseBaseStake` (new in v3.2.0). If the call succeeds, the upgrade was applied correctly. If it reverts, the rollup is still on the old implementation. ## FAQ diff --git a/scripts/foundry/contract-upgrades/3.2.0/VerifyNitroContracts3Point2Point0Upgrade.s.sol b/scripts/foundry/contract-upgrades/3.2.0/VerifyNitroContracts3Point2Point0Upgrade.s.sol new file mode 100644 index 00000000..1e1cae76 --- /dev/null +++ b/scripts/foundry/contract-upgrades/3.2.0/VerifyNitroContracts3Point2Point0Upgrade.s.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity 0.8.16; + +import "forge-std/Script.sol"; + +interface IRollupAdmin { + function owner() external view returns (address); + function increaseBaseStake(uint256 newBaseStake) external; +} + +/** + * @title VerifyNitroContracts3Point2Point0Upgrade + * @notice Verifies the upgrade to Nitro Contracts 3.2.0 by checking that + * increaseBaseStake (new in v3.2.0) is callable on the rollup. + */ +contract VerifyNitroContracts3Point2Point0Upgrade is Script { + function run() public { + address rollup = vm.envAddress("ROLLUP_ADDRESS"); + address owner = IRollupAdmin(rollup).owner(); + + vm.prank(owner); + IRollupAdmin(rollup).increaseBaseStake(type(uint256).max); + + console.log("Verification passed: increaseBaseStake is available (v3.2.0)"); + } +} From dce1920202fc962cc7a187e674bb0f20a70336f7 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:50:18 -0600 Subject: [PATCH 10/12] fix --- ...troContracts3Point2Point0UpgradeAction.sol | 1 + ...teNitroContracts3Point2Point0Upgrade.s.sol | 5 ++- scripts/orbit-versioner/orbitVersioner.ts | 34 ++++++++++-------- .../referentContractAddresses.json | 36 +++++-------------- .../NitroContracts3Point2Point0UpgradeAction | 11 ++++++ .../NitroContracts3Point2Point0UpgradeAction | 6 ++++ 6 files changed, 51 insertions(+), 42 deletions(-) create mode 100644 test/signatures/NitroContracts3Point2Point0UpgradeAction create mode 100644 test/storage/NitroContracts3Point2Point0UpgradeAction diff --git a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol index 4a9c925c..270a960f 100644 --- a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol +++ b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol @@ -5,6 +5,7 @@ interface IRollupAdminLogic { function upgradeSecondaryTo(address newImplementation) external; function upgradeTo(address newImplementation) external; } + /** * @title NitroContracts3Point2Point0UpgradeAction * @notice Upgrade action for nitro contracts v3.2.0 diff --git a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol index 8b434606..bcfb1122 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol +++ b/scripts/foundry/contract-upgrades/3.2.0/ExecuteNitroContracts3Point2Point0Upgrade.s.sol @@ -16,7 +16,10 @@ contract ExecuteNitroContracts3Point2Point0UpgradeScript is Script { NitroContracts3Point2Point0UpgradeAction upgradeAction = NitroContracts3Point2Point0UpgradeAction(vm.envAddress("UPGRADE_ACTION_ADDRESS")); - require(address(upgradeAction).code.length > 0, "Upgrade action contract not found at provided address, run deployment script first"); + require( + address(upgradeAction).code.length > 0, + "Upgrade action contract not found at provided address, run deployment script first" + ); // prepare upgrade calldata bytes memory upgradeCalldata = diff --git a/scripts/orbit-versioner/orbitVersioner.ts b/scripts/orbit-versioner/orbitVersioner.ts index dd9bb169..ab59a68f 100644 --- a/scripts/orbit-versioner/orbitVersioner.ts +++ b/scripts/orbit-versioner/orbitVersioner.ts @@ -104,7 +104,11 @@ async function main(): Promise { } if (process.env.DEV === 'true') { - console.log('\nLogic addresses of deployed contracts:', logicAddresses, '\n') + console.log( + '\nLogic addresses of deployed contracts:', + logicAddresses, + '\n' + ) } let isFeeTokenChain = false @@ -117,7 +121,10 @@ async function main(): Promise { if (!result.version) { // fall back to metadata hash lookup try { - const metadataHash = await _getMetadataHash(logicAddresses[key], provider) + const metadataHash = await _getMetadataHash( + logicAddresses[key], + provider + ) if (process.env.DEV === 'true') { console.log(`MetadataHash of deployed ${key}:`, metadataHash) } @@ -271,18 +278,17 @@ function _canBeUpgradedToTargetVersion( if (targetVersion === 'v3.2.0') { supportedSourceVersionsPerContract = { - Inbox: ['v3.1.0'], - Outbox: ['v3.1.0'], - Bridge: ['v3.1.0'], - RollupEventInbox: ['any'], - RollupProxy: ['any'], - RollupAdminLogic: ['v3.1.0'], - RollupUserLogic: ['v3.1.0'], - ChallengeManager: ['v3.1.0'], - SequencerInbox: ['v3.1.0'], - } - } - else if (targetVersion === 'v3.1.0') { + Inbox: ['v3.1.0'], + Outbox: ['v3.1.0'], + Bridge: ['v3.1.0'], + RollupEventInbox: ['any'], + RollupProxy: ['any'], + RollupAdminLogic: ['v3.1.0'], + RollupUserLogic: ['v3.1.0'], + ChallengeManager: ['v3.1.0'], + SequencerInbox: ['v3.1.0'], + } + } else if (targetVersion === 'v3.1.0') { // todo: remove once nitro supports bold for L3's if (parentChainId !== 1n && parentChainId !== 11155111n) { supportedSourceVersionsPerContract = { diff --git a/scripts/orbit-versioner/referentContractAddresses.json b/scripts/orbit-versioner/referentContractAddresses.json index 6645d8a7..add9f485 100644 --- a/scripts/orbit-versioner/referentContractAddresses.json +++ b/scripts/orbit-versioner/referentContractAddresses.json @@ -5,9 +5,7 @@ "0x2c358843740dB38a40f96FD627D4DA1dd859E554", "0x8D3b93dfFFf4842E7B61FB553b383db2C6BC91c6" ], - "Outbox": [ - "0x396765AEbE540575ef927F769b0d7b89594f931c" - ], + "Outbox": ["0x396765AEbE540575ef927F769b0d7b89594f931c"], "SequencerInbox": [ "0xDA2e941cc4C7D8166Ec207CB7f7B09bA4f94406c", "0x3636c0bB4Cfd072d06cbf59754A2830D05fD3419", @@ -16,21 +14,15 @@ "0x41e2B560F0B41FBc4A063Eac5298da4C246BEA1B", "0xb015D78fb9B890e96FD3E23819b2C8D9fffA3cC5" ], - "Bridge": [ - "0xC678f7B95A7D1F77c6024c0086301D21402854b1" - ], - "RollupEventInbox": [ - "0x796FeE4adceD1cb47a3e3d1B6925472F8fC8f1f9" - ] + "Bridge": ["0xC678f7B95A7D1F77c6024c0086301D21402854b1"], + "RollupEventInbox": ["0x796FeE4adceD1cb47a3e3d1B6925472F8fC8f1f9"] }, "erc20": { "Inbox": [ "0x02E5bFcF09Cc317EDDCaca72a1b1265A57197Db5", "0xBfd8916b9DCB60B3b437D2B3a6FF56F78DcD9Ff2" ], - "Outbox": [ - "0x5128805C5331A3D445B72545d2461B2C3B05218c" - ], + "Outbox": ["0x5128805C5331A3D445B72545d2461B2C3B05218c"], "SequencerInbox": [ "0xB8594C833f519126B614979867216EB4BAE82B6d", "0x5Bf5D77bed887dC32beE7852920A6C93A3D950f1", @@ -39,22 +31,12 @@ "0xE3E3A0EeFe4f3388eaf4AAA9A77Df0D0d489b776", "0x2D721E1704c48c9F16353a3b346Aa1EFEc9aA86c" ], - "Bridge": [ - "0x0124687D1F2869b0C2335B98ddc7FCf59DA2CEa1" - ], - "RollupEventInbox": [ - "0x2706682dD3bD709b055E0266D98BA380FE22B807" - ] + "Bridge": ["0x0124687D1F2869b0C2335B98ddc7FCf59DA2CEa1"], + "RollupEventInbox": ["0x2706682dD3bD709b055E0266D98BA380FE22B807"] }, "RollupProxy": [], - "RollupAdminLogic": [ - "0xAb7A44CE7e66963d2116dCe74AB63eeF88266C82" - ], - "RollupUserLogic": [ - "0xedC23dFC7D1e57EC07eA5ff7419634DbAe08Ed2C" - ], - "ChallengeManager": [ - "0xCAaa9332F940362aEAAADD1B0A59c229C4fD8f79" - ] + "RollupAdminLogic": ["0xAb7A44CE7e66963d2116dCe74AB63eeF88266C82"], + "RollupUserLogic": ["0xedC23dFC7D1e57EC07eA5ff7419634DbAe08Ed2C"], + "ChallengeManager": ["0xCAaa9332F940362aEAAADD1B0A59c229C4fD8f79"] } } diff --git a/test/signatures/NitroContracts3Point2Point0UpgradeAction b/test/signatures/NitroContracts3Point2Point0UpgradeAction new file mode 100644 index 00000000..6ac756ef --- /dev/null +++ b/test/signatures/NitroContracts3Point2Point0UpgradeAction @@ -0,0 +1,11 @@ + +╭---------------------------+------------╮ +| Method | Identifier | ++========================================+ +| newRollupAdminLogicImpl() | a4d733b9 | +|---------------------------+------------| +| newRollupUserLogicImpl() | b4b20033 | +|---------------------------+------------| +| perform(address) | b38ed43b | +╰---------------------------+------------╯ + diff --git a/test/storage/NitroContracts3Point2Point0UpgradeAction b/test/storage/NitroContracts3Point2Point0UpgradeAction new file mode 100644 index 00000000..1ec5dc07 --- /dev/null +++ b/test/storage/NitroContracts3Point2Point0UpgradeAction @@ -0,0 +1,6 @@ + +╭------+------+------+--------+-------+----------╮ +| Name | Type | Slot | Offset | Bytes | Contract | ++================================================+ +╰------+------+------+--------+-------+----------╯ + From 8acc1282fb5e51f84a3b10c84d26733f1a12891d Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Tue, 5 May 2026 08:57:19 -0600 Subject: [PATCH 11/12] require rollup impls deployed --- .../NitroContracts3Point2Point0UpgradeAction.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol index 270a960f..dde6cbcb 100644 --- a/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol +++ b/contracts/parent-chain/contract-upgrades/NitroContracts3Point2Point0UpgradeAction.sol @@ -16,6 +16,8 @@ contract NitroContracts3Point2Point0UpgradeAction { address public immutable newRollupUserLogicImpl; constructor(address _newRollupAdminLogicImpl, address _newRollupUserLogicImpl) { + require(_newRollupAdminLogicImpl.code.length > 0, "invalid rollup admin logic impl"); + require(_newRollupUserLogicImpl.code.length > 0, "invalid rollup user logic impl"); newRollupAdminLogicImpl = _newRollupAdminLogicImpl; newRollupUserLogicImpl = _newRollupUserLogicImpl; } From a86127bbbf7062d34638b7a75fdb439ab5d16827 Mon Sep 17 00:00:00 2001 From: Henry <11198460+godzillaba@users.noreply.github.com> Date: Tue, 5 May 2026 08:57:48 -0600 Subject: [PATCH 12/12] fix readme mistake --- scripts/foundry/contract-upgrades/3.2.0/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/foundry/contract-upgrades/3.2.0/README.md b/scripts/foundry/contract-upgrades/3.2.0/README.md index 082e2682..9a2878cc 100644 --- a/scripts/foundry/contract-upgrades/3.2.0/README.md +++ b/scripts/foundry/contract-upgrades/3.2.0/README.md @@ -43,7 +43,7 @@ Please refer to the top [README](/README.md#check-version-and-upgrade-path) `Che > The .env file must be in project root. 2. (Skip this step if you can use the deployed instances of action contract) - `DeployNitroContracts3Point2Point0UpgradeActionScript.s.sol` script deploys templates, and upgrade action itself. It can be executed in this directory like this: + `DeployNitroContracts3Point2Point0UpgradeActionScript.s.sol` script deploys the upgrade action. It can be executed in this directory like this: ```bash forge script --sender $DEPLOYER --rpc-url $PARENT_CHAIN_RPC --broadcast --slow DeployNitroContracts3Point2Point0UpgradeActionScript -vvv --verify --skip-simulation