@arbitrum/nitro-contracts 1.1.0-beta.0 → 1.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/build/contracts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
  2. package/build/contracts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
  3. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
  4. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
  5. package/build/contracts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
  6. package/build/contracts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
  7. package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +1 -1
  8. package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
  9. package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
  10. package/build/contracts/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol/UUPSUpgradeable.dbg.json +1 -1
  11. package/build/contracts/@openzeppelin/contracts/security/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
  12. package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
  13. package/build/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
  14. package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
  15. package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +1 -1
  16. package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +1 -1
  17. package/build/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
  18. package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
  19. package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json +1 -1
  20. package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol/IAccessControlUpgradeable.dbg.json +1 -1
  21. package/build/contracts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
  22. package/build/contracts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
  23. package/build/contracts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
  24. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
  25. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
  26. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
  27. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.dbg.json +1 -1
  28. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.dbg.json +1 -1
  29. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json +1 -1
  30. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json +1 -1
  31. package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.dbg.json +1 -1
  32. package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.json +26 -0
  33. package/build/contracts/src/bridge/AbsInbox.sol/AbsInbox.dbg.json +1 -1
  34. package/build/contracts/src/bridge/AbsOutbox.sol/AbsOutbox.dbg.json +1 -1
  35. package/build/contracts/src/bridge/AbsOutbox.sol/AbsOutbox.json +40 -0
  36. package/build/contracts/src/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  37. package/build/contracts/src/bridge/Bridge.sol/Bridge.json +28 -2
  38. package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.dbg.json +1 -1
  39. package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.json +28 -2
  40. package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.dbg.json +1 -1
  41. package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.json +2 -2
  42. package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.dbg.json +1 -1
  43. package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.json +42 -2
  44. package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.dbg.json +1 -1
  45. package/build/contracts/src/bridge/IBridge.sol/IBridge.dbg.json +1 -1
  46. package/build/contracts/src/bridge/IBridge.sol/IBridge.json +26 -0
  47. package/build/contracts/src/bridge/IDelayedMessageProvider.sol/IDelayedMessageProvider.dbg.json +1 -1
  48. package/build/contracts/src/bridge/IERC20Bridge.sol/IERC20Bridge.dbg.json +1 -1
  49. package/build/contracts/src/bridge/IERC20Bridge.sol/IERC20Bridge.json +26 -0
  50. package/build/contracts/src/bridge/IERC20Inbox.sol/IERC20Inbox.dbg.json +1 -1
  51. package/build/contracts/src/bridge/IEthBridge.sol/IEthBridge.dbg.json +1 -1
  52. package/build/contracts/src/bridge/IEthBridge.sol/IEthBridge.json +26 -0
  53. package/build/contracts/src/bridge/IInbox.sol/IInbox.dbg.json +1 -1
  54. package/build/contracts/src/bridge/IInboxBase.sol/IInboxBase.dbg.json +1 -1
  55. package/build/contracts/src/bridge/IOutbox.sol/IOutbox.dbg.json +1 -1
  56. package/build/contracts/src/bridge/IOutbox.sol/IOutbox.json +14 -0
  57. package/build/contracts/src/bridge/IOwnable.sol/IOwnable.dbg.json +1 -1
  58. package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.dbg.json +1 -1
  59. package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.json +7 -0
  60. package/build/contracts/src/bridge/Inbox.sol/Inbox.dbg.json +1 -1
  61. package/build/contracts/src/bridge/Inbox.sol/Inbox.json +2 -2
  62. package/build/contracts/src/bridge/Messages.sol/Messages.dbg.json +1 -1
  63. package/build/contracts/src/bridge/Outbox.sol/Outbox.dbg.json +1 -1
  64. package/build/contracts/src/bridge/Outbox.sol/Outbox.json +42 -2
  65. package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.dbg.json +1 -1
  66. package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.json +14 -2
  67. package/build/contracts/src/challenge/ChallengeLib.sol/ChallengeLib.dbg.json +1 -1
  68. package/build/contracts/src/challenge/ChallengeManager.sol/ChallengeManager.dbg.json +1 -1
  69. package/build/contracts/src/challenge/ChallengeManager.sol/ChallengeManager.json +2 -2
  70. package/build/contracts/src/challenge/IChallengeManager.sol/IChallengeManager.dbg.json +1 -1
  71. package/build/contracts/src/challenge/IChallengeResultReceiver.sol/IChallengeResultReceiver.dbg.json +1 -1
  72. package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.dbg.json +1 -1
  73. package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.dbg.json +1 -1
  74. package/build/contracts/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade.dbg.json +1 -1
  75. package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.dbg.json +1 -1
  76. package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.dbg.json +1 -1
  77. package/build/contracts/src/libraries/DelegateCallAware.sol/DelegateCallAware.dbg.json +1 -1
  78. package/build/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol/DoubleLogicUUPSUpgradeable.dbg.json +1 -1
  79. package/build/contracts/src/libraries/IGasRefunder.sol/GasRefundEnabled.dbg.json +1 -1
  80. package/build/contracts/src/libraries/IGasRefunder.sol/IGasRefunder.dbg.json +1 -1
  81. package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.dbg.json +1 -1
  82. package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.json +2 -2
  83. package/build/contracts/src/libraries/UUPSNotUpgradeable.sol/UUPSNotUpgradeable.dbg.json +1 -1
  84. package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.dbg.json +1 -1
  85. package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.json +28 -2
  86. package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.dbg.json +1 -1
  87. package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.json +28 -2
  88. package/build/contracts/src/mocks/InboxStub.sol/InboxStub.dbg.json +1 -1
  89. package/build/contracts/src/mocks/InboxStub.sol/InboxStub.json +2 -2
  90. package/build/contracts/src/mocks/MockResultReceiver.sol/MockResultReceiver.dbg.json +1 -1
  91. package/build/contracts/src/mocks/MockResultReceiver.sol/MockResultReceiver.json +2 -2
  92. package/build/contracts/src/mocks/ProxyAdminForBinding.sol/ProxyAdminForBinding.dbg.json +1 -1
  93. package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.dbg.json +1 -1
  94. package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.json +14 -2
  95. package/build/contracts/src/mocks/Simple.sol/Simple.dbg.json +1 -1
  96. package/build/contracts/src/mocks/SimpleProxy.sol/SimpleProxy.dbg.json +1 -1
  97. package/build/contracts/src/mocks/SingleExecutionChallenge.sol/SingleExecutionChallenge.dbg.json +1 -1
  98. package/build/contracts/src/mocks/SingleExecutionChallenge.sol/SingleExecutionChallenge.json +2 -2
  99. package/build/contracts/src/mocks/TimedOutChallengeManager.sol/TimedOutChallengeManager.dbg.json +1 -1
  100. package/build/contracts/src/mocks/TimedOutChallengeManager.sol/TimedOutChallengeManager.json +2 -2
  101. package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.dbg.json +1 -1
  102. package/build/contracts/src/node-interface/NodeInterface.sol/NodeInterface.dbg.json +1 -1
  103. package/build/contracts/src/node-interface/NodeInterfaceDebug.sol/NodeInterfaceDebug.dbg.json +1 -1
  104. package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.dbg.json +1 -1
  105. package/build/contracts/src/osp/IOneStepProofEntry.sol/IOneStepProofEntry.dbg.json +1 -1
  106. package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.dbg.json +1 -1
  107. package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.json +2 -2
  108. package/build/contracts/src/osp/IOneStepProver.sol/IOneStepProver.dbg.json +1 -1
  109. package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.dbg.json +1 -1
  110. package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.json +2 -2
  111. package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.dbg.json +1 -1
  112. package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.json +2 -2
  113. package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.dbg.json +1 -1
  114. package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.json +2 -2
  115. package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.dbg.json +1 -1
  116. package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.json +2 -2
  117. package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.dbg.json +1 -1
  118. package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.json +2 -2
  119. package/build/contracts/src/precompiles/ArbAddressTable.sol/ArbAddressTable.dbg.json +1 -1
  120. package/build/contracts/src/precompiles/ArbAggregator.sol/ArbAggregator.dbg.json +1 -1
  121. package/build/contracts/src/precompiles/ArbBLS.sol/ArbBLS.dbg.json +1 -1
  122. package/build/contracts/src/precompiles/ArbDebug.sol/ArbDebug.dbg.json +1 -1
  123. package/build/contracts/src/precompiles/ArbFunctionTable.sol/ArbFunctionTable.dbg.json +1 -1
  124. package/build/contracts/src/precompiles/ArbGasInfo.sol/ArbGasInfo.dbg.json +1 -1
  125. package/build/contracts/src/precompiles/ArbInfo.sol/ArbInfo.dbg.json +1 -1
  126. package/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.dbg.json +1 -1
  127. package/build/contracts/src/precompiles/ArbOwnerPublic.sol/ArbOwnerPublic.dbg.json +1 -1
  128. package/build/contracts/src/precompiles/ArbRetryableTx.sol/ArbRetryableTx.dbg.json +1 -1
  129. package/build/contracts/src/precompiles/ArbStatistics.sol/ArbStatistics.dbg.json +1 -1
  130. package/build/contracts/src/precompiles/ArbSys.sol/ArbSys.dbg.json +1 -1
  131. package/build/contracts/src/precompiles/ArbosActs.sol/ArbosActs.dbg.json +1 -1
  132. package/build/contracts/src/precompiles/ArbosTest.sol/ArbosTest.dbg.json +1 -1
  133. package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.dbg.json +1 -1
  134. package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.json +28 -0
  135. package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.dbg.json +1 -1
  136. package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.json +2 -2
  137. package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.dbg.json +1 -1
  138. package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.json +2 -2
  139. package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.dbg.json +1 -1
  140. package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.json +30 -2
  141. package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.dbg.json +1 -1
  142. package/build/contracts/src/rollup/IRollupCore.sol/IRollupCore.dbg.json +1 -1
  143. package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.dbg.json +1 -1
  144. package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.json +7 -0
  145. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUser.dbg.json +1 -1
  146. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserAbs.dbg.json +1 -1
  147. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserERC20.dbg.json +1 -1
  148. package/build/contracts/src/rollup/Node.sol/NodeLib.dbg.json +1 -1
  149. package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.dbg.json +1 -1
  150. package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.json +2 -2
  151. package/build/contracts/src/rollup/RollupCore.sol/RollupCore.dbg.json +1 -1
  152. package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.dbg.json +1 -1
  153. package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.json +98 -91
  154. package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.dbg.json +1 -1
  155. package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.json +30 -2
  156. package/build/contracts/src/rollup/RollupLib.sol/RollupLib.dbg.json +1 -1
  157. package/build/contracts/src/rollup/RollupLib.sol/RollupLib.json +2 -2
  158. package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.dbg.json +1 -1
  159. package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.json +2 -2
  160. package/build/contracts/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic.dbg.json +1 -1
  161. package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.dbg.json +1 -1
  162. package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.json +2 -2
  163. package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.dbg.json +1 -1
  164. package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json +2 -2
  165. package/build/contracts/src/rollup/ValidatorUtils.sol/ValidatorUtils.dbg.json +1 -1
  166. package/build/contracts/src/rollup/ValidatorUtils.sol/ValidatorUtils.json +2 -2
  167. package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.dbg.json +1 -1
  168. package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.json +2 -2
  169. package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.dbg.json +1 -1
  170. package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.json +2 -2
  171. package/build/contracts/src/state/Deserialize.sol/Deserialize.dbg.json +1 -1
  172. package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.dbg.json +1 -1
  173. package/build/contracts/src/state/Instructions.sol/Instructions.dbg.json +1 -1
  174. package/build/contracts/src/state/Machine.sol/MachineLib.dbg.json +1 -1
  175. package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.dbg.json +1 -1
  176. package/build/contracts/src/state/Module.sol/ModuleLib.dbg.json +1 -1
  177. package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.dbg.json +1 -1
  178. package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.dbg.json +1 -1
  179. package/build/contracts/src/state/PcArray.sol/PcArrayLib.dbg.json +1 -1
  180. package/build/contracts/src/state/StackFrame.sol/StackFrameLib.dbg.json +1 -1
  181. package/build/contracts/src/state/Value.sol/ValueLib.dbg.json +1 -1
  182. package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.dbg.json +1 -1
  183. package/build/contracts/src/state/ValueStack.sol/ValueStackLib.dbg.json +1 -1
  184. package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.dbg.json +1 -1
  185. package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.json +28 -2
  186. package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.dbg.json +1 -1
  187. package/build/contracts/src/test-helpers/EthVault.sol/EthVault.dbg.json +1 -1
  188. package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.dbg.json +1 -1
  189. package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.dbg.json +1 -1
  190. package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.json +32 -2
  191. package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.dbg.json +1 -1
  192. package/build/contracts/src/test-helpers/TestToken.sol/TestToken.dbg.json +1 -1
  193. package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.dbg.json +1 -1
  194. package/package.json +1 -1
  195. package/src/bridge/AbsBridge.sol +6 -0
  196. package/src/bridge/AbsOutbox.sol +25 -1
  197. package/src/bridge/IBridge.sol +4 -0
  198. package/src/bridge/IOutbox.sol +8 -0
  199. package/src/bridge/ISequencerInbox.sol +2 -0
  200. package/src/bridge/SequencerInbox.sol +11 -1
  201. package/src/libraries/Error.sol +7 -1
  202. package/src/mocks/BridgeStub.sol +4 -0
  203. package/src/rollup/AbsRollupEventInbox.sol +10 -1
  204. package/src/rollup/IRollupEventInbox.sol +2 -0
  205. package/src/rollup/RollupCreator.sol +57 -48
  206. package/src/rollup/RollupUserLogic.sol +26 -4
  207. package/src/test-helpers/BridgeTester.sol +4 -0
  208. package/src/test-helpers/OutboxWithoutOptTester.sol +6 -0
