From 3a7c3da4e853148928b05e45772433c9389da1f9 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Thu, 15 Aug 2024 16:55:11 +0200 Subject: [PATCH] Backport pallet info pub to SDK 1.14.0 (#5202) Backporting https://github.com/paritytech/polkadot-sdk/pull/4976 to version 1.14.0. The fields in `PalletInfo` were not `pub` in XCMv4 when they were for XCMv3. --------- Co-authored-by: Juan Ignacio Rios <54085674+JuaniRios@users.noreply.github.com> Co-authored-by: Adrian Catangiu Co-authored-by: Oliver Tale-Yazdi --- Cargo.lock | 6 +++--- polkadot/xcm/Cargo.toml | 2 +- polkadot/xcm/src/v4/mod.rs | 12 ++++++------ prdoc/pr_5202.prdoc | 13 +++++++++++++ 4 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 prdoc/pr_5202.prdoc diff --git a/Cargo.lock b/Cargo.lock index e580f85796a4..3030cd92ac74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13760,7 +13760,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "6.0.0" +version = "5.0.0" dependencies = [ "assert_cmd", "asset-hub-rococo-runtime", @@ -14013,7 +14013,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "15.0.0" +version = "15.0.1" dependencies = [ "assert_matches", "bitflags 1.3.2", @@ -20765,7 +20765,7 @@ version = "2.0.0" [[package]] name = "staging-xcm" -version = "14.0.1" +version = "14.0.2" dependencies = [ "array-bytes", "bounded-collections", diff --git a/polkadot/xcm/Cargo.toml b/polkadot/xcm/Cargo.toml index 36f19e9e55ab..d7be192bd603 100644 --- a/polkadot/xcm/Cargo.toml +++ b/polkadot/xcm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "staging-xcm" description = "The basic XCM datastructures. (polkadot v1.14.0)" -version = "14.0.1" +version = "14.0.2" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/polkadot/xcm/src/v4/mod.rs b/polkadot/xcm/src/v4/mod.rs index 57840562ba3e..2a279f989e9b 100644 --- a/polkadot/xcm/src/v4/mod.rs +++ b/polkadot/xcm/src/v4/mod.rs @@ -231,15 +231,15 @@ parameter_types! { #[derive(Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo, MaxEncodedLen)] pub struct PalletInfo { #[codec(compact)] - index: u32, - name: BoundedVec, - module_name: BoundedVec, + pub index: u32, + pub name: BoundedVec, + pub module_name: BoundedVec, #[codec(compact)] - major: u32, + pub major: u32, #[codec(compact)] - minor: u32, + pub minor: u32, #[codec(compact)] - patch: u32, + pub patch: u32, } impl TryInto for PalletInfo { diff --git a/prdoc/pr_5202.prdoc b/prdoc/pr_5202.prdoc new file mode 100644 index 000000000000..534bae6bab3b --- /dev/null +++ b/prdoc/pr_5202.prdoc @@ -0,0 +1,13 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Add pub to xcm::v4::PalletInfo + +doc: + - audience: Runtime Dev + description: | + Forgot to make v4 PalletInfo fields public. Without them we cannot make use of the struct. + +crates: + - name: staging-xcm + bump: patch