Commit f63cba6f authored by Disco's avatar Disco Committed by GitHub

fix: flake tests (#11742)

* fix: add optimism mintable check on assume address helper

* fix: mock interfaces checks

* chore: remove unused import

---------
Co-authored-by: default avatar0xng <87835144+0xng@users.noreply.github.com>
parent 34101091
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { IOptimismMintableERC20 } from "src/universal/IOptimismMintableERC20.sol"; import { IOptimismMintableERC20 } from "src/universal/IOptimismMintableERC20.sol";
import { ILegacyMintableERC20 } from "src/universal/OptimismMintableERC20.sol";
// TODO: Replace Predeploys.OPTIMISM_SUPERCHAIN_ERC20_FACTORY with optimismSuperchainERC20Factory // TODO: Replace Predeploys.OPTIMISM_SUPERCHAIN_ERC20_FACTORY with optimismSuperchainERC20Factory
import { Predeploys } from "src/libraries/Predeploys.sol"; import { Predeploys } from "src/libraries/Predeploys.sol";
...@@ -80,7 +81,7 @@ contract L2StandardBridgeInterop_LegacyToSuper_Test is L2StandardBridgeInterop_T ...@@ -80,7 +81,7 @@ contract L2StandardBridgeInterop_LegacyToSuper_Test is L2StandardBridgeInterop_T
// Mock `_from` to be a legacy address // Mock `_from` to be a legacy address
_mockInterface(_from, type(IERC165).interfaceId, true); _mockInterface(_from, type(IERC165).interfaceId, true);
_mockInterface(_from, type(IOptimismMintableERC20).interfaceId, true); _mockInterface(_from, type(ILegacyMintableERC20).interfaceId, true);
} }
/// @notice Test that the `convert` function with different decimals reverts /// @notice Test that the `convert` function with different decimals reverts
...@@ -230,6 +231,11 @@ contract L2StandardBridgeInterop_SuperToLegacy_Test is L2StandardBridgeInterop_T ...@@ -230,6 +231,11 @@ contract L2StandardBridgeInterop_SuperToLegacy_Test is L2StandardBridgeInterop_T
// Mock same decimals // Mock same decimals
_mockDecimals(_from, 18); _mockDecimals(_from, 18);
_mockDecimals(_to, 18); _mockDecimals(_to, 18);
// Mock `_from` so it is not a LegacyMintableERC20 address
_mockInterface(_from, type(IERC165).interfaceId, true);
_mockInterface(_from, type(ILegacyMintableERC20).interfaceId, false);
_mockInterface(_from, type(IOptimismMintableERC20).interfaceId, false);
} }
/// @notice Test that the `convert` function with different decimals reverts /// @notice Test that the `convert` function with different decimals reverts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment