docs
docs copied to clipboard
Tip4 2 dynamic nft
I want to propose the concept of Dynamic NFT
When we created the standard, almost everything was done for this, all the changes that I propose are fully backward compatible.
Add optional interface to TIP4.2
interface TIP4_2DYNAMIC_JSON_Metadata {
event MetadataChanged();
event MetadataFrozen(bool frozen);
function metadataFrozen() external view responsible returns (bool frozen);
}
The implementer of TIP4_2DYNAMIC_JSON_Metadata
emit events when Metadata forzen or changes
FAQ
Why I extend TIP4.2 and don't create new TIP 4.X
This logic directly depends on TIP 4.2 as the metadata that are described in TIP4.2. I don't think that it's good idea split standarts to
- TIP4.2 static NFT
- TIP4.X Dynamic NFT
Why event MetadataChanged has no parameters
We can't put the address there, because in theory the metadata can change via an external message.
We can't put the old hash and new hash. Metadata can have link to offchain data that can be changed and hash don't change for this case
We definitely can't push the metadata itself, as it's expensive.
Why event MetadataChanged is optional and not required to be called
Since we may have a link to the offchain part and it may change somehow regardless of the BC, or there may be custom formation logic (for example, from block time), releasing an event for any transaction can be expensive.
Why we can unfreeze and freeze
It seems that it makes no sense to limit in defrosting. For example, while NFT is in the game, it is not frozen, it was brought to the marketplace and frozen. At the same time, we oblige to release metadataFrozen
every time the value changes and when creating an NFT