Skip to content

Commit

Permalink
deprecate bridge peripherals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason-W123 committed Oct 16, 2022
1 parent 86a7545 commit 5d2c885
Show file tree
Hide file tree
Showing 42 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/arb-bridge-peripherals/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# arb-bridge-peripherals

This package has moved!

If you want to use what was once called `arb-bridge-peripherals`, look into the latest and greatest [`token-bridge-contracts`](https://github.com/OffchainLabs/token-bridge-contracts)!
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* for a custom token that interacts with the bridge, see TestArbCustomToken.sol for an example implementation).
*/

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

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

import "arbos-precompiles/arbos/builtin/ArbSys.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
/// @notice L2 utility contract to assist with L1 <=> L2 interactions
/// @dev this is an abstract contract instead of library so the functions can be easily overriden when testing
abstract contract L2ArbitrumMessenger {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "../libraries/BytesParser.sol";
import "./IArbToken.sol";

/**
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
* @title Standard (i.e., non-custom) contract deployed by L2Gateway.sol as L2 ERC20. Includes standard ERC20 interface plus additional methods for deposits/withdraws
*/
contract StandardArbERC20 is IArbToken, L2GatewayToken, Cloneable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import "../../libraries/gateway/TokenGateway.sol";

/**
* @title Common interface for gatways on Arbitrum messaging to L1.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
abstract contract L2ArbitrumGateway is L2ArbitrumMessenger, TokenGateway {
using Address for address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "../../libraries/gateway/ICustomGateway.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract L2CustomGateway is L2ArbitrumGateway, ICustomGateway {
// stores addresses of L2 tokens to be used
mapping(address => address) public override l1ToL2Token;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "./L2ArbitrumGateway.sol";
import "../StandardArbERC20.sol";
import "../../libraries/ClonableBeaconProxy.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract L2ERC20Gateway is L2ArbitrumGateway {
address public beaconProxyFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import "arb-bridge-eth/contracts/libraries/AddressAliasHelper.sol";
/**
* @title Handles withdrawals from Ethereum into Arbitrum. Tokens are routered to their appropriate L2 gateway (Router itself also conforms to the Gateway interface).
* @notice Router also serves as an L2-L1 token address oracle.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
contract L2GatewayRouter is GatewayRouter, L2ArbitrumMessenger {
modifier onlyCounterpartGateway() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import "../../libraries/IWETH9.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract L2WethGateway is L2ArbitrumGateway {
using SafeERC20 for IERC20;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface ArbitrumEnabledToken {

/**
* @title Minimum expected interface for L1 custom token (see TestCustomTokenL1.sol for an example implementation)
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
interface ICustomToken is ArbitrumEnabledToken {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pragma solidity ^0.6.11;
import "arb-bridge-eth/contracts/bridge/interfaces/IInbox.sol";
import "arb-bridge-eth/contracts/bridge/interfaces/IOutbox.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
/// @notice L1 utility contract to assist with L1 <=> L2 interactions
/// @dev this is an abstract contract instead of library so the functions can be easily overriden when testing
abstract contract L1ArbitrumMessenger {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "../../libraries/IERC165.sol";

/**
* @title Common interface for gatways on L1 messaging to Arbitrum.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
interface IL1ArbitrumGateway is ITokenGateway, IERC165 {
function inbox() external view returns (address);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import "../../libraries/IERC165.sol";
/**
* @title Handles deposits from Erhereum into Arbitrum. Tokens are routered to their appropriate L1 gateway (Router itself also conforms to the Gateway itnerface).
* @notice Router also serves as an L1-L2 token address oracle.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
interface IL1GatewayRouter is ITokenGateway, IERC165 {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "../../libraries/ITransferAndCall.sol";

import "./L1ArbitrumGateway.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface ITradeableExitReceiver {
function onExitTransfer(
address sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import "../../libraries/ERC165.sol";

/**
* @title Common interface for gatways on L1 messaging to Arbitrum.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
abstract contract L1ArbitrumGateway is
L1ArbitrumMessenger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import "arb-bridge-eth/contracts/libraries/Whitelist.sol";
/**
* @title Gatway for "custom" bridging functionality
* @notice Handles some (but not all!) custom Gateway needs.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
contract L1CustomGateway is L1ArbitrumExtendedGateway, ICustomGateway {
using Address for address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import "arb-bridge-eth/contracts/libraries/Whitelist.sol";
* @notice This contract handles token deposits, holds the escrowed tokens on layer 1, and (ultimately) finalizes withdrawals.
* @dev Any ERC20 that requires non-standard functionality should use a separate gateway.
* Messages to layer 2 use the inbox's createRetryableTicket method.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
contract L1ERC20Gateway is L1ArbitrumExtendedGateway {
// used for create2 address calculation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import "./IL1ArbitrumGateway.sol";
/**
* @title Handles deposits from Erhereum into Arbitrum. Tokens are routered to their appropriate L1 gateway (Router itself also conforms to the Gateway itnerface).
* @notice Router also serves as an L1-L2 token address oracle.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
contract L1GatewayRouter is
WhitelistConsumer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import "../../libraries/IWETH9.sol";
import "../../test/TestWETH9.sol";
import "./L1ArbitrumExtendedGateway.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract L1WethGateway is L1ArbitrumExtendedGateway {
using SafeERC20 for IERC20;

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

import "arb-bridge-eth/contracts/libraries/BytesLib.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
library BytesParser {
using BytesLib for bytes;

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

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface ProxySetter {
function beacon() external view returns (address);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity >0.6.0 <0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface ITransferAndCall is IERC20Upgradeable {
function transferAndCall(
address to,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface IWETH9 {
function deposit() external payable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "../arbitrum/IArbToken.sol";

/**
* @title Standard (i.e., non-custom) contract used as a base for different L2 Gateways
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
abstract contract L2GatewayToken is aeERC20, IArbToken {
address public l2Gateway;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "./ITransferAndCall.sol";
/**
* @notice based on Implementation from https://github.com/smartcontractkit/LinkToken/blob/master/contracts/v0.6/ERC677Token.sol
* The implementation doesn't return a bool on onTokenTransfer. This is similar to the proposed 677 standard, but still incompatible - thus we don't refer to it as such.
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
abstract contract TransferAndCallToken is ERC20Upgradeable, ITransferAndCall {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import "./TransferAndCallToken.sol";

/// @title Arbitrum extended ERC20
/// @notice The recommended ERC20 implementation for Layer 2 tokens
/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
/// @dev This implements the ERC20 standard with transferAndCall extenstion/affordances
contract aeERC20 is ERC20PermitUpgradeable, TransferAndCallToken {
using AddressUpgradeable for address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "./L2GatewayToken.sol";
import "./IWETH9.sol";

/// @title Arbitrum extended WETH
/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract aeWETH is L2GatewayToken, IWETH9 {
function initialize(
string memory name_,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
pragma solidity ^0.6.11;

/// @notice this library manages encoding and decoding of gateway communication
/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
library GatewayMessageHandler {
// these are for communication from L1 to L2 gateway

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import "./IGatewayRouter.sol";

/**
* @title Common interface for L1 and L2 Gateway Routers
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
abstract contract GatewayRouter is TokenGateway, IGatewayRouter {
using Address for address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pragma solidity >=0.6.9 <0.9.0;

// import "./ITokenGateway.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface ICustomGateway {
function l1ToL2Token(address _l1Token) external view returns (address _l2Token);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import "./GatewayMessageHandler.sol";

/**
* @title Common interface for L1 and L2 Gateway Routers
* @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
*/
interface IGatewayRouter is ITokenGateway {
function defaultGateway() external view returns (address gateway);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// solhint-disable-next-line compiler-version
pragma solidity >=0.6.9 <0.9.0;

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface ITokenGateway {
/// @notice event deprecated in favor of DepositInitiated and WithdrawalInitiated
// event OutboundTransferInitiated(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pragma solidity ^0.6.11;
import "./ITokenGateway.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
abstract contract TokenGateway is ITokenGateway {
using Address for address;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pragma solidity ^0.6.11;
import "../arbitrum/L2ArbitrumMessenger.sol";
import "arb-bridge-eth/contracts/libraries/AddressAliasHelper.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract AddressMappingTest is L2ArbitrumMessenger {
function getL1AddressTest(address sender) external pure returns (address l1Address) {
return AddressAliasHelper.undoL1ToL2Alias(sender);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pragma solidity ^0.6.11;

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract ArbSysMock {
event ArbSysL2ToL1Tx(address from, address to, uint256 value, bytes data);
uint256 counter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "arb-bridge-eth/contracts/bridge/interfaces/IOutbox.sol";
import "arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol";
import "arb-bridge-eth/contracts/bridge/interfaces/IInbox.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract InboxMock {
address l2ToL1SenderMock = address(0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pragma solidity ^0.6.11;
import "../arbitrum/IArbToken.sol";
import "../libraries/aeERC20.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract TestArbCustomToken is aeERC20, IArbToken {
address public l2Gateway;
address public override l1Address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pragma solidity ^0.6.11;

import "../libraries/BytesParser.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract TestBytesParser {
function bytesToString(bytes memory input)
public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
interface IL1CustomGateway {
function registerTokenToL2(
address _l2Address,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pragma solidity ^0.6.11;
import "../libraries/aeERC20.sol";
import "@openzeppelin/contracts-upgradeable/drafts/ERC20PermitUpgradeable.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract TestERC20 is aeERC20 {
constructor() public {
aeERC20._initialize("IntArbTestToken", "IARB", uint8(18));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pragma solidity ^0.6.11;

import "../libraries/ITransferAndCall.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract L2Called is ITransferAndCallReceiver {
event Called(uint256 num);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "../libraries/IWETH9.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/proxy/ProxyAdmin.sol";

/// @notice DEPRECATED - see new repo(https://github.com/OffchainLabs/token-bridge-contracts) for new updates
contract TestWETH9 is ERC20, IWETH9 {
constructor(string memory name_, string memory symbol_) public ERC20(name_, symbol_) {}

Expand Down

0 comments on commit 5d2c885

Please sign in to comment.