From 107bc111c419916cf809c5ba210b47906858e8a9 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Mon, 8 Dec 2025 10:34:22 +0100 Subject: [PATCH 01/24] add v3.2 abi --- src/contracts/RollupCreator/v3.2.ts | 287 ++++++++++++++++++++++++++++ wagmi.config.ts | 22 ++- 2 files changed, 308 insertions(+), 1 deletion(-) create mode 100644 src/contracts/RollupCreator/v3.2.ts diff --git a/src/contracts/RollupCreator/v3.2.ts b/src/contracts/RollupCreator/v3.2.ts new file mode 100644 index 00000000..5b2d5d52 --- /dev/null +++ b/src/contracts/RollupCreator/v3.2.ts @@ -0,0 +1,287 @@ +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// RollupCreator +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0000000000000000000000000000000000000000) + * - + * - [__View Contract on Base Basescan__](https://basescan.org/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x0000000000000000000000000000000000000000) + */ +export const rollupCreatorABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: 'initialOwner', internalType: 'address', type: 'address' }, + { name: '_bridgeCreator', internalType: 'contract BridgeCreator', type: 'address' }, + { name: '_osp', internalType: 'contract IOneStepProofEntry', type: 'address' }, + { + name: '_challengeManagerLogic', + internalType: 'contract IEdgeChallengeManager', + type: 'address', + }, + { name: '_rollupAdminLogic', internalType: 'contract IRollupAdmin', type: 'address' }, + { name: '_rollupUserLogic', internalType: 'contract IRollupUser', type: 'address' }, + { name: '_upgradeExecutorLogic', internalType: 'contract IUpgradeExecutor', type: 'address' }, + { name: '_validatorWalletCreator', internalType: 'address', type: 'address' }, + { name: '_l2FactoriesDeployer', internalType: 'contract DeployHelper', type: 'address' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'previousOwner', internalType: 'address', type: 'address', indexed: true }, + { name: 'newOwner', internalType: 'address', type: 'address', indexed: true }, + ], + name: 'OwnershipTransferred', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'rollupAddress', internalType: 'address', type: 'address', indexed: true }, + { name: 'nativeToken', internalType: 'address', type: 'address', indexed: true }, + { name: 'inboxAddress', internalType: 'address', type: 'address', indexed: false }, + { name: 'outbox', internalType: 'address', type: 'address', indexed: false }, + { name: 'rollupEventInbox', internalType: 'address', type: 'address', indexed: false }, + { name: 'challengeManager', internalType: 'address', type: 'address', indexed: false }, + { name: 'adminProxy', internalType: 'address', type: 'address', indexed: false }, + { name: 'sequencerInbox', internalType: 'address', type: 'address', indexed: false }, + { name: 'bridge', internalType: 'address', type: 'address', indexed: false }, + { name: 'upgradeExecutor', internalType: 'address', type: 'address', indexed: false }, + { name: 'validatorWalletCreator', internalType: 'address', type: 'address', indexed: false }, + ], + name: 'RollupCreated', + }, + { type: 'event', anonymous: false, inputs: [], name: 'TemplatesUpdated' }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'bridgeCreator', + outputs: [{ name: '', internalType: 'contract BridgeCreator', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'challengeManagerTemplate', + outputs: [{ name: '', internalType: 'contract IEdgeChallengeManager', type: 'address' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { + name: 'deployParams', + internalType: 'struct RollupCreator.RollupDeploymentParams', + type: 'tuple', + components: [ + { + name: 'config', + internalType: 'struct Config', + type: 'tuple', + components: [ + { name: 'confirmPeriodBlocks', internalType: 'uint64', type: 'uint64' }, + { name: 'stakeToken', internalType: 'address', type: 'address' }, + { name: 'baseStake', internalType: 'uint256', type: 'uint256' }, + { name: 'wasmModuleRoot', internalType: 'bytes32', type: 'bytes32' }, + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'loserStakeEscrow', internalType: 'address', type: 'address' }, + { name: 'chainId', internalType: 'uint256', type: 'uint256' }, + { name: 'chainConfig', internalType: 'string', type: 'string' }, + { name: 'minimumAssertionPeriod', internalType: 'uint256', type: 'uint256' }, + { name: 'validatorAfkBlocks', internalType: 'uint64', type: 'uint64' }, + { name: 'miniStakeValues', internalType: 'uint256[]', type: 'uint256[]' }, + { + name: 'sequencerInboxMaxTimeVariation', + internalType: 'struct ISequencerInbox.MaxTimeVariation', + type: 'tuple', + components: [ + { name: 'delayBlocks', internalType: 'uint256', type: 'uint256' }, + { name: 'futureBlocks', internalType: 'uint256', type: 'uint256' }, + { name: 'delaySeconds', internalType: 'uint256', type: 'uint256' }, + { name: 'futureSeconds', internalType: 'uint256', type: 'uint256' }, + ], + }, + { name: 'layerZeroBlockEdgeHeight', internalType: 'uint256', type: 'uint256' }, + { name: 'layerZeroBigStepEdgeHeight', internalType: 'uint256', type: 'uint256' }, + { name: 'layerZeroSmallStepEdgeHeight', internalType: 'uint256', type: 'uint256' }, + { + name: 'genesisAssertionState', + internalType: 'struct AssertionState', + type: 'tuple', + components: [ + { + name: 'globalState', + internalType: 'struct GlobalState', + type: 'tuple', + components: [ + { name: 'bytes32Vals', internalType: 'bytes32[2]', type: 'bytes32[2]' }, + { name: 'u64Vals', internalType: 'uint64[2]', type: 'uint64[2]' }, + ], + }, + { name: 'machineStatus', internalType: 'enum MachineStatus', type: 'uint8' }, + { name: 'endHistoryRoot', internalType: 'bytes32', type: 'bytes32' }, + ], + }, + { name: 'genesisInboxCount', internalType: 'uint256', type: 'uint256' }, + { name: 'anyTrustFastConfirmer', internalType: 'address', type: 'address' }, + { name: 'numBigStepLevel', internalType: 'uint8', type: 'uint8' }, + { name: 'challengeGracePeriodBlocks', internalType: 'uint64', type: 'uint64' }, + { + name: 'bufferConfig', + internalType: 'struct BufferConfig', + type: 'tuple', + components: [ + { name: 'threshold', internalType: 'uint64', type: 'uint64' }, + { name: 'max', internalType: 'uint64', type: 'uint64' }, + { name: 'replenishRateInBasis', internalType: 'uint64', type: 'uint64' }, + ], + }, + { name: 'dataCostEstimate', internalType: 'uint256', type: 'uint256' }, + ], + }, + { name: 'validators', internalType: 'address[]', type: 'address[]' }, + { name: 'maxDataSize', internalType: 'uint256', type: 'uint256' }, + { name: 'nativeToken', internalType: 'address', type: 'address' }, + { name: 'deployFactoriesToL2', internalType: 'bool', type: 'bool' }, + { name: 'maxFeePerGasForRetryables', internalType: 'uint256', type: 'uint256' }, + { name: 'batchPosters', internalType: 'address[]', type: 'address[]' }, + { name: 'batchPosterManager', internalType: 'address', type: 'address' }, + { name: 'feeTokenPricer', internalType: 'contract IFeeTokenPricer', type: 'address' }, + { name: 'customOsp', internalType: 'address', type: 'address' }, + ], + }, + ], + name: 'createRollup', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l2FactoriesDeployer', + outputs: [{ name: '', internalType: 'contract DeployHelper', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'osp', + outputs: [{ name: '', internalType: 'contract IOneStepProofEntry', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'rollupAdminLogic', + outputs: [{ name: '', internalType: 'contract IRollupAdmin', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'rollupUserLogic', + outputs: [{ name: '', internalType: 'contract IRollupUser', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_bridgeCreator', internalType: 'contract BridgeCreator', type: 'address' }, + { name: '_osp', internalType: 'contract IOneStepProofEntry', type: 'address' }, + { + name: '_challengeManagerLogic', + internalType: 'contract IEdgeChallengeManager', + type: 'address', + }, + { name: '_rollupAdminLogic', internalType: 'contract IRollupAdmin', type: 'address' }, + { name: '_rollupUserLogic', internalType: 'contract IRollupUser', type: 'address' }, + { name: '_upgradeExecutorLogic', internalType: 'contract IUpgradeExecutor', type: 'address' }, + { name: '_validatorWalletCreator', internalType: 'address', type: 'address' }, + { name: '_l2FactoriesDeployer', internalType: 'contract DeployHelper', type: 'address' }, + ], + name: 'setTemplates', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'upgradeExecutorLogic', + outputs: [{ name: '', internalType: 'contract IUpgradeExecutor', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'validatorWalletCreator', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const; + +/** + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0000000000000000000000000000000000000000) + * - + * - [__View Contract on Base Basescan__](https://basescan.org/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x0000000000000000000000000000000000000000) + */ +export const rollupCreatorAddress = { + 1: '0x0000000000000000000000000000000000000000', + 1337: '0x0000000000000000000000000000000000000000', + 8453: '0x0000000000000000000000000000000000000000', + 42161: '0x0000000000000000000000000000000000000000', + 42170: '0x0000000000000000000000000000000000000000', + 84532: '0x0000000000000000000000000000000000000000', + 412346: '0x0000000000000000000000000000000000000000', + 421614: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', + 11155111: '0x0000000000000000000000000000000000000000', +} as const; + +/** + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0000000000000000000000000000000000000000) + * - + * - [__View Contract on Base Basescan__](https://basescan.org/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x0000000000000000000000000000000000000000) + */ +export const rollupCreatorConfig = { + address: rollupCreatorAddress, + abi: rollupCreatorABI, +} as const; diff --git a/wagmi.config.ts b/wagmi.config.ts index 45a42e0c..7fe44960 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -120,6 +120,26 @@ const contracts: ContractConfig[] = [ [nitroTestnodeL2.id]: '0x4287839696d650a0cf93b98351e85199102335d0', }, }, + { + name: 'RollupCreator', + version: '3.2', + address: { + // mainnet L1 + [mainnet.id]: '0x0000000000000000000000000000000000000000', + // mainnet L2 + [arbitrumOne.id]: '0x0000000000000000000000000000000000000000', + [arbitrumNova.id]: '0x0000000000000000000000000000000000000000', + [base.id]: '0x0000000000000000000000000000000000000000', + // testnet L1 + [sepolia.id]: '0x0000000000000000000000000000000000000000', + // testnet L2 + [arbitrumSepolia.id]: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', + [baseSepolia.id]: '0x0000000000000000000000000000000000000000', + // local nitro-testnode (on "release" branch with --tokenbridge --l3node --l3-token-bridge flags) + [nitroTestnodeL1.id]: '0x0000000000000000000000000000000000000000', + [nitroTestnodeL2.id]: '0x0000000000000000000000000000000000000000', + }, + }, { name: 'RollupCreator', version: '3.1', @@ -253,7 +273,7 @@ export default async function () { ]; for (const contract of contracts) { - await assertContractAbisMatch(contract); + // await assertContractAbisMatch(contract); await updateContractWithImplementationIfProxy(contract); await sleep(); // sleep to avoid rate limiting From 911a7b24e4c0e5972945b6ac3995e01588148831 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Fri, 16 Jan 2026 09:50:35 +0100 Subject: [PATCH 02/24] reorder --- wagmi.config.ts | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/wagmi.config.ts b/wagmi.config.ts index 7fe44960..ef2daa92 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -120,26 +120,6 @@ const contracts: ContractConfig[] = [ [nitroTestnodeL2.id]: '0x4287839696d650a0cf93b98351e85199102335d0', }, }, - { - name: 'RollupCreator', - version: '3.2', - address: { - // mainnet L1 - [mainnet.id]: '0x0000000000000000000000000000000000000000', - // mainnet L2 - [arbitrumOne.id]: '0x0000000000000000000000000000000000000000', - [arbitrumNova.id]: '0x0000000000000000000000000000000000000000', - [base.id]: '0x0000000000000000000000000000000000000000', - // testnet L1 - [sepolia.id]: '0x0000000000000000000000000000000000000000', - // testnet L2 - [arbitrumSepolia.id]: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', - [baseSepolia.id]: '0x0000000000000000000000000000000000000000', - // local nitro-testnode (on "release" branch with --tokenbridge --l3node --l3-token-bridge flags) - [nitroTestnodeL1.id]: '0x0000000000000000000000000000000000000000', - [nitroTestnodeL2.id]: '0x0000000000000000000000000000000000000000', - }, - }, { name: 'RollupCreator', version: '3.1', @@ -160,6 +140,26 @@ const contracts: ContractConfig[] = [ [nitroTestnodeL2.id]: '0x1E08B9c3f94E9aBcc531f67F949d796eC76963b9', }, }, + { + name: 'RollupCreator', + version: '3.2', + address: { + // mainnet L1 + [mainnet.id]: '0x0000000000000000000000000000000000000000', + // mainnet L2 + [arbitrumOne.id]: '0x0000000000000000000000000000000000000000', + [arbitrumNova.id]: '0x0000000000000000000000000000000000000000', + [base.id]: '0x0000000000000000000000000000000000000000', + // testnet L1 + [sepolia.id]: '0x0000000000000000000000000000000000000000', + // testnet L2 + [arbitrumSepolia.id]: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', + [baseSepolia.id]: '0x0000000000000000000000000000000000000000', + // local nitro-testnode (on "release" branch with --tokenbridge --l3node --l3-token-bridge flags) + [nitroTestnodeL1.id]: '0x0000000000000000000000000000000000000000', + [nitroTestnodeL2.id]: '0x0000000000000000000000000000000000000000', + }, + }, { name: 'TokenBridgeCreator', version: '1.2', From 5eb7a82dcad7b1ccf7e7bde7b736e8b468443703 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Fri, 16 Jan 2026 13:13:13 +0100 Subject: [PATCH 03/24] wip --- .github/workflows/build-test.yml | 8 ++--- src/contracts/RollupCreator/index.ts | 2 +- src/createRollup.ts | 14 ++++---- src/createRollupDefaults.ts | 1 + src/createRollupEncodeFunctionData.ts | 16 +++++----- ...eateRollupEnoughCustomFeeTokenAllowance.ts | 2 +- src/createRollupGetCallValue.ts | 2 +- src/createRollupGetRetryablesFees.ts | 10 +++--- ...ustomFeeTokenApprovalTransactionRequest.ts | 2 +- .../index.ts | 32 +++++++++---------- .../{v3.1.ts => v3.2.ts} | 1 + ...upPrepareDeploymentParamsConfigDefaults.ts | 19 +++++------ src/createRollupPrepareTransactionRequest.ts | 12 +++---- src/getBatchPosters.ts | 15 ++++++++- src/isAnyTrust.ts | 6 +++- src/types/createRollupTypes.ts | 20 ++++++++---- src/utils/getRollupCreatorAddress.ts | 8 ++--- 17 files changed, 99 insertions(+), 71 deletions(-) rename src/createRollupPrepareDeploymentParamsConfig/{v3.1.ts => v3.2.ts} (99%) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1be3c0c7..db9e4536 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -80,13 +80,13 @@ jobs: strategy: matrix: config: - - name: Nitro contracts v3.1 - Custom gas token with 18 decimals - nitro-contracts-branch: v3.1.1 + - name: Nitro contracts v3.2.0-beta.0 - Custom gas token with 18 decimals + nitro-contracts-branch: v3.2.0-beta.0 args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token decimals: 18 - - name: Nitro contracts v3.1 - Custom gas token with 6 decimals - nitro-contracts-branch: v3.1.1 + - name: Nitro contracts v3.2.0-beta.0 - Custom gas token with 6 decimals + nitro-contracts-branch: v3.2.0-beta.0 args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token --l3-fee-token-decimals 6 decimals: 6 diff --git a/src/contracts/RollupCreator/index.ts b/src/contracts/RollupCreator/index.ts index b690aa44..631c2d1d 100644 --- a/src/contracts/RollupCreator/index.ts +++ b/src/contracts/RollupCreator/index.ts @@ -1,2 +1,2 @@ // export the latest version -export * from './v3.1'; +export * from './v3.2'; diff --git a/src/createRollup.ts b/src/createRollup.ts index b7e744bd..fc12cd56 100644 --- a/src/createRollup.ts +++ b/src/createRollup.ts @@ -37,7 +37,7 @@ async function ensureCustomGasTokenAllowanceGrantedToRollupCreator< nativeToken, parentChainPublicClient, account, - rollupCreatorVersion = 'v3.1', + rollupCreatorVersion = 'v3.2', }: EnsureCustomGasTokenAllowanceGrantedToRollupCreatorParams) { const allowanceParams = { nativeToken, @@ -84,13 +84,13 @@ export type CreateRollupFunctionParams = rollupCreatorVersion: 'v2.1'; } | { - params: CreateRollupParams<'v3.1'>; + params: CreateRollupParams<'v3.2'>; account: PrivateKeyAccount; parentChainPublicClient: PublicClient; - rollupCreatorVersion: 'v3.1'; + rollupCreatorVersion: 'v3.2'; } | { - params: CreateRollupParams<'v3.1'>; + params: CreateRollupParams<'v3.2'>; account: PrivateKeyAccount; parentChainPublicClient: PublicClient; rollupCreatorVersion?: never; @@ -172,7 +172,7 @@ export async function createRollup({ params, account, parentChainPublicClient, - rollupCreatorVersion = 'v3.1', + rollupCreatorVersion = 'v3.2', }: CreateRollupFunctionParams): Promise { validateParentChain(parentChainPublicClient); @@ -199,10 +199,10 @@ export async function createRollup({ rollupCreatorVersion: 'v2.1', }) : await createRollupPrepareTransactionRequest({ - params: params as CreateRollupParams<'v3.1'>, + params: params as CreateRollupParams<'v3.2'>, account: account.address, publicClient: parentChainPublicClient, - rollupCreatorVersion: 'v3.1', + rollupCreatorVersion: 'v3.2', }); // sign and send the transaction diff --git a/src/createRollupDefaults.ts b/src/createRollupDefaults.ts index a386ffee..1337a36e 100644 --- a/src/createRollupDefaults.ts +++ b/src/createRollupDefaults.ts @@ -6,4 +6,5 @@ export const defaults = { maxFeePerGasForRetryables: parseGwei(String('0.1')), batchPosterManager: zeroAddress, feeTokenPricer: zeroAddress, + customOsp: zeroAddress, }; diff --git a/src/createRollupEncodeFunctionData.ts b/src/createRollupEncodeFunctionData.ts index 14ae427e..5d6bc161 100644 --- a/src/createRollupEncodeFunctionData.ts +++ b/src/createRollupEncodeFunctionData.ts @@ -1,6 +1,6 @@ import { encodeFunctionData, Hex } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { @@ -12,23 +12,23 @@ import { * Encodes function data for the `createRollup` function call based on the RollupCreator version using the appropriate ABI. * * @param args - Function arguments matching the specified version - * @param rollupCreatorVersion - Rollup creator version (defaults to v3.1) + * @param rollupCreatorVersion - Rollup creator version (defaults to v3.2) * @returns The encoded function data as a hex string * * @example - * // Encode for default version (v3.1) + * // Encode for default version (v3.2) * const encodedData = createRollupEncodeFunctionData(args); * * @example * // Encode for specific version * const encodedDataV2 = createRollupEncodeFunctionData(args, 'v2.1'); - * const encodedDataV3 = createRollupEncodeFunctionData(args, 'v3.1'); + * const encodedDataV3 = createRollupEncodeFunctionData(args, 'v3.2'); */ export function createRollupEncodeFunctionData< - TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.1', + TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.2', >( args: CreateRollupFunctionInputs, - rollupCreatorVersion: TRollupCreatorVersion = 'v3.1' as TRollupCreatorVersion, + rollupCreatorVersion: TRollupCreatorVersion = 'v3.2' as TRollupCreatorVersion, ): Hex { if (rollupCreatorVersion === 'v2.1') { return encodeFunctionData({ @@ -39,8 +39,8 @@ export function createRollupEncodeFunctionData< } return encodeFunctionData({ - abi: rollupCreatorV3Dot1ABI, + abi: rollupCreatorV3Dot2ABI, functionName: 'createRollup', - args: args as CreateRollupFunctionInputs<'v3.1'>, + args: args as CreateRollupFunctionInputs<'v3.2'>, }); } diff --git a/src/createRollupEnoughCustomFeeTokenAllowance.ts b/src/createRollupEnoughCustomFeeTokenAllowance.ts index ac8c368e..c7521e5d 100644 --- a/src/createRollupEnoughCustomFeeTokenAllowance.ts +++ b/src/createRollupEnoughCustomFeeTokenAllowance.ts @@ -25,7 +25,7 @@ export async function createRollupEnoughCustomFeeTokenAllowance) { const allowance = await fetchAllowance({ address: nativeToken, diff --git a/src/createRollupGetCallValue.ts b/src/createRollupGetCallValue.ts index babcb627..57208b87 100644 --- a/src/createRollupGetCallValue.ts +++ b/src/createRollupGetCallValue.ts @@ -12,7 +12,7 @@ export async function createRollupGetCallValue nativeToken: Address; deployFactoriesToL2: boolean; }, - rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.1', + rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.2', ): Promise { // when not deploying deterministic factories to L2, no callvalue is necessary, as no retryable tickets will be created if (!params.deployFactoriesToL2) { diff --git a/src/createRollupGetRetryablesFees.ts b/src/createRollupGetRetryablesFees.ts index 83fd7779..699e3ce2 100644 --- a/src/createRollupGetRetryablesFees.ts +++ b/src/createRollupGetRetryablesFees.ts @@ -62,7 +62,7 @@ async function getTemplates( return [ethBasedTemplates[2], erc20BasedTemplates[2]] as const; } - // v3.1 - bridge, sequencerInbox, delayBufferableSequencerInbox, inbox, rollupEventInbox, outbox + // v3.1/v3.2 - bridge, sequencerInbox, delayBufferableSequencerInbox, inbox, rollupEventInbox, outbox // inbox at index 3 const [ethBasedTemplates, erc20BasedTemplates] = await Promise.all([ publicClient.readContract({ @@ -93,14 +93,14 @@ export type CreateRollupGetRetryablesFeesParams = { * @param params.account Account used for deploying the rollup. * @param params.nativeToken (Optional) The native token used for the rollup. Defaults to ETH. * @param params.maxFeePerGasForRetryables (Optional) `maxFeePerGas` to use for retryables. Defaults to 0.1 Gwei. - * @param rollupCreatorVersion (Optional) Version of RollupCreator to use. Defaults to latest (currently v3.1). + * @param rollupCreatorVersion (Optional) Version of RollupCreator to use. Defaults to latest (currently v3.2). * * @returns Estimated fees. */ export async function createRollupGetRetryablesFees( publicClient: PublicClient, { account, nativeToken, maxFeePerGasForRetryables }: CreateRollupGetRetryablesFeesParams, - rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.1', + rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.2', ): Promise { const deployHelperAddress = await publicClient.readContract({ abi: rollupCreatorABI, @@ -174,14 +174,14 @@ export async function createRollupGetRetryablesFees( publicClient: PublicClient, { account, nativeToken, maxFeePerGasForRetryables }: CreateRollupGetRetryablesFeesParams, - rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.1', + rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.2', ): Promise { try { return await createRollupGetRetryablesFees( diff --git a/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts b/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts index b162f33d..9dfcee8b 100644 --- a/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts +++ b/src/createRollupPrepareCustomFeeTokenApprovalTransactionRequest.ts @@ -31,7 +31,7 @@ export async function createRollupPrepareCustomFeeTokenApprovalTransactionReques account, publicClient, rollupCreatorAddressOverride, - rollupCreatorVersion = 'v3.1', + rollupCreatorVersion = 'v3.2', }: CreateRollupPrepareCustomFeeTokenApprovalTransactionRequestParams) { const { chainId } = validateParentChain(publicClient); diff --git a/src/createRollupPrepareDeploymentParamsConfig/index.ts b/src/createRollupPrepareDeploymentParamsConfig/index.ts index 8ff3b9a7..f42fca15 100644 --- a/src/createRollupPrepareDeploymentParamsConfig/index.ts +++ b/src/createRollupPrepareDeploymentParamsConfig/index.ts @@ -9,36 +9,36 @@ import { } from './v2.1'; import { - createRollupPrepareDeploymentParamsConfig as createRollupPrepareDeploymentParamsConfigV3Dot1, - CreateRollupPrepareDeploymentParamsConfigParams as CreateRollupPrepareDeploymentParamsConfigParamsV3Dot1, - CreateRollupPrepareDeploymentParamsConfigResult as CreateRollupPrepareDeploymentParamsConfigResultV3Dot1, -} from './v3.1'; + createRollupPrepareDeploymentParamsConfig as createRollupPrepareDeploymentParamsConfigV3Dot2, + CreateRollupPrepareDeploymentParamsConfigParams as CreateRollupPrepareDeploymentParamsConfigParamsV3Dot2, + CreateRollupPrepareDeploymentParamsConfigResult as CreateRollupPrepareDeploymentParamsConfigResultV3Dot2, +} from './v3.2'; export type CreateRollupPrepareDeploymentParamsConfigParams< - TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.1', + TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.2', > = TRollupCreatorVersion extends 'v2.1' ? CreateRollupPrepareDeploymentParamsConfigParamsV2Dot1 - : CreateRollupPrepareDeploymentParamsConfigParamsV3Dot1; + : CreateRollupPrepareDeploymentParamsConfigParamsV3Dot2; export type CreateRollupPrepareDeploymentParamsConfigResult< - TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.1', + TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.2', > = TRollupCreatorVersion extends 'v2.1' ? CreateRollupPrepareDeploymentParamsConfigResultV2Dot1 - : CreateRollupPrepareDeploymentParamsConfigResultV3Dot1; + : CreateRollupPrepareDeploymentParamsConfigResultV3Dot2; export function createRollupPrepareDeploymentParamsConfig< TChain extends Chain | undefined, - TRollupCreatorVersion extends RollupCreatorSupportedVersion | undefined = 'v3.1', + TRollupCreatorVersion extends RollupCreatorSupportedVersion | undefined = 'v3.2', >( client: Client, params: TRollupCreatorVersion extends 'v2.1' ? CreateRollupPrepareDeploymentParamsConfigParamsV2Dot1 - : CreateRollupPrepareDeploymentParamsConfigParamsV3Dot1, + : CreateRollupPrepareDeploymentParamsConfigParamsV3Dot2, rollupCreatorVersion?: TRollupCreatorVersion, ): TRollupCreatorVersion extends 'v2.1' ? CreateRollupPrepareDeploymentParamsConfigResultV2Dot1 - : CreateRollupPrepareDeploymentParamsConfigResultV3Dot1 { - const version = rollupCreatorVersion ?? 'v3.1'; + : CreateRollupPrepareDeploymentParamsConfigResultV3Dot2 { + const version = rollupCreatorVersion ?? 'v3.2'; if (version === 'v2.1') { return createRollupPrepareDeploymentParamsConfigV2Dot1( @@ -46,13 +46,13 @@ export function createRollupPrepareDeploymentParamsConfig< params as CreateRollupPrepareDeploymentParamsConfigParamsV2Dot1, ) as TRollupCreatorVersion extends 'v2.1' ? CreateRollupPrepareDeploymentParamsConfigResultV2Dot1 - : CreateRollupPrepareDeploymentParamsConfigResultV3Dot1; + : CreateRollupPrepareDeploymentParamsConfigResultV3Dot2; } - return createRollupPrepareDeploymentParamsConfigV3Dot1( + return createRollupPrepareDeploymentParamsConfigV3Dot2( client, - params as CreateRollupPrepareDeploymentParamsConfigParamsV3Dot1, + params as CreateRollupPrepareDeploymentParamsConfigParamsV3Dot2, ) as TRollupCreatorVersion extends 'v2.1' ? CreateRollupPrepareDeploymentParamsConfigResultV2Dot1 - : CreateRollupPrepareDeploymentParamsConfigResultV3Dot1; + : CreateRollupPrepareDeploymentParamsConfigResultV3Dot2; } diff --git a/src/createRollupPrepareDeploymentParamsConfig/v3.1.ts b/src/createRollupPrepareDeploymentParamsConfig/v3.2.ts similarity index 99% rename from src/createRollupPrepareDeploymentParamsConfig/v3.1.ts rename to src/createRollupPrepareDeploymentParamsConfig/v3.2.ts index b888c314..487d992f 100644 --- a/src/createRollupPrepareDeploymentParamsConfig/v3.1.ts +++ b/src/createRollupPrepareDeploymentParamsConfig/v3.2.ts @@ -50,6 +50,7 @@ export type CreateRollupPrepareDeploymentParamsConfigParams = Prettify< * @param {string} [params.wasmModuleRoot] * @param {string} [params.loserStakeEscrow] * @param {BigInt} [params.genesisBlockNum] + * @param {BigInt} [params.dataCostEstimate] * @param {Object} [params.sequencerInboxMaxTimeVariation] * @param {BigInt} [params.sequencerInboxMaxTimeVariation.delayBlocks] * @param {BigInt} [params.sequencerInboxMaxTimeVariation.futureBlocks] diff --git a/src/createRollupPrepareDeploymentParamsConfigDefaults.ts b/src/createRollupPrepareDeploymentParamsConfigDefaults.ts index b9728feb..7f4f1faa 100644 --- a/src/createRollupPrepareDeploymentParamsConfigDefaults.ts +++ b/src/createRollupPrepareDeploymentParamsConfigDefaults.ts @@ -28,9 +28,10 @@ const genesisAssertionState: Config['genesisAssertionState'] = { endHistoryRoot: zeroHash, } as const; -const defaultsV3Dot1 = { +const defaultsV3Dot2 = { anyTrustFastConfirmer: zeroAddress, bufferConfig, + dataCostEstimate: BigInt(0), genesisAssertionState, genesisInboxCount: BigInt(0), layerZeroBlockEdgeHeight: BigInt(2 ** 26), @@ -43,17 +44,17 @@ const defaultsV3Dot1 = { /** * Returns default values for the `config` parameter in `createRollup` for a given RollupCreator version. * - * @param {RollupCreatorSupportedVersion} [rollupCreatorVersion='v3.1'] - The version of the RollupCreator contract + * @param {RollupCreatorSupportedVersion} [rollupCreatorVersion='v3.2'] - The version of the RollupCreator contract * @returns {Object} Default configuration parameters specific to the RollupCreator version * * @example - * // Get defaults for latest version (v3.1) + * // Get defaults for latest version (v3.2) * const defaults = createRollupPrepareDeploymentParamsConfigDefaults(); * * @example * // Get defaults for specific version * const v2Defaults = createRollupPrepareDeploymentParamsConfigDefaults('v2.1'); - * const v3Defaults = createRollupPrepareDeploymentParamsConfigDefaults('v3.1'); + * const v3Defaults = createRollupPrepareDeploymentParamsConfigDefaults('v3.2'); * * @see {@link https://docs.arbitrum.io/launch-orbit-chain/reference/additional-configuration-parameters} */ @@ -61,17 +62,17 @@ export function createRollupPrepareDeploymentParamsConfigDefaults( rollupCreatorVersion: 'v2.1', ): typeof defaultsV2Dot1; export function createRollupPrepareDeploymentParamsConfigDefaults( - rollupCreatorVersion: 'v3.1', -): typeof defaultsV3Dot1; + rollupCreatorVersion: 'v3.2', +): typeof defaultsV3Dot2; export function createRollupPrepareDeploymentParamsConfigDefaults( rollupCreatorVersion?: never, -): typeof defaultsV3Dot1; +): typeof defaultsV3Dot2; export function createRollupPrepareDeploymentParamsConfigDefaults( - rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.1', + rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.2', ) { if (rollupCreatorVersion === 'v2.1') { return defaultsV2Dot1; } - return defaultsV3Dot1; + return defaultsV3Dot2; } diff --git a/src/createRollupPrepareTransactionRequest.ts b/src/createRollupPrepareTransactionRequest.ts index 9529d3b8..f03684b0 100644 --- a/src/createRollupPrepareTransactionRequest.ts +++ b/src/createRollupPrepareTransactionRequest.ts @@ -30,16 +30,16 @@ export type CreateRollupPrepareTransactionRequestParams; + params: CreateRollupParams<'v3.2'>; account: Address; value?: bigint; publicClient: PublicClient; gasOverrides?: TransactionRequestGasOverrides; rollupCreatorAddressOverride?: Address; - rollupCreatorVersion: 'v3.1'; + rollupCreatorVersion: 'v3.2'; } | { - params: CreateRollupParams<'v3.1'>; + params: CreateRollupParams<'v3.2'>; account: Address; value?: bigint; publicClient: PublicClient; @@ -55,7 +55,7 @@ export async function createRollupPrepareTransactionRequest) { const { chainId: parentChainId, isCustom: parentChainIsCustom } = validateParentChain(publicClient); @@ -84,9 +84,9 @@ export async function createRollupPrepareTransactionRequest).feeTokenPricer, + (params as CreateRollupParams<'v3.2'>).feeTokenPricer, ); // fee token pricer is mandatory for custom gas token rollup chains diff --git a/src/getBatchPosters.ts b/src/getBatchPosters.ts index 5d88a505..63c3c072 100644 --- a/src/getBatchPosters.ts +++ b/src/getBatchPosters.ts @@ -9,7 +9,8 @@ import { getFunctionSelector, } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from './contracts/RollupCreator/v1.1'; import { sequencerInboxABI } from './contracts/SequencerInbox'; @@ -19,6 +20,9 @@ import { gnosisSafeL2ABI } from './contracts/GnosisSafeL2'; import { createRollupFetchTransactionHash } from './createRollupFetchTransactionHash'; import { getLogsWithBatching } from './utils/getLogsWithBatching'; +const createRollupV3Dot2ABI = getAbiItem({ abi: rollupCreatorV3Dot2ABI, name: 'createRollup' }); +const createRollupV3Dot2FunctionSelector = getFunctionSelector(createRollupV3Dot2ABI); + const createRollupV3Dot1ABI = getAbiItem({ abi: rollupCreatorV3Dot1ABI, name: 'createRollup' }); const createRollupV3Dot1FunctionSelector = getFunctionSelector(createRollupV3Dot1ABI); @@ -44,6 +48,7 @@ const ownerFunctionCalledEventAbi = getAbiItem({ function getBatchPostersFromFunctionData< TAbi extends + | (typeof createRollupV3Dot2ABI)[] | (typeof createRollupV3Dot1ABI)[] | (typeof createRollupV2Dot1ABI)[] | (typeof createRollupV1Dot1ABI)[] @@ -153,6 +158,14 @@ export async function getBatchPosters( const txSelectedFunction = tx.input.slice(0, 10); switch (txSelectedFunction) { + case createRollupV3Dot2FunctionSelector: { + const [{ batchPosters }] = getBatchPostersFromFunctionData({ + abi: [createRollupV3Dot2ABI], + data: tx.input, + }); + + return new Set([...acc, ...batchPosters]); + } case createRollupV3Dot1FunctionSelector: { const [{ batchPosters }] = getBatchPostersFromFunctionData({ abi: [createRollupV3Dot1ABI], diff --git a/src/isAnyTrust.ts b/src/isAnyTrust.ts index a9fee634..4391b06b 100644 --- a/src/isAnyTrust.ts +++ b/src/isAnyTrust.ts @@ -1,10 +1,12 @@ import { Address, Chain, PublicClient, Transport, decodeFunctionData, getAbiItem } from 'viem'; import { createRollupFetchTransactionHash } from './createRollupFetchTransactionHash'; -import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from './contracts/RollupCreator/v1.1'; +const createRollupV3Dot2ABI = getAbiItem({ abi: rollupCreatorV3Dot2ABI, name: 'createRollup' }); const createRollupV3Dot1ABI = getAbiItem({ abi: rollupCreatorV3Dot1ABI, name: 'createRollup' }); const createRollupV2Dot1ABI = getAbiItem({ abi: rollupCreatorV2Dot1ABI, name: 'createRollup' }); const createRollupV1Dot1ABI = getAbiItem({ abi: rollupCreatorV1Dot1ABI, name: 'createRollup' }); @@ -32,6 +34,8 @@ export async function isAnyTrust({ let result: boolean | null = null; // try parsing from multiple RollupCreator versions [ + // v3.2 + createRollupV3Dot2ABI, // v3.1 createRollupV3Dot1ABI, // v2.1 diff --git a/src/types/createRollupTypes.ts b/src/types/createRollupTypes.ts index b2a34316..57e6a2eb 100644 --- a/src/types/createRollupTypes.ts +++ b/src/types/createRollupTypes.ts @@ -1,18 +1,21 @@ import { GetFunctionArgs } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from '../contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from '../contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from '../contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from '../contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from '../contracts/RollupCreator/v1.1'; import { Prettify } from './utils'; -export type RollupCreatorVersion = 'v3.1' | 'v2.1' | 'v1.1'; -export type RollupCreatorLatestVersion = Extract; -export type RollupCreatorSupportedVersion = Extract; +export type RollupCreatorVersion = 'v3.2' | 'v3.1' | 'v2.1' | 'v1.1'; +export type RollupCreatorLatestVersion = Extract; +export type RollupCreatorSupportedVersion = Extract; export type RollupCreatorABI = // - TVersion extends 'v3.1' + TVersion extends 'v3.2' + ? typeof rollupCreatorV3Dot2ABI + : TVersion extends 'v3.1' ? typeof rollupCreatorV3Dot1ABI : TVersion extends 'v2.1' ? typeof rollupCreatorV2Dot1ABI @@ -28,7 +31,12 @@ type GetCreateRollupRequiredKeys< TVersion extends RollupCreatorVersion = RollupCreatorLatestVersion, > = // - TVersion extends 'v3.1' + TVersion extends 'v3.2' + ? Extract< + keyof CreateRollupFunctionInputs[0], + 'config' | 'batchPosters' | 'validators' + > + : TVersion extends 'v3.1' ? Extract< keyof CreateRollupFunctionInputs[0], 'config' | 'batchPosters' | 'validators' diff --git a/src/utils/getRollupCreatorAddress.ts b/src/utils/getRollupCreatorAddress.ts index 054837cb..b62f0526 100644 --- a/src/utils/getRollupCreatorAddress.ts +++ b/src/utils/getRollupCreatorAddress.ts @@ -1,6 +1,6 @@ import { Client, Transport, Chain, ChainContract, Address } from 'viem'; -import { rollupCreatorAddress as rollupCreatorV3Dot1Address } from '../contracts/RollupCreator'; +import { rollupCreatorAddress as rollupCreatorV3Dot2Address } from '../contracts/RollupCreator'; import { rollupCreatorAddress as rollupCreatorV2Dot1Address } from '../contracts/RollupCreator/v2.1'; import { validateParentChain } from '../types/ParentChain'; @@ -8,7 +8,7 @@ import { RollupCreatorSupportedVersion } from '../types/createRollupTypes'; export function getRollupCreatorAddress( client: Client, - rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.1', + rollupCreatorVersion: RollupCreatorSupportedVersion = 'v3.2', ): Address { const { chainId: parentChainId, isCustom: parentChainIsCustom } = validateParentChain(client); @@ -26,9 +26,9 @@ export function getRollupCreatorAddress( } const rollupCreatorAddress = - rollupCreatorVersion === 'v3.1' + rollupCreatorVersion === 'v3.2' ? // - rollupCreatorV3Dot1Address + rollupCreatorV3Dot2Address : // rollupCreatorV2Dot1Address; From f0c14ea9e144185a63de867879e6c3a1416e61ae Mon Sep 17 00:00:00 2001 From: spsjvc Date: Fri, 16 Jan 2026 13:38:17 +0100 Subject: [PATCH 04/24] use v3.2 in integration tests --- src/testHelpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/testHelpers.ts b/src/testHelpers.ts index b861be66..8e0a8e51 100644 --- a/src/testHelpers.ts +++ b/src/testHelpers.ts @@ -137,7 +137,7 @@ export function getInformationFromTestnode(): TestnodeInformation { } export async function createRollupHelper< - TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.1', + TRollupCreatorVersion extends RollupCreatorSupportedVersion = 'v3.2', >({ deployer, batchPosters, @@ -190,10 +190,10 @@ export async function createRollupHelper< batchPosters, validators, nativeToken, - } as CreateRollupParams<'v3.1'>, + } as CreateRollupParams<'v3.2'>, account: deployer, parentChainPublicClient: client, - rollupCreatorVersion: 'v3.1', + rollupCreatorVersion: 'v3.2', }); // create test rollup with ETH as gas token @@ -246,5 +246,5 @@ export function testHelper_getRollupCreatorVersionFromEnv(): RollupCreatorSuppor .join('.') as RollupCreatorSupportedVersion; } - return 'v3.1'; + return 'v3.2'; } From 016db4ee1ecf899646ae0bfcc507a1b251761f17 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Fri, 16 Jan 2026 14:05:45 +0100 Subject: [PATCH 05/24] fix other tests --- ...createRollupGetRetryablesFees.unit.test.ts | 8 ++--- .../index.type.test.ts | 24 +++++++------- ...llupPrepareTransactionRequest.type.test.ts | 32 +++++++++---------- ...dminLogicPublicActions.integration.test.ts | 2 +- src/getValidators.integration.test.ts | 2 +- .../getRollupCreatorAddress.unit.test.ts | 4 +-- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/createRollupGetRetryablesFees.unit.test.ts b/src/createRollupGetRetryablesFees.unit.test.ts index e23ad346..c9868224 100644 --- a/src/createRollupGetRetryablesFees.unit.test.ts +++ b/src/createRollupGetRetryablesFees.unit.test.ts @@ -59,21 +59,21 @@ it('successfully fetches retryable fees for a custom gas token chain (v2.1)', as expect(fees).toEqual(124800000000000000n); }); -it('successfully fetches retryable fees for an eth-based chain (v3.1)', async () => { +it('successfully fetches retryable fees for an eth-based chain (v3.2)', async () => { const fees = await createRollupGetRetryablesFees( sepoliaClient, { account: '0x38f918D0E9F1b721EDaA41302E399fa1B79333a9', maxFeePerGasForRetryables: parseGwei('0.1'), }, - 'v3.1', + 'v3.2', ); expect(fees).toBeTypeOf('bigint'); expect(fees).toBeGreaterThanOrEqual(124708400000000000n); }); -it('successfully fetches retryable fees for a custom gas token chain (v3.1)', async () => { +it('successfully fetches retryable fees for a custom gas token chain (v3.2)', async () => { const fees = await createRollupGetRetryablesFees( sepoliaClient, { @@ -81,7 +81,7 @@ it('successfully fetches retryable fees for a custom gas token chain (v3.1)', as nativeToken: '0x0625afb445c3b6b7b929342a04a22599fd5dbb59', maxFeePerGasForRetryables: parseGwei('0.1'), }, - 'v3.1', + 'v3.2', ); expect(fees).toBeTypeOf('bigint'); diff --git a/src/createRollupPrepareDeploymentParamsConfig/index.type.test.ts b/src/createRollupPrepareDeploymentParamsConfig/index.type.test.ts index 9ba2bdc4..309c5b54 100644 --- a/src/createRollupPrepareDeploymentParamsConfig/index.type.test.ts +++ b/src/createRollupPrepareDeploymentParamsConfig/index.type.test.ts @@ -17,19 +17,19 @@ const baseParams = { chainId: 69_420n, }; -it('no version parameter defaults to v3.1 result', () => { +it('no version parameter defaults to v3.2 result', () => { const result = createRollupPrepareDeploymentParamsConfig(client, baseParams); expectTypeOf(result).toEqualTypeOf(); - expectTypeOf(result).toEqualTypeOf>(); + expectTypeOf(result).toEqualTypeOf>(); expectTypeOf(result).not.toEqualTypeOf>(); }); -it('explicit v3.1 parameter uses v3.1 result', () => { - const result = createRollupPrepareDeploymentParamsConfig(client, baseParams, 'v3.1'); +it('explicit v3.2 parameter uses v3.2 result', () => { + const result = createRollupPrepareDeploymentParamsConfig(client, baseParams, 'v3.2'); expectTypeOf(result).toEqualTypeOf(); - expectTypeOf(result).toEqualTypeOf>(); + expectTypeOf(result).toEqualTypeOf>(); expectTypeOf(result).not.toEqualTypeOf>(); }); @@ -37,11 +37,11 @@ it('explicit v2.1 parameter uses v2.1 result', () => { const result = createRollupPrepareDeploymentParamsConfig(client, baseParams, 'v2.1'); expectTypeOf(result).not.toEqualTypeOf(); - expectTypeOf(result).not.toEqualTypeOf>(); + expectTypeOf(result).not.toEqualTypeOf>(); expectTypeOf(result).toEqualTypeOf>(); }); -it('no version parameter defaults to v3.1 result', () => { +it('no version parameter defaults to v3.2 result', () => { // this should work createRollupPrepareDeploymentParamsConfig(client, { ...baseParams, @@ -51,25 +51,25 @@ it('no version parameter defaults to v3.1 result', () => { // this should not work createRollupPrepareDeploymentParamsConfig(client, { ...baseParams, - // @ts-expect-error - extraChallengeTimeBlocks not available in v3.1 + // @ts-expect-error - extraChallengeTimeBlocks not available in v3.2 extraChallengeTimeBlocks: 1n, }); }); -it('explicit v3.1 parameter uses v3.1 params', () => { +it('explicit v3.2 parameter uses v3.2 params', () => { // this should work createRollupPrepareDeploymentParamsConfig( client, { ...baseParams, challengeGracePeriodBlocks: 1n }, - 'v3.1', + 'v3.2', ); // this should not work createRollupPrepareDeploymentParamsConfig( client, - // @ts-expect-error - extraChallengeTimeBlocks not available in v3.1 + // @ts-expect-error - extraChallengeTimeBlocks not available in v3.2 { ...baseParams, extraChallengeTimeBlocks: 1n }, - 'v3.1', + 'v3.2', ); }); diff --git a/src/createRollupPrepareTransactionRequest.type.test.ts b/src/createRollupPrepareTransactionRequest.type.test.ts index ecd1eb52..faed4661 100644 --- a/src/createRollupPrepareTransactionRequest.type.test.ts +++ b/src/createRollupPrepareTransactionRequest.type.test.ts @@ -8,13 +8,13 @@ const client = {} as PublicClient; const owner = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045' as const; const configV2Dot1 = {} as CreateRollupPrepareDeploymentParamsConfigResult<'v2.1'>; -const configV3Dot1 = {} as CreateRollupPrepareDeploymentParamsConfigResult<'v3.1'>; +const configV3Dot2 = {} as CreateRollupPrepareDeploymentParamsConfigResult<'v3.2'>; -it('no rollupCreatorVersion parameter accepts v3.1 config (defaults to v3.1)', () => { - // this should work - v3.1 config with no version +it('no rollupCreatorVersion parameter accepts v3.2 config (defaults to v3.2)', () => { + // this should work - v3.2 config with no version createRollupPrepareTransactionRequest({ params: { - config: configV3Dot1, + config: configV3Dot2, batchPosters: [owner], validators: [owner], }, @@ -22,8 +22,8 @@ it('no rollupCreatorVersion parameter accepts v3.1 config (defaults to v3.1)', ( publicClient: client, }); - // this should not work - v2.1 config with no version (defaults to v3.1) - // @ts-expect-error - v2.1 config should not work with default v3.1 version + // this should not work - v2.1 config with no version (defaults to v3.2) + // @ts-expect-error - v2.1 config should not work with default v3.2 version createRollupPrepareTransactionRequest({ params: { config: configV2Dot1, @@ -35,21 +35,21 @@ it('no rollupCreatorVersion parameter accepts v3.1 config (defaults to v3.1)', ( }); }); -it('explicit v3.1 rollupCreatorVersion accepts v3.1 config', () => { - // this should work - v3.1 config with explicit v3.1 version +it('explicit v3.2 rollupCreatorVersion accepts v3.2 config', () => { + // this should work - v3.2 config with explicit v3.2 version createRollupPrepareTransactionRequest({ params: { - config: configV3Dot1, + config: configV3Dot2, batchPosters: [owner], validators: [owner], }, account: owner, publicClient: client, - rollupCreatorVersion: 'v3.1', + rollupCreatorVersion: 'v3.2', }); - // this should not work - v2.1 config with v3.1 version - // @ts-expect-error - v2.1 config should not work with v3.1 version + // this should not work - v2.1 config with v3.2 version + // @ts-expect-error - v2.1 config should not work with v3.2 version createRollupPrepareTransactionRequest({ params: { config: configV2Dot1, @@ -58,7 +58,7 @@ it('explicit v3.1 rollupCreatorVersion accepts v3.1 config', () => { }, account: owner, publicClient: client, - rollupCreatorVersion: 'v3.1', + rollupCreatorVersion: 'v3.2', }); }); @@ -75,11 +75,11 @@ it('explicit v2.1 rollupCreatorVersion accepts v2.1 config', () => { rollupCreatorVersion: 'v2.1', }); - // this should not work - v3.1 config with v2.1 version - // @ts-expect-error - v3.1 config should not work with v2.1 version + // this should not work - v3.2 config with v2.1 version + // @ts-expect-error - v3.2 config should not work with v2.1 version createRollupPrepareTransactionRequest({ params: { - config: configV3Dot1, + config: configV3Dot2, batchPosters: [owner], validators: [owner], }, diff --git a/src/decorators/rollupAdminLogicPublicActions.integration.test.ts b/src/decorators/rollupAdminLogicPublicActions.integration.test.ts index fb1dad93..0588060c 100644 --- a/src/decorators/rollupAdminLogicPublicActions.integration.test.ts +++ b/src/decorators/rollupAdminLogicPublicActions.integration.test.ts @@ -18,7 +18,7 @@ const rollupCreatorVersion = testHelper_getRollupCreatorVersionFromEnv(); // https://github.com/OffchainLabs/nitro-testnode/blob/release/test-node.bash#L634 // https://github.com/OffchainLabs/nitro-contracts/blob/v3.1.1/scripts/rollupCreation.ts#L250-L257 // https://github.com/OffchainLabs/nitro-contracts/blob/v2.1.3/scripts/rollupCreation.ts#L237-L243 -const expectedInitialValidators = rollupCreatorVersion === 'v3.1' ? 11 : 10; +const expectedInitialValidators = rollupCreatorVersion === 'v3.2' ? 11 : 10; const client = createPublicClient({ chain: nitroTestnodeL2, diff --git a/src/getValidators.integration.test.ts b/src/getValidators.integration.test.ts index bc82f19a..b75de2e3 100644 --- a/src/getValidators.integration.test.ts +++ b/src/getValidators.integration.test.ts @@ -18,7 +18,7 @@ const rollupCreatorVersion = testHelper_getRollupCreatorVersionFromEnv(); // https://github.com/OffchainLabs/nitro-testnode/blob/release/test-node.bash#L634 // https://github.com/OffchainLabs/nitro-contracts/blob/v3.1.1/scripts/rollupCreation.ts#L250-L257 // https://github.com/OffchainLabs/nitro-contracts/blob/v2.1.3/scripts/rollupCreation.ts#L237-L243 -const expectedInitialValidators = rollupCreatorVersion === 'v3.1' ? 11 : 10; +const expectedInitialValidators = rollupCreatorVersion === 'v3.2' ? 11 : 10; const client = createPublicClient({ chain: nitroTestnodeL2, diff --git a/src/utils/getRollupCreatorAddress.unit.test.ts b/src/utils/getRollupCreatorAddress.unit.test.ts index 1cf0137d..87aa3a82 100644 --- a/src/utils/getRollupCreatorAddress.unit.test.ts +++ b/src/utils/getRollupCreatorAddress.unit.test.ts @@ -16,13 +16,13 @@ it(`successfully returns address for Sepolia (latest)`, () => { expect(getRollupCreatorAddress(client)).toEqual('0x687Bc1D23390875a868Db158DA1cDC8998E31640'); }); -it(`successfully returns address for Sepolia (v3.1)`, () => { +it(`successfully returns address for Sepolia (v3.2)`, () => { const client = createPublicClient({ chain: sepolia, transport: http(), }); - expect(getRollupCreatorAddress(client, 'v3.1')).toEqual( + expect(getRollupCreatorAddress(client, 'v3.2')).toEqual( '0x687Bc1D23390875a868Db158DA1cDC8998E31640', ); }); From 32a8f895141f2878b13415051b00006406da2a77 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Fri, 16 Jan 2026 14:56:20 +0100 Subject: [PATCH 06/24] add in testnode addresses --- wagmi.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wagmi.config.ts b/wagmi.config.ts index ef2daa92..72629668 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -156,8 +156,8 @@ const contracts: ContractConfig[] = [ [arbitrumSepolia.id]: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', [baseSepolia.id]: '0x0000000000000000000000000000000000000000', // local nitro-testnode (on "release" branch with --tokenbridge --l3node --l3-token-bridge flags) - [nitroTestnodeL1.id]: '0x0000000000000000000000000000000000000000', - [nitroTestnodeL2.id]: '0x0000000000000000000000000000000000000000', + [nitroTestnodeL1.id]: '0xb562622f2D76F355D673560CB88c1dF6088702f1', + [nitroTestnodeL2.id]: '0x1E08B9c3f94E9aBcc531f67F949d796eC76963b9', }, }, { From a9372df00b4c4d9de23cf552f4d540b8f8ecb412 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Fri, 16 Jan 2026 15:38:09 +0100 Subject: [PATCH 07/24] fix testnode addresses --- src/contracts/RollupCreator/v3.2.ts | 4 ++-- wagmi.config.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/contracts/RollupCreator/v3.2.ts b/src/contracts/RollupCreator/v3.2.ts index 5b2d5d52..c2cff58e 100644 --- a/src/contracts/RollupCreator/v3.2.ts +++ b/src/contracts/RollupCreator/v3.2.ts @@ -261,12 +261,12 @@ export const rollupCreatorABI = [ */ export const rollupCreatorAddress = { 1: '0x0000000000000000000000000000000000000000', - 1337: '0x0000000000000000000000000000000000000000', + 1337: '0xe97d64a4f13B3a61bbE9358788BCB4C398987F02', 8453: '0x0000000000000000000000000000000000000000', 42161: '0x0000000000000000000000000000000000000000', 42170: '0x0000000000000000000000000000000000000000', 84532: '0x0000000000000000000000000000000000000000', - 412346: '0x0000000000000000000000000000000000000000', + 412346: '0xFd0A9f1FF82d4E635327700cE8Fe45cFdE6cB78C', 421614: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', 11155111: '0x0000000000000000000000000000000000000000', } as const; diff --git a/wagmi.config.ts b/wagmi.config.ts index 72629668..dddd766f 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -156,8 +156,8 @@ const contracts: ContractConfig[] = [ [arbitrumSepolia.id]: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', [baseSepolia.id]: '0x0000000000000000000000000000000000000000', // local nitro-testnode (on "release" branch with --tokenbridge --l3node --l3-token-bridge flags) - [nitroTestnodeL1.id]: '0xb562622f2D76F355D673560CB88c1dF6088702f1', - [nitroTestnodeL2.id]: '0x1E08B9c3f94E9aBcc531f67F949d796eC76963b9', + [nitroTestnodeL1.id]: '0xe97d64a4f13B3a61bbE9358788BCB4C398987F02', + [nitroTestnodeL2.id]: '0xFd0A9f1FF82d4E635327700cE8Fe45cFdE6cB78C', }, }, { From 6e86ca577b9a19737235f4fc9b5d9729ea1cab66 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 10:04:55 +0100 Subject: [PATCH 08/24] patch wagmi cli to fix etherscan rate limits --- patches/@wagmi+cli+1.5.2.patch | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/patches/@wagmi+cli+1.5.2.patch b/patches/@wagmi+cli+1.5.2.patch index 2e4b69d2..644f44e6 100644 --- a/patches/@wagmi+cli+1.5.2.patch +++ b/patches/@wagmi+cli+1.5.2.patch @@ -13,17 +13,30 @@ index 04a78d1..0eb6430 100644 97: string; 128: string; diff --git a/node_modules/@wagmi/cli/dist/plugins/index.js b/node_modules/@wagmi/cli/dist/plugins/index.js -index 8e23da2..02b7c49 100644 +index 8e23da2..615b384 100644 --- a/node_modules/@wagmi/cli/dist/plugins/index.js +++ b/node_modules/@wagmi/cli/dist/plugins/index.js -@@ -386,12 +386,12 @@ function blockExplorer({ +@@ -12,6 +12,10 @@ import { + } from "../chunk-3XEDX7DR.js"; + import "../chunk-UICA3PK6.js"; + ++function sleep(ms) { ++ return new Promise((resolve) => setTimeout(resolve, ms)); ++} ++ + // src/plugins/actions.ts + import { pascalCase } from "change-case"; + import dedent from "dedent"; +@@ -386,12 +390,14 @@ function blockExplorer({ throw new Error(parsed.data.result); return parsed.data.result; }, - request({ address }) { -+ request({ address, implementation }) { ++ async request({ address, implementation }) { if (!address) throw new Error("address is required"); ++ // etherscan was rate-limiting us, had to add this ++ await sleep(1000); return { url: `${baseUrl}?module=contract&action=getabi&address=${getAddress({ - address @@ -31,7 +44,7 @@ index 8e23da2..02b7c49 100644 })}${apiKey ? `&apikey=${apiKey}` : ""}` }; } -@@ -1386,7 +1386,9 @@ var apiUrls = { +@@ -1386,7 +1392,9 @@ var apiUrls = { [137]: "https://api.polygonscan.com/api", [80001]: "https://api-testnet.polygonscan.com/api", [42161]: "https://api.arbiscan.io/api", @@ -41,7 +54,7 @@ index 8e23da2..02b7c49 100644 [56]: "https://api.bscscan.com/api", [97]: "https://api-testnet.bscscan.com/api", [128]: "https://api.hecoinfo.com/api", -@@ -1409,16 +1411,16 @@ function etherscan({ +@@ -1409,16 +1417,16 @@ function etherscan({ address: typeof x.address === "string" ? { [chainId]: x.address } : x.address })); return blockExplorer({ From a17bb30fd08f4fc01283feede7c79ded5b1f82ed Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 10:08:39 +0100 Subject: [PATCH 09/24] increase wait time between requests --- wagmi.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wagmi.config.ts b/wagmi.config.ts index dddd766f..0bebd641 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -31,7 +31,7 @@ function loadApiKey(key: string): string { return apiKey; } -function sleep(ms: number = 1_000) { +function sleep(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); } @@ -225,7 +225,7 @@ export async function assertContractAbisMatch(contract: ContractConfig) { // fetch abis for all chains and hash them .map(async ([chainId, address], index) => { // sleep to avoid rate limiting - await sleep(index * 500); + await sleep(index * 1_000); const abi = await fetchAbi(Number(chainId) as ParentChainId, address); const abiHash = hashMessage(JSON.stringify(abi)); @@ -275,7 +275,7 @@ export default async function () { for (const contract of contracts) { // await assertContractAbisMatch(contract); await updateContractWithImplementationIfProxy(contract); - await sleep(); // sleep to avoid rate limiting + await sleep(1_000); // sleep to avoid rate limiting const filePath = typeof contract.version !== 'undefined' From 310e67dcb6c9f245e9f16d7366300e7a9ade8134 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 10:10:29 +0100 Subject: [PATCH 10/24] generate --- src/contracts/RollupCreator/v3.2.ts | 56 ++++++++++++++--------------- wagmi.config.ts | 16 ++++----- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/contracts/RollupCreator/v3.2.ts b/src/contracts/RollupCreator/v3.2.ts index c2cff58e..e54bdc57 100644 --- a/src/contracts/RollupCreator/v3.2.ts +++ b/src/contracts/RollupCreator/v3.2.ts @@ -3,14 +3,14 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7) * - - * - [__View Contract on Base Basescan__](https://basescan.org/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Base Basescan__](https://basescan.org/address/0x8d1668636D053C10F57367D68118bD624f41ffe6) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x8d1668636D053C10F57367D68118bD624f41ffe6) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7) */ export const rollupCreatorABI = [ { @@ -250,36 +250,36 @@ export const rollupCreatorABI = [ ] as const; /** - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7) * - - * - [__View Contract on Base Basescan__](https://basescan.org/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Base Basescan__](https://basescan.org/address/0x8d1668636D053C10F57367D68118bD624f41ffe6) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x8d1668636D053C10F57367D68118bD624f41ffe6) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7) */ export const rollupCreatorAddress = { - 1: '0x0000000000000000000000000000000000000000', + 1: '0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7', 1337: '0xe97d64a4f13B3a61bbE9358788BCB4C398987F02', - 8453: '0x0000000000000000000000000000000000000000', - 42161: '0x0000000000000000000000000000000000000000', - 42170: '0x0000000000000000000000000000000000000000', - 84532: '0x0000000000000000000000000000000000000000', + 8453: '0x8d1668636D053C10F57367D68118bD624f41ffe6', + 42161: '0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B', + 42170: '0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B', + 84532: '0x8d1668636D053C10F57367D68118bD624f41ffe6', 412346: '0xFd0A9f1FF82d4E635327700cE8Fe45cFdE6cB78C', - 421614: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', - 11155111: '0x0000000000000000000000000000000000000000', + 421614: '0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B', + 11155111: '0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7', } as const; /** - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7) * - - * - [__View Contract on Base Basescan__](https://basescan.org/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x0000000000000000000000000000000000000000) - * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131) - * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x0000000000000000000000000000000000000000) + * - [__View Contract on Base Basescan__](https://basescan.org/address/0x8d1668636D053C10F57367D68118bD624f41ffe6) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x8d1668636D053C10F57367D68118bD624f41ffe6) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7) */ export const rollupCreatorConfig = { address: rollupCreatorAddress, diff --git a/wagmi.config.ts b/wagmi.config.ts index 0bebd641..85d62426 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -145,16 +145,16 @@ const contracts: ContractConfig[] = [ version: '3.2', address: { // mainnet L1 - [mainnet.id]: '0x0000000000000000000000000000000000000000', + [mainnet.id]: '0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7', // mainnet L2 - [arbitrumOne.id]: '0x0000000000000000000000000000000000000000', - [arbitrumNova.id]: '0x0000000000000000000000000000000000000000', - [base.id]: '0x0000000000000000000000000000000000000000', + [arbitrumOne.id]: '0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B', + [arbitrumNova.id]: '0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B', + [base.id]: '0x8d1668636D053C10F57367D68118bD624f41ffe6', // testnet L1 - [sepolia.id]: '0x0000000000000000000000000000000000000000', + [sepolia.id]: '0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7', // testnet L2 - [arbitrumSepolia.id]: '0x04aFd6BaAd7805c3e6F8f86B9D3EE087F9FCa131', - [baseSepolia.id]: '0x0000000000000000000000000000000000000000', + [arbitrumSepolia.id]: '0xF5962AD061A1aD6F38F340F5b267b3593cC1Cd7B', + [baseSepolia.id]: '0x8d1668636D053C10F57367D68118bD624f41ffe6', // local nitro-testnode (on "release" branch with --tokenbridge --l3node --l3-token-bridge flags) [nitroTestnodeL1.id]: '0xe97d64a4f13B3a61bbE9358788BCB4C398987F02', [nitroTestnodeL2.id]: '0xFd0A9f1FF82d4E635327700cE8Fe45cFdE6cB78C', @@ -273,7 +273,7 @@ export default async function () { ]; for (const contract of contracts) { - // await assertContractAbisMatch(contract); + await assertContractAbisMatch(contract); await updateContractWithImplementationIfProxy(contract); await sleep(1_000); // sleep to avoid rate limiting From f45d29b4ac1fdc06aceb768c0d0d60631e8014f3 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 10:35:48 +0100 Subject: [PATCH 11/24] fix test --- src/utils/getRollupCreatorAddress.unit.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/getRollupCreatorAddress.unit.test.ts b/src/utils/getRollupCreatorAddress.unit.test.ts index 87aa3a82..902cd649 100644 --- a/src/utils/getRollupCreatorAddress.unit.test.ts +++ b/src/utils/getRollupCreatorAddress.unit.test.ts @@ -13,7 +13,7 @@ it(`successfully returns address for Sepolia (latest)`, () => { transport: http(), }); - expect(getRollupCreatorAddress(client)).toEqual('0x687Bc1D23390875a868Db158DA1cDC8998E31640'); + expect(getRollupCreatorAddress(client)).toEqual('0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7'); }); it(`successfully returns address for Sepolia (v3.2)`, () => { @@ -23,7 +23,7 @@ it(`successfully returns address for Sepolia (v3.2)`, () => { }); expect(getRollupCreatorAddress(client, 'v3.2')).toEqual( - '0x687Bc1D23390875a868Db158DA1cDC8998E31640', + '0xe06Bc77336E201c4C08751918A4bB99ddf0e1Bf7', ); }); From 8fd543aad6de43c815099dc7652fcdb8b69a7511 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 10:39:02 +0100 Subject: [PATCH 12/24] fix --- src/createRollupPrepareTransaction.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/createRollupPrepareTransaction.ts b/src/createRollupPrepareTransaction.ts index 24b1cb62..085d5abb 100644 --- a/src/createRollupPrepareTransaction.ts +++ b/src/createRollupPrepareTransaction.ts @@ -1,7 +1,8 @@ import { Transaction, decodeFunctionData } from 'viem'; import { DecodeFunctionDataReturnType } from 'viem/_types/utils/abi/decodeFunctionData'; -import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator/v3.2'; +import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from './contracts/RollupCreator/v1.1'; @@ -19,6 +20,8 @@ function createRollupDecodeFunctionData Date: Wed, 21 Jan 2026 10:43:03 +0100 Subject: [PATCH 13/24] make v3.2 imports explicit --- src/createRollupEncodeFunctionData.ts | 2 +- src/createRollupGetRetryablesFees.ts | 2 +- src/getBatchPosters.ts | 2 +- src/isAnyTrust.ts | 2 +- src/types/createRollupTypes.ts | 2 +- src/utils/getRollupCreatorAddress.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/createRollupEncodeFunctionData.ts b/src/createRollupEncodeFunctionData.ts index 5d6bc161..0ef9da97 100644 --- a/src/createRollupEncodeFunctionData.ts +++ b/src/createRollupEncodeFunctionData.ts @@ -1,6 +1,6 @@ import { encodeFunctionData, Hex } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator/v3.2'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { diff --git a/src/createRollupGetRetryablesFees.ts b/src/createRollupGetRetryablesFees.ts index 699e3ce2..d1ce27df 100644 --- a/src/createRollupGetRetryablesFees.ts +++ b/src/createRollupGetRetryablesFees.ts @@ -10,7 +10,7 @@ import { parseEther, } from 'viem'; -import { rollupCreatorABI } from './contracts/RollupCreator'; +import { rollupCreatorABI } from './contracts/RollupCreator/v3.2'; import { bridgeCreatorABI as bridgeCreatorV3Dot1ABI } from './contracts/BridgeCreator'; import { bridgeCreatorABI as bridgeCreatorV2Dot1ABI } from './contracts/BridgeCreator/v2.1'; import { getRollupCreatorAddress } from './utils/getRollupCreatorAddress'; diff --git a/src/getBatchPosters.ts b/src/getBatchPosters.ts index 63c3c072..eb58914d 100644 --- a/src/getBatchPosters.ts +++ b/src/getBatchPosters.ts @@ -9,7 +9,7 @@ import { getFunctionSelector, } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator/v3.2'; import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from './contracts/RollupCreator/v1.1'; diff --git a/src/isAnyTrust.ts b/src/isAnyTrust.ts index 4391b06b..bd58a95f 100644 --- a/src/isAnyTrust.ts +++ b/src/isAnyTrust.ts @@ -1,7 +1,7 @@ import { Address, Chain, PublicClient, Transport, decodeFunctionData, getAbiItem } from 'viem'; import { createRollupFetchTransactionHash } from './createRollupFetchTransactionHash'; -import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator/v3.2'; import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from './contracts/RollupCreator/v1.1'; diff --git a/src/types/createRollupTypes.ts b/src/types/createRollupTypes.ts index 57e6a2eb..b1791425 100644 --- a/src/types/createRollupTypes.ts +++ b/src/types/createRollupTypes.ts @@ -1,6 +1,6 @@ import { GetFunctionArgs } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from '../contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from '../contracts/RollupCreator/v3.2'; import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from '../contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from '../contracts/RollupCreator/v2.1'; import { rollupCreatorABI as rollupCreatorV1Dot1ABI } from '../contracts/RollupCreator/v1.1'; diff --git a/src/utils/getRollupCreatorAddress.ts b/src/utils/getRollupCreatorAddress.ts index b62f0526..7b431f09 100644 --- a/src/utils/getRollupCreatorAddress.ts +++ b/src/utils/getRollupCreatorAddress.ts @@ -1,6 +1,6 @@ import { Client, Transport, Chain, ChainContract, Address } from 'viem'; -import { rollupCreatorAddress as rollupCreatorV3Dot2Address } from '../contracts/RollupCreator'; +import { rollupCreatorAddress as rollupCreatorV3Dot2Address } from '../contracts/RollupCreator/v3.2'; import { rollupCreatorAddress as rollupCreatorV2Dot1Address } from '../contracts/RollupCreator/v2.1'; import { validateParentChain } from '../types/ParentChain'; From 0a25e0d79bbef5b93ab1f65e3b03666ad8a21887 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 10:44:29 +0100 Subject: [PATCH 14/24] fix transaction receipt --- src/createRollupPrepareTransactionReceipt.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/createRollupPrepareTransactionReceipt.ts b/src/createRollupPrepareTransactionReceipt.ts index d227fc22..fc05d20c 100644 --- a/src/createRollupPrepareTransactionReceipt.ts +++ b/src/createRollupPrepareTransactionReceipt.ts @@ -7,12 +7,17 @@ import { DecodeEventLogReturnType, } from 'viem'; -import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator'; +import { rollupCreatorABI as rollupCreatorV3Dot2ABI } from './contracts/RollupCreator/v3.2'; +import { rollupCreatorABI as rollupCreatorV3Dot1ABI } from './contracts/RollupCreator/v3.1'; import { rollupCreatorABI as rollupCreatorV2Dot1ABI } from './contracts/RollupCreator/v2.1'; import { CoreContracts } from './types/CoreContracts'; function findRollupCreatedEventLog(txReceipt: TransactionReceipt): Log { + // v3.2 + const v3Dot2EventSelector = getEventSelector( + getAbiItem({ abi: rollupCreatorV3Dot2ABI, name: 'RollupCreated' }), + ); // v3.1 const v3Dot1EventSelector = getEventSelector( getAbiItem({ abi: rollupCreatorV3Dot1ABI, name: 'RollupCreated' }), @@ -24,7 +29,11 @@ function findRollupCreatedEventLog(txReceipt: TransactionReceipt): Log { const topic = log.topics[0]; - return topic === v3Dot1EventSelector || topic === v2Dot1EventSelector; + return ( + topic === v3Dot2EventSelector || + topic === v3Dot1EventSelector || + topic === v2Dot1EventSelector + ); }); if (typeof log === 'undefined') { @@ -37,6 +46,8 @@ function findRollupCreatedEventLog(txReceipt: TransactionReceipt): Log Date: Wed, 21 Jan 2026 10:57:41 +0100 Subject: [PATCH 15/24] rename v3.1 to v3.2 --- .../{v3.1.unit.test.ts.snap => v3.2.unit.test.ts.snap} | 0 .../{v3.1.unit.test.ts => v3.2.unit.test.ts} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/createRollupPrepareDeploymentParamsConfig/__snapshots__/{v3.1.unit.test.ts.snap => v3.2.unit.test.ts.snap} (100%) rename src/createRollupPrepareDeploymentParamsConfig/{v3.1.unit.test.ts => v3.2.unit.test.ts} (100%) diff --git a/src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.1.unit.test.ts.snap b/src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.2.unit.test.ts.snap similarity index 100% rename from src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.1.unit.test.ts.snap rename to src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.2.unit.test.ts.snap diff --git a/src/createRollupPrepareDeploymentParamsConfig/v3.1.unit.test.ts b/src/createRollupPrepareDeploymentParamsConfig/v3.2.unit.test.ts similarity index 100% rename from src/createRollupPrepareDeploymentParamsConfig/v3.1.unit.test.ts rename to src/createRollupPrepareDeploymentParamsConfig/v3.2.unit.test.ts From 1d6bb19de8b03626cf30e562020fb5a3c118c6d0 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 11:01:46 +0100 Subject: [PATCH 16/24] rename v3.1 to v3.2 --- ...ts => createRollupPrepareTransactionRequest-v3.2.unit.test.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{createRollupPrepareTransactionRequest-v3.1.unit.test.ts => createRollupPrepareTransactionRequest-v3.2.unit.test.ts} (100%) diff --git a/src/createRollupPrepareTransactionRequest-v3.1.unit.test.ts b/src/createRollupPrepareTransactionRequest-v3.2.unit.test.ts similarity index 100% rename from src/createRollupPrepareTransactionRequest-v3.1.unit.test.ts rename to src/createRollupPrepareTransactionRequest-v3.2.unit.test.ts From 7e8b1053cf0b7ec8243c9bad8ed00f81514f6bf2 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 11:05:44 +0100 Subject: [PATCH 17/24] update snapshots --- .../__snapshots__/v3.2.unit.test.ts.snap | 7 +++++++ .../v3.2.unit.test.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.2.unit.test.ts.snap b/src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.2.unit.test.ts.snap index 673660fb..ff688516 100644 --- a/src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.2.unit.test.ts.snap +++ b/src/createRollupPrepareDeploymentParamsConfig/__snapshots__/v3.2.unit.test.ts.snap @@ -13,6 +13,7 @@ exports[`creates a config for a chain on top of a custom parent chain 1`] = ` "chainId": 123n, "challengeGracePeriodBlocks": 2n, "confirmPeriodBlocks": 1n, + "dataCostEstimate": 0n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { @@ -65,6 +66,7 @@ exports[`creates config for a chain on top of arbitrum one with defaults 1`] = ` "chainId": 69420n, "challengeGracePeriodBlocks": 14400n, "confirmPeriodBlocks": 50400n, + "dataCostEstimate": 0n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { @@ -117,6 +119,7 @@ exports[`creates config for a chain on top of arbitrum one with overrides 1`] = "chainId": 69420n, "challengeGracePeriodBlocks": 4201n, "confirmPeriodBlocks": 4200n, + "dataCostEstimate": 1n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { @@ -169,6 +172,7 @@ exports[`creates config for a chain on top of arbitrum sepolia with defaults 1`] "chainId": 69420n, "challengeGracePeriodBlocks": 14400n, "confirmPeriodBlocks": 150n, + "dataCostEstimate": 0n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { @@ -221,6 +225,7 @@ exports[`creates config for a chain on top of arbitrum sepolia with overrides 1` "chainId": 69420n, "challengeGracePeriodBlocks": 4201n, "confirmPeriodBlocks": 4200n, + "dataCostEstimate": 1n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { @@ -273,6 +278,7 @@ exports[`creates config for a chain on top of base sepolia with defaults 1`] = ` "chainId": 69420n, "challengeGracePeriodBlocks": 86400n, "confirmPeriodBlocks": 900n, + "dataCostEstimate": 0n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { @@ -325,6 +331,7 @@ exports[`creates config for a chain on top of base with defaults 1`] = ` "chainId": 69420n, "challengeGracePeriodBlocks": 86400n, "confirmPeriodBlocks": 302400n, + "dataCostEstimate": 0n, "genesisAssertionState": { "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "globalState": { diff --git a/src/createRollupPrepareDeploymentParamsConfig/v3.2.unit.test.ts b/src/createRollupPrepareDeploymentParamsConfig/v3.2.unit.test.ts index 14a96c32..3072ef3a 100644 --- a/src/createRollupPrepareDeploymentParamsConfig/v3.2.unit.test.ts +++ b/src/createRollupPrepareDeploymentParamsConfig/v3.2.unit.test.ts @@ -35,6 +35,7 @@ function getOverrides({ owner, chainId }: { owner: Address; chainId: bigint }) { max: 2n, replenishRateInBasis: 25n, }, + dataCostEstimate: 1n, loserStakeEscrow: '0x0000000000000000000000000000000000000001', sequencerInboxMaxTimeVariation: { delayBlocks: 200n, From 5ceede7e08afb38dc865b4a457b94890199681a2 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 13:39:25 +0100 Subject: [PATCH 18/24] add missing test --- ...RollupPrepareTransaction.unit.test.ts.snap | 70 +++++++++++++++++++ ...reateRollupPrepareTransaction.unit.test.ts | 10 +++ 2 files changed, 80 insertions(+) diff --git a/src/__snapshots__/createRollupPrepareTransaction.unit.test.ts.snap b/src/__snapshots__/createRollupPrepareTransaction.unit.test.ts.snap index b4900ab3..8419bca3 100644 --- a/src/__snapshots__/createRollupPrepareTransaction.unit.test.ts.snap +++ b/src/__snapshots__/createRollupPrepareTransaction.unit.test.ts.snap @@ -146,3 +146,73 @@ exports[`successfully parses input calldata for a chain created with RollupCreat }, ] `; + +exports[`successfully parses input calldata for a chain created with RollupCreator v3.2 1`] = ` +[ + { + "batchPosterManager": "0x784FB06549C5Ebc20A82FFE251FF3B45C963D8df", + "batchPosters": [ + "0x784FB06549C5Ebc20A82FFE251FF3B45C963D8df", + ], + "config": { + "anyTrustFastConfirmer": "0x0000000000000000000000000000000000000000", + "baseStake": 2500000000000000n, + "bufferConfig": { + "max": 14400n, + "replenishRateInBasis": 833n, + "threshold": 600n, + }, + "chainConfig": "{\\"chainId\\":2026011651,\\"homesteadBlock\\":0,\\"daoForkBlock\\":null,\\"daoForkSupport\\":true,\\"eip150Block\\":0,\\"eip150Hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"eip155Block\\":0,\\"eip158Block\\":0,\\"byzantiumBlock\\":0,\\"constantinopleBlock\\":0,\\"petersburgBlock\\":0,\\"istanbulBlock\\":0,\\"muirGlacierBlock\\":0,\\"berlinBlock\\":0,\\"londonBlock\\":0,\\"clique\\":{\\"period\\":0,\\"epoch\\":0},\\"arbitrum\\":{\\"EnableArbOS\\":true,\\"AllowDebugPrecompiles\\":false,\\"DataAvailabilityCommittee\\":false,\\"InitialArbOSVersion\\":51,\\"InitialChainOwner\\":\\"0x93a3B783Bd697b384Bfc6C01a2d2831E42536975\\",\\"GenesisBlockNum\\":0}}", + "chainId": 2026011651n, + "challengeGracePeriodBlocks": 10n, + "confirmPeriodBlocks": 128n, + "dataCostEstimate": 0n, + "genesisAssertionState": { + "endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "globalState": { + "bytes32Vals": [ + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + ], + "u64Vals": [ + 0n, + 0n, + ], + }, + "machineStatus": 1, + }, + "genesisInboxCount": 0n, + "layerZeroBigStepEdgeHeight": 524288n, + "layerZeroBlockEdgeHeight": 67108864n, + "layerZeroSmallStepEdgeHeight": 8388608n, + "loserStakeEscrow": "0x93a3B783Bd697b384Bfc6C01a2d2831E42536975", + "miniStakeValues": [ + 0n, + 500000000000000n, + 250000000000000n, + ], + "minimumAssertionPeriod": 75n, + "numBigStepLevel": 1, + "owner": "0x93a3B783Bd697b384Bfc6C01a2d2831E42536975", + "sequencerInboxMaxTimeVariation": { + "delayBlocks": 7200n, + "delaySeconds": 86400n, + "futureBlocks": 12n, + "futureSeconds": 3600n, + }, + "stakeToken": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "validatorAfkBlocks": 201600n, + "wasmModuleRoot": "0x8a7513bf7bb3e3db04b0d982d0e973bcf57bf8b88aef7c6d03dba3a81a56a499", + }, + "customOsp": "0x0000000000000000000000000000000000000000", + "deployFactoriesToL2": true, + "feeTokenPricer": "0x0000000000000000000000000000000000000000", + "maxDataSize": 117964n, + "maxFeePerGasForRetryables": 1000000000n, + "nativeToken": "0x0000000000000000000000000000000000000000", + "validators": [ + "0xe6AB2c18Ce552fE5fcf43667133776d6337359Df", + ], + }, +] +`; diff --git a/src/createRollupPrepareTransaction.unit.test.ts b/src/createRollupPrepareTransaction.unit.test.ts index ca806b73..b7c1acc0 100644 --- a/src/createRollupPrepareTransaction.unit.test.ts +++ b/src/createRollupPrepareTransaction.unit.test.ts @@ -32,3 +32,13 @@ it('successfully parses input calldata for a chain created with RollupCreator v3 expect(getInputs()).toMatchSnapshot(); }); + +// https://sepolia.etherscan.io/tx/0x6f6e67cc36fdee7248d76811739b2b6718641b5b1a13ca39c7605aa0636e7d67 +it('successfully parses input calldata for a chain created with RollupCreator v3.2', () => { + const { getInputs } = createRollupPrepareTransaction({ + input: + '0x2d12e32c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000840000000000000000000000000000000000000000000000000000000000001cccc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000880000000000000000000000000784fb06549c5ebc20a82ffe251ff3b45c963d8df0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000007b79995e5f793a07bc00c21412e50ecae098e7f90000000000000000000000000000000000000000000000000008e1bc9bf040008a7513bf7bb3e3db04b0d982d0e973bcf57bf8b88aef7c6d03dba3a81a56a49900000000000000000000000093a3b783bd697b384bfc6c01a2d2831e4253697500000000000000000000000093a3b783bd697b384bfc6c01a2d2831e425369750000000000000000000000000000000000000000000000000000000078c27c030000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004b000000000000000000000000000000000000000000000000000000000003138000000000000000000000000000000000000000000000000000000000000006800000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000000000000000000000000e10000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000038400000000000000000000000000000000000000000000000000000000000000341000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002497b22636861696e4964223a323032363031313635312c22686f6d657374656164426c6f636b223a302c2264616f466f726b426c6f636b223a6e756c6c2c2264616f466f726b537570706f7274223a747275652c22656970313530426c6f636b223a302c2265697031353048617368223a22307830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030222c22656970313535426c6f636b223a302c22656970313538426c6f636b223a302c2262797a616e7469756d426c6f636b223a302c22636f6e7374616e74696e6f706c65426c6f636b223a302c2270657465727362757267426c6f636b223a302c22697374616e62756c426c6f636b223a302c226d756972476c6163696572426c6f636b223a302c226265726c696e426c6f636b223a302c226c6f6e646f6e426c6f636b223a302c22636c69717565223a7b22706572696f64223a302c2265706f6368223a307d2c22617262697472756d223a7b22456e61626c654172624f53223a747275652c22416c6c6f774465627567507265636f6d70696c6573223a66616c73652c2244617461417661696c6162696c697479436f6d6d6974746565223a66616c73652c22496e697469616c4172624f5356657273696f6e223a35312c22496e697469616c436861696e4f776e6572223a22307839336133423738334264363937623338344266633643303161326432383331453432353336393735222c2247656e65736973426c6f636b4e756d223a307d7d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6bf526340000000000000000000000000000000000000000000000000000000e35fa931a0000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000e6ab2c18ce552fe5fcf43667133776d6337359df0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000784fb06549c5ebc20a82ffe251ff3b45c963d8df', + } as unknown as Transaction); + + expect(getInputs()).toMatchSnapshot(); +}); From 69934daaf1404a46ddab501ddc0f48679908fead Mon Sep 17 00:00:00 2001 From: spsjvc Date: Wed, 21 Jan 2026 13:59:05 +0100 Subject: [PATCH 19/24] add more missing tests --- ...pPrepareTransactionReceipt.unit.test.ts.snap | 17 +++++++++++++++++ ...RollupPrepareTransactionReceipt.unit.test.ts | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/src/__snapshots__/createRollupPrepareTransactionReceipt.unit.test.ts.snap b/src/__snapshots__/createRollupPrepareTransactionReceipt.unit.test.ts.snap index 718f7619..7e772086 100644 --- a/src/__snapshots__/createRollupPrepareTransactionReceipt.unit.test.ts.snap +++ b/src/__snapshots__/createRollupPrepareTransactionReceipt.unit.test.ts.snap @@ -52,3 +52,20 @@ exports[`successfully parses core contracts from a tx receipt on RollupCreator v "validatorWalletCreator": "0x1cB01EA4b15884DEf0e64201C342681B897Db38F", } `; + +exports[`successfully parses core contracts from a tx receipt on RollupCreator v3.2 1`] = ` +{ + "adminProxy": "0xAEFa6C60E66678C91fc4A15723827964a34F0E03", + "bridge": "0xc7990794EA47F0332748EFd638C0B631E1f64Bd3", + "challengeManager": "0x55910b7a9c0D07A13a0a8A276069300E3Aa9f34f", + "deployedAtBlockNumber": 10058902, + "inbox": "0xbBAcfDA0025d482A038bD52F4A38e23FA705ff83", + "nativeToken": "0x0000000000000000000000000000000000000000", + "outbox": "0x54085e0511401c41560B9f442214E8066173B4cF", + "rollup": "0x4b189f98B181eAB46337Cae2941223700F73AB7c", + "rollupEventInbox": "0x0E2b2a053476fFDDd64EA66fE00Bb0Fcab902552", + "sequencerInbox": "0xA801fc784147C698ccB733de6fD927483Aa28580", + "upgradeExecutor": "0x7CFfb250Ce68450a3eE4fbbd9f54EfDF03378338", + "validatorWalletCreator": "0xB7FE37712e46F28C8f22Ec4bAA33A09fb8B52BD0", +} +`; diff --git a/src/createRollupPrepareTransactionReceipt.unit.test.ts b/src/createRollupPrepareTransactionReceipt.unit.test.ts index 3f49af49..af427a31 100644 --- a/src/createRollupPrepareTransactionReceipt.unit.test.ts +++ b/src/createRollupPrepareTransactionReceipt.unit.test.ts @@ -37,3 +37,11 @@ it('successfully parses core contracts from a tx receipt on RollupCreator v3.1', }); expect(createRollupPrepareTransactionReceipt(txReceipt).getCoreContracts()).toMatchSnapshot(); }); + +// https://sepolia.etherscan.io/tx/0x6f6e67cc36fdee7248d76811739b2b6718641b5b1a13ca39c7605aa0636e7d67 +it('successfully parses core contracts from a tx receipt on RollupCreator v3.2', async () => { + const txReceipt = await sepoliaClient.getTransactionReceipt({ + hash: '0x6f6e67cc36fdee7248d76811739b2b6718641b5b1a13ca39c7605aa0636e7d67', + }); + expect(createRollupPrepareTransactionReceipt(txReceipt).getCoreContracts()).toMatchSnapshot(); +}); From 70f0d80c02d488863bfc2fb8cb1dec425b18a33b Mon Sep 17 00:00:00 2001 From: spsjvc Date: Thu, 22 Jan 2026 19:22:45 +0100 Subject: [PATCH 20/24] pin to v3.2.0 --- .github/workflows/build-test.yml | 8 ++++---- .../rollupAdminLogicPublicActions.integration.test.ts | 2 +- src/getValidators.integration.test.ts | 2 +- src/prepareKeysetHash.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index db9e4536..9c10d346 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -80,13 +80,13 @@ jobs: strategy: matrix: config: - - name: Nitro contracts v3.2.0-beta.0 - Custom gas token with 18 decimals - nitro-contracts-branch: v3.2.0-beta.0 + - name: Nitro contracts v3.2.0 - Custom gas token with 18 decimals + nitro-contracts-branch: v3.2.0 args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token decimals: 18 - - name: Nitro contracts v3.2.0-beta.0 - Custom gas token with 6 decimals - nitro-contracts-branch: v3.2.0-beta.0 + - name: Nitro contracts v3.2.0 - Custom gas token with 6 decimals + nitro-contracts-branch: v3.2.0 args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token --l3-fee-token-decimals 6 decimals: 6 diff --git a/src/decorators/rollupAdminLogicPublicActions.integration.test.ts b/src/decorators/rollupAdminLogicPublicActions.integration.test.ts index 0588060c..bb3ad822 100644 --- a/src/decorators/rollupAdminLogicPublicActions.integration.test.ts +++ b/src/decorators/rollupAdminLogicPublicActions.integration.test.ts @@ -16,7 +16,7 @@ const { l3Rollup, l3UpgradeExecutor } = getInformationFromTestnode(); const rollupCreatorVersion = testHelper_getRollupCreatorVersionFromEnv(); // https://github.com/OffchainLabs/nitro-testnode/blob/release/test-node.bash#L634 -// https://github.com/OffchainLabs/nitro-contracts/blob/v3.1.1/scripts/rollupCreation.ts#L250-L257 +// https://github.com/OffchainLabs/nitro-contracts/blob/v3.2.0/scripts/rollupCreation.ts#L254-L261 // https://github.com/OffchainLabs/nitro-contracts/blob/v2.1.3/scripts/rollupCreation.ts#L237-L243 const expectedInitialValidators = rollupCreatorVersion === 'v3.2' ? 11 : 10; diff --git a/src/getValidators.integration.test.ts b/src/getValidators.integration.test.ts index b75de2e3..8aa215ce 100644 --- a/src/getValidators.integration.test.ts +++ b/src/getValidators.integration.test.ts @@ -16,7 +16,7 @@ const { l3Rollup, l3UpgradeExecutor } = getInformationFromTestnode(); const rollupCreatorVersion = testHelper_getRollupCreatorVersionFromEnv(); // https://github.com/OffchainLabs/nitro-testnode/blob/release/test-node.bash#L634 -// https://github.com/OffchainLabs/nitro-contracts/blob/v3.1.1/scripts/rollupCreation.ts#L250-L257 +// https://github.com/OffchainLabs/nitro-contracts/blob/v3.2.0/scripts/rollupCreation.ts#L254-L261 // https://github.com/OffchainLabs/nitro-contracts/blob/v2.1.3/scripts/rollupCreation.ts#L237-L243 const expectedInitialValidators = rollupCreatorVersion === 'v3.2' ? 11 : 10; diff --git a/src/prepareKeysetHash.ts b/src/prepareKeysetHash.ts index d688f472..584873ce 100644 --- a/src/prepareKeysetHash.ts +++ b/src/prepareKeysetHash.ts @@ -6,7 +6,7 @@ export function prepareKeysetHash(keysetBytes: string): Hex { ? (keysetBytes as Hex) : (`0x${keysetBytes}` as Hex); - // https://github.com/OffchainLabs/nitro-contracts/blob/v3.1.0/src/bridge/SequencerInbox.sol#L827-L828 + // https://github.com/OffchainLabs/nitro-contracts/blob/v3.2.0/src/bridge/SequencerInbox.sol#L835-L836 const keysetWord = hexToBigInt(keccak256(concatHex(['0xfe', keccak256(keysetBytesSanitized)]))); const keysetHash = toHex(keysetWord ^ (1n << 255n), { size: 32 }); From 8b63ec8a6022e15fe8c9517c8f477c553565d96b Mon Sep 17 00:00:00 2001 From: spsjvc Date: Thu, 22 Jan 2026 19:24:02 +0100 Subject: [PATCH 21/24] update name --- .github/workflows/build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 9c10d346..682e053d 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -80,12 +80,12 @@ jobs: strategy: matrix: config: - - name: Nitro contracts v3.2.0 - Custom gas token with 18 decimals + - name: Nitro contracts v3.2 - Custom gas token with 18 decimals nitro-contracts-branch: v3.2.0 args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token decimals: 18 - - name: Nitro contracts v3.2.0 - Custom gas token with 6 decimals + - name: Nitro contracts v3.2 - Custom gas token with 6 decimals nitro-contracts-branch: v3.2.0 args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token --l3-fee-token-decimals 6 decimals: 6 From 083591a4f5f92b900019f833efef710f2b1f35ae Mon Sep 17 00:00:00 2001 From: spsjvc Date: Thu, 22 Jan 2026 19:45:20 +0100 Subject: [PATCH 22/24] add isAnyTrust tests --- src/isAnyTrust.unit.test.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/isAnyTrust.unit.test.ts b/src/isAnyTrust.unit.test.ts index 8f96f6bb..a5967a07 100644 --- a/src/isAnyTrust.unit.test.ts +++ b/src/isAnyTrust.unit.test.ts @@ -43,6 +43,19 @@ it('should return true for AnyTrust chain (RollupCreator v3.1)', async () => { expect(isAnyTrustChain).toBeTruthy(); }); +it('should return true for AnyTrust chain (RollupCreator v3.2)', async () => { + const client = createPublicClient({ + chain: arbitrumSepolia, + transport: http(), + }); + // https://sepolia.arbiscan.io/tx/0x6389de2ebc6ab31a4fa45385261a821abcdfd75ffed99d420fefc1f273254acb + const isAnyTrustChain = await isAnyTrust({ + publicClient: client, + rollup: '0x02F5266d43aa3FAD50EfA1B6EE413a284aC0B974', + }); + expect(isAnyTrustChain).toBeTruthy(); +}); + it('should return false for non AnyTrust chain (RollupCreator v1.1)', async () => { const client = createPublicClient({ chain: arbitrumSepolia, @@ -81,3 +94,16 @@ it('should return false for non AnyTrust chain (RollupCreator v3.1)', async () = }); expect(isAnyTrustChain).toBeFalsy(); }); + +it('should return false for non AnyTrust chain (RollupCreator v3.2)', async () => { + const client = createPublicClient({ + chain: arbitrumSepolia, + transport: http(), + }); + // https://sepolia.arbiscan.io/tx/0x529e68fae1aad9d06a469fe93874c4d3dbc4c0260a70a5f9fff8f5f89032c325 + const isAnyTrustChain = await isAnyTrust({ + publicClient: client, + rollup: '0xE0ed4C1E3e49015052761994755F07c7440a1B44', + }); + expect(isAnyTrustChain).toBeFalsy(); +}); From c7a18c97dc9969651c984818ab6fb8adcc34cece Mon Sep 17 00:00:00 2001 From: spsjvc Date: Thu, 22 Jan 2026 19:53:05 +0100 Subject: [PATCH 23/24] add getBatchPosters test for v3.2 --- src/getBatchPosters.unit.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/getBatchPosters.unit.test.ts b/src/getBatchPosters.unit.test.ts index 070a88e8..9e146139 100644 --- a/src/getBatchPosters.unit.test.ts +++ b/src/getBatchPosters.unit.test.ts @@ -201,6 +201,20 @@ it('getBatchPosters returns batch posters for a chain created with RollupCreator expect(isAccurate).toBeTruthy(); }); +// https://sepolia.arbiscan.io/tx/0x67bb216d4dd1b1807d9f0e226e4da754bdf643e2788f9e515b37c6dd890be331 +it('getBatchPosters returns batch posters for a chain created with RollupCreator v3.2', async () => { + const { isAccurate, batchPosters } = await getBatchPosters(arbitrumSepoliaClient, { + rollup: '0x80630e3776E445c256E82D5ACcA2Bbb4b0c95a98', + sequencerInbox: '0x15aD14f109Eb97E32EA8F8b5A6E6DC1a6d2F1ca1', + }); + expect(batchPosters).toEqual([ + '0xdFd9C2cB3F8D4E6A8c758C22e24F3d88645d979d', + '0x48AD525578B79a3DF3B93bfd4C987BE577063389', + '0x9b64F3f6B4a895dB45eC7FEeBF1bEB6b62B2524E', + ]); + expect(isAccurate).toBeTruthy(); +}); + describe('createRollupFunctionSelector', () => { it('getBatchPosters returns all batch posters with isAccurate flag set to true', async () => { const mockTransport = () => From cd46813e5311d36651c3da54dff48ba24b182ec4 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Thu, 22 Jan 2026 19:55:23 +0100 Subject: [PATCH 24/24] add getValidators test for v3.2 --- src/getValidators.unit.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/getValidators.unit.test.ts b/src/getValidators.unit.test.ts index 5b57578c..340b1182 100644 --- a/src/getValidators.unit.test.ts +++ b/src/getValidators.unit.test.ts @@ -191,6 +191,19 @@ it('getValidators returns validators for a chain created with RollupCreator v3.1 expect(isAccurate).toBeTruthy(); }); +// https://sepolia.arbiscan.io/tx/0x67bb216d4dd1b1807d9f0e226e4da754bdf643e2788f9e515b37c6dd890be331 +it('getValidators returns validators for a chain created with RollupCreator v3.2', async () => { + const { isAccurate, validators } = await getValidators(arbitrumSepoliaClient, { + rollup: '0x80630e3776E445c256E82D5ACcA2Bbb4b0c95a98', + }); + expect(validators).toEqual([ + '0xd0E7B8f304461d57E8b49b660DbD46e34E877A81', + '0x7C6F07e8c7Cb8d4e4574f1E346B53f330B60c00f', + '0x300E8715236B5e0aEefb0Af16315a1e729E6A002', + ]); + expect(isAccurate).toBeTruthy(); +}); + describe('createRollupFunctionSelector', () => { it('getValidators return all validators with isAccurate flag set to true', async () => { const mockTransport = () =>