1

I am doing research on using the erc721 interface to represent a digital good on an exchange. For simplicity's sake, let's say that these goods are a digital representation of a collectible card game (e.g. Magic the Gathering).

It is my understanding that each erc721 token will be unique. But taking the card game example, what if each product is not necessarily unique (has the same functionality)? For instance, if there are 20 of the same card in existence and each is owned by a separate address. Would erc721 be useful for such a situation?

My thinking is that each card of the same type would have a different ID, but the same metadata pertaining to the card's functionality or description. Any input on whether I'm on the right track is greatly appreciated.

0

If you plan to use ERC721, I recommend that you look at the ERC721 Standard EIP on GitHub as it's the only true authoritative source on ERC721.

To answer your question, yes you could use ERC721 for a trading-card type game. With regards to the ID, each ERC721 token (in this case, each individual card) must have its own unique tokenId, which doesn't change for the life of the card, and which is a uint256. You never have to expose this tokenId on the frontend of your dapp (ie, you don't have to put it on the actual picture of the card if you don't want to), but it's important for the way ERC721 tracks ownership of cards.

That's really the only requirement from ERC721 regarding uniqueness. As you said, you can assign the same metadata to two unique tokens and it doesn't breach the standard. You may also add extra properties or functionality which aren't mentioned by the standard, as long as it doesn't breach any of the specifications set out in the link I provided above.

The purpose of the ERC721 standard is just to allow your non-fungible asset to be easily used by other developers and incorporated into their apps, dapps or other contracts (think wallets, marketplaces, etc) without knowing your whole codebase.

0

Just in case someone lands here looking for answers. As per ERC721 each and every token (object represented by that token e.g. a Kitty) is unique. So even if there are exactly two objects of same attributes, they will be considered unique because they have different 'id' on the contract. Using 721MetaData interface to identify similar objects may not be a good idea because that interface 721MetaData is optional to be implemented by a 721 token. Another standard and approach is being recommended in the form of ERC420. This looks a very valid scenario. I haven't gone in details of their code yet. But if you want to make some similar tokens non-unique and others unique this is the best bet so far.

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.