1

I have a custom pallet that makes calls to the Nfts pallet to create collections and mint NFTs. The problem is that I can't find a way to set the metadata of a token. I do see something like set_typed_attribute being available in the Mutate trait, but is this really the same? The Rust documentation doesn't make me much wiser.

What I expected to find is something similar to fungibles::metadata::Mutate, which provides set to set metadata on fungible assets.

Therefore I'm very confused about how I can set metadata on items of the Nfts pallet. I'd highly appreciate if someone could put me on the right track.

1
  • Hi Arjan, thanks a lot for pointing out this problem. We've added it to the backlog and will try to add the missing trait in a priority way! Sep 19, 2023 at 7:13

1 Answer 1

2

You can use now set_item_metadata and set_collection_metadata to set the metadata of a token or a collection.

This trait has been added recently in this PR: Trading trait and deal with metadata in Mutate trait for nonfungibles_v2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.