@arbitrum/nitro-contracts 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/contracts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
  3. package/build/contracts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
  4. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
  5. package/build/contracts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
  6. package/build/contracts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
  7. package/build/contracts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
  8. package/build/contracts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +1 -1
  9. package/build/contracts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
  10. package/build/contracts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
  11. package/build/contracts/@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol/UUPSUpgradeable.dbg.json +1 -1
  12. package/build/contracts/@openzeppelin/contracts/security/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
  13. package/build/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
  14. package/build/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
  15. package/build/contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
  16. package/build/contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +1 -1
  17. package/build/contracts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +1 -1
  18. package/build/contracts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
  19. package/build/contracts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
  20. package/build/contracts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
  21. package/build/contracts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.dbg.json +4 -0
  22. package/build/contracts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json +10 -0
  23. package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol/AccessControlEnumerableUpgradeable.dbg.json +4 -0
  24. package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol/AccessControlEnumerableUpgradeable.json +258 -0
  25. package/build/contracts/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol/AccessControlUpgradeable.dbg.json +1 -1
  26. package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol/IAccessControlEnumerableUpgradeable.dbg.json +4 -0
  27. package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol/IAccessControlEnumerableUpgradeable.json +226 -0
  28. package/build/contracts/@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol/IAccessControlUpgradeable.dbg.json +1 -1
  29. package/build/contracts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
  30. package/build/contracts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
  31. package/build/contracts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
  32. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.dbg.json +4 -0
  33. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +281 -0
  34. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
  35. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol/ERC20BurnableUpgradeable.dbg.json +4 -0
  36. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol/ERC20BurnableUpgradeable.json +312 -0
  37. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol/IERC20MetadataUpgradeable.dbg.json +4 -0
  38. package/build/contracts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol/IERC20MetadataUpgradeable.json +233 -0
  39. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
  40. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
  41. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol/StorageSlotUpgradeable.dbg.json +1 -1
  42. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol/StringsUpgradeable.dbg.json +1 -1
  43. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol/ECDSAUpgradeable.dbg.json +4 -0
  44. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol/ECDSAUpgradeable.json +10 -0
  45. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol/EIP712Upgradeable.dbg.json +4 -0
  46. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol/EIP712Upgradeable.json +10 -0
  47. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol/ERC165Upgradeable.dbg.json +1 -1
  48. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol/IERC165Upgradeable.dbg.json +1 -1
  49. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.dbg.json +4 -0
  50. package/build/contracts/@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol/EnumerableSetUpgradeable.json +10 -0
  51. package/build/contracts/src/bridge/AbsBridge.sol/AbsBridge.dbg.json +1 -1
  52. package/build/contracts/src/bridge/AbsInbox.sol/AbsInbox.dbg.json +1 -1
  53. package/build/contracts/src/bridge/AbsOutbox.sol/AbsOutbox.dbg.json +1 -1
  54. package/build/contracts/src/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  55. package/build/contracts/src/bridge/ERC20Bridge.sol/ERC20Bridge.dbg.json +1 -1
  56. package/build/contracts/src/bridge/ERC20Inbox.sol/ERC20Inbox.dbg.json +1 -1
  57. package/build/contracts/src/bridge/ERC20Outbox.sol/ERC20Outbox.dbg.json +1 -1
  58. package/build/contracts/src/bridge/GasRefunder.sol/GasRefunder.dbg.json +1 -1
  59. package/build/contracts/src/bridge/IBridge.sol/IBridge.dbg.json +1 -1
  60. package/build/contracts/src/bridge/IDelayedMessageProvider.sol/IDelayedMessageProvider.dbg.json +1 -1
  61. package/build/contracts/src/bridge/IERC20Bridge.sol/IERC20Bridge.dbg.json +1 -1
  62. package/build/contracts/src/bridge/IERC20Inbox.sol/IERC20Inbox.dbg.json +1 -1
  63. package/build/contracts/src/bridge/IEthBridge.sol/IEthBridge.dbg.json +1 -1
  64. package/build/contracts/src/bridge/IInbox.sol/IInbox.dbg.json +1 -1
  65. package/build/contracts/src/bridge/IInboxBase.sol/IInboxBase.dbg.json +1 -1
  66. package/build/contracts/src/bridge/IOutbox.sol/IOutbox.dbg.json +1 -1
  67. package/build/contracts/src/bridge/IOwnable.sol/IOwnable.dbg.json +1 -1
  68. package/build/contracts/src/bridge/ISequencerInbox.sol/ISequencerInbox.dbg.json +1 -1
  69. package/build/contracts/src/bridge/Inbox.sol/Inbox.dbg.json +1 -1
  70. package/build/contracts/src/bridge/Inbox.sol/Inbox.json +2 -2
  71. package/build/contracts/src/bridge/Messages.sol/Messages.dbg.json +1 -1
  72. package/build/contracts/src/bridge/Outbox.sol/Outbox.dbg.json +1 -1
  73. package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.dbg.json +1 -1
  74. package/build/contracts/src/bridge/SequencerInbox.sol/SequencerInbox.json +2 -2
  75. package/build/contracts/src/chain/CacheManager.sol/CacheManager.dbg.json +1 -1
  76. package/build/contracts/src/chain/CacheManager.sol/CacheManager.json +2 -2
  77. package/build/contracts/src/challenge/ChallengeLib.sol/ChallengeLib.dbg.json +1 -1
  78. package/build/contracts/src/challenge/ChallengeManager.sol/ChallengeManager.dbg.json +1 -1
  79. package/build/contracts/src/challenge/IChallengeManager.sol/IChallengeManager.dbg.json +1 -1
  80. package/build/contracts/src/challenge/IChallengeResultReceiver.sol/IChallengeResultReceiver.dbg.json +1 -1
  81. package/build/contracts/src/express-lane-auction/Balance.sol/BalanceLib.dbg.json +4 -0
  82. package/build/contracts/src/express-lane-auction/Balance.sol/BalanceLib.json +10 -0
  83. package/build/contracts/src/express-lane-auction/Burner.sol/Burner.dbg.json +4 -0
  84. package/build/contracts/src/express-lane-auction/Burner.sol/Burner.json +47 -0
  85. package/build/contracts/src/express-lane-auction/ELCRound.sol/LatestELCRoundsLib.dbg.json +4 -0
  86. package/build/contracts/src/express-lane-auction/ELCRound.sol/LatestELCRoundsLib.json +10 -0
  87. package/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.dbg.json +4 -0
  88. package/build/contracts/src/express-lane-auction/ExpressLaneAuction.sol/ExpressLaneAuction.json +1588 -0
  89. package/build/contracts/src/express-lane-auction/IExpressLaneAuction.sol/IExpressLaneAuction.dbg.json +4 -0
  90. package/build/contracts/src/express-lane-auction/IExpressLaneAuction.sol/IExpressLaneAuction.json +1296 -0
  91. package/build/contracts/src/express-lane-auction/RoundTimingInfo.sol/RoundTimingInfoLib.dbg.json +4 -0
  92. package/build/contracts/src/express-lane-auction/RoundTimingInfo.sol/RoundTimingInfoLib.json +10 -0
  93. package/build/contracts/src/libraries/AddressAliasHelper.sol/AddressAliasHelper.dbg.json +1 -1
  94. package/build/contracts/src/libraries/AdminFallbackProxy.sol/AdminFallbackProxy.dbg.json +1 -1
  95. package/build/contracts/src/libraries/AdminFallbackProxy.sol/DoubleLogicERC1967Upgrade.dbg.json +1 -1
  96. package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.dbg.json +1 -1
  97. package/build/contracts/src/libraries/ArbitrumChecker.sol/ArbitrumChecker.json +2 -2
  98. package/build/contracts/src/libraries/CryptographyPrimitives.sol/CryptographyPrimitives.dbg.json +1 -1
  99. package/build/contracts/src/libraries/DecimalsConverterHelper.sol/DecimalsConverterHelper.dbg.json +1 -1
  100. package/build/contracts/src/libraries/DelegateCallAware.sol/DelegateCallAware.dbg.json +1 -1
  101. package/build/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol/DoubleLogicUUPSUpgradeable.dbg.json +1 -1
  102. package/build/contracts/src/libraries/GasRefundEnabled.sol/GasRefundEnabled.dbg.json +1 -1
  103. package/build/contracts/src/libraries/IGasRefunder.sol/IGasRefunder.dbg.json +1 -1
  104. package/build/contracts/src/libraries/IReader4844.sol/IReader4844.dbg.json +1 -1
  105. package/build/contracts/src/libraries/MerkleLib.sol/MerkleLib.dbg.json +1 -1
  106. package/build/contracts/src/libraries/UUPSNotUpgradeable.sol/UUPSNotUpgradeable.dbg.json +1 -1
  107. package/build/contracts/src/mocks/Benchmarks.sol/Benchmarks.dbg.json +1 -1
  108. package/build/contracts/src/mocks/BridgeStub.sol/BridgeStub.dbg.json +1 -1
  109. package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.dbg.json +1 -1
  110. package/build/contracts/src/mocks/BridgeUnproxied.sol/BridgeUnproxied.json +15 -2
  111. package/build/contracts/src/mocks/CreateTest.sol/CreateTest.dbg.json +4 -0
  112. package/build/contracts/src/mocks/CreateTest.sol/CreateTest.json +15 -0
  113. package/build/contracts/src/mocks/HostioTest.sol/HostioTest.dbg.json +4 -0
  114. package/build/contracts/src/mocks/HostioTest.sol/HostioTest.json +513 -0
  115. package/build/contracts/src/mocks/InboxStub.sol/InboxStub.dbg.json +1 -1
  116. package/build/contracts/src/mocks/MockResultReceiver.sol/MockResultReceiver.dbg.json +1 -1
  117. package/build/contracts/src/mocks/MultiCallTest.sol/MultiCallTest.dbg.json +1 -1
  118. package/build/contracts/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol/PendingBlkTimeAndNrAdvanceCheck.dbg.json +1 -1
  119. package/build/contracts/src/mocks/PendingBlkTimeAndNrAdvanceCheck.sol/PendingBlkTimeAndNrAdvanceCheck.json +2 -2
  120. package/build/contracts/src/mocks/Program.sol/ProgramTest.dbg.json +1 -1
  121. package/build/contracts/src/mocks/Program.sol/ProgramTest.json +2 -2
  122. package/build/contracts/src/mocks/ProxyAdminForBinding.sol/ProxyAdminForBinding.dbg.json +1 -1
  123. package/build/contracts/src/mocks/SdkStorage.sol/SdkStorage.dbg.json +1 -1
  124. package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.dbg.json +1 -1
  125. package/build/contracts/src/mocks/SequencerInboxStub.sol/SequencerInboxStub.json +2 -2
  126. package/build/contracts/src/mocks/Simple.sol/Simple.dbg.json +1 -1
  127. package/build/contracts/src/mocks/Simple.sol/Simple.json +2 -2
  128. package/build/contracts/src/mocks/SimpleCacheManager.sol/SimpleCacheManager.dbg.json +1 -1
  129. package/build/contracts/src/mocks/SimpleProxy.sol/SimpleProxy.dbg.json +1 -1
  130. package/build/contracts/src/mocks/SingleExecutionChallenge.sol/SingleExecutionChallenge.dbg.json +1 -1
  131. package/build/contracts/src/mocks/TimedOutChallengeManager.sol/TimedOutChallengeManager.dbg.json +1 -1
  132. package/build/contracts/src/mocks/UpgradeExecutorMock.sol/UpgradeExecutorMock.dbg.json +1 -1
  133. package/build/contracts/src/node-interface/NodeInterface.sol/NodeInterface.dbg.json +1 -1
  134. package/build/contracts/src/node-interface/NodeInterfaceDebug.sol/NodeInterfaceDebug.dbg.json +1 -1
  135. package/build/contracts/src/osp/HashProofHelper.sol/HashProofHelper.dbg.json +1 -1
  136. package/build/contracts/src/osp/IOneStepProofEntry.sol/IOneStepProofEntry.dbg.json +1 -1
  137. package/build/contracts/src/osp/IOneStepProofEntry.sol/OneStepProofEntryLib.dbg.json +1 -1
  138. package/build/contracts/src/osp/IOneStepProver.sol/IOneStepProver.dbg.json +1 -1
  139. package/build/contracts/src/osp/OneStepProofEntry.sol/OneStepProofEntry.dbg.json +1 -1
  140. package/build/contracts/src/osp/OneStepProver0.sol/OneStepProver0.dbg.json +1 -1
  141. package/build/contracts/src/osp/OneStepProverHostIo.sol/OneStepProverHostIo.dbg.json +1 -1
  142. package/build/contracts/src/osp/OneStepProverMath.sol/OneStepProverMath.dbg.json +1 -1
  143. package/build/contracts/src/osp/OneStepProverMemory.sol/OneStepProverMemory.dbg.json +1 -1
  144. package/build/contracts/src/precompiles/ArbAddressTable.sol/ArbAddressTable.dbg.json +1 -1
  145. package/build/contracts/src/precompiles/ArbAggregator.sol/ArbAggregator.dbg.json +1 -1
  146. package/build/contracts/src/precompiles/ArbBLS.sol/ArbBLS.dbg.json +1 -1
  147. package/build/contracts/src/precompiles/ArbDebug.sol/ArbDebug.dbg.json +1 -1
  148. package/build/contracts/src/precompiles/ArbFunctionTable.sol/ArbFunctionTable.dbg.json +1 -1
  149. package/build/contracts/src/precompiles/ArbGasInfo.sol/ArbGasInfo.dbg.json +1 -1
  150. package/build/contracts/src/precompiles/ArbInfo.sol/ArbInfo.dbg.json +1 -1
  151. package/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.dbg.json +1 -1
  152. package/build/contracts/src/precompiles/ArbOwnerPublic.sol/ArbOwnerPublic.dbg.json +1 -1
  153. package/build/contracts/src/precompiles/ArbRetryableTx.sol/ArbRetryableTx.dbg.json +1 -1
  154. package/build/contracts/src/precompiles/ArbStatistics.sol/ArbStatistics.dbg.json +1 -1
  155. package/build/contracts/src/precompiles/ArbSys.sol/ArbSys.dbg.json +1 -1
  156. package/build/contracts/src/precompiles/ArbWasm.sol/ArbWasm.dbg.json +1 -1
  157. package/build/contracts/src/precompiles/ArbWasm.sol/ArbWasm.json +4 -4
  158. package/build/contracts/src/precompiles/ArbWasmCache.sol/ArbWasmCache.dbg.json +1 -1
  159. package/build/contracts/src/precompiles/ArbosActs.sol/ArbosActs.dbg.json +1 -1
  160. package/build/contracts/src/precompiles/ArbosTest.sol/ArbosTest.dbg.json +1 -1
  161. package/build/contracts/src/rollup/AbsRollupEventInbox.sol/AbsRollupEventInbox.dbg.json +1 -1
  162. package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.dbg.json +1 -1
  163. package/build/contracts/src/rollup/BridgeCreator.sol/BridgeCreator.json +2 -2
  164. package/build/contracts/src/rollup/DeployHelper.sol/DeployHelper.dbg.json +1 -1
  165. package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.dbg.json +1 -1
  166. package/build/contracts/src/rollup/ERC20RollupEventInbox.sol/ERC20RollupEventInbox.json +2 -2
  167. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/FactoryDeployerHelper.dbg.json +1 -1
  168. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IDeployHelper.dbg.json +1 -1
  169. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20.dbg.json +1 -1
  170. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IERC20Bridge.dbg.json +1 -1
  171. package/build/contracts/src/rollup/FactoryDeployerHelper.sol/IInboxBase.dbg.json +1 -1
  172. package/build/contracts/src/rollup/IRollupAdmin.sol/IRollupAdmin.dbg.json +1 -1
  173. package/build/contracts/src/rollup/IRollupCore.sol/IRollupCore.dbg.json +1 -1
  174. package/build/contracts/src/rollup/IRollupEventInbox.sol/IRollupEventInbox.dbg.json +1 -1
  175. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUser.dbg.json +1 -1
  176. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserAbs.dbg.json +1 -1
  177. package/build/contracts/src/rollup/IRollupLogic.sol/IRollupUserERC20.dbg.json +1 -1
  178. package/build/contracts/src/rollup/Node.sol/NodeLib.dbg.json +1 -1
  179. package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.dbg.json +1 -1
  180. package/build/contracts/src/rollup/RollupAdminLogic.sol/RollupAdminLogic.json +2 -2
  181. package/build/contracts/src/rollup/RollupCore.sol/RollupCore.dbg.json +1 -1
  182. package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.dbg.json +1 -1
  183. package/build/contracts/src/rollup/RollupCreator.sol/RollupCreator.json +2 -2
  184. package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.dbg.json +1 -1
  185. package/build/contracts/src/rollup/RollupEventInbox.sol/RollupEventInbox.json +2 -2
  186. package/build/contracts/src/rollup/RollupLib.sol/RollupLib.dbg.json +1 -1
  187. package/build/contracts/src/rollup/RollupProxy.sol/RollupProxy.dbg.json +1 -1
  188. package/build/contracts/src/rollup/RollupUserLogic.sol/AbsRollupUserLogic.dbg.json +1 -1
  189. package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.dbg.json +1 -1
  190. package/build/contracts/src/rollup/RollupUserLogic.sol/ERC20RollupUserLogic.json +2 -2
  191. package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.dbg.json +1 -1
  192. package/build/contracts/src/rollup/RollupUserLogic.sol/RollupUserLogic.json +2 -2
  193. package/build/contracts/src/rollup/ValidatorUtils.sol/ValidatorUtils.dbg.json +1 -1
  194. package/build/contracts/src/rollup/ValidatorWallet.sol/ValidatorWallet.dbg.json +1 -1
  195. package/build/contracts/src/rollup/ValidatorWalletCreator.sol/ValidatorWalletCreator.dbg.json +1 -1
  196. package/build/contracts/src/state/Deserialize.sol/Deserialize.dbg.json +1 -1
  197. package/build/contracts/src/state/GlobalState.sol/GlobalStateLib.dbg.json +1 -1
  198. package/build/contracts/src/state/Instructions.sol/Instructions.dbg.json +1 -1
  199. package/build/contracts/src/state/Machine.sol/MachineLib.dbg.json +1 -1
  200. package/build/contracts/src/state/MerkleProof.sol/MerkleProofLib.dbg.json +1 -1
  201. package/build/contracts/src/state/Module.sol/ModuleLib.dbg.json +1 -1
  202. package/build/contracts/src/state/ModuleMemory.sol/ModuleMemoryLib.dbg.json +1 -1
  203. package/build/contracts/src/state/ModuleMemoryCompact.sol/ModuleMemoryCompactLib.dbg.json +1 -1
  204. package/build/contracts/src/state/MultiStack.sol/MultiStackLib.dbg.json +1 -1
  205. package/build/contracts/src/state/PcArray.sol/PcArrayLib.dbg.json +1 -1
  206. package/build/contracts/src/state/StackFrame.sol/StackFrameLib.dbg.json +1 -1
  207. package/build/contracts/src/state/Value.sol/ValueLib.dbg.json +1 -1
  208. package/build/contracts/src/state/ValueArray.sol/ValueArrayLib.dbg.json +1 -1
  209. package/build/contracts/src/state/ValueStack.sol/ValueStackLib.dbg.json +1 -1
  210. package/build/contracts/src/test-helpers/BridgeTester.sol/BridgeTester.dbg.json +1 -1
  211. package/build/contracts/src/test-helpers/CryptographyPrimitivesTester.sol/CryptographyPrimitivesTester.dbg.json +1 -1
  212. package/build/contracts/src/test-helpers/EthVault.sol/EthVault.dbg.json +1 -1
  213. package/build/contracts/src/test-helpers/MessageTester.sol/MessageTester.dbg.json +1 -1
  214. package/build/contracts/src/test-helpers/OutboxWithoutOptTester.sol/OutboxWithoutOptTester.dbg.json +1 -1
  215. package/build/contracts/src/test-helpers/RollupMock.sol/RollupMock.dbg.json +1 -1
  216. package/build/contracts/src/test-helpers/TestToken.sol/TestToken.dbg.json +1 -1
  217. package/build/contracts/src/test-helpers/ValueArrayTester.sol/ValueArrayTester.dbg.json +1 -1
  218. package/out/yul/Reader4844.yul/Reader4844.json +1 -1
  219. package/package.json +5 -2
  220. package/src/express-lane-auction/Balance.sol +142 -0
  221. package/src/express-lane-auction/Burner.sol +25 -0
  222. package/src/express-lane-auction/ELCRound.sol +73 -0
  223. package/src/express-lane-auction/Errors.sol +31 -0
  224. package/src/express-lane-auction/ExpressLaneAuction.sol +565 -0
  225. package/src/express-lane-auction/IExpressLaneAuction.sol +421 -0
  226. package/src/express-lane-auction/RoundTimingInfo.sol +115 -0
  227. package/src/mocks/BridgeUnproxied.sol +2 -0
  228. package/src/mocks/CreateTest.sol +42 -0
  229. package/src/mocks/HostioTest.sol +196 -0
  230. package/src/precompiles/ArbSys.sol +2 -1
  231. package/src/precompiles/ArbWasm.sol +1 -1
  232. package/src/rollup/RollupCreator.sol +4 -4
