Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/contracts-bedrock/scripts/L2Genesis.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ contract L2Genesis is Deployer {
setL2ToL2CrossDomainMessenger(); // 23
setSuperchainWETH(); // 24
setETHLiquidity(); // 25
setOptimismSuperchainERC20Factory(); // 26
setOptimismSuperchainERC20Beacon(); // 27
setSuperchainTokenBridge(); // 28
}
}
Expand Down
2 changes: 0 additions & 2 deletions packages/contracts-bedrock/src/libraries/Predeploys.sol
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ library Predeploys {
|| _addr == L1_FEE_VAULT || _addr == SCHEMA_REGISTRY || _addr == EAS || _addr == GOVERNANCE_TOKEN
|| (_useInterop && _addr == CROSS_L2_INBOX) || (_useInterop && _addr == L2_TO_L2_CROSS_DOMAIN_MESSENGER)
|| (_useInterop && _addr == SUPERCHAIN_WETH) || (_useInterop && _addr == ETH_LIQUIDITY)
|| (_useInterop && _addr == OPTIMISM_SUPERCHAIN_ERC20_FACTORY)
|| (_useInterop && _addr == OPTIMISM_SUPERCHAIN_ERC20_BEACON)
|| (_useInterop && _addr == SUPERCHAIN_TOKEN_BRIDGE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";
contract OptimismSuperchainERC20BeaconTest is CommonTest {
/// @notice Sets up the test suite.
function setUp() public override {
// Skip the test until OptimismSuperchainERC20Beacon is integrated again
vm.skip(true);

super.enableInterop();
super.setUp();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ contract OptimismSuperchainERC20FactoryTest is CommonTest {

/// @notice Sets up the test suite.
function setUp() public override {
// Skip the test until OptimismSuperchainERC20Factory is integrated again
vm.skip(true);

super.enableInterop();
super.setUp();
}
Expand Down
29 changes: 17 additions & 12 deletions packages/contracts-bedrock/test/L2/SuperchainTokenBridge.t.sol
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
pragma solidity 0.8.25;

// Testing utilities
import { CommonTest } from "test/setup/CommonTest.sol";
import { Test } from "forge-std/Test.sol";

// Libraries
import { Predeploys } from "src/libraries/Predeploys.sol";
import { IL2ToL2CrossDomainMessenger } from "interfaces/L2/IL2ToL2CrossDomainMessenger.sol";

// Target contract
import { SuperchainTokenBridge } from "src/L2/SuperchainTokenBridge.sol";
import { ISuperchainTokenBridge } from "interfaces/L2/ISuperchainTokenBridge.sol";
import { ISuperchainERC20 } from "interfaces/L2/ISuperchainERC20.sol";
import { IOptimismSuperchainERC20Factory } from "interfaces/L2/IOptimismSuperchainERC20Factory.sol";
import { IERC20 } from "@openzeppelin/contracts/interfaces/IERC20.sol";
import { IERC7802 } from "interfaces/L2/IERC7802.sol";
import { MockSuperchainERC20Implementation } from "test/mocks/SuperchainERC20Implementation.sol";

/// @title SuperchainTokenBridgeTest
/// @notice Contract for testing the SuperchainTokenBridge contract.
contract SuperchainTokenBridgeTest is CommonTest {
contract SuperchainTokenBridgeTest is Test {
address internal constant ZERO_ADDRESS = address(0);
string internal constant NAME = "SuperchainERC20";
string internal constant SYMBOL = "OSE";
Expand All @@ -32,17 +34,20 @@ contract SuperchainTokenBridgeTest is CommonTest {
event RelayERC20(address indexed token, address indexed from, address indexed to, uint256 amount, uint256 source);

ISuperchainERC20 public superchainERC20;
ISuperchainTokenBridge public superchainTokenBridge;

/// @notice Sets up the test suite.
function setUp() public override {
super.enableInterop();
super.setUp();

superchainERC20 = ISuperchainERC20(
IOptimismSuperchainERC20Factory(Predeploys.OPTIMISM_SUPERCHAIN_ERC20_FACTORY).deploy(
REMOTE_TOKEN, NAME, SYMBOL, 18
)
);
function setUp() public {
vm.etch(Predeploys.SUPERCHAIN_TOKEN_BRIDGE, address(new SuperchainTokenBridge()).code);
superchainTokenBridge = ISuperchainTokenBridge(Predeploys.SUPERCHAIN_TOKEN_BRIDGE);
superchainERC20 = ISuperchainERC20(address(new MockSuperchainERC20Implementation()));

// Skip the initialization until OptimismSuperchainERC20Factory is integrated again
// superchainERC20 = ISuperchainERC20(
// IOptimismSuperchainERC20Factory(Predeploys.OPTIMISM_SUPERCHAIN_ERC20_FACTORY).deploy(
// REMOTE_TOKEN, NAME, SYMBOL, 18
// )
// );
}

/// @notice Helper function to setup a mock and expect a call to it.
Expand Down