rmrk-team / rmrk-substrate

[WIP] RMRK Substrate pallets
https://rmrk.app
Other
74 stars 36 forks source link

Add MarketplaceHooks and MarketFee traits & upgrade to Polkadot v0.9.37 #276

Open HashWarlock opened 1 year ago

HashWarlock commented 1 year ago

Description

Currently the Market pallet has no way to check if the type of NFT can be sold (i.e. Stakepool v2 NFTs vs PhalaWorld Shell NFTs). To resolve this, there are an introduction to 2 new traits called MarketplaceHooks and MarketFee which will hold the standard market fee percentage constant in the MarketFee trait and the MarketplaceHooks will implement 3 functions called calculate_market_fee(amount) calculate_royalty_fee(amount, royalty_fee) and can_list_or_buy_in_market(collections_id, nft_id) that will help prevent NFTs from being listed that are not eligible for the marketplace.

Targets