Post
Share your knowledge.
Should Metadata be Owned, Shared, or Frozen in Sui Move?
I'm working on creating a new coin using Sui Move, and I'm not sure whether to make the Metadata object owned, shared, or frozen. I'm leaning towards freezing it, but I'm curious about the consequences of each choice. Can freezing the Metadata object cause any problems aside from making it unchangeable, and are there any drawbacks to having it as owned or shared?
- Move CLI
- Move
Answers
2Having the Metadata object as owned means that even though it's visible from a full node, it won't be accessible inside MoveVM, preventing certain use cases like a DEX that might need to aggregate coin information. Freezing the Metadata object provides security and assures users that its details will remain constant, which can be crucial depending on your use case.
Freezing the Metadata object is generally recommended since it ensures that no one, including you as the issuer, can change it. This guarantees the token's trustworthiness and stability for users If you make it shared, it becomes vulnerable as anyone would be able to change the Metadata, which is not ideal for maintaining the integrity of the coin.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.