@@ -0,0 +1,421 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
5
+ import {RoundTimingInfo} from "./RoundTimingInfo.sol";
6
+ import {ELCRound} from "./ELCRound.sol";
7
+ import {
8
+ IAccessControlEnumerableUpgradeable
9
+ } from "@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol";
10
+ import {
11
+ IERC165Upgradeable
12
+ } from "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
13
+
14
+ /// @notice A bid to control the express lane for a specific round
15
+ struct Bid {
16
+ /// @notice The address to be set as the express lane controller if this bid wins the auction round
17
+ address expressLaneController;
18
+ /// @notice The maximum amount the bidder is willing to pay if they win the round
19
+ /// The auction is a second price auction, so the winner may end up paying less than this amount
20
+ /// however this is the maximum amount up to which they may have to pay
21
+ uint256 amount;
22
+ /// @notice Authentication of this bid by the bidder.
23
+ /// The bidder signs over a hash of the following
24
+ /// keccak256("\x19Ethereum Signed Message:\n144" ++ keccak256("TIMEBOOST_BID") ++ chainId ++ auctionContractAddress ++ auctionRound ++ bidAmount ++ expressLaneController)
25
+ bytes signature;
26
+ }
27
+
28
+ /// @notice Sets a transferor for an express lane controller
29
+ /// The transferor is an address that will have the right to transfer express lane controller rights
30
+ /// on behalf an express lane controller.
31
+ struct Transferor {
32
+ /// @notice The address of the transferor
33
+ address addr;
34
+ /// @notice The express lane controller can choose to fix the transferor until a future round number
35
+ /// This gives them ability to guarantee to other parties that they will not change transferor during an ongoing round
36
+ /// The express lane controller can ignore this feature by setting this value to 0.
37
+ uint64 fixedUntilRound;
38
+ }
39
+
40
+ /// @notice The arguments used to initialize an express lane auction
41
+ struct InitArgs {
42
+ /// @notice The address who can resolve auctions
43
+ address _auctioneer;
44
+ /// @notice The ERC20 token that bids will be made in
45
+ /// It is assumed that this token does NOT have fee-on-transfer, rebasing,
46
+ /// transfer hooks or otherwise non-standard ERC20 logic.
47
+ address _biddingToken;
48
+ /// @notice The address to which auction winners will pay the bid
49
+ address _beneficiary;
50
+ /// @notice Round timing components: offset, auction closing, round duration, reserve submission
51
+ RoundTimingInfo _roundTimingInfo;
52
+ /// @notice The minimum reserve price, also used to set the initial reserve price
53
+ uint256 _minReservePrice;
54
+ /// @notice Can update the auctioneer address
55
+ address _auctioneerAdmin;
56
+ /// @notice The address given the rights to change the min reserve price
57
+ address _minReservePriceSetter;
58
+ /// @notice The address given the rights to change the reserve price
59
+ address _reservePriceSetter;
60
+ /// @notice Can update the reserve price setter address
61
+ address _reservePriceSetterAdmin;
62
+ /// @notice The address given the rights to change the beneficiary address
63
+ address _beneficiarySetter;
64
+ /// @notice _roundTimingSetter The address given the rights to update the round timing info
65
+ address _roundTimingSetter;
66
+ /// @notice The admin that can manage all the admin roles in the contract
67
+ address _masterAdmin;
68
+ }
69
+
70
+ interface IExpressLaneAuction is IAccessControlEnumerableUpgradeable, IERC165Upgradeable {
71
+ /// @notice An account has deposited funds to be used for bidding in the auction
72
+ /// @param account The account that deposited funds
73
+ /// @param amount The amount deposited by that account
74
+ event Deposit(address indexed account, uint256 amount);
75
+
76
+ /// @notice An account has initiated a withdrawal of funds from the auction
77
+ /// @param account The account withdrawing the funds
78
+ /// @param withdrawalAmount The amount beind withdrawn
79
+ /// @param roundWithdrawable The round the funds will become withdrawable in
80
+ event WithdrawalInitiated(
81
+ address indexed account,
82
+ uint256 withdrawalAmount,
83
+ uint256 roundWithdrawable
84
+ );
85
+
86
+ /// @notice An account has finalized a withdrawal
87
+ /// @param account The account that finalized the withdrawal
88
+ /// @param withdrawalAmount The amount that was withdrawn
89
+ event WithdrawalFinalized(address indexed account, uint256 withdrawalAmount);
90
+
91
+ /// @notice An auction was resolved and a new express lane controller was set
92
+ /// @param isMultiBidAuction Whether there was more than one bid in the auction
93
+ /// @param round The round for which the rights were being auctioned
94
+ /// @param firstPriceBidder The bidder who won the auction
95
+ /// @param firstPriceExpressLaneController The address that will have express lane control in the specified round
96
+ /// @param firstPriceAmount The price in the winning bid
97
+ /// @param price The price paid by the winning bidder
98
+ /// @param roundStartTimestamp The time at which the round will start
99
+ /// @param roundEndTimestamp The time at which the round will end
100
+ event AuctionResolved(
101
+ bool indexed isMultiBidAuction,
102
+ uint64 round,
103
+ address indexed firstPriceBidder,
104
+ address indexed firstPriceExpressLaneController,
105
+ uint256 firstPriceAmount,
106
+ uint256 price,
107
+ uint64 roundStartTimestamp,
108
+ uint64 roundEndTimestamp
109
+ );
110
+
111
+ /// @notice A new express lane controller was set
112
+ /// @param round The round which the express lane controller will control
113
+ /// @param previousExpressLaneController The previous express lane controller
114
+ /// @param newExpressLaneController The new express lane controller
115
+ /// @param transferor The address that transferored the controller rights. The transferor if set, otherwise the express lane controller
116
+ /// @param startTimestamp The timestamp at which the new express lane controller takes over
117
+ /// @param endTimestamp The timestamp at which the new express lane controller's rights are expected to cease. They can cease earlier if
118
+ /// if they are transfered before the end of the round
119
+ event SetExpressLaneController(
120
+ uint64 round,
121
+ address indexed previousExpressLaneController,
122
+ address indexed newExpressLaneController,
123
+ address indexed transferor,
124
+ uint64 startTimestamp,
125
+ uint64 endTimestamp
126
+ );
127
+
128
+ /// @notice A new transferor has been set for
129
+ /// @param expressLaneController The express lane controller that has a transferor
130
+ /// @param transferor The transferor chosen
131
+ /// @param fixedUntilRound The round until which this transferor is fixed for this controller
132
+ event SetTransferor(
133
+ address indexed expressLaneController,
134
+ address indexed transferor,
135
+ uint64 fixedUntilRound
136
+ );
137
+
138
+ /// @notice The minimum reserve price was set
139
+ /// @param oldPrice The previous minimum reserve price
140
+ /// @param newPrice The new minimum reserve price
141
+ event SetMinReservePrice(uint256 oldPrice, uint256 newPrice);
142
+
143
+ /// @notice A new reserve price was set
144
+ /// @param oldReservePrice Previous reserve price
145
+ /// @param newReservePrice New reserve price
146
+ event SetReservePrice(uint256 oldReservePrice, uint256 newReservePrice);
147
+
148
+ /// @notice A new beneficiary was set
149
+ /// @param oldBeneficiary The previous beneficiary
150
+ /// @param newBeneficiary The new beneficiary
151
+ event SetBeneficiary(address oldBeneficiary, address newBeneficiary);
152
+
153
+ /// @notice A new round timing info has been set
154
+ /// @param currentRound The round during which the timing info was set
155
+ /// @param offsetTimestamp The new offset timestamp
156
+ /// @param roundDurationSeconds The new round duration seconds
157
+ /// @param auctionClosingSeconds The new auction closing seconds
158
+ /// @param reserveSubmissionSeconds The new reserve submission seconds
159
+ event SetRoundTimingInfo(
160
+ uint64 currentRound,
161
+ int64 offsetTimestamp,
162
+ uint64 roundDurationSeconds,
163
+ uint64 auctionClosingSeconds,
164
+ uint64 reserveSubmissionSeconds
165
+ );
166
+
167
+ /// @notice The role given to the address that can resolve auctions
168
+ function AUCTIONEER_ROLE() external returns (bytes32);
169
+
170
+ /// @notice The role that administers AUCTIONEER_ROLE
171
+ function AUCTIONEER_ADMIN_ROLE() external returns (bytes32);
172
+
173
+ /// @notice The role given to the address that can set the minimum reserve
174
+ function MIN_RESERVE_SETTER_ROLE() external returns (bytes32);
175
+
176
+ /// @notice The role given to the address that can set the reserve
177
+ function RESERVE_SETTER_ROLE() external returns (bytes32);
178
+
179
+ /// @notice The role that administers the RESERVE_SETTER_ROLE
180
+ function RESERVE_SETTER_ADMIN_ROLE() external returns (bytes32);
181
+
182
+ /// @notice The role given to the address that can set the beneficiary
183
+ function BENEFICIARY_SETTER_ROLE() external returns (bytes32);
184
+
185
+ /// @notice The role given to addresses that can set round timing info
186
+ function ROUND_TIMING_SETTER_ROLE() external returns (bytes32);
187
+
188
+ /// @notice The beneficiary who receives the funds that are paid by the auction winners
189
+ function beneficiary() external returns (address);
190
+
191
+ /// @notice The ERC20 token that can be used for bidding
192
+ /// It is assumed that the this token does NOT have fee-on-transfer, rebasing,
193
+ /// transfer hooks or otherwise non-standard ERC20 logic.
194
+ function biddingToken() external returns (IERC20);
195
+
196
+ /// @notice The reserve price for the auctions. The reserve price setter can update this value
197
+ /// to ensure that controlling rights are auctioned off at a reasonable value
198
+ function reservePrice() external returns (uint256);
199
+
200
+ /// @notice The minimum amount the reserve can be set to. This ensures that reserve prices cannot be
201
+ /// set too low
202
+ function minReservePrice() external returns (uint256);
203
+
204
+ /// @notice Returns the currently unflushed balance of the beneficiary
205
+ /// Anyone can call flushBalance to transfer this balance from the auction to the beneficiary
206
+ /// This is a gas optimisation to avoid making a transfer every time an auction is resolved
207
+ function beneficiaryBalance() external returns (uint256);
208
+
209
+ /// @notice Express lane controllers can optionally set a transferor address that has the rights
210
+ /// to transfer their controller rights. This function returns the transferor if one has been set
211
+ /// Returns the transferor for the supplied controller, and the round until which this
212
+ /// transferor is fixed if set.
213
+ function transferorOf(address expressLaneController)
214
+ external
215
+ returns (address addr, uint64 fixedUntil);
216
+
217
+ /// @notice Initialize the auction
218
+ /// @param args Initialization parameters
219
+ function initialize(InitArgs memory args) external;
220
+
221
+ /// @notice Round timing components: offset, auction closing, round duration and reserve submission
222
+ function roundTimingInfo()
223
+ external
224
+ view
225
+ returns (
226
+ int64 offsetTimestamp,
227
+ uint64 roundDurationSeconds,
228
+ uint64 auctionClosingSeconds,
229
+ uint64 reserveSubmissionSeconds
230
+ );
231
+
232
+ /// @notice The current auction round that we're in
233
+ /// Bidding for control of the next round occurs in the current round
234
+ function currentRound() external view returns (uint64);
235
+
236
+ /// @notice Is the current auction round closed for bidding
237
+ /// After the round has closed the auctioneer can resolve it with the highest bids
238
+ /// Note. This can change unexpectedly if a round timing info is updated
239
+ function isAuctionRoundClosed() external view returns (bool);
240
+
241
+ /// @notice The auction reserve cannot be updated during the blackout period
242
+ /// This starts ReserveSubmissionSeconds before the round closes and ends when the round is resolved, or the round ends
243
+ /// Note. This can change unexpectedly if a round timing info is updated
244
+ function isReserveBlackout() external view returns (bool);
245
+
246
+ /// @notice Gets the start and end timestamps for a given round
247
+ /// This only returns the start and end timestamps given the current round timing info, which can be updated
248
+ /// Historical round timestamp can be found by checking the logs for round timing info updates, or by looking
249
+ /// at the timing info emitted in events from resolved auctions
250
+ /// Since it is possible to set a negative offset, the start and end time may also be negative
251
+ /// In this case requesting roundTimestamps will revert.
252
+ /// @param round The round to find the timestamps for
253
+ /// @return start The start of the round in seconds, inclusive
254
+ /// @return end The end of the round in seconds, inclusive
255
+ function roundTimestamps(uint64 round) external view returns (uint64 start, uint64 end);
256
+
257
+ /// @notice Update the beneficiary to a new address
258
+ /// Setting the beneficiary does not flush any pending balance, so anyone calling this function should consider
259
+ /// whether they want to flush before calling set.
260
+ /// It is expected that the DAO will have the rights to set beneficiary, and since they execute calls via
261
+ /// action contract they can atomically call flush and set beneficiary together.
262
+ /// @param newBeneficiary The new beneficiary
263
+ function setBeneficiary(address newBeneficiary) external;
264
+
265
+ /// @notice Set the minimum reserve. The reserve cannot be set below this value
266
+ /// Having a minimum reserve ensures that the reserve setter doesn't set the reserve too low
267
+ /// If the new minimum reserve is greater than the current reserve then the reserve will also be set,
268
+ /// this will happen regardless of whether we are in a reserve blackout period or not.
269
+ /// The min reserve setter is therefore trusted to either give bidders plenty of notice that they may change the min
270
+ /// reserve, or do so outside of the blackout window. It is expected that the min reserve setter will be controlled by
271
+ /// Arbitrum DAO who can only make changes via timelocks, thereby providing the notice to bidders.
272
+ /// If the new minimum reserve is set to a very high value eg max(uint) then the auction will never be able to resolve
273
+ /// the min reserve setter is therefore trusted not to do this as it would DOS the auction. Note that even if this occurs
274
+ /// bidders will not lose their funds and will still be able to withdraw them.
275
+ /// @param newMinReservePrice The new minimum reserve
276
+ function setMinReservePrice(uint256 newMinReservePrice) external;
277
+
278
+ /// @notice Set the auction reserve price. Must be greater than or equal the minimum reserve.
279
+ /// A reserve price setter is given the ability to change the reserve price to ensure that express lane control rights
280
+ /// are not sold off too cheaply. They are trusted to set realistic values for this.
281
+ /// However they can only change this value when not in the blackout period, which occurs before at the auction close
282
+ /// This ensures that bidders will have plenty of time to observe the reserve before the auction closes, and that
283
+ /// the reserve cannot be changed at the last second. One exception to this is if the minimum reserve changes, see the setMinReservePrice
284
+ /// documentation for more details.
285
+ /// If the new reserve is set to a very high value eg max(uint) then the auction will never be able to resolve
286
+ /// the reserve setter is therefore trusted not to do this as it would DOS the auction. Note that even if this occurs
287
+ /// bidders will not lose their funds and will still be able to withdraw them.
288
+ /// Note to reserve price setter, setting reserve price is dependent on the time into the round, which can change if the round timing info is updated
289
+ /// @param newReservePrice The price to set the reserve to
290
+ function setReservePrice(uint256 newReservePrice) external;
291
+
292
+ /// @notice Sets new round timing info. When setting a new round timing info the current round and the start
293
+ /// timestamp of the next round cannot change. The caller can ensure this by dynamically calculating
294
+ /// the correct offset which will produce this for the specified round duration seconds in the new timing info.
295
+ /// Changing timing info affects the current ongoing auction, given that the round may already have been resolved
296
+ /// this could result in bidders paying for a round that is longer or shorter than they expected. To that end
297
+ /// the round timing setter is trusted not to set this function too often, and any observers who depend upon this timing info
298
+ /// (eg bidders, auctioneer, reserve price setter etc) should be able to see when this is going to happen.
299
+ /// On Arbitrum One the expected round timing setter is the Arbitrum DAO, that can only
300
+ /// make changes by passing proposals through timelocks, therefore providing the notice to bidders.
301
+ /// Since the next round of the new info must be the same as the next round of the current info, it follows
302
+ /// that the update can only be made within min(roundDuration, newRoundDuration) of the end of the round, making
303
+ /// an update outside of this will cause a revert.
304
+ /// If necessary negative offsets can be set in order to achieve the next round number, given that
305
+ /// the maximum round duration is 1 day it should be possible to have many thousands of years worth of
306
+ /// rounds before it is not longer possible (due to int underflow) to change from 1 second to 1 day duration
307
+ /// @param newRoundTimingInfo The new timing info to set
308
+ function setRoundTimingInfo(RoundTimingInfo calldata newRoundTimingInfo) external;
309
+
310
+ /// @notice Get the current balance of specified account.
311
+ /// If a withdrawal is initiated this balance will reduce in current round + 2
312
+ /// @param account The specified account
313
+ function balanceOf(address account) external view returns (uint256);
314
+
315
+ /// @notice Get what the balance will be at some future round
316
+ /// Since withdrawals are scheduled for future rounds it is possible to see that a balance
317
+ /// will reduce at some future round, this method provides a way to query that.
318
+ /// Specifically this will return 0 if the withdrawal round has been set, and is < the supplied round
319
+ /// Will revert if a round from the past is supplied
320
+ /// @param account The specified account
321
+ /// @param round The round to query the balance at
322
+ function balanceOfAtRound(address account, uint64 round) external view returns (uint256);
323
+
324
+ /// @notice The amount of balance that can currently be withdrawn via the finalize method
325
+ /// This balance only increases current round + 2 after a withdrawal is initiated
326
+ /// @param account The account the check the withdrawable balance for
327
+ function withdrawableBalance(address account) external view returns (uint256);
328
+
329
+ /// @notice The amount of balance that can currently be withdrawn via the finalize method
330
+ /// Since withdrawals are scheduled for future rounds it is possible to see that a withdrawal balance
331
+ /// will increase at some future round, this method provides a way to query that.
332
+ /// Specifically this will return 0 unless the withdrawal round has been set, and is >= the supplied round
333
+ /// Will revert if a round from the past is supplied
334
+ /// This balance only increases current round + 2 after a withdrawal is initiated
335
+ /// @param account The account the check the withdrawable balance for
336
+ /// @param round The round to query the withdrawable balance at
337
+ function withdrawableBalanceAtRound(address account, uint64 round)
338
+ external
339
+ view
340
+ returns (uint256);
341
+
342
+ /// @notice Deposit an amount of ERC20 token to the auction to make bids with
343
+ /// Deposits must be submitted prior to bidding.
344
+ /// When withdrawing the full balance must be withdrawn. This is done via a two step process
345
+ /// of initialization and finalization, which takes at least 2 rounds to complete.
346
+ /// The round timing info offset timestamp is the start of the zeroth round, so if deposits
347
+ /// are made before that time they will need to wait until 2 rounds after that offset has occurred
348
+ /// @dev Deposits are submitted first so that the auctioneer can be sure that the accepted bids can actually be paid
349
+ /// @param amount The amount to deposit.
350
+ function deposit(uint256 amount) external;
351
+
352
+ /// @notice Initiate a withdrawal of the full account balance of the message sender
353
+ /// Once funds have been deposited they can only be retrieved by initiating + finalizing a withdrawal
354
+ /// There is a delay between initializing and finalizing a withdrawal so that the auctioneer can be sure
355
+ /// that value cannot be removed before an auction is resolved. The timeline is as follows:
356
+ /// 1. Initiate a withdrawal at some time in round r
357
+ /// 2. During round r the balance is still available and can be used in an auction
358
+ /// 3. During round r+1 the auctioneer should consider any accounts that have been initiated for withdrawal as having zero balance
359
+ /// However if a bid is submitted the balance will be available for use
360
+ /// 4. During round r+2 the bidder can finalize a withdrawal and remove their funds
361
+ /// A bidder may have only one withdrawal being processed at any one time, and that withdrawal will be for the full balance
362
+ function initiateWithdrawal() external;
363
+
364
+ /// @notice Finalizes a withdrawal and transfers the funds to the msg.sender
365
+ /// Withdrawals can only be finalized 2 rounds after being initiated
366
+ function finalizeWithdrawal() external;
367
+
368
+ /// @notice Can be called by anyone to transfer any beneficiary balance from the auction contract to the beneficiary
369
+ /// This is not done separately so that it does not need to be done during auction resolution, thus saving some gas costs there
370
+ function flushBeneficiaryBalance() external;
371
+
372
+ /// @notice The domain separator used in the 712 signing hash
373
+ function domainSeparator() external view returns (bytes32);
374
+
375
+ /// @notice Get the 712 hash of a bid used for signing
376
+ /// @param round The round the bid is for the control of
377
+ /// @param expressLaneController The address that will be the express lane controller if the bid wins
378
+ /// @param amount The amount being bid
379
+ function getBidHash(
380
+ uint64 round,
381
+ address expressLaneController,
382
+ uint256 amount
383
+ ) external view returns (bytes32);
384
+
385
+ /// @notice Resolve the auction with just a single bid. The auctioneer is trusted to call this only when there are
386
+ /// less than two bids higher than the reserve price for an auction round.
387
+ /// In this case the highest bidder will pay the reserve price for the round
388
+ /// @dev We do not enforce it, but the following accounts or their sybils, are trusted not to send bids to the auctioneer
389
+ /// Auctioneer, beneficiary, beneficiary setter, reserve price setter, min reserve price setter, role admin, round timing info setter
390
+ /// @param firstPriceBid The highest price bid. Must have a price higher than the reserve. Price paid is the reserve
391
+ function resolveSingleBidAuction(Bid calldata firstPriceBid) external;
392
+
393
+ /// @notice Resolves the auction round with the two highest bids for that round
394
+ /// The highest price bidder pays the price of the second highest bid
395
+ /// Both bids must be higher than the reserve
396
+ /// @dev We do not enforce it, but the following accounts or their sybils, are trusted not to send bids to the auctioneer
397
+ /// Auctioneer, beneficiary, beneficiary setter, reserve price setter, min reserve price setter, role admin, round timing info setter
398
+ /// @param firstPriceBid The highest price bid
399
+ /// @param secondPriceBid The second highest price bid
400
+ function resolveMultiBidAuction(Bid calldata firstPriceBid, Bid calldata secondPriceBid)
401
+ external;
402
+
403
+ /// @notice Sets a transferor for an express lane controller
404
+ /// The transferor is an address that will have the right to transfer express lane controller rights
405
+ /// on behalf an express lane controller.
406
+ /// @param transferor The transferor to set
407
+ function setTransferor(Transferor calldata transferor) external;
408
+
409
+ /// @notice Express lane controllers are allowed to transfer their express lane rights for the current or future
410
+ /// round to another address. They may use this for reselling their rights after purchasing them
411
+ /// Again, the priviledged accounts mentioned in resolve documentation are trusted not to try to receive rights via this message.
412
+ /// Although they cannot stop someone transferring the rights to them, they should not use the controller rights if that does occur
413
+ /// @param round The round to transfer rights for
414
+ /// @param newExpressLaneController The new express lane controller to transfer the rights to
415
+ function transferExpressLaneController(uint64 round, address newExpressLaneController) external;
416
+
417
+ /// @notice The last two auction rounds that were resolved
418
+ /// @return The most recent resolved auction round
419
+ /// @return The second most recent resolved auction round
420
+ function resolvedRounds() external view returns (ELCRound memory, ELCRound memory);
421
+ }
@@ -0,0 +1,115 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import {NegativeRoundStart} from "./Errors.sol";
5
+
6
+ /// @notice Information about the timings of auction round. All timings measured in seconds
7
+ /// Bids can be submitted to the offchain autonomous auctioneer until the auction round closes
8
+ /// after which the auctioneer can submit the two highest bids to the auction contract to resolve the auction
9
+ struct RoundTimingInfo {
10
+ /// @notice The timestamp when round 0 starts
11
+ /// We allow this to be negative so that later when setting new round timing info
12
+ /// we can use offsets very far in the past. This combined with the maxium that we allow
13
+ /// on round duration ensures that we can always set a new round duration within the possible range
14
+ int64 offsetTimestamp;
15
+ /// @notice The total duration (in seconds) of the round. Always less than 86400 and greater than 0
16
+ uint64 roundDurationSeconds;
17
+ /// @notice The number of seconds before the end of the round that the auction round closes. Cannot be 0
18
+ uint64 auctionClosingSeconds;
19
+ /// @notice A reserve setter account has the rights to set a reserve for a round,
20
+ /// however they cannot do this within a reserve blackout period.
21
+ /// The blackout period starts at RoundDuration - AuctionClosingSeconds - ReserveSubmissionSeconds,
22
+ /// and ends when the auction round is resolved, or the round ends.
23
+ uint64 reserveSubmissionSeconds;
24
+ }
25
+
26
+ library RoundTimingInfoLib {
27
+ /// @dev Using signed offset involves a lot of casting when comparing the to the block timestamp
28
+ /// so we provide a helper method here
29
+ function blockTimestampBeforeOffset(int64 offsetTimestamp) private view returns (bool) {
30
+ return int64(uint64(block.timestamp)) < offsetTimestamp;
31
+ }
32
+
33
+ /// @dev Using signed offset involves a lot of casting when comparing the to the block timestamp
34
+ /// so we provide a helper method here
35
+ /// Notice! this helper method should not be used before checking that the offset is less than the timestamp
36
+ function unsignedSinceTimestamp(int64 offsetTimestamp) private view returns (uint64) {
37
+ return uint64(int64(uint64(block.timestamp)) - offsetTimestamp);
38
+ }
39
+
40
+ /// @notice The current round, given the current timestamp, the offset and the round duration
41
+ function currentRound(RoundTimingInfo memory info) internal view returns (uint64) {
42
+ if (blockTimestampBeforeOffset(info.offsetTimestamp)) {
43
+ return 0;
44
+ }
45
+
46
+ return (unsignedSinceTimestamp(info.offsetTimestamp)) / info.roundDurationSeconds;
47
+ }
48
+
49
+ /// @notice Has the current auction round closed
50
+ function isAuctionRoundClosed(RoundTimingInfo memory info) internal view returns (bool) {
51
+ if (blockTimestampBeforeOffset(info.offsetTimestamp)) {
52
+ return false;
53
+ }
54
+
55
+ uint64 timeSinceOffset = unsignedSinceTimestamp(info.offsetTimestamp);
56
+ uint64 timeInRound = timeSinceOffset % info.roundDurationSeconds;
57
+ // round closes at AuctionClosedSeconds before the end of the round
58
+ return timeInRound >= info.roundDurationSeconds - info.auctionClosingSeconds;
59
+ }
60
+
61
+ /// @notice The reserve cannot be set during the blackout period
62
+ /// This period runs from ReserveSubmissionSeconds before the auction closes and ends when the round resolves, or when the round ends.
63
+ /// @param info Round timing info
64
+ /// @param latestResolvedRound The last auction round number that was resolved
65
+ function isReserveBlackout(RoundTimingInfo memory info, uint64 latestResolvedRound)
66
+ internal
67
+ view
68
+ returns (bool)
69
+ {
70
+ if (blockTimestampBeforeOffset(info.offsetTimestamp)) {
71
+ // no rounds have started, can't be in blackout
72
+ return false;
73
+ }
74
+
75
+ // if we're in round r, we are selling the rights for r+1
76
+ // if the latest round is r+1 that means we've already resolved the auction in r
77
+ // so we are no longer in the blackout period
78
+ uint64 curRound = currentRound(info);
79
+ if (latestResolvedRound >= curRound + 1) {
80
+ return false;
81
+ }
82
+
83
+ // the round in question hasnt been resolved
84
+ // therefore if we're within ReserveSubmissionSeconds of the auction close then we're in blackout
85
+ // otherwise we're not
86
+ uint64 timeSinceOffset = unsignedSinceTimestamp(info.offsetTimestamp);
87
+ uint64 timeInRound = timeSinceOffset % info.roundDurationSeconds;
88
+ return
89
+ timeInRound >=
90
+ (info.roundDurationSeconds -
91
+ info.auctionClosingSeconds -
92
+ info.reserveSubmissionSeconds);
93
+ }
94
+
95
+ /// @notice Gets the start and end timestamps (seconds) of a specified round
96
+ /// Since it is possible to set a negative offset, the start and end time may also be negative
97
+ /// In this case requesting roundTimestamps will revert.
98
+ /// @param info Round timing info
99
+ /// @param round The specified round
100
+ /// @return The timestamp at which the round starts
101
+ /// @return The timestamp at which the round ends
102
+ function roundTimestamps(RoundTimingInfo memory info, uint64 round)
103
+ internal
104
+ pure
105
+ returns (uint64, uint64)
106
+ {
107
+ int64 intRoundStart = info.offsetTimestamp + int64(info.roundDurationSeconds * round);
108
+ if (intRoundStart < 0) {
109
+ revert NegativeRoundStart(intRoundStart);
110
+ }
111
+ uint64 roundStart = uint64(intRoundStart);
112
+ uint64 roundEnd = roundStart + info.roundDurationSeconds - 1;
113
+ return (roundStart, roundEnd);
114
+ }
115
+ }
@@ -10,6 +10,8 @@ import {BadSequencerMessageNumber} from "../libraries/Error.sol";
10
10
  import "../bridge/Bridge.sol";
