Unverified Commit 3aaf62ad authored by alexd10s's avatar alexd10s Committed by GitHub
Browse files

Trading trait and deal with metadata in Mutate trait for nonfungibles_v2 (#1561)

I have added some Traits that are missing and are useful for dealing
with non-fungible tokens on other pallets and their implementations for
NFTs pallet.

- In the Mutate trait, added methods for dealing with the metadata:
`set_metadata`, `set_collection_metadata`, `clear_metadata` and
`clear_collection_metadata`.
The motivation of adding this methods coming from a StackExchange
question asking for it: [Setting metadata of an item of the Nfts pallet
in a custom
pallet](https://substrate.stackexchange.com/questions/9974/setting-metadata-of-an-item-of-the-nfts-pallet-in-a-custom-pallet)

- A Trait for trading non-fungible items. The methods in that Trait are
`buy_item`, `set_price` and `item_price`
An example of where this Trait can be useful is a pallet that deals with
[NFT
Royalties](https://forum.polkadot.network/t/nfts-royalty-pallet/3766

)
and needs to perform this actions.

---------

Co-authored-by: default avatarJegor Sidorenko <[email protected]>
parent d3ea69b7
Pipeline #402120 passed with stages
in 52 minutes and 25 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment