mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 03:41:02 +00:00
Fix pallet's integration (#13056)
This commit is contained in:
@@ -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-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-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
|
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-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" }
|
||||||
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }
|
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }
|
||||||
|
|
||||||
@@ -38,6 +39,7 @@ std = [
|
|||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"log/std",
|
"log/std",
|
||||||
"scale-info/std",
|
"scale-info/std",
|
||||||
|
"sp-core/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1767,3 +1767,5 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $);
|
||||||
|
|||||||
@@ -272,15 +272,15 @@ pub enum MintType<CollectionId> {
|
|||||||
#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
|
#[derive(Clone, Copy, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
|
||||||
pub struct MintSettings<Price, BlockNumber, CollectionId> {
|
pub struct MintSettings<Price, BlockNumber, CollectionId> {
|
||||||
/// Whether anyone can mint or if minters are restricted to some subset.
|
/// 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.
|
/// An optional price per mint.
|
||||||
pub(super) price: Option<Price>,
|
pub price: Option<Price>,
|
||||||
/// When the mint starts.
|
/// When the mint starts.
|
||||||
pub(super) start_block: Option<BlockNumber>,
|
pub start_block: Option<BlockNumber>,
|
||||||
/// When the mint ends.
|
/// When the mint ends.
|
||||||
pub(super) end_block: Option<BlockNumber>,
|
pub end_block: Option<BlockNumber>,
|
||||||
/// Default settings each item will get during the mint.
|
/// 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> {
|
impl<Price, BlockNumber, CollectionId> Default for MintSettings<Price, BlockNumber, CollectionId> {
|
||||||
@@ -315,11 +315,11 @@ pub enum PalletAttributes<CollectionId> {
|
|||||||
)]
|
)]
|
||||||
pub struct CollectionConfig<Price, BlockNumber, CollectionId> {
|
pub struct CollectionConfig<Price, BlockNumber, CollectionId> {
|
||||||
/// Collection's settings.
|
/// Collection's settings.
|
||||||
pub(super) settings: CollectionSettings,
|
pub settings: CollectionSettings,
|
||||||
/// Collection's max supply.
|
/// Collection's max supply.
|
||||||
pub(super) max_supply: Option<u32>,
|
pub max_supply: Option<u32>,
|
||||||
/// Default settings each item will get during the mint.
|
/// 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> {
|
impl<Price, BlockNumber, CollectionId> CollectionConfig<Price, BlockNumber, CollectionId> {
|
||||||
|
|||||||
Reference in New Issue
Block a user