Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Fix NFTs pallet's integration issues #13056

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frame/nfts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive"
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" }
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
sp-core = { version = "7.0.0", default-features = false, path = "../../primitives/core" }
sp-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" }
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }

Expand All @@ -38,6 +39,7 @@ std = [
"frame-system/std",
"log/std",
"scale-info/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
]
Expand Down
2 changes: 2 additions & 0 deletions frame/nfts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1767,3 +1767,5 @@ pub mod pallet {
}
}
}

sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $);
16 changes: 8 additions & 8 deletions frame/nfts/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@ pub enum MintType<CollectionId> {
#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub struct MintSettings<Price, BlockNumber, CollectionId> {
/// Whether anyone can mint or if minters are restricted to some subset.
pub(super) mint_type: MintType<CollectionId>,
pub mint_type: MintType<CollectionId>,
/// An optional price per mint.
pub(super) price: Option<Price>,
pub price: Option<Price>,
/// When the mint starts.
pub(super) start_block: Option<BlockNumber>,
pub start_block: Option<BlockNumber>,
/// When the mint ends.
pub(super) end_block: Option<BlockNumber>,
pub end_block: Option<BlockNumber>,
/// Default settings each item will get during the mint.
pub(super) default_item_settings: ItemSettings,
pub default_item_settings: ItemSettings,
}

impl<Price, BlockNumber, CollectionId> Default for MintSettings<Price, BlockNumber, CollectionId> {
Expand Down Expand Up @@ -315,11 +315,11 @@ pub enum PalletAttributes<CollectionId> {
)]
pub struct CollectionConfig<Price, BlockNumber, CollectionId> {
/// Collection's settings.
pub(super) settings: CollectionSettings,
pub settings: CollectionSettings,
/// Collection's max supply.
pub(super) max_supply: Option<u32>,
pub max_supply: Option<u32>,
/// Default settings each item will get during the mint.
pub(super) mint_settings: MintSettings<Price, BlockNumber, CollectionId>,
pub mint_settings: MintSettings<Price, BlockNumber, CollectionId>,
}

impl<Price, BlockNumber, CollectionId> CollectionConfig<Price, BlockNumber, CollectionId> {
Expand Down