@arbitrum/nitro-contracts 1.1.0-beta.0 → 1.1.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/build/contracts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol/UUPSUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/security/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol/IAccessControlUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json +1 -1
- package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json +1 -1
- package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.dbg.json +1 -1
- package/build/contracts/src/bridge/AbsInbox.sol/AbsInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/AbsOutbox.sol/AbsOutbox.dbg.json +1 -1
- package/build/contracts/src/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.dbg.json +1 -1
- package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.dbg.json +1 -1
- package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.dbg.json +1 -1
- package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.dbg.json +1 -1
- package/build/contracts/src/bridge/IBridge.sol/IBridge.dbg.json +1 -1
- package/build/contracts/src/bridge/IDelayedMessageProvider.sol/IDelayedMessageProvider.dbg.json +1 -1
- package/build/contracts/src/bridge/IERC20Bridge.sol/IERC20Bridge.dbg.json +1 -1
- package/build/contracts/src/bridge/IERC20Inbox.sol/IERC20Inbox.dbg.json +1 -1
- package/build/contracts/src/bridge/IEthBridge.sol/IEthBridge.dbg.json +1 -1
- package/build/contracts/src/bridge/IInbox.sol/IInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/IInboxBase.sol/IInboxBase.dbg.json +1 -1
- package/build/contracts/src/bridge/IOutbox.sol/IOutbox.dbg.json +1 -1
- package/build/contracts/src/bridge/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.dbg.json +1 -1
- package/build/contracts/src/bridge/Inbox.sol/Inbox.dbg.json +1 -1
- package/build/contracts/src/bridge/Messages.sol/Messages.dbg.json +1 -1
- package/build/contracts/src/bridge/Outbox.sol/Outbox.dbg.json +1 -1
- package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.dbg.json +1 -1
- package/build/contracts/src/challenge/ChallengeLib.sol/ChallengeLib.dbg.json +1 -1
- package/build/contracts/src/challenge/ChallengeManager.sol/ChallengeManager.dbg.json +1 -1
- package/build/contracts/src/challenge/IChallengeManager.sol/IChallengeManager.dbg.json +1 -1
- package/build/contracts/src/challenge/IChallengeResultReceiver.sol/IChallengeResultReceiver.dbg.json +1 -1
- package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.dbg.json +1 -1
- package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.dbg.json +1 -1
- package/build/contracts/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade.dbg.json +1 -1
- package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.dbg.json +1 -1
- package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.dbg.json +1 -1
- package/build/contracts/src/libraries/DelegateCallAware.sol/DelegateCallAware.dbg.json +1 -1
- package/build/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol/DoubleLogicUUPSUpgradeable.dbg.json +1 -1
- package/build/contracts/src/libraries/IGasRefunder.sol/GasRefundEnabled.dbg.json +1 -1
- package/build/contracts/src/libraries/IGasRefunder.sol/IGasRefunder.dbg.json +1 -1
- package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.dbg.json +1 -1
- package/build/contracts/src/libraries/UUPSNotUpgradeable.sol/UUPSNotUpgradeable.dbg.json +1 -1
- package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.dbg.json +1 -1
- package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.dbg.json +1 -1
- package/build/contracts/src/mocks/InboxStub.sol/InboxStub.dbg.json +1 -1
- package/build/contracts/src/mocks/MockResultReceiver.sol/MockResultReceiver.dbg.json +1 -1
- package/build/contracts/src/mocks/ProxyAdminForBinding.sol/ProxyAdminForBinding.dbg.json +1 -1
- package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.dbg.json +1 -1
- package/build/contracts/src/mocks/Simple.sol/Simple.dbg.json +1 -1
- package/build/contracts/src/mocks/SimpleProxy.sol/SimpleProxy.dbg.json +1 -1
- package/build/contracts/src/mocks/SingleExecutionChallenge.sol/SingleExecutionChallenge.dbg.json +1 -1
- package/build/contracts/src/mocks/TimedOutChallengeManager.sol/TimedOutChallengeManager.dbg.json +1 -1
- package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.dbg.json +1 -1
- package/build/contracts/src/node-interface/NodeInterface.sol/NodeInterface.dbg.json +1 -1
- package/build/contracts/src/node-interface/NodeInterfaceDebug.sol/NodeInterfaceDebug.dbg.json +1 -1
- package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.dbg.json +1 -1
- package/build/contracts/src/osp/IOneStepProofEntry.sol/IOneStepProofEntry.dbg.json +1 -1
- package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.dbg.json +1 -1
- package/build/contracts/src/osp/IOneStepProver.sol/IOneStepProver.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.dbg.json +1 -1
- package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbAddressTable.sol/ArbAddressTable.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbAggregator.sol/ArbAggregator.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbBLS.sol/ArbBLS.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbDebug.sol/ArbDebug.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbFunctionTable.sol/ArbFunctionTable.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbGasInfo.sol/ArbGasInfo.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbInfo.sol/ArbInfo.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbOwnerPublic.sol/ArbOwnerPublic.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbRetryableTx.sol/ArbRetryableTx.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbStatistics.sol/ArbStatistics.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbSys.sol/ArbSys.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbosActs.sol/ArbosActs.dbg.json +1 -1
- package/build/contracts/src/precompiles/ArbosTest.sol/ArbosTest.dbg.json +1 -1
- package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.dbg.json +1 -1
- package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.dbg.json +1 -1
- package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupCore.sol/IRollupCore.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUser.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserAbs.dbg.json +1 -1
- package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserERC20.dbg.json +1 -1
- package/build/contracts/src/rollup/Node.sol/NodeLib.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupCore.sol/RollupCore.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.json +98 -91
- package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupLib.sol/RollupLib.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.dbg.json +1 -1
- package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.dbg.json +1 -1
- package/build/contracts/src/rollup/ValidatorUtils.sol/ValidatorUtils.dbg.json +1 -1
- package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.dbg.json +1 -1
- package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.dbg.json +1 -1
- package/build/contracts/src/state/Deserialize.sol/Deserialize.dbg.json +1 -1
- package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.dbg.json +1 -1
- package/build/contracts/src/state/Instructions.sol/Instructions.dbg.json +1 -1
- package/build/contracts/src/state/Machine.sol/MachineLib.dbg.json +1 -1
- package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.dbg.json +1 -1
- package/build/contracts/src/state/Module.sol/ModuleLib.dbg.json +1 -1
- package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.dbg.json +1 -1
- package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.dbg.json +1 -1
- package/build/contracts/src/state/PcArray.sol/PcArrayLib.dbg.json +1 -1
- package/build/contracts/src/state/StackFrame.sol/StackFrameLib.dbg.json +1 -1
- package/build/contracts/src/state/Value.sol/ValueLib.dbg.json +1 -1
- package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.dbg.json +1 -1
- package/build/contracts/src/state/ValueStack.sol/ValueStackLib.dbg.json +1 -1
- package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/EthVault.sol/EthVault.dbg.json +1 -1
- package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.dbg.json +1 -1
- package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.dbg.json +1 -1
- package/build/contracts/src/test-helpers/TestToken.sol/TestToken.dbg.json +1 -1
- package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.dbg.json +1 -1
- package/package.json +1 -1
- package/src/rollup/RollupCreator.sol +57 -48
package/package.json
CHANGED
@@ -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
|
85
|
-
*
|
86
|
-
*
|
87
|
-
*
|
88
|
-
*
|
89
|
-
*
|
90
|
-
*
|
91
|
-
*
|
92
|
-
*
|
93
|
-
*
|
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
|
-
|
98
|
-
|
99
|
-
address
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
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
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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
|
-
|
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 (
|
176
|
-
bridgeContracts.sequencerInbox.setIsBatchPoster(
|
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 (
|
181
|
-
bool[] memory _vals = new bool[](
|
182
|
-
for (uint256 i = 0; 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(
|
194
|
+
IRollupAdmin(address(rollup)).setValidator(deployParams.validators, _vals);
|
186
195
|
}
|
187
196
|
|
188
197
|
IRollupAdmin(address(rollup)).setOwner(address(upgradeExecutor));
|
189
198
|
|
190
|
-
if (
|
199
|
+
if (deployParams.deployFactoriesToL2) {
|
191
200
|
_deployFactories(
|
192
201
|
address(bridgeContracts.inbox),
|
193
|
-
|
194
|
-
|
202
|
+
deployParams.nativeToken,
|
203
|
+
deployParams.maxFeePerGasForRetryables
|
195
204
|
);
|
196
205
|
}
|
197
206
|
|
198
207
|
emit RollupCreated(
|
199
208
|
address(rollup),
|
200
|
-
|
209
|
+
deployParams.nativeToken,
|
201
210
|
address(bridgeContracts.inbox),
|
202
211
|
address(bridgeContracts.outbox),
|
203
212
|
address(bridgeContracts.rollupEventInbox),
|