From abcfa3f42e32e3c898eb60804b5b3808251b746e Mon Sep 17 00:00:00 2001 From: AgusDuha <81362284+agusduha@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:04:40 -0300 Subject: [PATCH] fix: add generic factory interface (#14) * test: add L2 standard bridge interop unit tests * fix: add tests natspec * fix: add generic factory interface --- .../src/L2/IOptimismERC20Factory.sol | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/contracts-bedrock/src/L2/IOptimismERC20Factory.sol diff --git a/packages/contracts-bedrock/src/L2/IOptimismERC20Factory.sol b/packages/contracts-bedrock/src/L2/IOptimismERC20Factory.sol new file mode 100644 index 000000000000..0286a8f7b34e --- /dev/null +++ b/packages/contracts-bedrock/src/L2/IOptimismERC20Factory.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @title IOptimismERC20Factory +/// @notice Generic interface for IOptimismMintableERC20Factory and ISuperchainERC20Factory. Used to +/// determine if a ERC20 contract is deployed by a factory. +interface IOptimismERC20Factory { + /// @notice Checks if a ERC20 token is deployed by the factory. + /// @param _token The address of the ERC20 token to check the deployment. + /// @return _remoteToken The address of the remote token if it is deployed or `address(0)` if not. + function deployments(address _token) external view returns (address _remoteToken); +}