diff --git a/contracts/L2Token.sol b/contracts/L2Token.sol index dc5508d..2d5d44c 100644 --- a/contracts/L2Token.sol +++ b/contracts/L2Token.sol @@ -77,9 +77,11 @@ contract L2Token is AbstractToken, IOptimismMintableERC20 { /// @return Whether or not the interface is supported by this contract. function supportsInterface(bytes4 _interfaceId) public pure virtual override(AbstractToken, IERC165) returns (bool) { bytes4 iface1 = type(IERC165).interfaceId; + // Interface corresponding to the legacy L2StandardERC20. + bytes4 iface2 = type(ILegacyMintableERC20).interfaceId; // Interface corresponding to the updated OptimismMintableERC20 (this contract). - bytes4 iface2 = type(IOptimismMintableERC20).interfaceId; - return _interfaceId == iface1 || _interfaceId == iface2; + bytes4 iface3 = type(IOptimismMintableERC20).interfaceId; + return _interfaceId == iface1 || _interfaceId == iface2 || _interfaceId == iface3; } /// @custom:legacy @@ -95,4 +97,16 @@ contract L2Token is AbstractToken, IOptimismMintableERC20 { function bridge() public view virtual override(IOptimismMintableERC20) returns (address) { return BRIDGE; } + + /// @custom:legacy + /// @notice Legacy getter for the remote token. Use REMOTE_TOKEN going forward. + function l1Token() public virtual view returns (address) { + return REMOTE_TOKEN; + } + + /// @custom:legacy + /// @notice Legacy getter for the bridge. Use BRIDGE going forward. + function l2Bridge() public virtual view returns (address) { + return BRIDGE; + } }