From ae925080a0c42611bfd8fe22a12de679a0a1a1e9 Mon Sep 17 00:00:00 2001 From: Meet Mangukiya Date: Mon, 10 Jun 2024 12:31:38 +0530 Subject: [PATCH] chore: use type.interfaceId and also support IEIP165 interface --- src/COWShedResolver.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/COWShedResolver.sol b/src/COWShedResolver.sol index b26a8f4..c4da54c 100644 --- a/src/COWShedResolver.sol +++ b/src/COWShedResolver.sol @@ -5,6 +5,7 @@ import { INameResolver, IReverseRegistrar, IENS, IAddrResolver, ENS, ADDR_REVERSE_NODE, sha3HexAddress } from "./ens.sol"; import { LibString } from "solady/utils/LibString.sol"; +import { IERC165 } from "forge-std/interfaces/IERC165.sol"; abstract contract COWShedResolver is INameResolver, IAddrResolver { /// @notice maps the `.` node to the user address @@ -44,7 +45,8 @@ abstract contract COWShedResolver is INameResolver, IAddrResolver { } function supportsInterface(bytes4 interfaceId) external pure returns (bool) { - return interfaceId == IAddrResolver.addr.selector || interfaceId == INameResolver.name.selector; + return interfaceId == type(IAddrResolver).interfaceId || interfaceId == type(INameResolver).interfaceId + || interfaceId == type(IERC165).interfaceId; } function _setReverseNode(address user, address proxy) internal {