nft-contracts icon indicating copy to clipboard operation
nft-contracts copied to clipboard

NFTExtension interface conformance doesn't check anything

Open caffeinum opened this issue 3 years ago • 1 comments

Given INFTExtension interface is empty, the ERC165 check for that is always true.

https://github.com/buildship-dev/nft-contracts/blob/2f33f71c05266b45b1f1e3fb80e421087dd8f5b7/contracts/factory/extensions/INFTExtension.sol#L6-L7

Which means addExtension check doesn't check anything: https://github.com/buildship-dev/nft-contracts/blob/2f33f71c05266b45b1f1e3fb80e421087dd8f5b7/contracts/factory/MetaverseNFT.sol#L201-L205

caffeinum avatar Mar 12 '22 07:03 caffeinum

Possible solutions are:

  • including some specific field like keccak("nftfactory.nftextension")
  • including name or type view function

caffeinum avatar Mar 12 '22 08:03 caffeinum