3

I'm prototyping an asset management system using private blockchain and one of the main event is adding a new asset to the system. I was thinking about creating a new token when the asset is added to the system and assign the token to the owner of the contract by default. Is it a good practice to create a new ERC721 token as needed?

3

The ERC721 standard has no requirements about when tokens can or can't be created, so you're free implement token minting functions as you see fit.

However, if you are implementing an ERC721 token contract for asset management, it probably does makes sense to mint new ones as assets are added to the system.

The only alternative would be to pre-mint a bunch of tokens and have them sit there, not assigned to an asset. But then you'd have a whole lot of pointless tokens in your ecosystem mixed in with the useful assigned ones, and unless you pre-minted millions of them you'll probably run out eventually too.

So yes, creating them as needed would probably be sensible.

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.