Simplify selector access (#2766)
This commit is contained in:
@ -104,7 +104,7 @@ library ERC165Checker {
|
||||
* Interface identification is specified in ERC-165.
|
||||
*/
|
||||
function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
|
||||
bytes memory encodedParams = abi.encodeWithSelector(IERC165(account).supportsInterface.selector, interfaceId);
|
||||
bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
|
||||
(bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
|
||||
if (result.length < 32) return false;
|
||||
return success && abi.decode(result, (bool));
|
||||
|
||||
Reference in New Issue
Block a user