From 895405edbdf9a052c8e82cc260692bca5e198061 Mon Sep 17 00:00:00 2001 From: gzeon Date: Mon, 10 Jul 2023 20:14:58 +0800 Subject: [PATCH] chore: latest nitro-contracts develop 5e9673f --- contracts/src/bridge/Bridge.sol | 2 +- contracts/src/bridge/IBridge.sol | 2 +- .../src/bridge/IDelayedMessageProvider.sol | 2 +- contracts/src/bridge/IInbox.sol | 2 +- contracts/src/bridge/IOutbox.sol | 2 +- contracts/src/bridge/IOwnable.sol | 2 +- contracts/src/bridge/ISequencerInbox.sol | 16 +++- contracts/src/bridge/Inbox.sol | 82 +------------------ contracts/src/bridge/Messages.sol | 2 +- contracts/src/bridge/Outbox.sol | 2 +- contracts/src/bridge/SequencerInbox.sol | 37 +++++++-- contracts/src/challenge/ChallengeLib.sol | 2 +- contracts/src/challenge/ChallengeManager.sol | 2 +- contracts/src/challenge/IChallengeManager.sol | 2 +- .../challenge/IChallengeResultReceiver.sol | 2 +- .../src/libraries/AddressAliasHelper.sol | 2 +- .../src/libraries/AdminFallbackProxy.sol | 2 +- contracts/src/libraries/ArbitrumChecker.sol | 16 ++++ contracts/src/libraries/Constants.sol | 5 +- .../src/libraries/CryptographyPrimitives.sol | 2 +- contracts/src/libraries/DelegateCallAware.sol | 2 +- .../libraries/DoubleLogicUUPSUpgradeable.sol | 2 +- contracts/src/libraries/Error.sol | 2 +- contracts/src/libraries/IGasRefunder.sol | 2 +- contracts/src/libraries/MerkleLib.sol | 2 +- contracts/src/libraries/MessageTypes.sol | 2 +- contracts/src/mocks/BridgeStub.sol | 2 +- contracts/src/mocks/BridgeUnproxied.sol | 2 +- contracts/src/mocks/InboxStub.sol | 2 +- contracts/src/mocks/MockResultReceiver.sol | 2 +- contracts/src/mocks/ProxyAdminForBinding.sol | 2 +- contracts/src/mocks/SequencerInboxStub.sol | 2 +- contracts/src/mocks/Simple.sol | 4 +- contracts/src/mocks/SimpleProxy.sol | 2 +- .../src/mocks/SingleExecutionChallenge.sol | 2 +- .../src/mocks/TimedOutChallengeManager.sol | 2 +- .../src/node-interface/NodeInterface.sol | 2 +- .../src/node-interface/NodeInterfaceDebug.sol | 2 +- contracts/src/osp/HashProofHelper.sol | 2 +- contracts/src/osp/IOneStepProofEntry.sol | 2 +- contracts/src/osp/IOneStepProver.sol | 2 +- contracts/src/osp/OneStepProofEntry.sol | 2 +- contracts/src/osp/OneStepProver0.sol | 2 +- contracts/src/osp/OneStepProverHostIo.sol | 2 +- contracts/src/osp/OneStepProverMath.sol | 2 +- contracts/src/osp/OneStepProverMemory.sol | 2 +- contracts/src/precompiles/ArbAddressTable.sol | 2 +- contracts/src/precompiles/ArbAggregator.sol | 2 +- contracts/src/precompiles/ArbBLS.sol | 2 +- contracts/src/precompiles/ArbDebug.sol | 2 +- .../src/precompiles/ArbFunctionTable.sol | 2 +- contracts/src/precompiles/ArbGasInfo.sol | 2 +- contracts/src/precompiles/ArbInfo.sol | 2 +- contracts/src/precompiles/ArbOwner.sol | 2 +- contracts/src/precompiles/ArbOwnerPublic.sol | 2 +- contracts/src/precompiles/ArbRetryableTx.sol | 2 +- contracts/src/precompiles/ArbStatistics.sol | 2 +- contracts/src/precompiles/ArbSys.sol | 2 +- contracts/src/precompiles/ArbosTest.sol | 2 +- contracts/src/rollup/BridgeCreator.sol | 2 +- contracts/src/rollup/Config.sol | 2 +- contracts/src/rollup/IRollupAdmin.sol | 2 +- contracts/src/rollup/IRollupCore.sol | 2 +- contracts/src/rollup/IRollupEventInbox.sol | 2 +- contracts/src/rollup/IRollupLogic.sol | 2 +- contracts/src/rollup/Node.sol | 2 +- contracts/src/rollup/RollupAdminLogic.sol | 2 +- contracts/src/rollup/RollupCore.sol | 12 +-- contracts/src/rollup/RollupCreator.sol | 42 ++++++++-- contracts/src/rollup/RollupEventInbox.sol | 16 +++- contracts/src/rollup/RollupLib.sol | 2 +- contracts/src/rollup/RollupProxy.sol | 2 +- contracts/src/rollup/RollupUserLogic.sol | 2 +- contracts/src/rollup/ValidatorUtils.sol | 2 +- contracts/src/rollup/ValidatorWallet.sol | 2 +- .../src/rollup/ValidatorWalletCreator.sol | 2 +- contracts/src/state/Deserialize.sol | 2 +- contracts/src/state/GlobalState.sol | 2 +- contracts/src/state/Instructions.sol | 2 +- contracts/src/state/Machine.sol | 2 +- contracts/src/state/MerkleProof.sol | 2 +- contracts/src/state/Module.sol | 2 +- contracts/src/state/ModuleMemory.sol | 2 +- contracts/src/state/ModuleMemoryCompact.sol | 2 +- contracts/src/state/PcArray.sol | 2 +- contracts/src/state/StackFrame.sol | 2 +- contracts/src/state/Value.sol | 2 +- contracts/src/state/ValueArray.sol | 2 +- contracts/src/state/ValueStack.sol | 2 +- contracts/src/test-helpers/BridgeTester.sol | 2 +- .../CryptographyPrimitivesTester.sol | 2 +- .../InterfaceCompatibilityTester.sol | 2 +- contracts/src/test-helpers/MessageTester.sol | 2 +- .../test-helpers/OutboxWithoutOptTester.sol | 2 +- contracts/src/test-helpers/RollupMock.sol | 2 +- .../src/test-helpers/ValueArrayTester.sol | 2 +- 96 files changed, 203 insertions(+), 201 deletions(-) create mode 100644 contracts/src/libraries/ArbitrumChecker.sol diff --git a/contracts/src/bridge/Bridge.sol b/contracts/src/bridge/Bridge.sol index e8a6764ee..31b415540 100644 --- a/contracts/src/bridge/Bridge.sol +++ b/contracts/src/bridge/Bridge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/bridge/IBridge.sol b/contracts/src/bridge/IBridge.sol index 5e318c3a2..f1fff13c0 100644 --- a/contracts/src/bridge/IBridge.sol +++ b/contracts/src/bridge/IBridge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/bridge/IDelayedMessageProvider.sol b/contracts/src/bridge/IDelayedMessageProvider.sol index 9e650c872..a03601aa6 100644 --- a/contracts/src/bridge/IDelayedMessageProvider.sol +++ b/contracts/src/bridge/IDelayedMessageProvider.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/bridge/IInbox.sol b/contracts/src/bridge/IInbox.sol index ba424b6bb..95c3128cf 100644 --- a/contracts/src/bridge/IInbox.sol +++ b/contracts/src/bridge/IInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/bridge/IOutbox.sol b/contracts/src/bridge/IOutbox.sol index 78f36767f..3a551ce65 100644 --- a/contracts/src/bridge/IOutbox.sol +++ b/contracts/src/bridge/IOutbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/bridge/IOwnable.sol b/contracts/src/bridge/IOwnable.sol index 20735f0dd..10bfc5e90 100644 --- a/contracts/src/bridge/IOwnable.sol +++ b/contracts/src/bridge/IOwnable.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/bridge/ISequencerInbox.sol b/contracts/src/bridge/ISequencerInbox.sol index 994c7c012..5f19471e9 100644 --- a/contracts/src/bridge/ISequencerInbox.sol +++ b/contracts/src/bridge/ISequencerInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version @@ -76,9 +76,17 @@ interface ISequencerInbox is IDelayedMessageProvider { uint64 creationBlock; } - // https://github.com/ethereum/solidity/issues/11826 - // function maxTimeVariation() external view returns (MaxTimeVariation calldata); - // function dasKeySetInfo(bytes32) external view returns (DasKeySetInfo calldata); + function maxTimeVariation() + external + view + returns ( + uint256, + uint256, + uint256, + uint256 + ); + + function dasKeySetInfo(bytes32) external view returns (bool, uint64); /// @notice Remove force inclusion delay after a L1 chainId fork function removeDelayAfterFork() external; diff --git a/contracts/src/bridge/Inbox.sol b/contracts/src/bridge/Inbox.sol index 4cf654927..9e718b664 100644 --- a/contracts/src/bridge/Inbox.sol +++ b/contracts/src/bridge/Inbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -35,7 +35,7 @@ import { L2MessageType_unsignedEOATx, L2MessageType_unsignedContractTx } from "../libraries/MessageTypes.sol"; -import {MAX_DATA_SIZE, UNISWAP_L1_TIMELOCK, UNISWAP_L2_FACTORY} from "../libraries/Constants.sol"; +import {MAX_DATA_SIZE} from "../libraries/Constants.sol"; import "../precompiles/ArbSys.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; @@ -527,84 +527,6 @@ contract Inbox is DelegateCallAware, PausableUpgradeable, IInbox { ); } - /// @notice This is an one-time-exception to resolve a misconfiguration of Uniswap Arbitrum deployment - /// Only the Uniswap L1 Timelock may call this function and it is allowed to create a crosschain - /// retryable ticket without address aliasing. More info here: - /// https://gov.uniswap.org/t/consensus-check-fix-the-cross-chain-messaging-bridge-on-arbitrum/18547 - /// @dev This function will be removed in future releases - function uniswapCreateRetryableTicket( - address to, - uint256 l2CallValue, - uint256 maxSubmissionCost, - address excessFeeRefundAddress, - address callValueRefundAddress, - uint256 gasLimit, - uint256 maxFeePerGas, - bytes calldata data - ) external payable whenNotPaused onlyAllowed returns (uint256) { - // this can only be called by UNISWAP_L1_TIMELOCK - require(msg.sender == UNISWAP_L1_TIMELOCK, "NOT_UNISWAP_L1_TIMELOCK"); - // the retryable can only call UNISWAP_L2_FACTORY - require(to == UNISWAP_L2_FACTORY, "NOT_TO_UNISWAP_L2_FACTORY"); - - // ensure the user's deposit alone will make submission succeed - if (msg.value < (maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas)) { - revert InsufficientValue( - maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas, - msg.value - ); - } - - // if a refund address is a contract, we apply the alias to it - // so that it can access its funds on the L2 - // since the beneficiary and other refund addresses don't get rewritten by arb-os - if (AddressUpgradeable.isContract(excessFeeRefundAddress)) { - excessFeeRefundAddress = AddressAliasHelper.applyL1ToL2Alias(excessFeeRefundAddress); - } - if (AddressUpgradeable.isContract(callValueRefundAddress)) { - // this is the beneficiary. be careful since this is the address that can cancel the retryable in the L2 - callValueRefundAddress = AddressAliasHelper.applyL1ToL2Alias(callValueRefundAddress); - } - - // gas price and limit of 1 should never be a valid input, so instead they are used as - // magic values to trigger a revert in eth calls that surface data without requiring a tx trace - if (gasLimit == 1 || maxFeePerGas == 1) - revert RetryableData( - msg.sender, - to, - l2CallValue, - msg.value, - maxSubmissionCost, - excessFeeRefundAddress, - callValueRefundAddress, - gasLimit, - maxFeePerGas, - data - ); - - uint256 submissionFee = calculateRetryableSubmissionFee(data.length, block.basefee); - if (maxSubmissionCost < submissionFee) - revert InsufficientSubmissionCost(submissionFee, maxSubmissionCost); - - return - _deliverMessage( - L1MessageType_submitRetryableTx, - AddressAliasHelper.undoL1ToL2Alias(msg.sender), - abi.encodePacked( - uint256(uint160(to)), - l2CallValue, - msg.value, - maxSubmissionCost, - uint256(uint160(excessFeeRefundAddress)), - uint256(uint160(callValueRefundAddress)), - gasLimit, - maxFeePerGas, - data.length, - data - ) - ); - } - function _deliverMessage( uint8 _kind, address _sender, diff --git a/contracts/src/bridge/Messages.sol b/contracts/src/bridge/Messages.sol index 6e193b7d6..07731c517 100644 --- a/contracts/src/bridge/Messages.sol +++ b/contracts/src/bridge/Messages.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/bridge/Outbox.sol b/contracts/src/bridge/Outbox.sol index b0b4bbe03..9020e660a 100644 --- a/contracts/src/bridge/Outbox.sol +++ b/contracts/src/bridge/Outbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/bridge/SequencerInbox.sol b/contracts/src/bridge/SequencerInbox.sol index c95cd70b7..8c2c53876 100644 --- a/contracts/src/bridge/SequencerInbox.sol +++ b/contracts/src/bridge/SequencerInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -27,10 +27,12 @@ import "./IInbox.sol"; import "./ISequencerInbox.sol"; import "../rollup/IRollupLogic.sol"; import "./Messages.sol"; +import "../precompiles/ArbGasInfo.sol"; import {L1MessageType_batchPostingReport} from "../libraries/MessageTypes.sol"; import {GasRefundEnabled, IGasRefunder} from "../libraries/IGasRefunder.sol"; import "../libraries/DelegateCallAware.sol"; +import "../libraries/ArbitrumChecker.sol"; import {MAX_DATA_SIZE} from "../libraries/Constants.sol"; /** @@ -66,6 +68,9 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox mapping(address => bool) public isSequencer; + // If the chain this SequencerInbox is deployed on is an Arbitrum chain. + bool internal immutable hostChainIsArbitrum = ArbitrumChecker.runningOnArbitrum(); + function _chainIdChanged() internal view returns (bool) { return deployTimeChainId != block.chainid; } @@ -387,13 +392,29 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox // this msg isn't included in the current sequencer batch, but instead added to // the delayed messages queue that is yet to be included address batchPoster = msg.sender; - bytes memory spendingReportMsg = abi.encodePacked( - block.timestamp, - batchPoster, - dataHash, - seqMessageIndex, - block.basefee - ); + bytes memory spendingReportMsg; + if (hostChainIsArbitrum) { + // Include extra gas for the host chain's L1 gas charging + uint256 l1Fees = ArbGasInfo(address(0x6c)).getCurrentTxL1GasFees(); + uint256 extraGas = l1Fees / block.basefee; + require(extraGas <= type(uint64).max, "L1_GAS_NOT_UINT64"); + spendingReportMsg = abi.encodePacked( + block.timestamp, + batchPoster, + dataHash, + seqMessageIndex, + block.basefee, + uint64(extraGas) + ); + } else { + spendingReportMsg = abi.encodePacked( + block.timestamp, + batchPoster, + dataHash, + seqMessageIndex, + block.basefee + ); + } uint256 msgNum = bridge.submitBatchSpendingReport( batchPoster, keccak256(spendingReportMsg) diff --git a/contracts/src/challenge/ChallengeLib.sol b/contracts/src/challenge/ChallengeLib.sol index e225ea1fe..25ff894d8 100644 --- a/contracts/src/challenge/ChallengeLib.sol +++ b/contracts/src/challenge/ChallengeLib.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/challenge/ChallengeManager.sol b/contracts/src/challenge/ChallengeManager.sol index 8c97e53eb..12cad0852 100644 --- a/contracts/src/challenge/ChallengeManager.sol +++ b/contracts/src/challenge/ChallengeManager.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/challenge/IChallengeManager.sol b/contracts/src/challenge/IChallengeManager.sol index ca46a68ec..b6f63d672 100644 --- a/contracts/src/challenge/IChallengeManager.sol +++ b/contracts/src/challenge/IChallengeManager.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/challenge/IChallengeResultReceiver.sol b/contracts/src/challenge/IChallengeResultReceiver.sol index 6533dfa35..264a0ae24 100644 --- a/contracts/src/challenge/IChallengeResultReceiver.sol +++ b/contracts/src/challenge/IChallengeResultReceiver.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/libraries/AddressAliasHelper.sol b/contracts/src/libraries/AddressAliasHelper.sol index a9b7dcbd1..9320fe3e2 100644 --- a/contracts/src/libraries/AddressAliasHelper.sol +++ b/contracts/src/libraries/AddressAliasHelper.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/libraries/AdminFallbackProxy.sol b/contracts/src/libraries/AdminFallbackProxy.sol index 52dc9bff9..7f1bb5116 100644 --- a/contracts/src/libraries/AdminFallbackProxy.sol +++ b/contracts/src/libraries/AdminFallbackProxy.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/libraries/ArbitrumChecker.sol b/contracts/src/libraries/ArbitrumChecker.sol new file mode 100644 index 000000000..714c4e75c --- /dev/null +++ b/contracts/src/libraries/ArbitrumChecker.sol @@ -0,0 +1,16 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +import "../precompiles/ArbSys.sol"; + +library ArbitrumChecker { + function runningOnArbitrum() internal view returns (bool) { + (bool ok, bytes memory data) = address(100).staticcall( + abi.encodeWithSelector(ArbSys.arbOSVersion.selector) + ); + return ok && data.length == 32; + } +} diff --git a/contracts/src/libraries/Constants.sol b/contracts/src/libraries/Constants.sol index 7fc7f875b..d15bdf169 100644 --- a/contracts/src/libraries/Constants.sol +++ b/contracts/src/libraries/Constants.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; @@ -11,6 +11,3 @@ uint64 constant NO_CHAL_INDEX = 0; // Expected seconds per block in Ethereum PoS uint256 constant ETH_POS_BLOCK_TIME = 12; - -address constant UNISWAP_L1_TIMELOCK = 0x1a9C8182C09F50C8318d769245beA52c32BE35BC; -address constant UNISWAP_L2_FACTORY = 0x1F98431c8aD98523631AE4a59f267346ea31F984; diff --git a/contracts/src/libraries/CryptographyPrimitives.sol b/contracts/src/libraries/CryptographyPrimitives.sol index ba1e41fe1..c77ad7c1d 100644 --- a/contracts/src/libraries/CryptographyPrimitives.sol +++ b/contracts/src/libraries/CryptographyPrimitives.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/libraries/DelegateCallAware.sol b/contracts/src/libraries/DelegateCallAware.sol index bbedcf98c..c5168aa13 100644 --- a/contracts/src/libraries/DelegateCallAware.sol +++ b/contracts/src/libraries/DelegateCallAware.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol b/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol index fb616878a..c9bf30400 100644 --- a/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol +++ b/contracts/src/libraries/DoubleLogicUUPSUpgradeable.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/libraries/Error.sol b/contracts/src/libraries/Error.sol index 7aeef8029..2114aa1e0 100644 --- a/contracts/src/libraries/Error.sol +++ b/contracts/src/libraries/Error.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/libraries/IGasRefunder.sol b/contracts/src/libraries/IGasRefunder.sol index 99e48bf57..e7b086565 100644 --- a/contracts/src/libraries/IGasRefunder.sol +++ b/contracts/src/libraries/IGasRefunder.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/libraries/MerkleLib.sol b/contracts/src/libraries/MerkleLib.sol index 344bad3e9..fd80196f4 100644 --- a/contracts/src/libraries/MerkleLib.sol +++ b/contracts/src/libraries/MerkleLib.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/libraries/MessageTypes.sol b/contracts/src/libraries/MessageTypes.sol index 093cb332a..d7a6a812a 100644 --- a/contracts/src/libraries/MessageTypes.sol +++ b/contracts/src/libraries/MessageTypes.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/mocks/BridgeStub.sol b/contracts/src/mocks/BridgeStub.sol index 261cfabf3..d0f9e8cca 100644 --- a/contracts/src/mocks/BridgeStub.sol +++ b/contracts/src/mocks/BridgeStub.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/BridgeUnproxied.sol b/contracts/src/mocks/BridgeUnproxied.sol index 84b447336..75aecfe14 100644 --- a/contracts/src/mocks/BridgeUnproxied.sol +++ b/contracts/src/mocks/BridgeUnproxied.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/InboxStub.sol b/contracts/src/mocks/InboxStub.sol index 3b1838839..a31f33ef5 100644 --- a/contracts/src/mocks/InboxStub.sol +++ b/contracts/src/mocks/InboxStub.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/MockResultReceiver.sol b/contracts/src/mocks/MockResultReceiver.sol index 1b2fd1a2f..46a4dd112 100644 --- a/contracts/src/mocks/MockResultReceiver.sol +++ b/contracts/src/mocks/MockResultReceiver.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/ProxyAdminForBinding.sol b/contracts/src/mocks/ProxyAdminForBinding.sol index 4311e8808..4d770ab34 100644 --- a/contracts/src/mocks/ProxyAdminForBinding.sol +++ b/contracts/src/mocks/ProxyAdminForBinding.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/SequencerInboxStub.sol b/contracts/src/mocks/SequencerInboxStub.sol index 20d5e9f05..c476043b1 100644 --- a/contracts/src/mocks/SequencerInboxStub.sol +++ b/contracts/src/mocks/SequencerInboxStub.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/Simple.sol b/contracts/src/mocks/Simple.sol index 25d4b67b5..a97e1d0c9 100644 --- a/contracts/src/mocks/Simple.sol +++ b/contracts/src/mocks/Simple.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -30,6 +30,8 @@ contract Simple { } function incrementRedeem() external { + require(msg.sender == tx.origin, "SENDER_NOT_ORIGIN"); + require(ArbSys(address(0x64)).wasMyCallersAddressAliased(), "NOT_ALIASED"); counter++; emit RedeemedEvent(msg.sender, ArbRetryableTx(address(110)).getCurrentRedeemer()); } diff --git a/contracts/src/mocks/SimpleProxy.sol b/contracts/src/mocks/SimpleProxy.sol index 6c44c86e1..e69f891cc 100644 --- a/contracts/src/mocks/SimpleProxy.sol +++ b/contracts/src/mocks/SimpleProxy.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/SingleExecutionChallenge.sol b/contracts/src/mocks/SingleExecutionChallenge.sol index 696567ade..cd44ce1e9 100644 --- a/contracts/src/mocks/SingleExecutionChallenge.sol +++ b/contracts/src/mocks/SingleExecutionChallenge.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/mocks/TimedOutChallengeManager.sol b/contracts/src/mocks/TimedOutChallengeManager.sol index 2dbe10f07..83e0457f1 100644 --- a/contracts/src/mocks/TimedOutChallengeManager.sol +++ b/contracts/src/mocks/TimedOutChallengeManager.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/node-interface/NodeInterface.sol b/contracts/src/node-interface/NodeInterface.sol index f74c5a4c8..9f3ec1d2f 100644 --- a/contracts/src/node-interface/NodeInterface.sol +++ b/contracts/src/node-interface/NodeInterface.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/node-interface/NodeInterfaceDebug.sol b/contracts/src/node-interface/NodeInterfaceDebug.sol index 323b324a1..faeacb746 100644 --- a/contracts/src/node-interface/NodeInterfaceDebug.sol +++ b/contracts/src/node-interface/NodeInterfaceDebug.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/osp/HashProofHelper.sol b/contracts/src/osp/HashProofHelper.sol index 4d37aa9b3..b211908f0 100644 --- a/contracts/src/osp/HashProofHelper.sol +++ b/contracts/src/osp/HashProofHelper.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/IOneStepProofEntry.sol b/contracts/src/osp/IOneStepProofEntry.sol index c90bfd791..fb00b74f0 100644 --- a/contracts/src/osp/IOneStepProofEntry.sol +++ b/contracts/src/osp/IOneStepProofEntry.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/IOneStepProver.sol b/contracts/src/osp/IOneStepProver.sol index 202d58599..2e11e6570 100644 --- a/contracts/src/osp/IOneStepProver.sol +++ b/contracts/src/osp/IOneStepProver.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/OneStepProofEntry.sol b/contracts/src/osp/OneStepProofEntry.sol index bae84ca1e..390727c34 100644 --- a/contracts/src/osp/OneStepProofEntry.sol +++ b/contracts/src/osp/OneStepProofEntry.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/OneStepProver0.sol b/contracts/src/osp/OneStepProver0.sol index 2767a8e98..107e49738 100644 --- a/contracts/src/osp/OneStepProver0.sol +++ b/contracts/src/osp/OneStepProver0.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/OneStepProverHostIo.sol b/contracts/src/osp/OneStepProverHostIo.sol index a2cb8e31e..260ab2062 100644 --- a/contracts/src/osp/OneStepProverHostIo.sol +++ b/contracts/src/osp/OneStepProverHostIo.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/OneStepProverMath.sol b/contracts/src/osp/OneStepProverMath.sol index 1a2334746..c13dd8945 100644 --- a/contracts/src/osp/OneStepProverMath.sol +++ b/contracts/src/osp/OneStepProverMath.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/osp/OneStepProverMemory.sol b/contracts/src/osp/OneStepProverMemory.sol index 7d33d55e0..6fee2f932 100644 --- a/contracts/src/osp/OneStepProverMemory.sol +++ b/contracts/src/osp/OneStepProverMemory.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/precompiles/ArbAddressTable.sol b/contracts/src/precompiles/ArbAddressTable.sol index b0e8e97bf..b37d949d3 100644 --- a/contracts/src/precompiles/ArbAddressTable.sol +++ b/contracts/src/precompiles/ArbAddressTable.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbAggregator.sol b/contracts/src/precompiles/ArbAggregator.sol index 4c01f00b6..c37af3bae 100644 --- a/contracts/src/precompiles/ArbAggregator.sol +++ b/contracts/src/precompiles/ArbAggregator.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbBLS.sol b/contracts/src/precompiles/ArbBLS.sol index c85d0c8d3..9aef25ce4 100644 --- a/contracts/src/precompiles/ArbBLS.sol +++ b/contracts/src/precompiles/ArbBLS.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbDebug.sol b/contracts/src/precompiles/ArbDebug.sol index 3cfb3cf43..9924ededc 100644 --- a/contracts/src/precompiles/ArbDebug.sol +++ b/contracts/src/precompiles/ArbDebug.sol @@ -1,5 +1,5 @@ // Copyright 2021-2023, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbFunctionTable.sol b/contracts/src/precompiles/ArbFunctionTable.sol index 1b5e14b76..6ee07011a 100644 --- a/contracts/src/precompiles/ArbFunctionTable.sol +++ b/contracts/src/precompiles/ArbFunctionTable.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbGasInfo.sol b/contracts/src/precompiles/ArbGasInfo.sol index ff91c037e..a71068838 100644 --- a/contracts/src/precompiles/ArbGasInfo.sol +++ b/contracts/src/precompiles/ArbGasInfo.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbInfo.sol b/contracts/src/precompiles/ArbInfo.sol index 7668169ad..ab7e7294f 100644 --- a/contracts/src/precompiles/ArbInfo.sol +++ b/contracts/src/precompiles/ArbInfo.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbOwner.sol b/contracts/src/precompiles/ArbOwner.sol index 165039c9d..46ac63c56 100644 --- a/contracts/src/precompiles/ArbOwner.sol +++ b/contracts/src/precompiles/ArbOwner.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbOwnerPublic.sol b/contracts/src/precompiles/ArbOwnerPublic.sol index d6fd68312..270f5f247 100644 --- a/contracts/src/precompiles/ArbOwnerPublic.sol +++ b/contracts/src/precompiles/ArbOwnerPublic.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbRetryableTx.sol b/contracts/src/precompiles/ArbRetryableTx.sol index 3de17ea12..0600f6513 100644 --- a/contracts/src/precompiles/ArbRetryableTx.sol +++ b/contracts/src/precompiles/ArbRetryableTx.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbStatistics.sol b/contracts/src/precompiles/ArbStatistics.sol index 901dc5ca9..d0a3da001 100644 --- a/contracts/src/precompiles/ArbStatistics.sol +++ b/contracts/src/precompiles/ArbStatistics.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbSys.sol b/contracts/src/precompiles/ArbSys.sol index ca2f316c5..4e7a8f41f 100644 --- a/contracts/src/precompiles/ArbSys.sol +++ b/contracts/src/precompiles/ArbSys.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/precompiles/ArbosTest.sol b/contracts/src/precompiles/ArbosTest.sol index b99dc142a..b766fd015 100644 --- a/contracts/src/precompiles/ArbosTest.sol +++ b/contracts/src/precompiles/ArbosTest.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.4.21 <0.9.0; diff --git a/contracts/src/rollup/BridgeCreator.sol b/contracts/src/rollup/BridgeCreator.sol index 4c2c7ba7d..1c2b60cd7 100644 --- a/contracts/src/rollup/BridgeCreator.sol +++ b/contracts/src/rollup/BridgeCreator.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/Config.sol b/contracts/src/rollup/Config.sol index 41950a9bd..269ecb5a2 100644 --- a/contracts/src/rollup/Config.sol +++ b/contracts/src/rollup/Config.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/IRollupAdmin.sol b/contracts/src/rollup/IRollupAdmin.sol index 8420c29c6..bdad07b33 100644 --- a/contracts/src/rollup/IRollupAdmin.sol +++ b/contracts/src/rollup/IRollupAdmin.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/IRollupCore.sol b/contracts/src/rollup/IRollupCore.sol index e17c27af4..e50f7a4af 100644 --- a/contracts/src/rollup/IRollupCore.sol +++ b/contracts/src/rollup/IRollupCore.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/IRollupEventInbox.sol b/contracts/src/rollup/IRollupEventInbox.sol index 5c1111e09..beb1b4ed2 100644 --- a/contracts/src/rollup/IRollupEventInbox.sol +++ b/contracts/src/rollup/IRollupEventInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/IRollupLogic.sol b/contracts/src/rollup/IRollupLogic.sol index d413b2771..bc1520be6 100644 --- a/contracts/src/rollup/IRollupLogic.sol +++ b/contracts/src/rollup/IRollupLogic.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/Node.sol b/contracts/src/rollup/Node.sol index a5a502705..6961168a0 100644 --- a/contracts/src/rollup/Node.sol +++ b/contracts/src/rollup/Node.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/RollupAdminLogic.sol b/contracts/src/rollup/RollupAdminLogic.sol index 44a9989c7..b6c3771fc 100644 --- a/contracts/src/rollup/RollupAdminLogic.sol +++ b/contracts/src/rollup/RollupAdminLogic.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/RollupCore.sol b/contracts/src/rollup/RollupCore.sol index ec417596c..1107f1059 100644 --- a/contracts/src/rollup/RollupCore.sol +++ b/contracts/src/rollup/RollupCore.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -19,6 +19,7 @@ import "../bridge/IOutbox.sol"; import "../precompiles/ArbSys.sol"; +import "../libraries/ArbitrumChecker.sol"; import {NO_CHAL_INDEX} from "../libraries/Constants.sol"; abstract contract RollupCore is IRollupCore, PausableUpgradeable { @@ -78,17 +79,10 @@ abstract contract RollupCore is IRollupCore, PausableUpgradeable { bool public validatorWhitelistDisabled; // If the chain this RollupCore is deployed on is an Arbitrum chain. - bool internal immutable _hostChainIsArbitrum; + bool internal immutable _hostChainIsArbitrum = ArbitrumChecker.runningOnArbitrum(); // If the chain RollupCore is deployed on, this will contain the ArbSys.blockNumber() at each node's creation. mapping(uint64 => uint256) internal _nodeCreatedAtArbSysBlock; - constructor() { - (bool ok, bytes memory data) = address(100).staticcall( - abi.encodeWithSelector(ArbSys.arbOSVersion.selector) - ); - _hostChainIsArbitrum = ok && data.length == 32; - } - /** * @notice Get a storage reference to the Node for the given node index * @param nodeNum Index of the node diff --git a/contracts/src/rollup/RollupCreator.sol b/contracts/src/rollup/RollupCreator.sol index 58ef0909f..e71263d83 100644 --- a/contracts/src/rollup/RollupCreator.sol +++ b/contracts/src/rollup/RollupCreator.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -11,14 +11,20 @@ import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.so import "@openzeppelin/contracts/access/Ownable.sol"; import "./RollupProxy.sol"; +import "./IRollupAdmin.sol"; contract RollupCreator is Ownable { event RollupCreated( address indexed rollupAddress, address inboxAddress, + address outbox, + address rollupEventInbox, + address challengeManager, address adminProxy, address sequencerInbox, - address bridge + address bridge, + address validatorUtils, + address validatorWalletCreator ); event TemplatesUpdated(); @@ -57,7 +63,11 @@ contract RollupCreator is Ownable { // RollupOwner should be the owner of Rollup's ProxyAdmin // RollupOwner should be the owner of Rollup // Bridge should have a single inbox and outbox - function createRollup(Config memory config) external returns (address) { + function createRollup( + Config memory config, + address _batchPoster, + address[] calldata _validators + ) external returns (address) { ProxyAdmin proxyAdmin = new ProxyAdmin(); // Create the rollup proxy to figure out the address and initialize it later @@ -75,8 +85,6 @@ contract RollupCreator is Ownable { config.sequencerInboxMaxTimeVariation ); - proxyAdmin.transferOwnership(config.owner); - IChallengeManager challengeManager = IChallengeManager( address( new TransparentUpgradeableProxy( @@ -93,6 +101,12 @@ contract RollupCreator is Ownable { osp ); + proxyAdmin.transferOwnership(config.owner); + + // initialize the rollup with this contract as owner to set batch poster and validators + // it will transfer the ownership back to the actual owner later + address actualOwner = config.owner; + config.owner = address(this); rollup.initializeProxy( config, ContractDependencies({ @@ -109,12 +123,28 @@ contract RollupCreator is Ownable { }) ); + sequencerInbox.setIsBatchPoster(_batchPoster, true); + + // Call setValidator on the newly created rollup contract + bool[] memory _vals = new bool[](_validators.length); + for (uint256 i = 0; i < _validators.length; i++) { + _vals[i] = true; + } + IRollupAdmin(address(rollup)).setValidator(_validators, _vals); + + IRollupAdmin(address(rollup)).setOwner(actualOwner); + emit RollupCreated( address(rollup), address(inbox), + address(outbox), + address(rollupEventInbox), + address(challengeManager), address(proxyAdmin), address(sequencerInbox), - address(bridge) + address(bridge), + address(validatorUtils), + address(validatorWalletCreator) ); return address(rollup); } diff --git a/contracts/src/rollup/RollupEventInbox.sol b/contracts/src/rollup/RollupEventInbox.sol index 9d7353fcc..ff7a727c1 100644 --- a/contracts/src/rollup/RollupEventInbox.sol +++ b/contracts/src/rollup/RollupEventInbox.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; @@ -7,7 +7,9 @@ pragma solidity ^0.8.0; import "./IRollupEventInbox.sol"; import "../bridge/IBridge.sol"; import "../bridge/IDelayedMessageProvider.sol"; +import "../precompiles/ArbGasInfo.sol"; import "../libraries/DelegateCallAware.sol"; +import "../libraries/ArbitrumChecker.sol"; import {INITIALIZATION_MSG_TYPE} from "../libraries/MessageTypes.sol"; import {AlreadyInit, HadZeroInit} from "../libraries/Error.sol"; @@ -36,7 +38,17 @@ contract RollupEventInbox is IRollupEventInbox, IDelayedMessageProvider, Delegat onlyRollup { require(bytes(chainConfig).length > 0, "EMPTY_CHAIN_CONFIG"); - bytes memory initMsg = abi.encodePacked(chainId, uint8(0), chainConfig); + uint8 initMsgVersion = 1; + uint256 currentDataCost = block.basefee; + if (ArbitrumChecker.runningOnArbitrum()) { + currentDataCost += ArbGasInfo(address(0x6c)).getL1BaseFeeEstimate(); + } + bytes memory initMsg = abi.encodePacked( + chainId, + initMsgVersion, + currentDataCost, + chainConfig + ); uint256 num = bridge.enqueueDelayedMessage( INITIALIZATION_MSG_TYPE, address(0), diff --git a/contracts/src/rollup/RollupLib.sol b/contracts/src/rollup/RollupLib.sol index 8120fe838..82b9571dc 100644 --- a/contracts/src/rollup/RollupLib.sol +++ b/contracts/src/rollup/RollupLib.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/RollupProxy.sol b/contracts/src/rollup/RollupProxy.sol index 110dd3991..2938a5851 100644 --- a/contracts/src/rollup/RollupProxy.sol +++ b/contracts/src/rollup/RollupProxy.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/RollupUserLogic.sol b/contracts/src/rollup/RollupUserLogic.sol index 00145fa2e..bd16ad5eb 100644 --- a/contracts/src/rollup/RollupUserLogic.sol +++ b/contracts/src/rollup/RollupUserLogic.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/ValidatorUtils.sol b/contracts/src/rollup/ValidatorUtils.sol index a7bb7d9df..75d554bb9 100644 --- a/contracts/src/rollup/ValidatorUtils.sol +++ b/contracts/src/rollup/ValidatorUtils.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/ValidatorWallet.sol b/contracts/src/rollup/ValidatorWallet.sol index fbde488a4..9b8c2296c 100644 --- a/contracts/src/rollup/ValidatorWallet.sol +++ b/contracts/src/rollup/ValidatorWallet.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/rollup/ValidatorWalletCreator.sol b/contracts/src/rollup/ValidatorWalletCreator.sol index 325b2077c..ce801eb02 100644 --- a/contracts/src/rollup/ValidatorWalletCreator.sol +++ b/contracts/src/rollup/ValidatorWalletCreator.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/Deserialize.sol b/contracts/src/state/Deserialize.sol index b0f150072..75bf62bf1 100644 --- a/contracts/src/state/Deserialize.sol +++ b/contracts/src/state/Deserialize.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/GlobalState.sol b/contracts/src/state/GlobalState.sol index 46a9be1a4..ceea60652 100644 --- a/contracts/src/state/GlobalState.sol +++ b/contracts/src/state/GlobalState.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/Instructions.sol b/contracts/src/state/Instructions.sol index 196899c93..75452f77e 100644 --- a/contracts/src/state/Instructions.sol +++ b/contracts/src/state/Instructions.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/Machine.sol b/contracts/src/state/Machine.sol index a7a5e9273..9d80f45c9 100644 --- a/contracts/src/state/Machine.sol +++ b/contracts/src/state/Machine.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/MerkleProof.sol b/contracts/src/state/MerkleProof.sol index 560e3913d..09c405b20 100644 --- a/contracts/src/state/MerkleProof.sol +++ b/contracts/src/state/MerkleProof.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/Module.sol b/contracts/src/state/Module.sol index 46d64de24..e21fb018d 100644 --- a/contracts/src/state/Module.sol +++ b/contracts/src/state/Module.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/ModuleMemory.sol b/contracts/src/state/ModuleMemory.sol index 76e64ec18..1f0a4434d 100644 --- a/contracts/src/state/ModuleMemory.sol +++ b/contracts/src/state/ModuleMemory.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/ModuleMemoryCompact.sol b/contracts/src/state/ModuleMemoryCompact.sol index 935fdf381..627154775 100644 --- a/contracts/src/state/ModuleMemoryCompact.sol +++ b/contracts/src/state/ModuleMemoryCompact.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/PcArray.sol b/contracts/src/state/PcArray.sol index d76465a30..d36076db4 100644 --- a/contracts/src/state/PcArray.sol +++ b/contracts/src/state/PcArray.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/StackFrame.sol b/contracts/src/state/StackFrame.sol index 465d63762..083376ecd 100644 --- a/contracts/src/state/StackFrame.sol +++ b/contracts/src/state/StackFrame.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/Value.sol b/contracts/src/state/Value.sol index 6e0a837b2..a4cb832a3 100644 --- a/contracts/src/state/Value.sol +++ b/contracts/src/state/Value.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/ValueArray.sol b/contracts/src/state/ValueArray.sol index 89833182a..c4239f6ca 100644 --- a/contracts/src/state/ValueArray.sol +++ b/contracts/src/state/ValueArray.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/state/ValueStack.sol b/contracts/src/state/ValueStack.sol index ccfe9ddc3..ce676bd0e 100644 --- a/contracts/src/state/ValueStack.sol +++ b/contracts/src/state/ValueStack.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/test-helpers/BridgeTester.sol b/contracts/src/test-helpers/BridgeTester.sol index 51454eb51..b355c51c8 100644 --- a/contracts/src/test-helpers/BridgeTester.sol +++ b/contracts/src/test-helpers/BridgeTester.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/test-helpers/CryptographyPrimitivesTester.sol b/contracts/src/test-helpers/CryptographyPrimitivesTester.sol index c05698092..d587e1ec0 100644 --- a/contracts/src/test-helpers/CryptographyPrimitivesTester.sol +++ b/contracts/src/test-helpers/CryptographyPrimitivesTester.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/test-helpers/InterfaceCompatibilityTester.sol b/contracts/src/test-helpers/InterfaceCompatibilityTester.sol index 1c6ae155a..ba6377058 100644 --- a/contracts/src/test-helpers/InterfaceCompatibilityTester.sol +++ b/contracts/src/test-helpers/InterfaceCompatibilityTester.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version diff --git a/contracts/src/test-helpers/MessageTester.sol b/contracts/src/test-helpers/MessageTester.sol index b8070dea8..1dc5cbff5 100644 --- a/contracts/src/test-helpers/MessageTester.sol +++ b/contracts/src/test-helpers/MessageTester.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; diff --git a/contracts/src/test-helpers/OutboxWithoutOptTester.sol b/contracts/src/test-helpers/OutboxWithoutOptTester.sol index 09b9d60e2..50f378ace 100644 --- a/contracts/src/test-helpers/OutboxWithoutOptTester.sol +++ b/contracts/src/test-helpers/OutboxWithoutOptTester.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/test-helpers/RollupMock.sol b/contracts/src/test-helpers/RollupMock.sol index fe701827b..085b9c005 100644 --- a/contracts/src/test-helpers/RollupMock.sol +++ b/contracts/src/test-helpers/RollupMock.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.4; diff --git a/contracts/src/test-helpers/ValueArrayTester.sol b/contracts/src/test-helpers/ValueArrayTester.sol index 8a614570b..048b76af3 100644 --- a/contracts/src/test-helpers/ValueArrayTester.sol +++ b/contracts/src/test-helpers/ValueArrayTester.sol @@ -1,5 +1,5 @@ // Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0;