Technology community sharing | Introducing NFT metadata on Flow

A group of developers, with the help of the Flow core team, has been expanding Cadence's NFT standard to add support for on-chain NFT metadata. We are now happy to announce that this extension is ready to use!

——Pete

⚠️ This is a continuous development standard, and there will be more updates and expansions in the future. You can implement this extension today, but if you want to use the NFT royalty function, we recommend that you wait for the royalty view to be implemented.

Royalty View: https://github.com/onflow/flow-nft/issues/53

This work has been in progress for a few months, so here's a recap:

  • 15 Dec 2021 - @bjartek @briandilley and @bluesign proposed a base standard for metadata, adopted in FLIP-0636.

  • January 4, 2022 - We merged the base standard into Flow NFT's main code repository.

  • 19 Jan 2022 - We defined the first metadata infrastructure for NFT descriptions and thumbnails.

  • January 25, 2022 - The new standard is deployed to Flow's testnet and mainnet.

Why is this criterion important?

  • Ecosystem Network Effects  - It's time to integrate Flow's NFTs. This standard will allow all NFT projects to speak a common language, which will pave the way for their strong integration. We're all running on a shared computer, so let's use that!

  • Better utility for users  - True ownership means users should be able to spend their NFTs anywhere. In the open world we're building, no one wants to be stranded on an island.

  • Less developer frustration  - A common standard removes developer friction and makes it easier to create an NFT that can be used everywhere. No more special cases or hardcoding!

There is a growing NFT ecosystem on Flow consisting of many independent projects. Each item is great on its own, but the true power of any system comes from the sum of its parts. The NFT Base Standard defines the mechanics of NFTs (minting, transferring, etc.), but not how these NFTs look and function in different applications.

We are starting to see the first wave of NFT applications that aggregate multiple projects. Marketplaces like Blocto Bay, Gaia, and Rarible now allow users to trade various NFTs in one place. The Alchemy NFT API provides an index of NFTs on the Flow chain. Wallets like Blocto and Dapper offer a way for users to collect NFTs, while Find allows users to add NFTs to their public profiles. The Metadaba standard enables developers to define how their NFTs are displayed in all these applications.

How NFT metadata works on Flow

Flow is designed to support application composability: the ability for multiple applications to interact with each other and build upon each other. Blockchain systems provide a shared execution state within which composable applications can flourish. For example, on Flow, communication between applications occurs in Cadence function calls rather than HTTP requests.

With this in mind, these are the high-level design goals for NFT metadata:

  • Important data should exist directly on-chain. While it is common practice to store large assets such as images and videos in off-chain storage, other information, such as the characteristics of NFTs, are better suited for on-chain storage. This would allow another Cadence contract to build interesting logic on top of your NFT (ie it was built for composability).

  • Metadata should be flexible. We cannot predict all future use cases for NFTs, so we have defined a standard framework that can be easily extended as new use cases arise. Anyone can propose new metadata formats (called "views").

  • The new standard should be non-destructive. The authors took special care to ensure that the standard does not disrupt existing NFT applications. If you are ready, you can upgrade your NFT contract at any time without breaking your current implementation.

How to implement the NFT metadata standard

We'll be releasing a full developer guide soon, but if you want to get a head start, check out the latest version of the Kitty Items sample app, which already implements the new metadata standard.

As mentioned earlier, if you want to use Royalty View in production, you will have to wait a bit.

join the discussion

As the standard evolves, new metadata views will be discussed in the Flow NFT code repository. Feel free to join our discussion on GitHub!

  • Royalty — Discussions are ongoing on a standard format for metadata for NFT royalties. Royalty is a fee paid to the NFT creator on future sales.

  • Serial Numbers - A proposal to define a metadata view for NFT serial numbers.

Github discussion:  https://github.com/onflow/flow-nft/issues

Here is a related discussion of other views:

  • Collection level view: https://github.com/onflow/flow-nft/issues/62

  • The Listing view used to indicate that an NFT is listed for sale/auction/exchange, etc.: https://github.com/onflow/flow-nft/issues/61

  • A view for representing the rarity of NFTs: https://github.com/onflow/flow-nft/issues/60

  • A view representing an external web address for an NFT to be viewed by humans: https://github.com/onflow/flow-nft/issues/59

  • A view for representing item IDs: https://github.com/onflow/flow-nft/issues/56

Guess you like

Origin blog.csdn.net/weixin_57551966/article/details/125088453