Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove superchain erc20 base #70

Merged
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
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@
},
"src/L2/OptimismSuperchainERC20.sol": {
"initCodeHash": "0x749dacbd29aad60c71c1e1878b21854c796759fb7a5ddc549b96ab9e39bb62b8",
"sourceCodeHash": "0xabd50b1b74d00aae459352899da16d937b6809699dd17c0b42c46cfd0e9a201d"
"sourceCodeHash": "0xd067ddabbeb6fe1c3886100b16c905b57dfd44f5e6e893323217fe4e642285d4"
},
"src/L2/OptimismSuperchainERC20Beacon.sol": {
"initCodeHash": "0x99ce8095b23c124850d866cbc144fee6cee05dbc6bb5d83acadfe00b90cf42c7",
"sourceCodeHash": "0x5e58b7c867fafa49fe39d68d83875425e9cf94f05f2835bdcdaa08fc8bc6b68e"
},
"src/L2/OptimismSuperchainERC20Factory.sol": {
"initCodeHash": "0x43ec413140b05bfb83ec453b0d4f82b33a2d560bf8c76405d08de17565b87053",
"sourceCodeHash": "0x3dc742f350bf100f92fd32769c99668cddf1f9cf6782dcff0bb1243b7c7ed186"
"sourceCodeHash": "0x1e8e1262a549ce7e24e19174a998716ceb9a3034296b456914d74b4cb4f40caa"
},
"src/L2/SequencerFeeVault.sol": {
"initCodeHash": "0x2e6551705e493bacba8cffe22e564d5c401ae5bb02577a5424e0d32784e13e74",
Expand Down
10 changes: 5 additions & 5 deletions packages/contracts-bedrock/src/L2/OptimismSuperchainERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { Initializable } from "@openzeppelin/contracts-v5/proxy/utils/Initializa
/// @title OptimismSuperchainERC20
/// @notice OptimismSuperchainERC20 is a standard extension of the base ERC20 token contract that unifies ERC20 token
/// bridging to make it fungible across the Superchain. This construction allows the L2StandardBridge to burn
/// and mint tokens. This makes it possible to convert a valid OptimismMintableERC20 token to a SuperchainERC20
/// token, turning it fungible and interoperable across the superchain. Likewise, it also enables the inverse
/// conversion path.
/// and mint tokens. This makes it possible to convert a valid OptimismMintableERC20 token to a
/// OptimismSuperchainERC20 token, turning it fungible and interoperable across the superchain. Likewise, it
/// also enables the inverse conversion path.
/// Moreover, it builds on top of the L2ToL2CrossDomainMessenger for both replay protection and domain binding.
contract OptimismSuperchainERC20 is ERC20, Initializable, ERC165, IOptimismSuperchainERC20Extension, ISemver {
/// @notice Storage slot that the OptimismSuperchainERC20Metadata struct is stored at.
Expand Down Expand Up @@ -81,7 +81,7 @@ contract OptimismSuperchainERC20 is ERC20, Initializable, ERC165, IOptimismSuper
_storage.decimals = _decimals;
}

/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge bridges to mint tokens.
/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge to mint tokens.
/// @param _to Address to mint tokens to.
/// @param _amount Amount of tokens to mint.
function mint(address _to, uint256 _amount) external virtual onlyAuthorizedBridge {
Expand All @@ -92,7 +92,7 @@ contract OptimismSuperchainERC20 is ERC20, Initializable, ERC165, IOptimismSuper
emit Mint(_to, _amount);
}

/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge bridges to burn tokens.
/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge to burn tokens.
/// @param _from Address to burn tokens from.
/// @param _amount Amount of tokens to burn.
function burn(address _from, uint256 _amount) external virtual onlyAuthorizedBridge {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract OptimismSuperchainERC20Factory is IOptimismSuperchainERC20Factory, ISem
mapping(address superchainToken => address remoteToken) public deployments;

/// @notice Emitted when an OptimismSuperchainERC20 is deployed.
/// @param superchainToken Address of the SuperchainERC20 deployment.
/// @param superchainToken Address of the OptimismSuperchainERC20 deployment.
/// @param remoteToken Address of the corresponding token on the remote chain.
/// @param deployer Address of the account that deployed the token.
event OptimismSuperchainERC20Created(
Expand Down
49 changes: 0 additions & 49 deletions packages/contracts-bedrock/src/L2/SuperchainERC20.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ interface IOptimismSuperchainERC20Errors {

/// @title IOptimismSuperchainERC20Extension
/// @notice This interface is available on the OptimismSuperchainERC20 contract.
/// We declare it as a separate interface so that it can be used in
/// custom implementations of SuperchainERC20.
interface IOptimismSuperchainERC20Extension is IOptimismSuperchainERC20Errors {
/// @notice Emitted whenever tokens are minted for an account.
/// @param account Address of the account tokens are being minted for.
Expand All @@ -30,12 +28,12 @@ interface IOptimismSuperchainERC20Extension is IOptimismSuperchainERC20Errors {
/// @param amount Amount of tokens burned.
event Burn(address indexed account, uint256 amount);

/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge bridges to mint tokens.
/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge to mint tokens.
/// @param _to Address to mint tokens to.
/// @param _amount Amount of tokens to mint.
function mint(address _to, uint256 _amount) external;

/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge bridges to burn tokens.
/// @notice Allows the L2StandardBridge and SuperchainERC20Bridge to burn tokens.
/// @param _from Address to burn tokens from.
/// @param _amount Amount of tokens to burn.
function burn(address _from, uint256 _amount) external;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Interfaces
import { IERC20Solady } from "src/vendor/interfaces/IERC20Solady.sol";

/// @title ISuperchainERC20Errors
/// @notice Interface containing the errors added in the SuperchainERC20 implementation.
interface ISuperchainERC20Errors {
Expand Down Expand Up @@ -49,7 +46,3 @@ interface ISuperchainERC20Extensions is ISuperchainERC20Errors {
/// @param _amount Amount of tokens to relay.
function relayERC20(address _from, address _to, uint256 _amount) external;
}

/// @title ISuperchainERC20
/// @notice Combines Solady's ERC20 interface with the SuperchainERC20Extensions interface.
interface ISuperchainERC20 is IERC20Solady, ISuperchainERC20Extensions { }
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ contract L2StandardBridgeInterop_Test is Bridge_Initializer {
}
}

/// @notice Test suite when converting from a legacy token to a SuperchainERC20 token
/// @notice Test suite when converting from a legacy token to a OptimismSuperchainERC20 token
contract L2StandardBridgeInterop_LegacyToSuper_Test is L2StandardBridgeInterop_Test {
/// @notice Set up the test for converting from a legacy token to a SuperchainERC20 token
/// @notice Set up the test for converting from a legacy token to a OptimismSuperchainERC20 token
function _setUpLegacyToSuper(address _from, address _to) internal {
// Assume
_assumeAddress(_from);
Expand Down Expand Up @@ -212,9 +212,9 @@ contract L2StandardBridgeInterop_LegacyToSuper_Test is L2StandardBridgeInterop_T
}
}

/// @notice Test suite when converting from a SuperchainERC20 token to a legacy token
/// @notice Test suite when converting from a OptimismSuperchainERC20 token to a legacy token
contract L2StandardBridgeInterop_SuperToLegacy_Test is L2StandardBridgeInterop_Test {
/// @notice Set up the test for converting from a SuperchainERC20 token to a legacy token
/// @notice Set up the test for converting from a OptimismSuperchainERC20 token to a legacy token
function _setUpSuperToLegacy(address _from, address _to) internal {
// Assume
_assumeAddress(_from);
Expand Down
223 changes: 0 additions & 223 deletions packages/contracts-bedrock/test/L2/SuperchainERC20.t.sol

This file was deleted.

Loading