From e3965eb5678520fe920e2318c09ad28f74a2faf7 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Rios <54085674+JuaniRios@users.noreply.github.com> Date: Thu, 18 Jul 2024 21:35:00 +0200 Subject: [PATCH] Add `pub` to xcm::v4::PalletInfo (#4976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v3 PalletInfo had the fields public, but not v4. Any reason why? I need the PalletInfo fields public so I can read the values and do some logic based on that at Polimec @franciscoaguirre If this could be backported would be highly appreciated 🙏🏻 --------- Co-authored-by: Adrian Catangiu Co-authored-by: Oliver Tale-Yazdi --- polkadot/xcm/src/v4/mod.rs | 12 ++++++------ prdoc/pr_4976.prdoc | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 prdoc/pr_4976.prdoc diff --git a/polkadot/xcm/src/v4/mod.rs b/polkadot/xcm/src/v4/mod.rs index 57840562ba3e4..2a279f989e9b2 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_4976.prdoc b/prdoc/pr_4976.prdoc new file mode 100644 index 0000000000000..72b7b92bc47f7 --- /dev/null +++ b/prdoc/pr_4976.prdoc @@ -0,0 +1,15 @@ +# 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 + validate: false +