Add warning for supportsERC165InterfaceUnchecked edge case (#4017)

(cherry picked from commit d13ec90f37)
This commit is contained in:
Yamen Merhi
2023-02-03 21:15:41 +02:00
committed by Francisco Giordano
parent c018c9cf36
commit 9b610d3db4

View File

@ -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) {