@@ -33,6 +33,16 @@ contract RollupCreator is Ownable {
33
33
  );
34
34
  event TemplatesUpdated();
35
35
 
36
+ struct RollupDeploymentParams {
37
+ Config config;
38
+ address batchPoster;
39
+ address[] validators;
40
+ uint256 maxDataSize;
41
+ address nativeToken;
42
+ bool deployFactoriesToL2;
43
+ uint256 maxFeePerGasForRetryables;
44
+ }
45
+
36
46
  BridgeCreator public bridgeCreator;
37
47
  IOneStepProofEntry public osp;
38
48
  IChallengeManager public challengeManagerTemplate;
@@ -81,53 +91,52 @@ contract RollupCreator is Ownable {
81
91
  * @dev - config.rollupOwner should have executor role on upgradeExecutor
82
92
  * @dev - Bridge should have a single inbox and outbox
83
93
  * @dev - Validators and batch poster should be set if provided
84
- * @param config The configuration for the rollup
85
- * @param _batchPoster The address of the batch poster, not used when set to zero address
86
- * @param _validators The list of validator addresses, not used when set to empty list
87
- * @param _nativeToken Address of the custom fee token used by rollup. If rollup is ETH-based address(0) should be provided
88
- * @param _deployFactoriesToL2 Whether to deploy L2 factories using retryable tickets. If true, retryables need to be paid for in native currency.
89
- * Deploying factories via retryable tickets at rollup creation time is the most reliable method to do it since it
90
- * doesn't require paying the L1 gas. If deployment is not done as part of rollup creation TX, there is a risk that
91
- * anyone can try to deploy factories and potentially burn the nonce 0 (ie. due to gas price spike when doing direct
92
- * L2 TX). That would mean we permanently lost capability to deploy deterministic factory at expected address.
93
- * @param _maxFeePerGasForRetryables price bid for L2 execution.
94
+ * @param deployParams The parameters for the rollup deployment. It consists of:
95
+ * - config The configuration for the rollup
96
+ * - batchPoster The address of the batch poster, not used when set to zero address
97
+ * - validators The list of validator addresses, not used when set to empty list
98
+ * - nativeToken Address of the custom fee token used by rollup. If rollup is ETH-based address(0) should be provided
99
+ * - deployFactoriesToL2 Whether to deploy L2 factories using retryable tickets. If true, retryables need to be paid for in native currency.
100
+ * Deploying factories via retryable tickets at rollup creation time is the most reliable method to do it since it
101
+ * doesn't require paying the L1 gas. If deployment is not done as part of rollup creation TX, there is a risk that
102
+ * anyone can try to deploy factories and potentially burn the nonce 0 (ie. due to gas price spike when doing direct
103
+ * L2 TX). That would mean we permanently lost capability to deploy deterministic factory at expected address.
104
+ * - maxFeePerGasForRetryables price bid for L2 execution.
94
105
  * @return The address of the newly created rollup
95
106
  */
96
- function createRollup(
97
- Config memory config,
98
- address _batchPoster,
99
- address[] memory _validators,
100
- uint256 _maxDataSize,
101
- address _nativeToken,
102
- bool _deployFactoriesToL2,
103
- uint256 _maxFeePerGasForRetryables
104
- ) public payable returns (address) {
105
- {
106
- // Make sure the immutable maxDataSize is as expected
107
- (, ISequencerInbox ethSequencerInbox, IInboxBase ethInbox, , ) = bridgeCreator
108
- .ethBasedTemplates();
109
- require(_maxDataSize == ethSequencerInbox.maxDataSize(), "SI_MAX_DATA_SIZE_MISMATCH");
110
- require(_maxDataSize == ethInbox.maxDataSize(), "I_MAX_DATA_SIZE_MISMATCH");
107
+ function createRollup(RollupDeploymentParams memory deployParams)
108
+ public
109
+ payable
110
+ returns (address)
111
+ {
112
+ // Make sure the immutable maxDataSize is as expected
113
+ (, ISequencerInbox ethSequencerInbox, IInboxBase ethInbox, , ) = bridgeCreator
114
+ .ethBasedTemplates();
115
+ require(
116
+ deployParams.maxDataSize == ethSequencerInbox.maxDataSize(),
117
+ "SI_MAX_DATA_SIZE_MISMATCH"
118
+ );
119
+ require(deployParams.maxDataSize == ethInbox.maxDataSize(), "I_MAX_DATA_SIZE_MISMATCH");
111
120
 
112
- (, ISequencerInbox erc20SequencerInbox, IInboxBase erc20Inbox, , ) = bridgeCreator
113
- .erc20BasedTemplates();
114
- require(_maxDataSize == erc20SequencerInbox.maxDataSize(), "SI_MAX_DATA_SIZE_MISMATCH");
115
- require(_maxDataSize == erc20Inbox.maxDataSize(), "I_MAX_DATA_SIZE_MISMATCH");
116
- }
121
+ (, ISequencerInbox erc20SequencerInbox, IInboxBase erc20Inbox, , ) = bridgeCreator
122
+ .erc20BasedTemplates();
123
+ require(
124
+ deployParams.maxDataSize == erc20SequencerInbox.maxDataSize(),
125
+ "SI_MAX_DATA_SIZE_MISMATCH"
126
+ );
127
+ require(deployParams.maxDataSize == erc20Inbox.maxDataSize(), "I_MAX_DATA_SIZE_MISMATCH");
117
128
 
118
129
  // create proxy admin which will manage bridge contracts
119
130
  ProxyAdmin proxyAdmin = new ProxyAdmin();
120
131
 
121
132
  // Create the rollup proxy to figure out the address and initialize it later
122
- RollupProxy rollup = new RollupProxy{
123
- salt: keccak256(abi.encode(config, _batchPoster, _validators, _maxDataSize))
124
- }();
133
+ RollupProxy rollup = new RollupProxy{salt: keccak256(abi.encode(deployParams))}();
125
134
 
126
135
  BridgeCreator.BridgeContracts memory bridgeContracts = bridgeCreator.createBridge(
127
136
  address(proxyAdmin),
128
137
  address(rollup),
129
- _nativeToken,
130
- config.sequencerInboxMaxTimeVariation
138
+ deployParams.nativeToken,
139
+ deployParams.config.sequencerInboxMaxTimeVariation
131
140
  );
132
141
 
133
142
  IChallengeManager challengeManager = IChallengeManager(
@@ -147,16 +156,16 @@ contract RollupCreator is Ownable {
147
156
  );
148
157
 
149
158
  // deploy and init upgrade executor
150
- address upgradeExecutor = _deployUpgradeExecutor(config.owner, proxyAdmin);
159
+ address upgradeExecutor = _deployUpgradeExecutor(deployParams.config.owner, proxyAdmin);
151
160
 
152
161
  // upgradeExecutor shall be proxyAdmin's owner
153
162
  proxyAdmin.transferOwnership(address(upgradeExecutor));
154
163
 
155
164
  // initialize the rollup with this contract as owner to set batch poster and validators
156
165
  // it will transfer the ownership to the upgrade executor later
157
- config.owner = address(this);
166
+ deployParams.config.owner = address(this);
158
167
  rollup.initializeProxy(
159
- config,
168
+ deployParams.config,
160
169
  ContractDependencies({
161
170
  bridge: bridgeContracts.bridge,
162
171
  sequencerInbox: bridgeContracts.sequencerInbox,
@@ -172,32 +181,32 @@ contract RollupCreator is Ownable {
172
181
  );
173
182
 
174
183
  // setting batch poster, if the address provided is not zero address
175
- if (_batchPoster != address(0)) {
176
- bridgeContracts.sequencerInbox.setIsBatchPoster(_batchPoster, true);
184
+ if (deployParams.batchPoster != address(0)) {
185
+ bridgeContracts.sequencerInbox.setIsBatchPoster(deployParams.batchPoster, true);
177
186
  }
178
187
 
179
188
  // Call setValidator on the newly created rollup contract just if validator set is not empty
180
- if (_validators.length != 0) {
181
- bool[] memory _vals = new bool[](_validators.length);
182
- for (uint256 i = 0; i < _validators.length; i++) {
189
+ if (deployParams.validators.length != 0) {
190
+ bool[] memory _vals = new bool[](deployParams.validators.length);
191
+ for (uint256 i = 0; i < deployParams.validators.length; i++) {
183
192
  _vals[i] = true;
184
193
  }
185
- IRollupAdmin(address(rollup)).setValidator(_validators, _vals);
194
+ IRollupAdmin(address(rollup)).setValidator(deployParams.validators, _vals);
186
195
  }
187
196
 
188
197
  IRollupAdmin(address(rollup)).setOwner(address(upgradeExecutor));
189
198
 
190
- if (_deployFactoriesToL2) {
199
+ if (deployParams.deployFactoriesToL2) {
191
200
  _deployFactories(
192
201
  address(bridgeContracts.inbox),
193
- _nativeToken,
194
- _maxFeePerGasForRetryables
202
+ deployParams.nativeToken,
203
+ deployParams.maxFeePerGasForRetryables
195
204
  );
196
205
  }
197
206
 
198
207
  emit RollupCreated(
199
208
  address(rollup),
200
- _nativeToken,
209
+ deployParams.nativeToken,
201
210
  address(bridgeContracts.inbox),
202
211
  address(bridgeContracts.outbox),
203
212
  address(bridgeContracts.rollupEventInbox),
@@ -27,6 +27,11 @@ abstract contract AbsRollupUserLogic is
27
27
  _;
28
28
  }
29
29
 
30
+ modifier whenNotPausedOrDeprecated() {
31
+ require(!paused() || address(bridge.rollup()) != address(this), "PAUSED_AND_ACTIVE");
32
+ _;
33
+ }
34
+
30
35
  uint256 internal immutable deployTimeChainId = block.chainid;
31
36
 
32
37
  function _chainIdChanged() internal view returns (bool) {
@@ -234,7 +239,12 @@ abstract contract AbsRollupUserLogic is
234
239
  * and move it to the desired node.
235
240
  * @param stakerAddress Address of the staker whose stake is refunded
236
241
  */
237
- function returnOldDeposit(address stakerAddress) external override onlyValidator whenNotPaused {
242
+ function returnOldDeposit(address stakerAddress)
243
+ external
244
+ override
245
+ onlyValidator
246
+ whenNotPausedOrDeprecated
247
+ {
238
248
  require(latestStakedNode(stakerAddress) <= latestConfirmed(), "TOO_RECENT");
239
249
  requireUnchallengedStaker(stakerAddress);
240
250
  withdrawStaker(stakerAddress);
@@ -258,7 +268,7 @@ abstract contract AbsRollupUserLogic is
258
268
  * @notice Reduce the amount staked for the sender (difference between initial amount staked and target is creditted back to the sender).
259
269
  * @param target Target amount of stake for the staker. If this is below the current minimum, it will be set to minimum instead
260
270
  */
261
- function reduceDeposit(uint256 target) external onlyValidator whenNotPaused {
271
+ function reduceDeposit(uint256 target) external onlyValidator whenNotPausedOrDeprecated {
262
272
  requireUnchallengedStaker(msg.sender);
263
273
  uint256 currentRequired = currentRequiredStake();
264
274
  if (target < currentRequired) {
@@ -659,7 +669,13 @@ contract RollupUserLogic is AbsRollupUserLogic, IRollupUser {
659
669
  /**
660
670
  * @notice Withdraw uncommitted funds owned by sender from the rollup chain
661
671
  */
662
- function withdrawStakerFunds() external override onlyValidator whenNotPaused returns (uint256) {
672
+ function withdrawStakerFunds()
673
+ external
674
+ override
675
+ onlyValidator
676
+ whenNotPausedOrDeprecated
677
+ returns (uint256)
678
+ {
663
679
  uint256 amount = withdrawFunds(msg.sender);
664
680
  // This is safe because it occurs after all checks and effects
665
681
  // solhint-disable-next-line avoid-low-level-calls
@@ -731,7 +747,13 @@ contract ERC20RollupUserLogic is AbsRollupUserLogic, IRollupUserERC20 {
731
747
  /**
732
748
  * @notice Withdraw uncommitted funds owned by sender from the rollup chain
733
749
  */
734
- function withdrawStakerFunds() external override onlyValidator whenNotPaused returns (uint256) {
750
+ function withdrawStakerFunds()
751
+ external
752
+ override
753
+ onlyValidator
754
+ whenNotPausedOrDeprecated
755
+ returns (uint256)
756
+ {
735
757
  uint256 amount = withdrawFunds(msg.sender);
736
758
  // This is safe because it occurs after all checks and effects
737
759
  require(IERC20Upgradeable(stakeToken).transfer(msg.sender, amount), "TRANSFER_FAILED");
@@ -74,6 +74,10 @@ contract BridgeTester is Initializable, DelegateCallAware, IBridge, IEthBridge {
74
74
  rollup = rollup_;
75
75
  }
76
76
 
77
+ function updateRollupAddress(IOwnable _rollup) external {
78
+ rollup = _rollup;
79
+ }
80
+
77
81
  function activeOutbox() public view returns (address) {
78
82
  if (_activeOutbox == EMPTY_ACTIVEOUTBOX) return address(uint160(0));
79
83
  return _activeOutbox;
@@ -48,12 +48,18 @@ contract OutboxWithoutOptTester is DelegateCallAware, IOutbox {
48
48
  rollup = address(_bridge.rollup());
49
49
  }
50
50
 
51
+ function postUpgradeInit() external {}
52
+
51
53
  function updateSendRoot(bytes32 root, bytes32 l2BlockHash) external override {
52
54
  //if (msg.sender != rollup) revert NotRollup(msg.sender, rollup); //test only!!!
53
55
  roots[root] = l2BlockHash;
54
56
  emit SendRootUpdated(root, l2BlockHash);
55
57
  }
56
58
 
59
+ function updateRollupAddress() external onlyDelegated onlyProxyOwner {
60
+ rollup = address(bridge.rollup());
61
+ }
62
+
57
63
  /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account
58
64
  /// When the return value is zero, that means this is a system message
59
65
  /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies