怎么判断合约是否erc 1155标准呢

佬大,看了您说了怎么判断一个合约是erc20还是erc721

请先 登录 后评论

最佳答案 2021-10-17 10:05

调用 supportsInterface(0xd9b67a26) 如果是 1155 会返回 true 。

这个 1155的要求: Smart contracts implementing the ERC-1155 standard MUST implement the ERC-165 supportsInterface function and MUST return the constant value true if 0xd9b67a26 is passed through the interfaceID argument.

请先 登录 后评论

其它 1 个回答

joaries
请先 登录 后评论
  • 3 关注
  • 1 收藏,4456 浏览
  • daijun168 提出于 2021-10-15 14:44