Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract pallet-paras-sudo-wrapper into a Separate Crate Trasparently #3882

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 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 @@ -195,6 +195,7 @@ members = [
"polkadot/primitives/test-helpers",
"polkadot/rpc",
"polkadot/runtime/common",
"polkadot/runtime/common/pallets/paras-sudo-wrapper",
"polkadot/runtime/common/slot_range_helper",
"polkadot/runtime/metrics",
"polkadot/runtime/parachains",
Expand Down
4 changes: 4 additions & 0 deletions polkadot/runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ libsecp256k1 = { version = "0.7.0", default-features = false }
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }

slot-range-helper = { path = "slot_range_helper", default-features = false }
pallet-paras-sudo-wrapper = { path = "pallets/paras-sudo-wrapper", default-features = false }
xcm = { package = "staging-xcm", path = "../../xcm", default-features = false }
xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false, optional = true }
xcm-builder = { package = "staging-xcm-builder", path = "../../xcm/xcm-builder", default-features = false }
Expand Down Expand Up @@ -90,6 +91,7 @@ std = [
"pallet-election-provider-multi-phase/std",
"pallet-fast-unstake/std",
"pallet-identity/std",
"pallet-paras-sudo-wrapper/std",
"pallet-session/std",
"pallet-staking-reward-fn/std",
"pallet-staking/std",
Expand Down Expand Up @@ -130,6 +132,7 @@ runtime-benchmarks = [
"pallet-election-provider-multi-phase/runtime-benchmarks",
"pallet-fast-unstake/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
"pallet-paras-sudo-wrapper/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
Expand All @@ -154,6 +157,7 @@ try-runtime = [
"pallet-election-provider-multi-phase/try-runtime",
"pallet-fast-unstake/try-runtime",
"pallet-identity/try-runtime",
"pallet-paras-sudo-wrapper/try-runtime",
"pallet-session/try-runtime",
"pallet-staking/try-runtime",
"pallet-timestamp/try-runtime",
Expand Down
45 changes: 45 additions & 0 deletions polkadot/runtime/common/pallets/paras-sudo-wrapper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "pallet-paras-sudo-wrapper"
version = "7.0.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
description = "Polkadot paras sudo wrapper pallet"

[lints]
workspace = true

[dependencies]
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 = { package = "sp-std", path = "../../../../../substrate/primitives/std", 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 }

[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",
"xcm/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"primitives/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"runtime-parachains/try-runtime",
]
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

//! A simple wrapper allowing `Sudo` to call into `paras` routines.

#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
pub use pallet::*;
Expand Down
3 changes: 2 additions & 1 deletion polkadot/runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub mod elections;
pub mod identity_migrator;
pub mod impls;
pub mod paras_registrar;
pub mod paras_sudo_wrapper;
pub mod purchase;
pub mod slot_range;
pub mod slots;
Expand Down Expand Up @@ -63,6 +62,8 @@ pub use sp_runtime::BuildStorage;
/// Implementations of some helper traits passed into runtime modules as associated types.
pub use impls::ToAuthor;

pub use pallet_paras_sudo_wrapper as paras_sudo_wrapper;

pub type NegativeImbalance<T> = <pallet_balances::Pallet<T> as Currency<
<T as frame_system::Config>::AccountId,
>>::NegativeImbalance;
Expand Down
Loading