diff --git a/src/contracts/RollupCreator/v3.1.ts b/src/contracts/RollupCreator/v3.1.ts index 8e288371..ada7290e 100644 --- a/src/contracts/RollupCreator/v3.1.ts +++ b/src/contracts/RollupCreator/v3.1.ts @@ -1,232 +1,266 @@ +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// RollupCreator +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x43698080f40dB54DEE6871540037b8AB8fD0AB44) + * - + * - [__View Contract on Base Basescan__](https://basescan.org/address/0xDbe3e840569a0446CDfEbc65D7d429c5Da5537b7) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xB90e53fd945Cd28Ec4728cBfB566981dD571eB8b) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0xF916Bfe431B7A7AaE083273F5b862e00a15d60F4) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x70cA29dA3B116A2c4A267c549bf7947d47f41e22) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x5F45675AC8DDF7d45713b2c7D191B287475C16cF) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x687Bc1D23390875a868Db158DA1cDC8998E31640) + */ export const rollupCreatorABI = [ - { inputs: [], stateMutability: 'nonpayable', type: 'constructor' }, + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, { + type: 'event', anonymous: false, inputs: [ - { indexed: true, internalType: 'address', name: 'previousOwner', type: 'address' }, - { indexed: true, internalType: 'address', name: 'newOwner', type: 'address' }, + { name: 'previousOwner', internalType: 'address', type: 'address', indexed: true }, + { name: 'newOwner', internalType: 'address', type: 'address', indexed: true }, ], name: 'OwnershipTransferred', - type: 'event', }, { + type: 'event', anonymous: false, inputs: [ - { indexed: true, internalType: 'address', name: 'rollupAddress', type: 'address' }, - { indexed: true, internalType: 'address', name: 'nativeToken', type: 'address' }, - { indexed: false, internalType: 'address', name: 'inboxAddress', type: 'address' }, - { indexed: false, internalType: 'address', name: 'outbox', type: 'address' }, - { indexed: false, internalType: 'address', name: 'rollupEventInbox', type: 'address' }, - { indexed: false, internalType: 'address', name: 'challengeManager', type: 'address' }, - { indexed: false, internalType: 'address', name: 'adminProxy', type: 'address' }, - { indexed: false, internalType: 'address', name: 'sequencerInbox', type: 'address' }, - { indexed: false, internalType: 'address', name: 'bridge', type: 'address' }, - { indexed: false, internalType: 'address', name: 'upgradeExecutor', type: 'address' }, - { indexed: false, internalType: 'address', name: 'validatorWalletCreator', type: 'address' }, + { 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', type: 'event' }, + { type: 'event', anonymous: false, inputs: [], name: 'TemplatesUpdated' }, { - inputs: [], - name: 'bridgeCreator', - outputs: [{ internalType: 'contract BridgeCreator', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'bridgeCreator', + outputs: [{ name: '', internalType: 'contract BridgeCreator', type: 'address' }], }, { - inputs: [], - name: 'challengeManagerTemplate', - outputs: [{ internalType: 'contract IEdgeChallengeManager', name: '', 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: [ - { internalType: 'uint64', name: 'confirmPeriodBlocks', type: 'uint64' }, - { internalType: 'address', name: 'stakeToken', type: 'address' }, - { internalType: 'uint256', name: 'baseStake', type: 'uint256' }, - { internalType: 'bytes32', name: 'wasmModuleRoot', type: 'bytes32' }, - { internalType: 'address', name: 'owner', type: 'address' }, - { internalType: 'address', name: 'loserStakeEscrow', type: 'address' }, - { internalType: 'uint256', name: 'chainId', type: 'uint256' }, - { internalType: 'string', name: 'chainConfig', type: 'string' }, - { internalType: 'uint256', name: 'minimumAssertionPeriod', type: 'uint256' }, - { internalType: 'uint64', name: 'validatorAfkBlocks', type: 'uint64' }, - { internalType: 'uint256[]', name: 'miniStakeValues', type: 'uint256[]' }, + { 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[]' }, { - components: [ - { internalType: 'uint256', name: 'delayBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'futureBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'delaySeconds', type: 'uint256' }, - { internalType: 'uint256', name: 'futureSeconds', type: 'uint256' }, - ], - internalType: 'struct ISequencerInbox.MaxTimeVariation', 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' }, + ], }, - { internalType: 'uint256', name: 'layerZeroBlockEdgeHeight', type: 'uint256' }, - { internalType: 'uint256', name: 'layerZeroBigStepEdgeHeight', type: 'uint256' }, - { internalType: 'uint256', name: 'layerZeroSmallStepEdgeHeight', 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: [ { - components: [ - { internalType: 'bytes32[2]', name: 'bytes32Vals', type: 'bytes32[2]' }, - { internalType: 'uint64[2]', name: 'u64Vals', type: 'uint64[2]' }, - ], - internalType: 'struct GlobalState', name: 'globalState', + internalType: 'struct GlobalState', type: 'tuple', + components: [ + { name: 'bytes32Vals', internalType: 'bytes32[2]', type: 'bytes32[2]' }, + { name: 'u64Vals', internalType: 'uint64[2]', type: 'uint64[2]' }, + ], }, - { internalType: 'enum MachineStatus', name: 'machineStatus', type: 'uint8' }, - { internalType: 'bytes32', name: 'endHistoryRoot', type: 'bytes32' }, + { name: 'machineStatus', internalType: 'enum MachineStatus', type: 'uint8' }, + { name: 'endHistoryRoot', internalType: 'bytes32', type: 'bytes32' }, ], - internalType: 'struct AssertionState', - name: 'genesisAssertionState', - type: 'tuple', }, - { internalType: 'uint256', name: 'genesisInboxCount', type: 'uint256' }, - { internalType: 'address', name: 'anyTrustFastConfirmer', type: 'address' }, - { internalType: 'uint8', name: 'numBigStepLevel', type: 'uint8' }, - { internalType: 'uint64', name: 'challengeGracePeriodBlocks', type: 'uint64' }, + { name: 'genesisInboxCount', internalType: 'uint256', type: 'uint256' }, + { name: 'anyTrustFastConfirmer', internalType: 'address', type: 'address' }, + { name: 'numBigStepLevel', internalType: 'uint8', type: 'uint8' }, + { name: 'challengeGracePeriodBlocks', internalType: 'uint64', type: 'uint64' }, { - components: [ - { internalType: 'uint64', name: 'threshold', type: 'uint64' }, - { internalType: 'uint64', name: 'max', type: 'uint64' }, - { internalType: 'uint64', name: 'replenishRateInBasis', type: 'uint64' }, - ], - internalType: 'struct BufferConfig', 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' }, + ], }, ], - internalType: 'struct Config', - name: 'config', - type: 'tuple', }, - { internalType: 'address[]', name: 'validators', type: 'address[]' }, - { internalType: 'uint256', name: 'maxDataSize', type: 'uint256' }, - { internalType: 'address', name: 'nativeToken', type: 'address' }, - { internalType: 'bool', name: 'deployFactoriesToL2', type: 'bool' }, - { internalType: 'uint256', name: 'maxFeePerGasForRetryables', type: 'uint256' }, - { internalType: 'address[]', name: 'batchPosters', type: 'address[]' }, - { internalType: 'address', name: 'batchPosterManager', type: 'address' }, - { internalType: 'contract IFeeTokenPricer', name: 'feeTokenPricer', type: 'address' }, + { 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' }, ], - internalType: 'struct RollupCreator.RollupDeploymentParams', - name: 'deployParams', - type: 'tuple', }, ], name: 'createRollup', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'payable', - type: 'function', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - inputs: [], - name: 'l2FactoriesDeployer', - outputs: [{ internalType: 'contract DeployHelper', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'l2FactoriesDeployer', + outputs: [{ name: '', internalType: 'contract DeployHelper', type: 'address' }], }, { - inputs: [], - name: 'osp', - outputs: [{ internalType: 'contract IOneStepProofEntry', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'osp', + outputs: [{ name: '', internalType: 'contract IOneStepProofEntry', type: 'address' }], }, { - inputs: [], - name: 'owner', - outputs: [{ internalType: 'address', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { + stateMutability: 'nonpayable', + type: 'function', inputs: [], name: 'renounceOwnership', outputs: [], - stateMutability: 'nonpayable', - type: 'function', }, { - inputs: [], - name: 'rollupAdminLogic', - outputs: [{ internalType: 'contract IRollupAdmin', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'rollupAdminLogic', + outputs: [{ name: '', internalType: 'contract IRollupAdmin', type: 'address' }], }, { - inputs: [], - name: 'rollupUserLogic', - outputs: [{ internalType: 'contract IRollupUser', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'rollupUserLogic', + outputs: [{ name: '', internalType: 'contract IRollupUser', type: 'address' }], }, { + stateMutability: 'nonpayable', + type: 'function', inputs: [ - { internalType: 'contract BridgeCreator', name: '_bridgeCreator', type: 'address' }, - { internalType: 'contract IOneStepProofEntry', name: '_osp', type: 'address' }, + { name: '_bridgeCreator', internalType: 'contract BridgeCreator', type: 'address' }, + { name: '_osp', internalType: 'contract IOneStepProofEntry', type: 'address' }, { - internalType: 'contract IEdgeChallengeManager', name: '_challengeManagerLogic', + internalType: 'contract IEdgeChallengeManager', type: 'address', }, - { internalType: 'contract IRollupAdmin', name: '_rollupAdminLogic', type: 'address' }, - { internalType: 'contract IRollupUser', name: '_rollupUserLogic', type: 'address' }, - { internalType: 'contract IUpgradeExecutor', name: '_upgradeExecutorLogic', type: 'address' }, - { internalType: 'address', name: '_validatorWalletCreator', type: 'address' }, - { internalType: 'contract DeployHelper', name: '_l2FactoriesDeployer', 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: [{ internalType: 'address', name: 'newOwner', type: 'address' }], - name: 'transferOwnership', - outputs: [], stateMutability: 'nonpayable', type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], }, { - inputs: [], - name: 'upgradeExecutorLogic', - outputs: [{ internalType: 'contract IUpgradeExecutor', name: '', type: 'address' }], stateMutability: 'view', type: 'function', + inputs: [], + name: 'upgradeExecutorLogic', + outputs: [{ name: '', internalType: 'contract IUpgradeExecutor', type: 'address' }], }, { - inputs: [], - name: 'validatorWalletCreator', - outputs: [{ internalType: 'address', name: '', 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/0x43698080f40dB54DEE6871540037b8AB8fD0AB44) + * - + * - [__View Contract on Base Basescan__](https://basescan.org/address/0xDbe3e840569a0446CDfEbc65D7d429c5Da5537b7) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xB90e53fd945Cd28Ec4728cBfB566981dD571eB8b) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0xF916Bfe431B7A7AaE083273F5b862e00a15d60F4) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x70cA29dA3B116A2c4A267c549bf7947d47f41e22) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x5F45675AC8DDF7d45713b2c7D191B287475C16cF) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x687Bc1D23390875a868Db158DA1cDC8998E31640) + */ export const rollupCreatorAddress = { 1: '0x43698080f40dB54DEE6871540037b8AB8fD0AB44', 1337: '0xb562622f2D76F355D673560CB88c1dF6088702f1', - 8453: '0x0000000000000000000000000000000000000000', - 42161: '0x0000000000000000000000000000000000000000', - 42170: '0x0000000000000000000000000000000000000000', - 84532: '0x0000000000000000000000000000000000000000', + 8453: '0xDbe3e840569a0446CDfEbc65D7d429c5Da5537b7', + 42161: '0xB90e53fd945Cd28Ec4728cBfB566981dD571eB8b', + 42170: '0xF916Bfe431B7A7AaE083273F5b862e00a15d60F4', + 84532: '0x70cA29dA3B116A2c4A267c549bf7947d47f41e22', 412346: '0x1E08B9c3f94E9aBcc531f67F949d796eC76963b9', 421614: '0x5F45675AC8DDF7d45713b2c7D191B287475C16cF', 11155111: '0x687Bc1D23390875a868Db158DA1cDC8998E31640', } as const; +/** + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x43698080f40dB54DEE6871540037b8AB8fD0AB44) + * - + * - [__View Contract on Base Basescan__](https://basescan.org/address/0xDbe3e840569a0446CDfEbc65D7d429c5Da5537b7) + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xB90e53fd945Cd28Ec4728cBfB566981dD571eB8b) + * - [__View Contract on Arbitrum Nova Arbiscan__](https://nova.arbiscan.io/address/0xF916Bfe431B7A7AaE083273F5b862e00a15d60F4) + * - [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x70cA29dA3B116A2c4A267c549bf7947d47f41e22) + * - [__View Contract on Arbitrum Sepolia Blockscout__](https://sepolia-explorer.arbitrum.io/address/0x5F45675AC8DDF7d45713b2c7D191B287475C16cF) + * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x687Bc1D23390875a868Db158DA1cDC8998E31640) + */ export const rollupCreatorConfig = { address: rollupCreatorAddress, abi: rollupCreatorABI, diff --git a/src/createRollupPrepareTransactionRequest.ts b/src/createRollupPrepareTransactionRequest.ts index 7e6e6c40..ad387ae6 100644 --- a/src/createRollupPrepareTransactionRequest.ts +++ b/src/createRollupPrepareTransactionRequest.ts @@ -18,7 +18,6 @@ import { WithRollupCreatorAddressOverride, } from './types/createRollupTypes'; import { isKnownWasmModuleRoot, getConsensusReleaseByWasmModuleRoot } from './wasmModuleRoot'; -import { getParentChainLayer } from './utils'; function createRollupEncodeFunctionData(args: CreateRollupFunctionInputs) { return encodeFunctionData({ @@ -50,19 +49,6 @@ export async function createRollupPrepareTransactionRequest