forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trading trait and deal with metadata in Mutate trait for nonfungibles…
…_v2 (paritytech#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: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
- Loading branch information
1 parent
6ed16bd
commit cabc74c
Showing
4 changed files
with
153 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters