Skip to content

Commit

Permalink
chore: use type.interfaceId and also support IEIP165 interface
Browse files Browse the repository at this point in the history
  • Loading branch information
meetmangukiya committed Jun 10, 2024
1 parent c07bf75 commit ae92508
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/COWShedResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<proxy-address>.<base-name>` node to the user address
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ae92508

Please sign in to comment.