Skip to content

Commit

Permalink
extract paras-registrar
Browse files Browse the repository at this point in the history
  • Loading branch information
asiniscalchi committed Mar 28, 2024
1 parent d609fc6 commit 143dbe8
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 3 deletions.
17 changes: 17 additions & 0 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ members = [
"polkadot/runtime/common/slot_range_helper",
"polkadot/runtime/metrics",
"polkadot/runtime/pallets/paras-sudo-wrapper",
"polkadot/runtime/pallets/paras-registrar",
"polkadot/runtime/parachains",
"polkadot/runtime/rococo",
"polkadot/runtime/rococo/constants",
Expand Down
1 change: 0 additions & 1 deletion polkadot/runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub mod crowdloan;
pub mod elections;
pub mod identity_migrator;
pub mod impls;
pub mod paras_registrar;
pub mod purchase;
pub mod slot_range;
pub mod slots;
Expand Down
51 changes: 51 additions & 0 deletions polkadot/runtime/pallets/paras-registrar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[package]
name = "pallet-paras-registrar"
version = "7.0.0"
authors.workspace = true
edition.workspace = true
license.workspace = true

[lints]
workspace = true

[dependencies]
log = { workspace = true }
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
frame-support = { path = "../../../../substrate/frame/support", default-features = false }
frame-system = { path = "../../../../substrate/frame/system", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../../primitives", default-features = false }
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../../parachains", default-features = false }
xcm = { package = "staging-xcm", path = "../../../xcm", default-features = false }
polkadot-runtime-common = { path = "../../common", default-features = false }

[features]
default = ["std"]
no_std = []
std = [
"frame-support/std",
"frame-system/std",
"parity-scale-codec/std",
"primitives/std",
"runtime-parachains/std",
"scale-info/std",
"sp-std/std",
"sp-runtime/std",
"polkadot-runtime-common/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"primitives/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"runtime-parachains/try-runtime",
"polkadot-runtime-common/try-runtime",
]
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use runtime_parachains::{
};
use sp_std::{prelude::*, result};

use crate::traits::{OnSwap, Registrar};
use polkadot_runtime_common::traits::{OnSwap, Registrar};
pub use pallet::*;
use parity_scale_codec::{Decode, Encode};
use runtime_parachains::paras::{OnNewHead, ParaKind};
Expand Down Expand Up @@ -131,7 +131,7 @@ pub mod pallet {
type Currency: ReservableCurrency<Self::AccountId>;

/// Runtime hook for when a lease holding parachain and on-demand parachain swap.
type OnSwap: crate::traits::OnSwap;
type OnSwap: polkadot_runtime_common::traits::OnSwap;

/// The deposit to be paid to run a on-demand parachain.
/// This should include the cost for storing the genesis head and validation code.
Expand Down

0 comments on commit 143dbe8

Please sign in to comment.