0

Is there any disadvantages of using erc1155 when compared to erc721? I am studying erc1155 and it seems an improved version of erc721. However, I am wondering that if there is any trade-offs of using erc1155 when compared to erc721, for example, gas costs or data size required. Frankly, still many dapps are using erc721 so it makes me doubt erc1155.

1

The main disadvantage is that you cannot query the owner of NFTs on-chain. And there is no way to enumerate tokens on-chain.

4
  • May I ask why erc1155 does not offer the function to query the owner of NFTs? I think it seems possible to query the owner of token whether it is NFT or FT.
    – lagoiz
    Nov 28 '21 at 15:24
  • New question please for that Nov 29 '21 at 3:45
  • the answer is really in the way storage is indexed. there isn't an O(1) way to do this, as some accounts might have one token and others might have hundreds. the upper limit on the number of tokens an erc1155 can have is very large, so getting that information would require a loop. standardized contract operations should stay constant in runtime and storage use
    – zfogg
    Dec 27 '21 at 2:53
  • Incorrect. It is possible to implement all those things as O(1) operations in a similar way to how ERC-721 does it. Dec 28 '21 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.