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

Commit

Permalink
Fix pallet's integration (#13056)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsidorenko authored Jan 4, 2023
1 parent 6e52d60 commit 18ead61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
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

0 comments on commit 18ead61

Please sign in to comment.