Skip to content

Commit

Permalink
add pallet-kitties to runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi committed Sep 1, 2024
1 parent 2964428 commit 4129751
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions polkadot-sdk-minimal-template/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions polkadot-sdk-minimal-template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ resolver = "2"
[workspace.dependencies]
minimal-template-runtime = { path = "./runtime", default-features = false }
pallet-minimal-template = { path = "./pallets/template", default-features = false }
pallet-kitties = { path = "../substrate-collectables-workshop", default-features = false }
clap = { version = "4.5.3" }
docify = { version = "0.2.8" }
frame = { version = "0.6.0", default-features = false, package = "polkadot-sdk-frame" }
Expand Down
2 changes: 2 additions & 0 deletions polkadot-sdk-minimal-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pallet-transaction-payment-rpc-runtime-api.workspace = true
sp-genesis-builder.workspace = true
sp-runtime = { features = ["serde"], workspace = true }
pallet-minimal-template.workspace = true
pallet-kitties.workspace = true

[build-dependencies]
substrate-wasm-builder = { optional = true, workspace = true, default-features = true }
Expand All @@ -40,6 +41,7 @@ std = [
"pallet-transaction-payment/std",

"pallet-minimal-template/std",
"pallet-kitties/std",

"sp-genesis-builder/std",
"sp-runtime/std",
Expand Down
10 changes: 10 additions & 0 deletions polkadot-sdk-minimal-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ mod runtime {
/// A minimal pallet template.
#[runtime::pallet_index(5)]
pub type Template = pallet_minimal_template::Pallet<Runtime>;

/// A kitties nft marketplace pallet.
#[runtime::pallet_index(6)]
pub type Kitties = pallet_kitties::Pallet<Runtime>;
}

parameter_types! {
Expand Down Expand Up @@ -165,6 +169,12 @@ impl pallet_transaction_payment::Config for Runtime {
// Implements the types required for the template pallet.
impl pallet_minimal_template::Config for Runtime {}

impl pallet_kitties::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type NativeBalance = Balances;
}


type Block = frame::runtime::types_common::BlockOf<Runtime, SignedExtra>;
type Header = HeaderFor<Runtime>;

Expand Down

0 comments on commit 4129751

Please sign in to comment.