Jump to content

NFT attributes and metadata


julian
 Share

Recommended Posts

Hi, I noticed that all NFTs created using the devnet web wallet are getting additional metadata field with info about the file, description, etc. Is there a way to have custom metadata when using `esdt_nft_create` in SC? Is this somehow related to `attributes` format? If so, what should it look like? I couldn't find any information about that.

Link to comment
Share on other sites

Hello, for the moment you can not add custom metadata via devnet web wallet, we will add this functionality in the future. You can add custom metadata if you create the transaction by yourself and add to the attributes field the desired attributes. The attributes field  should follow the format attribute_name:attribute_value;attribute_name:attribute_value. For more information you can look here (https://docs.elrond.com/developers/nft-tokens/#nftsft-fields)

  • Like 1
Link to comment
Share on other sites

Thanks for the replay. Yes, I use `attributes`, but I thought there was a way to use the `metadata` keyword the same as the `tags` keyword. So, for example if I'll put `tags` into the `attributes` like:

tags:test,test2

then in the API response I will get:

"tags": [
    "test",
    "test2"
  ],

So I thought that there is a pattern for `metadata` too, like `metadata:somethingother` to be able to get metadata: { something: something, other: other } etc, in the API response, as it is in the case of autogenerated `metadata` field when using the devnet web wallet. But this is probably something custom, for now, applicable only for NFT creation using the devnet web wallet, right?

Link to comment
Share on other sites

  • 3 weeks later...

Ok, so I know more now. Maybe it will also be helpful for someone. I also have some new questions.

To sum up: 
- metadata attribute will keep the ipfs cid to the metadata JSON file hosted there, and then the data will be served as 'metadata' through Elrond rest API, right?
- the https://devnet-media.elrond.com/nfts/asset/... is a custom ipfs gateway so that it will serve the image based on fileUri from the metadata JSON file
- all NFTs which will be using proper metadata and ipfs will get the 'isWhitelistedStorage' flag. From what I understood to get the flag, one should host a metadata JSON file and include the fileUri key.

I wonder how the official marketplace will treat NFTs without the 'isWhitelistedStorage' flag. Will there be a possibility to list/buy/sell them anyway? I mean, it is good to tell the user that decentralized hosting is a must, but what if some of the NFT's won't host the metadata file and only image or will be on-chain only, including art pieces. Without going into whether it makes sense or not.

Thanks.

Edited by julian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...