Skip to content

Commit

Permalink
Deprecate xcm::body::TREASURER_INDEX constant, use standard Treasury …
Browse files Browse the repository at this point in the history
…varian instead (#3608)

Deprecate the `xcm::body::TREASURER_INDEX` constant and use the standard
Treasury variant from the `xcm::BodyId` type instead.

To align with the production runtimes:
polkadot-fellows/runtimes#149
  • Loading branch information
muharem committed Mar 7, 2024
1 parent de9411a commit 629506c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ parameter_types! {
pub const GovernanceLocation: Location = Location::parent();
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(xcm_constants::body::FELLOWSHIP_ADMIN_INDEX);
pub AssetHub: Location = (Parent, Parachain(1000)).into();
pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX);
pub const TreasurerBodyId: BodyId = BodyId::Treasury;
pub AssetHubUsdtId: AssetId = (PalletInstance(50), GeneralIndex(1984)).into();
pub UsdtAssetHub: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(),
Expand Down
2 changes: 2 additions & 0 deletions polkadot/runtime/westend/constants/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ pub mod xcm {
const ROOT_INDEX: u32 = 0;
// The bodies corresponding to the Polkadot OpenGov Origins.
pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1;
#[deprecated = "Will be removed after August 2024; Use `xcm::latest::BodyId::Treasury` \
instead"]
pub const TREASURER_INDEX: u32 = 2;
}
}
Expand Down
6 changes: 2 additions & 4 deletions polkadot/runtime/westend/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ use runtime_common::{
};
use sp_core::ConstU32;
use westend_runtime_constants::{
currency::CENTS,
system_parachain::*,
xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX},
currency::CENTS, system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX,
};
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down Expand Up @@ -231,7 +229,7 @@ parameter_types! {
// FellowshipAdmin pluralistic body.
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX);
// `Treasurer` pluralistic body.
pub const TreasurerBodyId: BodyId = BodyId::Index(TREASURER_INDEX);
pub const TreasurerBodyId: BodyId = BodyId::Treasury;
}

/// Type to convert the `GeneralAdmin` origin to a Plurality `Location` value.
Expand Down

0 comments on commit 629506c

Please sign in to comment.