11
11
 
12
12
  contract BridgeUnproxied is Bridge {
13
+ uint256 public DUMMYVAR = 0; // This is a dummy variable to disambiguous with the Bridge contract
14
+
13
15
  constructor() {
14
16
  _activeOutbox = EMPTY_ACTIVEOUTBOX;
15
17
  rollup = IOwnable(msg.sender);
@@ -0,0 +1,42 @@
1
+ // Copyright 2024, 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
+ /*
8
+ * This contract is the solidity equivalent of the stylus create test contract.
9
+ */
10
+ contract CreateTest {
11
+ // solhint-disable no-complex-fallback
12
+ // solhint-disable reason-string
13
+ // solhint-disable avoid-low-level-calls
14
+ // solhint-disable-next-line prettier/prettier
15
+ fallback(bytes calldata input) external returns (bytes memory) {
16
+ uint8 kind = uint8(input[0]);
17
+ input = input[1:];
18
+
19
+ bytes32 endowment = bytes32(input[:32]);
20
+ input = input[32:];
21
+
22
+ address addr;
23
+
24
+ if (kind == 2) {
25
+ bytes32 salt = bytes32(input[:32]);
26
+ input = input[32:];
27
+ bytes memory code = input;
28
+ assembly {
29
+ addr := create2(endowment, add(code, 32), mload(code), salt)
30
+ }
31
+ } else {
32
+ bytes memory code = input;
33
+ assembly {
34
+ addr := create(endowment, add(code, 32), mload(code))
35
+ }
36
+ }
37
+ if (addr == address(0)) {
38
+ revert("failed to create");
39
+ }
40
+ return addr.code;
41
+ }
42
+ }