@arbitrum/nitro-contracts 1.1.0-alpha.1 → 1.1.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +114 -0
- package/README.md +2 -2
- package/build/types/@openzeppelin/contracts/access/Ownable.ts +175 -0
- package/build/types/@openzeppelin/contracts/access/index.ts +4 -0
- package/build/types/@openzeppelin/contracts/index.ts +11 -0
- package/build/types/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.ts +87 -0
- package/build/types/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/index.ts +4 -0
- package/build/types/@openzeppelin/contracts/interfaces/index.ts +5 -0
- package/build/types/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.ts +108 -0
- package/build/types/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.ts +108 -0
- package/build/types/@openzeppelin/contracts/proxy/ERC1967/index.ts +5 -0
- package/build/types/@openzeppelin/contracts/proxy/Proxy.ts +55 -0
- package/build/types/@openzeppelin/contracts/proxy/beacon/IBeacon.ts +87 -0
- package/build/types/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.ts +239 -0
- package/build/types/@openzeppelin/contracts/proxy/beacon/index.ts +5 -0
- package/build/types/@openzeppelin/contracts/proxy/index.ts +12 -0
- package/build/types/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.ts +359 -0
- package/build/types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.ts +278 -0
- package/build/types/@openzeppelin/contracts/proxy/transparent/index.ts +5 -0
- package/build/types/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.ts +216 -0
- package/build/types/@openzeppelin/contracts/proxy/utils/index.ts +4 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/ERC20.ts +444 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/IERC20.ts +322 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.ts +507 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.ts +364 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/extensions/index.ts +5 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/index.ts +9 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.ts +507 -0
- package/build/types/@openzeppelin/contracts/token/ERC20/presets/index.ts +4 -0
- package/build/types/@openzeppelin/contracts/token/index.ts +5 -0
- package/build/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.ts +175 -0
- package/build/types/@openzeppelin/contracts-upgradeable/access/index.ts +4 -0
- package/build/types/@openzeppelin/contracts-upgradeable/index.ts +9 -0
- package/build/types/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.ts +111 -0
- package/build/types/@openzeppelin/contracts-upgradeable/security/index.ts +4 -0
- package/build/types/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.ts +322 -0
- package/build/types/@openzeppelin/contracts-upgradeable/token/ERC20/index.ts +4 -0
- package/build/types/@openzeppelin/contracts-upgradeable/token/index.ts +5 -0
- package/build/types/@openzeppelin/index.ts +7 -0
- package/build/types/common.ts +44 -0
- package/build/types/factories/@openzeppelin/contracts/access/Ownable__factory.ts +78 -0
- package/build/types/factories/@openzeppelin/contracts/access/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts/index.ts +7 -0
- package/build/types/factories/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable__factory.ts +39 -0
- package/build/types/factories/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts/interfaces/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy__factory.ts +146 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade__factory.ts +71 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/ERC1967/index.ts +5 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/Proxy__factory.ts +31 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/beacon/IBeacon__factory.ts +39 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon__factory.ts +169 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/beacon/index.ts +5 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/index.ts +8 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/transparent/ProxyAdmin__factory.ts +211 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy__factory.ts +228 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/transparent/index.ts +5 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable__factory.ts +115 -0
- package/build/types/factories/@openzeppelin/contracts/proxy/utils/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.ts +349 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.ts +206 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable__factory.ts +327 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.ts +248 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.ts +5 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/index.ts +7 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply__factory.ts +420 -0
- package/build/types/factories/@openzeppelin/contracts/token/ERC20/presets/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts/token/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.ts +78 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/access/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/index.ts +6 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable__factory.ts +65 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/security/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable__factory.ts +209 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/token/ERC20/index.ts +4 -0
- package/build/types/factories/@openzeppelin/contracts-upgradeable/token/index.ts +4 -0
- package/build/types/factories/@openzeppelin/index.ts +5 -0
- package/build/types/factories/index.ts +5 -0
- package/build/types/factories/src/bridge/AbsBridge__factory.ts +612 -0
- package/build/types/factories/src/bridge/AbsInbox__factory.ts +455 -0
- package/build/types/factories/src/bridge/AbsOutbox__factory.ts +561 -0
- package/build/types/factories/src/bridge/Bridge__factory.ts +695 -0
- package/build/types/factories/src/bridge/ERC20Bridge__factory.ts +746 -0
- package/build/types/factories/src/bridge/ERC20Inbox__factory.ts +719 -0
- package/build/types/factories/src/bridge/ERC20Outbox__factory.ts +610 -0
- package/build/types/factories/src/bridge/IBridge__factory.ts +508 -0
- package/build/types/factories/src/bridge/IDelayedMessageProvider__factory.ts +62 -0
- package/build/types/factories/src/bridge/IERC20Bridge__factory.ts +576 -0
- package/build/types/factories/src/bridge/IERC20Inbox__factory.ts +461 -0
- package/build/types/factories/src/bridge/IEthBridge__factory.ts +553 -0
- package/build/types/factories/src/bridge/IEthInbox__factory.ts +653 -0
- package/build/types/factories/src/bridge/IInbox__factory.ts +318 -0
- package/build/types/factories/src/bridge/IOutbox__factory.ts +431 -0
- package/build/types/factories/src/bridge/IOwnable__factory.ts +36 -0
- package/build/types/factories/src/bridge/ISequencerInbox__factory.ts +666 -0
- package/build/types/factories/src/bridge/Inbox__factory.ts +999 -0
- package/build/types/factories/src/bridge/Outbox__factory.ts +591 -0
- package/build/types/factories/src/bridge/SequencerInbox__factory.ts +865 -0
- package/build/types/factories/src/bridge/index.ts +23 -0
- package/build/types/factories/src/challenge/ChallengeManager__factory.ts +720 -0
- package/build/types/factories/src/challenge/IChallengeManager__factory.ts +401 -0
- package/build/types/factories/src/challenge/IChallengeResultReceiver__factory.ts +53 -0
- package/build/types/factories/src/challenge/index.ts +6 -0
- package/build/types/factories/src/index.ts +12 -0
- package/build/types/factories/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy__factory.ts +128 -0
- package/build/types/factories/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade__factory.ts +88 -0
- package/build/types/factories/src/libraries/AdminFallbackProxy.sol/index.ts +5 -0
- package/build/types/factories/src/libraries/DoubleLogicUUPSUpgradeable__factory.ts +163 -0
- package/build/types/factories/src/libraries/IGasRefunder__factory.ts +55 -0
- package/build/types/factories/src/libraries/UUPSNotUpgradeable__factory.ts +97 -0
- package/build/types/factories/src/libraries/index.ts +7 -0
- package/build/types/factories/src/mocks/BridgeStub__factory.ts +612 -0
- package/build/types/factories/src/mocks/BridgeUnproxied__factory.ts +706 -0
- package/build/types/factories/src/mocks/InboxStub__factory.ts +702 -0
- package/build/types/factories/src/mocks/MockResultReceiver__factory.ts +244 -0
- package/build/types/factories/src/mocks/ProxyAdminForBinding__factory.ts +215 -0
- package/build/types/factories/src/mocks/SequencerInboxStub__factory.ts +938 -0
- package/build/types/factories/src/mocks/SimpleProxy__factory.ts +83 -0
- package/build/types/factories/src/mocks/Simple__factory.ts +287 -0
- package/build/types/factories/src/mocks/SingleExecutionChallenge__factory.ts +823 -0
- package/build/types/factories/src/mocks/TimedOutChallengeManager__factory.ts +724 -0
- package/build/types/factories/src/mocks/index.ts +13 -0
- package/build/types/factories/src/node-interface/NodeInterfaceDebug__factory.ts +82 -0
- package/build/types/factories/src/node-interface/NodeInterface__factory.ts +301 -0
- package/build/types/factories/src/node-interface/index.ts +5 -0
- package/build/types/factories/src/osp/HashProofHelper__factory.ts +216 -0
- package/build/types/factories/src/osp/IOneStepProofEntry__factory.ts +72 -0
- package/build/types/factories/src/osp/IOneStepProver__factory.ts +492 -0
- package/build/types/factories/src/osp/OneStepProofEntry__factory.ts +206 -0
- package/build/types/factories/src/osp/OneStepProver0__factory.ts +528 -0
- package/build/types/factories/src/osp/OneStepProverHostIo__factory.ts +528 -0
- package/build/types/factories/src/osp/OneStepProverMath__factory.ts +528 -0
- package/build/types/factories/src/osp/OneStepProverMemory__factory.ts +528 -0
- package/build/types/factories/src/osp/index.ts +11 -0
- package/build/types/factories/src/precompiles/ArbAddressTable__factory.ts +163 -0
- package/build/types/factories/src/precompiles/ArbAggregator__factory.ts +163 -0
- package/build/types/factories/src/precompiles/ArbDebug__factory.ts +208 -0
- package/build/types/factories/src/precompiles/ArbFunctionTable__factory.ts +92 -0
- package/build/types/factories/src/precompiles/ArbGasInfo__factory.ts +339 -0
- package/build/types/factories/src/precompiles/ArbInfo__factory.ts +64 -0
- package/build/types/factories/src/precompiles/ArbOwnerPublic__factory.ts +84 -0
- package/build/types/factories/src/precompiles/ArbOwner__factory.ts +393 -0
- package/build/types/factories/src/precompiles/ArbRetryableTx__factory.ts +321 -0
- package/build/types/factories/src/precompiles/ArbStatistics__factory.ts +64 -0
- package/build/types/factories/src/precompiles/ArbSys__factory.ts +389 -0
- package/build/types/factories/src/precompiles/ArbosActs__factory.ts +92 -0
- package/build/types/factories/src/precompiles/ArbosTest__factory.ts +39 -0
- package/build/types/factories/src/precompiles/index.ts +16 -0
- package/build/types/factories/src/rollup/AbsBridgeCreator__factory.ts +182 -0
- package/build/types/factories/src/rollup/AbsRollupCreator__factory.ts +285 -0
- package/build/types/factories/src/rollup/AbsRollupEventInbox__factory.ts +125 -0
- package/build/types/factories/src/rollup/BridgeCreator__factory.ts +294 -0
- package/build/types/factories/src/rollup/ERC20BridgeCreator__factory.ts +299 -0
- package/build/types/factories/src/rollup/ERC20RollupCreator__factory.ts +439 -0
- package/build/types/factories/src/rollup/ERC20RollupEventInbox__factory.ts +170 -0
- package/build/types/factories/src/rollup/IBridgeCreator.sol/IBridgeCreator__factory.ts +124 -0
- package/build/types/factories/src/rollup/IBridgeCreator.sol/IERC20BridgeCreator__factory.ts +200 -0
- package/build/types/factories/src/rollup/IBridgeCreator.sol/IEthBridgeCreator__factory.ts +195 -0
- package/build/types/factories/src/rollup/IBridgeCreator.sol/index.ts +6 -0
- package/build/types/factories/src/rollup/IRollupAdmin__factory.ts +559 -0
- package/build/types/factories/src/rollup/IRollupCore__factory.ts +904 -0
- package/build/types/factories/src/rollup/IRollupCreator.sol/IERC20RollupCreator__factory.ts +182 -0
- package/build/types/factories/src/rollup/IRollupCreator.sol/IEthRollupCreator__factory.ts +177 -0
- package/build/types/factories/src/rollup/IRollupCreator.sol/IRollupCreator__factory.ts +69 -0
- package/build/types/factories/src/rollup/IRollupCreator.sol/index.ts +6 -0
- package/build/types/factories/src/rollup/IRollupEventInbox__factory.ts +83 -0
- package/build/types/factories/src/rollup/IRollupLogic.sol/IRollupUserAbs__factory.ts +1324 -0
- package/build/types/factories/src/rollup/IRollupLogic.sol/IRollupUserERC20__factory.ts +1458 -0
- package/build/types/factories/src/rollup/IRollupLogic.sol/IRollupUser__factory.ts +1443 -0
- package/build/types/factories/src/rollup/IRollupLogic.sol/index.ts +6 -0
- package/build/types/factories/src/rollup/RollupAdminLogic__factory.ts +1859 -0
- package/build/types/factories/src/rollup/RollupCore__factory.ts +1066 -0
- package/build/types/factories/src/rollup/RollupCreator__factory.ts +434 -0
- package/build/types/factories/src/rollup/RollupEventInbox__factory.ts +166 -0
- package/build/types/factories/src/rollup/RollupProxy__factory.ts +277 -0
- package/build/types/factories/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic__factory.ts +1593 -0
- package/build/types/factories/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic__factory.ts +1767 -0
- package/build/types/factories/src/rollup/RollupUserLogic.sol/RollupUserLogic__factory.ts +1748 -0
- package/build/types/factories/src/rollup/RollupUserLogic.sol/index.ts +6 -0
- package/build/types/factories/src/rollup/ValidatorUtils__factory.ts +430 -0
- package/build/types/factories/src/rollup/ValidatorWalletCreator__factory.ts +205 -0
- package/build/types/factories/src/rollup/ValidatorWallet__factory.ts +486 -0
- package/build/types/factories/src/rollup/index.ts +25 -0
- package/build/types/factories/src/test-helpers/BridgeTester__factory.ts +654 -0
- package/build/types/factories/src/test-helpers/CryptographyPrimitivesTester__factory.ts +111 -0
- package/build/types/factories/src/test-helpers/EthVault__factory.ts +95 -0
- package/build/types/factories/src/test-helpers/MessageTester__factory.ts +135 -0
- package/build/types/factories/src/test-helpers/OutboxWithoutOptTester__factory.ts +575 -0
- package/build/types/factories/src/test-helpers/RollupMock__factory.ts +100 -0
- package/build/types/factories/src/test-helpers/ValueArrayTester__factory.ts +69 -0
- package/build/types/factories/src/test-helpers/index.ts +10 -0
- package/build/types/index.ts +240 -0
- package/build/types/src/bridge/AbsBridge.ts +863 -0
- package/build/types/src/bridge/AbsInbox.ts +664 -0
- package/build/types/src/bridge/AbsOutbox.ts +700 -0
- package/build/types/src/bridge/Bridge.ts +934 -0
- package/build/types/src/bridge/ERC20Bridge.ts +970 -0
- package/build/types/src/bridge/ERC20Inbox.ts +869 -0
- package/build/types/src/bridge/ERC20Outbox.ts +722 -0
- package/build/types/src/bridge/IBridge.ts +799 -0
- package/build/types/src/bridge/IDelayedMessageProvider.ts +108 -0
- package/build/types/src/bridge/IERC20Bridge.ts +914 -0
- package/build/types/src/bridge/IERC20Inbox.ts +788 -0
- package/build/types/src/bridge/IEthBridge.ts +871 -0
- package/build/types/src/bridge/IEthInbox.ts +1081 -0
- package/build/types/src/bridge/IInbox.ts +583 -0
- package/build/types/src/bridge/IOutbox.ts +654 -0
- package/build/types/src/bridge/IOwnable.ts +81 -0
- package/build/types/src/bridge/ISequencerInbox.ts +1038 -0
- package/build/types/src/bridge/Inbox.ts +1279 -0
- package/build/types/src/bridge/Outbox.ts +700 -0
- package/build/types/src/bridge/SequencerInbox.ts +1138 -0
- package/build/types/src/bridge/index.ts +23 -0
- package/build/types/src/challenge/ChallengeManager.ts +889 -0
- package/build/types/src/challenge/IChallengeManager.ts +543 -0
- package/build/types/src/challenge/IChallengeResultReceiver.ts +115 -0
- package/build/types/src/challenge/index.ts +6 -0
- package/build/types/src/index.ts +21 -0
- package/build/types/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.ts +128 -0
- package/build/types/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade.ts +128 -0
- package/build/types/src/libraries/AdminFallbackProxy.sol/index.ts +5 -0
- package/build/types/src/libraries/DoubleLogicUUPSUpgradeable.ts +314 -0
- package/build/types/src/libraries/IGasRefunder.ts +112 -0
- package/build/types/src/libraries/UUPSNotUpgradeable.ts +164 -0
- package/build/types/src/libraries/index.ts +8 -0
- package/build/types/src/mocks/BridgeStub.ts +887 -0
- package/build/types/src/mocks/BridgeUnproxied.ts +934 -0
- package/build/types/src/mocks/InboxStub.ts +1076 -0
- package/build/types/src/mocks/MockResultReceiver.ts +301 -0
- package/build/types/src/mocks/ProxyAdminForBinding.ts +359 -0
- package/build/types/src/mocks/SequencerInboxStub.ts +1173 -0
- package/build/types/src/mocks/Simple.ts +514 -0
- package/build/types/src/mocks/SimpleProxy.ts +55 -0
- package/build/types/src/mocks/SingleExecutionChallenge.ts +889 -0
- package/build/types/src/mocks/TimedOutChallengeManager.ts +883 -0
- package/build/types/src/mocks/index.ts +13 -0
- package/build/types/src/node-interface/NodeInterface.ts +502 -0
- package/build/types/src/node-interface/NodeInterfaceDebug.ts +137 -0
- package/build/types/src/node-interface/index.ts +5 -0
- package/build/types/src/osp/HashProofHelper.ts +308 -0
- package/build/types/src/osp/IOneStepProofEntry.ts +128 -0
- package/build/types/src/osp/IOneStepProver.ts +284 -0
- package/build/types/src/osp/OneStepProofEntry.ts +196 -0
- package/build/types/src/osp/OneStepProver0.ts +284 -0
- package/build/types/src/osp/OneStepProverHostIo.ts +284 -0
- package/build/types/src/osp/OneStepProverMath.ts +284 -0
- package/build/types/src/osp/OneStepProverMemory.ts +284 -0
- package/build/types/src/osp/index.ts +11 -0
- package/build/types/src/precompiles/ArbAddressTable.ts +248 -0
- package/build/types/src/precompiles/ArbAggregator.ts +335 -0
- package/build/types/src/precompiles/ArbDebug.ts +292 -0
- package/build/types/src/precompiles/ArbFunctionTable.ts +150 -0
- package/build/types/src/precompiles/ArbGasInfo.ts +494 -0
- package/build/types/src/precompiles/ArbInfo.ts +105 -0
- package/build/types/src/precompiles/ArbOwner.ts +928 -0
- package/build/types/src/precompiles/ArbOwnerPublic.ts +157 -0
- package/build/types/src/precompiles/ArbRetryableTx.ts +467 -0
- package/build/types/src/precompiles/ArbStatistics.ts +93 -0
- package/build/types/src/precompiles/ArbSys.ts +553 -0
- package/build/types/src/precompiles/ArbosActs.ts +173 -0
- package/build/types/src/precompiles/ArbosTest.ts +97 -0
- package/build/types/src/precompiles/index.ts +16 -0
- package/build/types/src/rollup/AbsBridgeCreator.ts +348 -0
- package/build/types/src/rollup/AbsRollupCreator.ts +449 -0
- package/build/types/src/rollup/AbsRollupEventInbox.ts +218 -0
- package/build/types/src/rollup/BridgeCreator.ts +415 -0
- package/build/types/src/rollup/ERC20BridgeCreator.ts +420 -0
- package/build/types/src/rollup/ERC20RollupCreator.ts +561 -0
- package/build/types/src/rollup/ERC20RollupEventInbox.ts +218 -0
- package/build/types/src/rollup/IBridgeCreator.sol/IBridgeCreator.ts +231 -0
- package/build/types/src/rollup/IBridgeCreator.sol/IERC20BridgeCreator.ts +303 -0
- package/build/types/src/rollup/IBridgeCreator.sol/IEthBridgeCreator.ts +298 -0
- package/build/types/src/rollup/IBridgeCreator.sol/index.ts +6 -0
- package/build/types/src/rollup/IRollupAdmin.ts +1003 -0
- package/build/types/src/rollup/IRollupCore.ts +1183 -0
- package/build/types/src/rollup/IRollupCreator.sol/IERC20RollupCreator.ts +247 -0
- package/build/types/src/rollup/IRollupCreator.sol/IEthRollupCreator.ts +242 -0
- package/build/types/src/rollup/IRollupCreator.sol/IRollupCreator.ts +134 -0
- package/build/types/src/rollup/IRollupCreator.sol/index.ts +6 -0
- package/build/types/src/rollup/IRollupEventInbox.ts +167 -0
- package/build/types/src/rollup/IRollupLogic.sol/IRollupUser.ts +2022 -0
- package/build/types/src/rollup/IRollupLogic.sol/IRollupUserAbs.ts +1901 -0
- package/build/types/src/rollup/IRollupLogic.sol/IRollupUserERC20.ts +2036 -0
- package/build/types/src/rollup/IRollupLogic.sol/index.ts +6 -0
- package/build/types/src/rollup/RollupAdminLogic.ts +2593 -0
- package/build/types/src/rollup/RollupCore.ts +1406 -0
- package/build/types/src/rollup/RollupCreator.ts +556 -0
- package/build/types/src/rollup/RollupEventInbox.ts +218 -0
- package/build/types/src/rollup/RollupProxy.ts +285 -0
- package/build/types/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic.ts +2282 -0
- package/build/types/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.ts +2417 -0
- package/build/types/src/rollup/RollupUserLogic.sol/RollupUserLogic.ts +2403 -0
- package/build/types/src/rollup/RollupUserLogic.sol/index.ts +6 -0
- package/build/types/src/rollup/ValidatorUtils.ts +561 -0
- package/build/types/src/rollup/ValidatorWallet.ts +751 -0
- package/build/types/src/rollup/ValidatorWalletCreator.ts +294 -0
- package/build/types/src/rollup/index.ts +29 -0
- package/build/types/src/test-helpers/BridgeTester.ts +899 -0
- package/build/types/src/test-helpers/CryptographyPrimitivesTester.ts +141 -0
- package/build/types/src/test-helpers/EthVault.ts +141 -0
- package/build/types/src/test-helpers/MessageTester.ts +182 -0
- package/build/types/src/test-helpers/OutboxWithoutOptTester.ts +700 -0
- package/build/types/src/test-helpers/RollupMock.ts +164 -0
- package/build/types/src/test-helpers/ValueArrayTester.ts +81 -0
- package/build/types/src/test-helpers/index.ts +10 -0
- package/package.json +9 -3
- package/src/bridge/AbsBridge.sol +302 -0
- package/src/bridge/AbsInbox.sol +335 -0
- package/src/bridge/AbsOutbox.sol +295 -0
- package/src/bridge/Bridge.sol +15 -244
- package/src/bridge/ERC20Bridge.sol +74 -0
- package/src/bridge/ERC20Inbox.sol +141 -0
- package/src/bridge/ERC20Outbox.sol +27 -0
- package/src/bridge/IBridge.sol +1 -16
- package/src/bridge/IDelayedMessageProvider.sol +1 -1
- package/src/bridge/IERC20Bridge.sol +35 -0
- package/src/bridge/IERC20Inbox.sol +75 -0
- package/src/bridge/IEthBridge.sol +26 -0
- package/src/bridge/IEthInbox.sol +133 -0
- package/src/bridge/IInbox.sol +13 -123
- package/src/bridge/IOutbox.sol +1 -1
- package/src/bridge/IOwnable.sol +1 -1
- package/src/bridge/ISequencerInbox.sol +12 -4
- package/src/bridge/Inbox.sol +46 -333
- package/src/bridge/Messages.sol +1 -1
- package/src/bridge/Outbox.sol +8 -265
- package/src/bridge/SequencerInbox.sol +29 -8
- package/src/challenge/ChallengeLib.sol +1 -1
- package/src/challenge/ChallengeManager.sol +1 -1
- package/src/challenge/IChallengeManager.sol +1 -1
- package/src/challenge/IChallengeResultReceiver.sol +1 -1
- package/src/libraries/AddressAliasHelper.sol +1 -1
- package/src/libraries/AdminFallbackProxy.sol +1 -1
- package/src/libraries/ArbitrumChecker.sol +16 -0
- package/src/libraries/Constants.sol +1 -4
- package/src/libraries/CryptographyPrimitives.sol +1 -1
- package/src/libraries/DelegateCallAware.sol +1 -1
- package/src/libraries/DoubleLogicUUPSUpgradeable.sol +1 -1
- package/src/libraries/Error.sol +9 -1
- package/src/libraries/IGasRefunder.sol +1 -1
- package/src/libraries/MerkleLib.sol +1 -1
- package/src/libraries/MessageTypes.sol +1 -1
- package/src/mocks/BridgeStub.sol +3 -2
- package/src/mocks/BridgeUnproxied.sol +1 -1
- package/src/mocks/InboxStub.sol +28 -5
- package/src/mocks/MockResultReceiver.sol +1 -1
- package/src/mocks/ProxyAdminForBinding.sol +1 -1
- package/src/mocks/SequencerInboxStub.sol +3 -2
- package/src/mocks/Simple.sol +3 -1
- package/src/mocks/SimpleProxy.sol +1 -1
- package/src/mocks/SingleExecutionChallenge.sol +1 -1
- package/src/mocks/TimedOutChallengeManager.sol +1 -1
- package/src/node-interface/NodeInterface.sol +1 -1
- package/src/node-interface/NodeInterfaceDebug.sol +1 -1
- package/src/osp/HashProofHelper.sol +1 -1
- package/src/osp/IOneStepProofEntry.sol +1 -1
- package/src/osp/IOneStepProver.sol +2 -1
- package/src/osp/OneStepProofEntry.sol +1 -1
- package/src/osp/OneStepProver0.sol +1 -1
- package/src/osp/OneStepProverHostIo.sol +2 -1
- package/src/osp/OneStepProverMath.sol +1 -1
- package/src/osp/OneStepProverMemory.sol +2 -1
- package/src/precompiles/ArbAddressTable.sol +1 -1
- package/src/precompiles/ArbAggregator.sol +1 -1
- package/src/precompiles/ArbBLS.sol +1 -1
- package/src/precompiles/ArbDebug.sol +1 -1
- package/src/precompiles/ArbFunctionTable.sol +1 -1
- package/src/precompiles/ArbGasInfo.sol +1 -1
- package/src/precompiles/ArbInfo.sol +1 -1
- package/src/precompiles/ArbOwner.sol +1 -1
- package/src/precompiles/ArbOwnerPublic.sol +1 -1
- package/src/precompiles/ArbRetryableTx.sol +1 -1
- package/src/precompiles/ArbStatistics.sol +1 -1
- package/src/precompiles/ArbSys.sol +1 -1
- package/src/precompiles/ArbosTest.sol +1 -1
- package/src/rollup/AbsBridgeCreator.sol +117 -0
- package/src/rollup/AbsRollupCreator.sol +164 -0
- package/src/rollup/AbsRollupEventInbox.sol +62 -0
- package/src/rollup/BridgeCreator.sol +17 -88
- package/src/rollup/Config.sol +43 -0
- package/src/rollup/ERC20BridgeCreator.sol +48 -0
- package/src/rollup/ERC20RollupCreator.sol +48 -0
- package/src/rollup/ERC20RollupEventInbox.sol +26 -0
- package/src/rollup/IBridgeCreator.sol +64 -0
- package/src/rollup/IRollupAdmin.sol +138 -0
- package/src/rollup/IRollupCore.sol +7 -3
- package/src/rollup/IRollupCreator.sol +40 -0
- package/src/rollup/IRollupEventInbox.sol +1 -1
- package/src/rollup/IRollupLogic.sol +4 -132
- package/src/rollup/Node.sol +15 -1
- package/src/rollup/RollupAdminLogic.sol +6 -8
- package/src/rollup/RollupCore.sol +4 -11
- package/src/rollup/RollupCreator.sol +22 -97
- package/src/rollup/RollupEventInbox.sol +12 -35
- package/src/rollup/RollupLib.sol +2 -41
- package/src/rollup/RollupProxy.sol +3 -2
- package/src/rollup/RollupUserLogic.sol +6 -4
- package/src/rollup/ValidatorUtils.sol +2 -1
- package/src/rollup/ValidatorWallet.sol +1 -1
- package/src/rollup/ValidatorWalletCreator.sol +1 -1
- package/src/state/Deserialize.sol +2 -2
- package/src/state/GlobalState.sol +1 -1
- package/src/state/Instructions.sol +1 -1
- package/src/state/Machine.sol +1 -1
- package/src/state/MerkleProof.sol +1 -1
- package/src/state/Module.sol +3 -3
- package/src/state/ModuleMemory.sol +3 -8
- package/src/state/ModuleMemoryCompact.sol +17 -0
- package/src/state/PcArray.sol +1 -1
- package/src/state/StackFrame.sol +1 -1
- package/src/state/Value.sol +1 -1
- package/src/state/ValueArray.sol +1 -1
- package/src/state/ValueStack.sol +1 -1
- package/src/test-helpers/BridgeTester.sol +3 -2
- package/src/test-helpers/CryptographyPrimitivesTester.sol +1 -1
- package/src/test-helpers/EthVault.sol +20 -0
- package/src/test-helpers/InterfaceCompatibilityTester.sol +1 -1
- package/src/test-helpers/MessageTester.sol +1 -1
- package/src/test-helpers/OutboxWithoutOptTester.sol +1 -1
- package/src/test-helpers/RollupMock.sol +1 -1
- package/src/test-helpers/ValueArrayTester.sol +1 -1
- package/hardhat.config.ts +0 -164
@@ -1,60 +1,20 @@
|
|
1
1
|
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
-
// For license information, see https://github.com/nitro/blob/
|
2
|
+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
|
3
3
|
// SPDX-License-Identifier: BUSL-1.1
|
4
4
|
|
5
5
|
pragma solidity ^0.8.0;
|
6
6
|
|
7
7
|
import "../bridge/Bridge.sol";
|
8
|
-
import "../bridge/
|
9
|
-
import "../bridge/ISequencerInbox.sol";
|
8
|
+
import "../bridge/IEthBridge.sol";
|
10
9
|
import "../bridge/Inbox.sol";
|
11
|
-
import "../
|
12
|
-
import "
|
10
|
+
import "../rollup/AbsBridgeCreator.sol";
|
11
|
+
import "../rollup/RollupEventInbox.sol";
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
|
17
|
-
|
18
|
-
contract BridgeCreator is Ownable {
|
19
|
-
Bridge public bridgeTemplate;
|
20
|
-
SequencerInbox public sequencerInboxTemplate;
|
21
|
-
Inbox public inboxTemplate;
|
22
|
-
RollupEventInbox public rollupEventInboxTemplate;
|
23
|
-
Outbox public outboxTemplate;
|
24
|
-
|
25
|
-
event TemplatesUpdated();
|
26
|
-
|
27
|
-
constructor() Ownable() {
|
13
|
+
contract BridgeCreator is AbsBridgeCreator, IEthBridgeCreator {
|
14
|
+
constructor() AbsBridgeCreator() {
|
28
15
|
bridgeTemplate = new Bridge();
|
29
|
-
sequencerInboxTemplate = new SequencerInbox();
|
30
16
|
inboxTemplate = new Inbox();
|
31
17
|
rollupEventInboxTemplate = new RollupEventInbox();
|
32
|
-
outboxTemplate = new Outbox();
|
33
|
-
}
|
34
|
-
|
35
|
-
function updateTemplates(
|
36
|
-
address _bridgeTemplate,
|
37
|
-
address _sequencerInboxTemplate,
|
38
|
-
address _inboxTemplate,
|
39
|
-
address _rollupEventInboxTemplate,
|
40
|
-
address _outboxTemplate
|
41
|
-
) external onlyOwner {
|
42
|
-
bridgeTemplate = Bridge(_bridgeTemplate);
|
43
|
-
sequencerInboxTemplate = SequencerInbox(_sequencerInboxTemplate);
|
44
|
-
inboxTemplate = Inbox(_inboxTemplate);
|
45
|
-
rollupEventInboxTemplate = RollupEventInbox(_rollupEventInboxTemplate);
|
46
|
-
outboxTemplate = Outbox(_outboxTemplate);
|
47
|
-
|
48
|
-
emit TemplatesUpdated();
|
49
|
-
}
|
50
|
-
|
51
|
-
struct CreateBridgeFrame {
|
52
|
-
ProxyAdmin admin;
|
53
|
-
Bridge bridge;
|
54
|
-
SequencerInbox sequencerInbox;
|
55
|
-
Inbox inbox;
|
56
|
-
RollupEventInbox rollupEventInbox;
|
57
|
-
Outbox outbox;
|
58
18
|
}
|
59
19
|
|
60
20
|
function createBridge(
|
@@ -64,52 +24,21 @@ contract BridgeCreator is Ownable {
|
|
64
24
|
)
|
65
25
|
external
|
66
26
|
returns (
|
67
|
-
|
27
|
+
IBridge,
|
68
28
|
SequencerInbox,
|
69
|
-
|
70
|
-
|
29
|
+
IInbox,
|
30
|
+
IRollupEventInbox,
|
71
31
|
Outbox
|
72
32
|
)
|
73
33
|
{
|
74
|
-
|
75
|
-
|
76
|
-
frame.bridge = Bridge(
|
77
|
-
address(new TransparentUpgradeableProxy(address(bridgeTemplate), adminProxy, ""))
|
78
|
-
);
|
79
|
-
frame.sequencerInbox = SequencerInbox(
|
80
|
-
address(
|
81
|
-
new TransparentUpgradeableProxy(address(sequencerInboxTemplate), adminProxy, "")
|
82
|
-
)
|
83
|
-
);
|
84
|
-
frame.inbox = Inbox(
|
85
|
-
address(new TransparentUpgradeableProxy(address(inboxTemplate), adminProxy, ""))
|
86
|
-
);
|
87
|
-
frame.rollupEventInbox = RollupEventInbox(
|
88
|
-
address(
|
89
|
-
new TransparentUpgradeableProxy(
|
90
|
-
address(rollupEventInboxTemplate),
|
91
|
-
adminProxy,
|
92
|
-
""
|
93
|
-
)
|
94
|
-
)
|
95
|
-
);
|
96
|
-
frame.outbox = Outbox(
|
97
|
-
address(new TransparentUpgradeableProxy(address(outboxTemplate), adminProxy, ""))
|
98
|
-
);
|
99
|
-
}
|
100
|
-
|
101
|
-
frame.bridge.initialize(IOwnable(rollup));
|
102
|
-
frame.sequencerInbox.initialize(IBridge(frame.bridge), maxTimeVariation);
|
103
|
-
frame.inbox.initialize(IBridge(frame.bridge), ISequencerInbox(frame.sequencerInbox));
|
104
|
-
frame.rollupEventInbox.initialize(IBridge(frame.bridge));
|
105
|
-
frame.outbox.initialize(IBridge(frame.bridge));
|
34
|
+
return _createBridge(adminProxy, rollup, address(0), maxTimeVariation);
|
35
|
+
}
|
106
36
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
);
|
37
|
+
function _initializeBridge(
|
38
|
+
IBridge bridge,
|
39
|
+
IOwnable rollup,
|
40
|
+
address
|
41
|
+
) internal override {
|
42
|
+
IEthBridge(address(bridge)).initialize(IOwnable(rollup));
|
114
43
|
}
|
115
44
|
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
pragma solidity ^0.8.0;
|
6
|
+
|
7
|
+
import "../state/GlobalState.sol";
|
8
|
+
import "../state/Machine.sol";
|
9
|
+
import "../bridge/ISequencerInbox.sol";
|
10
|
+
import "../bridge/IBridge.sol";
|
11
|
+
import "../bridge/IOutbox.sol";
|
12
|
+
import "../bridge/IInbox.sol";
|
13
|
+
import "./IRollupEventInbox.sol";
|
14
|
+
import "./IRollupLogic.sol";
|
15
|
+
import "../challenge/IChallengeManager.sol";
|
16
|
+
|
17
|
+
struct Config {
|
18
|
+
uint64 confirmPeriodBlocks;
|
19
|
+
uint64 extraChallengeTimeBlocks;
|
20
|
+
address stakeToken;
|
21
|
+
uint256 baseStake;
|
22
|
+
bytes32 wasmModuleRoot;
|
23
|
+
address owner;
|
24
|
+
address loserStakeEscrow;
|
25
|
+
uint256 chainId;
|
26
|
+
string chainConfig;
|
27
|
+
uint64 genesisBlockNum;
|
28
|
+
ISequencerInbox.MaxTimeVariation sequencerInboxMaxTimeVariation;
|
29
|
+
}
|
30
|
+
|
31
|
+
struct ContractDependencies {
|
32
|
+
IBridge bridge;
|
33
|
+
ISequencerInbox sequencerInbox;
|
34
|
+
IInbox inbox;
|
35
|
+
IOutbox outbox;
|
36
|
+
IRollupEventInbox rollupEventInbox;
|
37
|
+
IChallengeManager challengeManager;
|
38
|
+
address rollupAdminLogic;
|
39
|
+
IRollupUser rollupUserLogic;
|
40
|
+
// misc contracts that are useful when interacting with the rollup
|
41
|
+
address validatorUtils;
|
42
|
+
address validatorWalletCreator;
|
43
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/nitro/blob/master/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
pragma solidity ^0.8.0;
|
6
|
+
|
7
|
+
import "../rollup/AbsBridgeCreator.sol";
|
8
|
+
import "../bridge/ERC20Bridge.sol";
|
9
|
+
import "../bridge/IERC20Bridge.sol";
|
10
|
+
import "../bridge/ERC20Inbox.sol";
|
11
|
+
import "../rollup/IBridgeCreator.sol";
|
12
|
+
import "../rollup/ERC20RollupEventInbox.sol";
|
13
|
+
|
14
|
+
import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol";
|
15
|
+
|
16
|
+
contract ERC20BridgeCreator is AbsBridgeCreator, IERC20BridgeCreator {
|
17
|
+
constructor() AbsBridgeCreator() {
|
18
|
+
bridgeTemplate = new ERC20Bridge();
|
19
|
+
inboxTemplate = new ERC20Inbox();
|
20
|
+
rollupEventInboxTemplate = new ERC20RollupEventInbox();
|
21
|
+
}
|
22
|
+
|
23
|
+
function createBridge(
|
24
|
+
address adminProxy,
|
25
|
+
address rollup,
|
26
|
+
address nativeToken,
|
27
|
+
ISequencerInbox.MaxTimeVariation memory maxTimeVariation
|
28
|
+
)
|
29
|
+
external
|
30
|
+
returns (
|
31
|
+
IBridge,
|
32
|
+
SequencerInbox,
|
33
|
+
IInbox,
|
34
|
+
IRollupEventInbox,
|
35
|
+
Outbox
|
36
|
+
)
|
37
|
+
{
|
38
|
+
return _createBridge(adminProxy, rollup, nativeToken, maxTimeVariation);
|
39
|
+
}
|
40
|
+
|
41
|
+
function _initializeBridge(
|
42
|
+
IBridge bridge,
|
43
|
+
IOwnable rollup,
|
44
|
+
address nativeToken
|
45
|
+
) internal override {
|
46
|
+
IERC20Bridge(address(bridge)).initialize(IOwnable(rollup), nativeToken);
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/nitro/blob/master/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
pragma solidity ^0.8.0;
|
6
|
+
|
7
|
+
import "./AbsRollupCreator.sol";
|
8
|
+
import "./ERC20BridgeCreator.sol";
|
9
|
+
|
10
|
+
contract ERC20RollupCreator is AbsRollupCreator, IERC20RollupCreator {
|
11
|
+
constructor() AbsRollupCreator() {}
|
12
|
+
|
13
|
+
// After this setup:
|
14
|
+
// Rollup should be the owner of bridge
|
15
|
+
// RollupOwner should be the owner of Rollup's ProxyAdmin
|
16
|
+
// RollupOwner should be the owner of Rollup
|
17
|
+
// Bridge should have a single inbox and outbox
|
18
|
+
function createRollup(
|
19
|
+
Config memory config,
|
20
|
+
address _batchPoster,
|
21
|
+
address[] calldata _validators,
|
22
|
+
address nativeToken
|
23
|
+
) external override returns (address) {
|
24
|
+
return _createRollup(config, _batchPoster, _validators, nativeToken);
|
25
|
+
}
|
26
|
+
|
27
|
+
function _createBridge(
|
28
|
+
address proxyAdmin,
|
29
|
+
address rollup,
|
30
|
+
ISequencerInbox.MaxTimeVariation memory maxTimeVariation,
|
31
|
+
address nativeToken
|
32
|
+
) internal override returns (BridgeContracts memory) {
|
33
|
+
(
|
34
|
+
IBridge bridge,
|
35
|
+
ISequencerInbox sequencerInbox,
|
36
|
+
IInbox inbox,
|
37
|
+
IRollupEventInbox rollupEventInbox,
|
38
|
+
IOutbox outbox
|
39
|
+
) = ERC20BridgeCreator(address(bridgeCreator)).createBridge(
|
40
|
+
proxyAdmin,
|
41
|
+
rollup,
|
42
|
+
nativeToken,
|
43
|
+
maxTimeVariation
|
44
|
+
);
|
45
|
+
|
46
|
+
return BridgeContracts(bridge, sequencerInbox, inbox, rollupEventInbox, outbox);
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/nitro/blob/master/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
pragma solidity ^0.8.0;
|
6
|
+
|
7
|
+
import "./AbsRollupEventInbox.sol";
|
8
|
+
import "../bridge/IERC20Bridge.sol";
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @title The inbox for rollup protocol events
|
12
|
+
*/
|
13
|
+
contract ERC20RollupEventInbox is AbsRollupEventInbox {
|
14
|
+
constructor() AbsRollupEventInbox() {}
|
15
|
+
|
16
|
+
function _enqueueInitializationMsg(bytes memory initMsg) internal override returns (uint256) {
|
17
|
+
uint256 tokenAmount = 0;
|
18
|
+
return
|
19
|
+
IERC20Bridge(address(bridge)).enqueueDelayedMessage(
|
20
|
+
INITIALIZATION_MSG_TYPE,
|
21
|
+
address(0),
|
22
|
+
keccak256(initMsg),
|
23
|
+
tokenAmount
|
24
|
+
);
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/nitro/blob/master/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
pragma solidity ^0.8.0;
|
6
|
+
|
7
|
+
import "./RollupLib.sol";
|
8
|
+
import "./IRollupCore.sol";
|
9
|
+
import "../bridge/SequencerInbox.sol";
|
10
|
+
import "../bridge/Outbox.sol";
|
11
|
+
import "../rollup/RollupEventInbox.sol";
|
12
|
+
|
13
|
+
interface IBridgeCreator {
|
14
|
+
function updateTemplates(
|
15
|
+
address _bridgeTemplate,
|
16
|
+
address _sequencerInboxTemplate,
|
17
|
+
address _inboxTemplate,
|
18
|
+
address _rollupEventInboxTemplate,
|
19
|
+
address _outboxTemplate
|
20
|
+
) external;
|
21
|
+
|
22
|
+
function bridgeTemplate() external view returns (IBridge);
|
23
|
+
|
24
|
+
function sequencerInboxTemplate() external view returns (SequencerInbox);
|
25
|
+
|
26
|
+
function inboxTemplate() external view returns (IInbox);
|
27
|
+
|
28
|
+
function rollupEventInboxTemplate() external view returns (IRollupEventInbox);
|
29
|
+
|
30
|
+
function outboxTemplate() external view returns (Outbox);
|
31
|
+
}
|
32
|
+
|
33
|
+
interface IEthBridgeCreator is IBridgeCreator {
|
34
|
+
function createBridge(
|
35
|
+
address adminProxy,
|
36
|
+
address rollup,
|
37
|
+
ISequencerInbox.MaxTimeVariation memory maxTimeVariation
|
38
|
+
)
|
39
|
+
external
|
40
|
+
returns (
|
41
|
+
IBridge,
|
42
|
+
SequencerInbox,
|
43
|
+
IInbox,
|
44
|
+
IRollupEventInbox,
|
45
|
+
Outbox
|
46
|
+
);
|
47
|
+
}
|
48
|
+
|
49
|
+
interface IERC20BridgeCreator is IBridgeCreator {
|
50
|
+
function createBridge(
|
51
|
+
address adminProxy,
|
52
|
+
address rollup,
|
53
|
+
address nativeToken,
|
54
|
+
ISequencerInbox.MaxTimeVariation memory maxTimeVariation
|
55
|
+
)
|
56
|
+
external
|
57
|
+
returns (
|
58
|
+
IBridge,
|
59
|
+
SequencerInbox,
|
60
|
+
IInbox,
|
61
|
+
IRollupEventInbox,
|
62
|
+
Outbox
|
63
|
+
);
|
64
|
+
}
|
@@ -0,0 +1,138 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
pragma solidity ^0.8.0;
|
6
|
+
|
7
|
+
import "./IRollupCore.sol";
|
8
|
+
import "../bridge/ISequencerInbox.sol";
|
9
|
+
import "../bridge/IOutbox.sol";
|
10
|
+
import "../bridge/IOwnable.sol";
|
11
|
+
import "./Config.sol";
|
12
|
+
|
13
|
+
interface IRollupAdmin {
|
14
|
+
event OwnerFunctionCalled(uint256 indexed id);
|
15
|
+
|
16
|
+
function initialize(Config calldata config, ContractDependencies calldata connectedContracts)
|
17
|
+
external;
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @notice Add a contract authorized to put messages into this rollup's inbox
|
21
|
+
* @param _outbox Outbox contract to add
|
22
|
+
*/
|
23
|
+
function setOutbox(IOutbox _outbox) external;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* @notice Disable an old outbox from interacting with the bridge
|
27
|
+
* @param _outbox Outbox contract to remove
|
28
|
+
*/
|
29
|
+
function removeOldOutbox(address _outbox) external;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* @notice Enable or disable an inbox contract
|
33
|
+
* @param _inbox Inbox contract to add or remove
|
34
|
+
* @param _enabled New status of inbox
|
35
|
+
*/
|
36
|
+
function setDelayedInbox(address _inbox, bool _enabled) external;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* @notice Pause interaction with the rollup contract
|
40
|
+
*/
|
41
|
+
function pause() external;
|
42
|
+
|
43
|
+
/**
|
44
|
+
* @notice Resume interaction with the rollup contract
|
45
|
+
*/
|
46
|
+
function resume() external;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* @notice Set the addresses of the validator whitelist
|
50
|
+
* @dev It is expected that both arrays are same length, and validator at
|
51
|
+
* position i corresponds to the value at position i
|
52
|
+
* @param _validator addresses to set in the whitelist
|
53
|
+
* @param _val value to set in the whitelist for corresponding address
|
54
|
+
*/
|
55
|
+
function setValidator(address[] memory _validator, bool[] memory _val) external;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* @notice Set a new owner address for the rollup proxy
|
59
|
+
* @param newOwner address of new rollup owner
|
60
|
+
*/
|
61
|
+
function setOwner(address newOwner) external;
|
62
|
+
|
63
|
+
/**
|
64
|
+
* @notice Set minimum assertion period for the rollup
|
65
|
+
* @param newPeriod new minimum period for assertions
|
66
|
+
*/
|
67
|
+
function setMinimumAssertionPeriod(uint256 newPeriod) external;
|
68
|
+
|
69
|
+
/**
|
70
|
+
* @notice Set number of blocks until a node is considered confirmed
|
71
|
+
* @param newConfirmPeriod new number of blocks until a node is confirmed
|
72
|
+
*/
|
73
|
+
function setConfirmPeriodBlocks(uint64 newConfirmPeriod) external;
|
74
|
+
|
75
|
+
/**
|
76
|
+
* @notice Set number of extra blocks after a challenge
|
77
|
+
* @param newExtraTimeBlocks new number of blocks
|
78
|
+
*/
|
79
|
+
function setExtraChallengeTimeBlocks(uint64 newExtraTimeBlocks) external;
|
80
|
+
|
81
|
+
/**
|
82
|
+
* @notice Set base stake required for an assertion
|
83
|
+
* @param newBaseStake maximum avmgas to be used per block
|
84
|
+
*/
|
85
|
+
function setBaseStake(uint256 newBaseStake) external;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* @notice Set the token used for stake, where address(0) == eth
|
89
|
+
* @dev Before changing the base stake token, you might need to change the
|
90
|
+
* implementation of the Rollup User logic!
|
91
|
+
* @param newStakeToken address of token used for staking
|
92
|
+
*/
|
93
|
+
function setStakeToken(address newStakeToken) external;
|
94
|
+
|
95
|
+
/**
|
96
|
+
* @notice Upgrades the implementation of a beacon controlled by the rollup
|
97
|
+
* @param beacon address of beacon to be upgraded
|
98
|
+
* @param newImplementation new address of implementation
|
99
|
+
*/
|
100
|
+
function upgradeBeacon(address beacon, address newImplementation) external;
|
101
|
+
|
102
|
+
function forceResolveChallenge(address[] memory stackerA, address[] memory stackerB) external;
|
103
|
+
|
104
|
+
function forceRefundStaker(address[] memory stacker) external;
|
105
|
+
|
106
|
+
function forceCreateNode(
|
107
|
+
uint64 prevNode,
|
108
|
+
uint256 prevNodeInboxMaxCount,
|
109
|
+
Assertion memory assertion,
|
110
|
+
bytes32 expectedNodeHash
|
111
|
+
) external;
|
112
|
+
|
113
|
+
function forceConfirmNode(
|
114
|
+
uint64 nodeNum,
|
115
|
+
bytes32 blockHash,
|
116
|
+
bytes32 sendRoot
|
117
|
+
) external;
|
118
|
+
|
119
|
+
function setLoserStakeEscrow(address newLoserStakerEscrow) external;
|
120
|
+
|
121
|
+
/**
|
122
|
+
* @notice Set the proving WASM module root
|
123
|
+
* @param newWasmModuleRoot new module root
|
124
|
+
*/
|
125
|
+
function setWasmModuleRoot(bytes32 newWasmModuleRoot) external;
|
126
|
+
|
127
|
+
/**
|
128
|
+
* @notice set a new sequencer inbox contract
|
129
|
+
* @param _sequencerInbox new address of sequencer inbox
|
130
|
+
*/
|
131
|
+
function setSequencerInbox(address _sequencerInbox) external;
|
132
|
+
|
133
|
+
/**
|
134
|
+
* @notice set the validatorWhitelistDisabled flag
|
135
|
+
* @param _validatorWhitelistDisabled new value of validatorWhitelistDisabled, i.e. true = disabled
|
136
|
+
*/
|
137
|
+
function setValidatorWhitelistDisabled(bool _validatorWhitelistDisabled) external;
|
138
|
+
}
|
@@ -1,11 +1,15 @@
|
|
1
1
|
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
-
// For license information, see https://github.com/nitro/blob/
|
2
|
+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
|
3
3
|
// SPDX-License-Identifier: BUSL-1.1
|
4
4
|
|
5
5
|
pragma solidity ^0.8.0;
|
6
6
|
|
7
7
|
import "./Node.sol";
|
8
|
-
import "
|
8
|
+
import "../bridge/IBridge.sol";
|
9
|
+
import "../bridge/IOutbox.sol";
|
10
|
+
import "../bridge/IInbox.sol";
|
11
|
+
import "./IRollupEventInbox.sol";
|
12
|
+
import "../challenge/IChallengeManager.sol";
|
9
13
|
|
10
14
|
interface IRollupCore {
|
11
15
|
struct Staker {
|
@@ -24,7 +28,7 @@ interface IRollupCore {
|
|
24
28
|
bytes32 indexed parentNodeHash,
|
25
29
|
bytes32 indexed nodeHash,
|
26
30
|
bytes32 executionHash,
|
27
|
-
|
31
|
+
Assertion assertion,
|
28
32
|
bytes32 afterInboxBatchAcc,
|
29
33
|
bytes32 wasmModuleRoot,
|
30
34
|
uint256 inboxMaxCount
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
+
// For license information, see https://github.com/nitro/blob/master/LICENSE
|
3
|
+
// SPDX-License-Identifier: BUSL-1.1
|
4
|
+
|
5
|
+
// solhint-disable-next-line compiler-version
|
6
|
+
pragma solidity >=0.6.9 <0.9.0;
|
7
|
+
|
8
|
+
import "./IBridgeCreator.sol";
|
9
|
+
import "./RollupProxy.sol";
|
10
|
+
import "../osp/IOneStepProofEntry.sol";
|
11
|
+
import "../challenge/IChallengeManager.sol";
|
12
|
+
|
13
|
+
interface IRollupCreator {
|
14
|
+
function setTemplates(
|
15
|
+
IBridgeCreator _bridgeCreator,
|
16
|
+
IOneStepProofEntry _osp,
|
17
|
+
IChallengeManager _challengeManagerLogic,
|
18
|
+
IRollupAdmin _rollupAdminLogic,
|
19
|
+
IRollupUser _rollupUserLogic,
|
20
|
+
address _validatorUtils,
|
21
|
+
address _validatorWalletCreator
|
22
|
+
) external;
|
23
|
+
}
|
24
|
+
|
25
|
+
interface IEthRollupCreator is IRollupCreator {
|
26
|
+
function createRollup(
|
27
|
+
Config memory config,
|
28
|
+
address _batchPoster,
|
29
|
+
address[] calldata _validators
|
30
|
+
) external returns (address);
|
31
|
+
}
|
32
|
+
|
33
|
+
interface IERC20RollupCreator is IRollupCreator {
|
34
|
+
function createRollup(
|
35
|
+
Config memory config,
|
36
|
+
address _batchPoster,
|
37
|
+
address[] calldata _validators,
|
38
|
+
address nativeToken
|
39
|
+
) external returns (address);
|
40
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright 2021-2022, Offchain Labs, Inc.
|
2
|
-
// For license information, see https://github.com/nitro/blob/
|
2
|
+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE
|
3
3
|
// SPDX-License-Identifier: BUSL-1.1
|
4
4
|
|
5
5
|
pragma solidity ^0.8.0;
|