Tokens / Managing Unique Characteristics

broadkbroadk Member Posts: 1
Hi,

New to smart contracts so I'm hoping someone can offer an architectural perspective. I'd like to create a new class of token which could be linked to a physical item. As such there will be a limited number of tokens which map to a batch of items. Each item in the batch would be uniquely numbered IRL, e.g. 1 of 10. It's unclear to me whether it is feasible to uniquely describe each token (and give it a unique price) within a single contract or would I be better creating a unique contract for each? Clearly I would prefer the former given their intrinsic physical relationship.

Is there any best practice for this type of use-case?

kind regards
k.

Comments

  • astroastro Member Posts: 16
    When designing your token contract, you could create a token object which contains a uid and other unique descriptors (price, description, etc). That way your code can handle a generic token of your type, but can also inspect the elements of the object to handle any special cases.
Sign In or Register to comment.