diff --git a/contracts/utils/introspection/ERC165Checker.sol b/contracts/utils/introspection/ERC165Checker.sol index 4c5fe2092..2b75ba737 100644 --- a/contracts/utils/introspection/ERC165Checker.sol +++ b/contracts/utils/introspection/ERC165Checker.sol @@ -102,6 +102,10 @@ library ERC165Checker { * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. + * + * Some precompiled contracts will falsely indicate support for a given interface, so caution + * should be exercised when using this function. + * * Interface identification is specified in ERC-165. */ function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { diff --git a/docs/modules/api/pages/utils.adoc b/docs/modules/api/pages/utils.adoc index 6d16cfbaf..fda245e67 100644 --- a/docs/modules/api/pages/utils.adoc +++ b/docs/modules/api/pages/utils.adoc @@ -2931,6 +2931,10 @@ See {IERC165-supportsInterface}. Assumes that account contains a contract that supports ERC165, otherwise the behavior of this method is undefined. This precondition can be checked with {supportsERC165}. + +Some precompiled contracts will falsely indicate support for a given interface, so caution +should be exercised when using this function. + Interface identification is specified in ERC-165. :InterfaceImplementerSet: pass:normal[xref:#IERC1820Registry-InterfaceImplementerSet-address-bytes32-address-[`++InterfaceImplementerSet++`]]