From 1a3a17c229a97c335e6d5473b0a2e9334d73ffd6 Mon Sep 17 00:00:00 2001 From: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> Date: Wed, 4 Jan 2023 10:30:12 +0200 Subject: [PATCH] Fix pallet's integration (#13056) --- frame/nfts/Cargo.toml | 2 ++ frame/nfts/src/lib.rs | 2 ++ frame/nfts/src/types.rs | 16 ++++++++-------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/frame/nfts/Cargo.toml b/frame/nfts/Cargo.toml index 109dffdd10f50..d2cdb48532fd0 100644 --- a/frame/nfts/Cargo.toml +++ b/frame/nfts/Cargo.toml @@ -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" } @@ -38,6 +39,7 @@ std = [ "frame-system/std", "log/std", "scale-info/std", + "sp-core/std", "sp-runtime/std", "sp-std/std", ] diff --git a/frame/nfts/src/lib.rs b/frame/nfts/src/lib.rs index 2006d78959c4d..dbd2c2048155a 100644 --- a/frame/nfts/src/lib.rs +++ b/frame/nfts/src/lib.rs @@ -1767,3 +1767,5 @@ pub mod pallet { } } } + +sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $); diff --git a/frame/nfts/src/types.rs b/frame/nfts/src/types.rs index 58b1acaaedf42..9b89fb964b316 100644 --- a/frame/nfts/src/types.rs +++ b/frame/nfts/src/types.rs @@ -272,15 +272,15 @@ pub enum MintType { #[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] pub struct MintSettings { /// Whether anyone can mint or if minters are restricted to some subset. - pub(super) mint_type: MintType, + pub mint_type: MintType, /// An optional price per mint. - pub(super) price: Option, + pub price: Option, /// When the mint starts. - pub(super) start_block: Option, + pub start_block: Option, /// When the mint ends. - pub(super) end_block: Option, + pub end_block: Option, /// Default settings each item will get during the mint. - pub(super) default_item_settings: ItemSettings, + pub default_item_settings: ItemSettings, } impl Default for MintSettings { @@ -315,11 +315,11 @@ pub enum PalletAttributes { )] pub struct CollectionConfig { /// Collection's settings. - pub(super) settings: CollectionSettings, + pub settings: CollectionSettings, /// Collection's max supply. - pub(super) max_supply: Option, + pub max_supply: Option, /// Default settings each item will get during the mint. - pub(super) mint_settings: MintSettings, + pub mint_settings: MintSettings, } impl CollectionConfig {