Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12_ERC721Check 不应用这种方案判断是否是erc721 #111

Closed
0FuzzingQ opened this issue Nov 20, 2023 · 1 comment
Closed

12_ERC721Check 不应用这种方案判断是否是erc721 #111

0FuzzingQ opened this issue Nov 20, 2023 · 1 comment

Comments

@0FuzzingQ
Copy link

0FuzzingQ commented Nov 20, 2023


interface Temp {
    function supportsInterface(bytes4 interfaceId) external pure returns (bool);
}

contract Tmp is Temp {
    function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {
        return true;       
    }
}```

使用:
`
const selectorERC721 = "0x80ac58cd"
const isERC721 = await contractbayc.supportsInterface(selectorERC721)
`
将返回true ,但实际上该合约并不是erc721标准的
@AmazingAng
Copy link
Member

这是根据erc165标准检测的,可以满足绝大多数情况。
一般不会有合约故意实现这个接口。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants