ZRC-7 is officially in place: What does this mean for our NFTs?
In early Feb 2022, we introduced and requested public feedback on ZRC-7: The Metadata standard for Zilliqa’s NFTs and creator economy. ZRC-7 complements NFT standards, i.e., ZRC-1 and ZRC-6 by providing a structured format to describe the functionalities of a given NFT.
Greetings all,
In early Feb 2022, we introduced and requested public feedback on ZRC-7: The Metadata standard for Zilliqa’s NFTs and creator economy. ZRC-7 complements NFT standards, i.e., ZRC-1 and ZRC-6 by providing a structured format to describe the functionalities of a given NFT. This effectively means that developers in the Zilliqa can follow a unified structure for NFTs, enabling better composability (FYI — Compostability refers to a token’s ability to be seamlessly inter-operable between various protocols).
We have since received great feedback from the community and have incorporated the required changes into ZRC-7. Now, we’re happy to share that the ZRC-7 has been finalised as an official standard for the Zilliqa ecosystem. Details can be found on Github.
ZRC-7 Specifications: https://github.com/Zilliqa/ZRC/blob/master/zrcs/zrc-7.md
What’s been updated?
1. Support for multiple resources
As the NFT ecosystem matures, an NFT may contain multiple resources e.g., an NFT featuring a house may have 2D and 3D models in various different angles. As such, the metadata structure has been modified to support multiple resources.
2. Support for MIME type and integrity for attributes
Today, NFT attributes are mostly text descriptions. But there may be other use cases that go beyond the textual description. One example is a music NFT. An audio file can have multiple attributes such as front cover, back cover, lyrics, photographs and additional materials.
To support use cases like these, we have added the following attributes:
- MIME types — Describes type of resource, e.g., PDF, JPEG
- Integrity — Built for the user to verify that the resource has not been tampered with
3. Transitions
Each NFT token may have additional transitions available to the token owner. An NFT representing a real estate property may require additional transitions within the NFT contract such as “Pay mortgage” or “Rent” operations. Having such information embedded within the Metadata will allow frontends to easily render all available transitions that the token holder can call.
4. Data URL
Under the Token URI section, we have added a Data URL as one of the possible token URI. With Data URL, it is possible to store metadata on-chain. One of the possible use cases is the burning of NFT. Upon burning of NFT, the on-chain metadata can be pruned away too. Similarly for resources within the metadata, it now also supports Data URL.
*However, developers should be aware of potential gas consumption and ensure that the Data URL is optimal and does not consume too much contract storage space.
Improvements to ZRC-6
Since the finalisation of ZRC-6, we’ve continued to receive great feedback from the Zilliqa community, and actioned some of the changes within the token standard.
What has been updated?
- Adding “token_owner” to the events emitted by the following transitions
- “SetSpender”
- “AddOperator”
- “RemoveOperator”
(This update will provide more verbose information for events emitted. It will be useful for use cases like NFT indexer and frontend interacting with ZRC-6 contracts)
2. Support Data URL for token URI