Skip to content

Commit ee8faaa

Browse files
authored
test: fix superc20 interface test (#125)
1 parent 6fbf9db commit ee8faaa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/contracts-bedrock/test/L2/OptimismSuperchainERC20.t.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol";
77

88
// Libraries
99
import { Predeploys } from "src/libraries/Predeploys.sol";
10-
import { IERC20Solady as IERC20 } from "src/vendor/interfaces/IERC20Solady.sol";
1110

1211
import { Initializable } from "@openzeppelin/contracts-v5/proxy/utils/Initializable.sol";
1312
import { IERC165 } from "@openzeppelin/contracts-v5/utils/introspection/IERC165.sol";
13+
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
14+
import { IERC7802 } from "src/L2/interfaces/IERC7802.sol";
1415
import { IBeacon } from "@openzeppelin/contracts-v5/proxy/beacon/IBeacon.sol";
1516
import { BeaconProxy } from "@openzeppelin/contracts-v5/proxy/beacon/BeaconProxy.sol";
1617
import { Unauthorized } from "src/libraries/errors/CommonErrors.sol";
@@ -248,13 +249,17 @@ contract OptimismSuperchainERC20Test is Test {
248249
/// @notice Tests that the `supportsInterface` function returns true for the `ISuperchainERC20` interface.
249250
function test_supportInterface_succeeds() public view {
250251
assertTrue(optimismSuperchainERC20.supportsInterface(type(IERC165).interfaceId));
252+
assertTrue(optimismSuperchainERC20.supportsInterface(type(IERC20).interfaceId));
253+
assertTrue(optimismSuperchainERC20.supportsInterface(type(IERC7802).interfaceId));
251254
assertTrue(optimismSuperchainERC20.supportsInterface(type(IOptimismSuperchainERC20).interfaceId));
252255
}
253256

254257
/// @notice Tests that the `supportsInterface` function returns false for any other interface than the
255258
/// `ISuperchainERC20` one.
256259
function testFuzz_supportInterface_returnFalse(bytes4 _interfaceId) public view {
257260
vm.assume(_interfaceId != type(IERC165).interfaceId);
261+
vm.assume(_interfaceId != type(IERC20).interfaceId);
262+
vm.assume(_interfaceId != type(IERC7802).interfaceId);
258263
vm.assume(_interfaceId != type(IOptimismSuperchainERC20).interfaceId);
259264
assertFalse(optimismSuperchainERC20.supportsInterface(_interfaceId));
260265
}

0 commit comments

Comments
 (0)