Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into post-nitro-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacolvin0 committed Oct 29, 2022
2 parents 8912415 + 119da9e commit 7d28732
Show file tree
Hide file tree
Showing 109 changed files with 346 additions and 186 deletions.
6 changes: 6 additions & 0 deletions packages/arb-bridge-eth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ sudo docker run -p 7545:7545 -it arb-bridge-eth
```

This repository is offered under the Apache 2.0 license. See LICENSE for details.

## Only for classic version

This package has been deprecated!

If you want to use what was once called `arb-bridge-eth`, look into the latest and greatest [`nitro/contracts`](https://github.com/OffchainLabs/nitro/tree/master/contracts)!
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/Hashing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ pragma solidity ^0.6.11;

import "./Value.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library Hashing {
using Hashing for Value.Data;
using Value for Value.CodePoint;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/IOneStepProof.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ pragma solidity >=0.6.9 <0.9.0;
import "../bridge/interfaces/IBridge.sol";
import "../bridge/interfaces/ISequencerInbox.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/token-bridge-contracts)
* for new updates
*/
interface IOneStepProof {
// Bridges is sequencer bridge then delayed bridge
function executeStep(
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/Machine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ import "./Marshaling.sol";

import "../libraries/DebugPrint.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library Machine {
using Hashing for Value.Data;

Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/Marshaling.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import "./Hashing.sol";

import "../libraries/BytesLib.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library Marshaling {
using BytesLib for bytes;
using Value for Value.Data;
Expand Down
5 changes: 4 additions & 1 deletion packages/arb-bridge-eth/contracts/arch/OneStepProof.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import "../bridge/Messages.sol";
import "../libraries/BytesLib.sol";

// Originally forked from https://github.com/leapdao/solEVM-enforcer/tree/master

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract OneStepProof is OneStepProofCommon {
using Machine for Machine.Data;
using Hashing for Value.Data;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/OneStepProof2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ import "./Machine.sol";

// Originally forked from https://github.com/leapdao/solEVM-enforcer/tree/master

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract OneStepProof2 is OneStepProofCommon {
/* solhint-disable no-inline-assembly */

Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/OneStepProofCommon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ import "./Machine.sol";
import "../bridge/interfaces/IBridge.sol";
import "../bridge/interfaces/ISequencerInbox.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
abstract contract OneStepProofCommon is IOneStepProof {
using Machine for Machine.Data;
using Hashing for Value.Data;
Expand Down
5 changes: 4 additions & 1 deletion packages/arb-bridge-eth/contracts/arch/OneStepProofHash.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ import "./OneStepProofCommon.sol";
import "../libraries/Precompiles.sol";

// Originally forked from https://github.com/leapdao/solEVM-enforcer/tree/master

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract OneStepProofHash is OneStepProofCommon {
function executeHashInsn(AssertionContext memory context) internal pure {
Value.Data memory val = popVal(context.stack);
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/arch/Value.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

pragma solidity ^0.6.11;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library Value {
uint8 internal constant INT_TYPECODE = 0;
uint8 internal constant CODE_POINT_TYPECODE = 1;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import "@openzeppelin/contracts/utils/Address.sol";

import "./interfaces/IBridge.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract Bridge is OwnableUpgradeable, IBridge {
using Address for address;
struct InOutInfo {
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/BridgeUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pragma solidity ^0.6.11;
import "./interfaces/IBridge.sol";
import "./interfaces/ISequencerInbox.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract BridgeUtils {
function getCountsAndAccumulators(IBridge delayedBridge, ISequencerInbox sequencerInbox)
external
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/Inbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import "../libraries/AddressAliasHelper.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./Bridge.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract Inbox is IInbox, WhitelistConsumer, Cloneable {
uint8 internal constant ETH_TRANSFER = 0;
uint8 internal constant L2_MSG = 3;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/Messages.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

pragma solidity ^0.6.11;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library Messages {
function messageHash(
uint8 kind,
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ import { INitroRollup, IArbOwner, NitroReadyMagicNums } from "./NitroMigratorUti
pragma solidity ^0.6.11;
pragma experimental ABIEncoderV2;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract NitroMigrator is OwnableUpgradeable, IMessageProvider {
uint8 internal constant L1MessageType_shutdownForNitro = 128;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ import "./interfaces/IInbox.sol";
import "@arbitrum/nitro-contracts/src/bridge/IBridge.sol" as INitroBridge;
import "@arbitrum/nitro-contracts/src/bridge/IInbox.sol" as INitroInbox;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface INitroRollup {
struct GlobalState {
bytes32[2] bytes32Vals;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import { NitroReadyMagicNums } from "../NitroMigratorUtil.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract OldOutbox is IOutbox, Cloneable {
using BytesLib for bytes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ pragma solidity ^0.6.11;

import "../../libraries/Cloneable.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract OutboxEntry is Cloneable {
address outbox;
bytes32 public root;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/Outbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import "@openzeppelin/contracts/proxy/BeaconProxy.sol";
import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract Outbox is IOutbox, Cloneable {
using BytesLib for bytes;

Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import "../validator/IGasRefunder.sol";
import { NitroReadyMagicNums } from "./NitroMigratorUtil.sol";
import "./Messages.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface OldRollup {
function sequencerInboxMaxDelayBlocks() external view returns (uint256);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IBridge {
event MessageDelivered(
uint256 indexed messageIndex,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ pragma solidity >=0.6.9 <0.9.0;
import "./IBridge.sol";
import "./IMessageProvider.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IInbox is IMessageProvider {
function sendL2Message(bytes calldata messageData) external returns (uint256);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IMessageProvider {
event InboxMessageDelivered(uint256 indexed messageNum, bytes data);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pragma solidity >=0.6.9 <0.9.0;

import "./IBridge.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IOutbox {
event OutboxEntryCreated(
uint256 indexed batchNum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface ISequencerInbox {
event SequencerBatchDelivered(
uint256 indexed firstMessageNum,
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/challenge/Challenge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import "../arch/IOneStepProof.sol";

import "./ChallengeLib.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract Challenge is Cloneable, IChallenge {
using SafeMath for uint256;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import "./IChallengeFactory.sol";
import "@openzeppelin/contracts/proxy/BeaconProxy.sol";
import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract ChallengeFactory is IChallengeFactory {
IOneStepProof[] public executors;
UpgradeableBeacon public beacon;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/challenge/ChallengeLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pragma solidity ^0.6.11;
import "../libraries/MerkleLib.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library ChallengeLib {
using SafeMath for uint256;

Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/challenge/IChallenge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import "../bridge/interfaces/IBridge.sol";
import "../bridge/interfaces/ISequencerInbox.sol";
import "../arch/IOneStepProof.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IChallenge {
function initializeChallenge(
IOneStepProof[] calldata _executors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ pragma solidity >=0.6.9 <0.9.0;
import "../bridge/interfaces/IBridge.sol";
import "../bridge/interfaces/ISequencerInbox.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IChallengeFactory {
function createChallenge(
address _resultReceiver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

pragma solidity ^0.6.11;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
library AddressAliasHelper {
uint160 constant offset = uint160(0x1111000000000000000000000000000000001111);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

pragma solidity ^0.6.11;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface NitroReadyContract {
function isNitroReady() external pure returns (uint256);
}
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/rollup/BridgeCreator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/ProxyAdmin.sol";
import "../libraries/Whitelist.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
contract BridgeCreator is Ownable {
Bridge public delayedBridgeTemplate;
SequencerInbox public sequencerInboxTemplate;
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/rollup/INode.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface INode {
function initialize(
address _rollup,
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface INodeFactory {
function createNode(
bytes32 _stateHash,
Expand Down
4 changes: 4 additions & 0 deletions packages/arb-bridge-eth/contracts/rollup/IRollupCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pragma solidity >=0.6.9 <0.9.0;

import "./INode.sol";

/**
* @notice DEPRECATED - only for classic version, see new repo (https://github.com/OffchainLabs/nitro/tree/master/contracts)
* for new updates
*/
interface IRollupCore {
function _stakerMap(address stakerAddress)
external
Expand Down
Loading

0 comments on commit 7d28732

Please sign in to comment.