You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does it make sense for us to introduce a BurnableERC721Token Contract similar to the BurnableToken contract we have for ERC20s? For ERC20 we simply subtract tokens from the balances mapping in StandardToken whereas for the proposed BurnableERC721Token contract we would need to ensure that the specific token ID or index is eliminated. Pulling from this article the steps might look like:
First, we clearApproval(), then remove the token from ownership via removeTokenFrom() and use the Transfer event to alert this change on the front end.
Next, we eliminate the metadata associated with that token by deleting what is mapped to that particular token index.
Lastly, much like removing a token from ownership, we rearrange our allTokens array so that we replace the _tokenId index with the last token in the array.
📈 This is a feature request.
The text was updated successfully, but these errors were encountered:
I think this makes sense, and is something we might want to include for consistency, but would like to first hear from our resident NFT expert @shrugs.
We have an implementation stuck in #957 which has unfortunately been put on hold because of a wide variety of blockers that will eventually be resolved, but if you'd like to cherry-pick the burnable parts of that PR into this one (keeping Vittorio's commit authorship), that would be ❤️
🎉 Description
Does it make sense for us to introduce a BurnableERC721Token Contract similar to the BurnableToken contract we have for ERC20s? For ERC20 we simply subtract tokens from the balances mapping in StandardToken whereas for the proposed BurnableERC721Token contract we would need to ensure that the specific token ID or index is eliminated. Pulling from this article the steps might look like:
First, we clearApproval(), then remove the token from ownership via removeTokenFrom() and use the Transfer event to alert this change on the front end.
Next, we eliminate the metadata associated with that token by deleting what is mapped to that particular token index.
Lastly, much like removing a token from ownership, we rearrange our allTokens array so that we replace the _tokenId index with the last token in the array.
📈 This is a feature request.
The text was updated successfully, but these errors were encountered: