Skip to content
Snippets Groups Projects
Unverified Commit 629506ce authored by Muharem Ismailov's avatar Muharem Ismailov Committed by GitHub
Browse files

Deprecate xcm::body::TREASURER_INDEX constant, use standard Treasury 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:
https://github.com/polkadot-fellows/runtimes/pull/149
parent de9411aa
No related merge requests found
Pipeline #452928 passed with stages
in 45 minutes and 2 seconds
...@@ -59,7 +59,7 @@ parameter_types! { ...@@ -59,7 +59,7 @@ parameter_types! {
pub const GovernanceLocation: Location = Location::parent(); pub const GovernanceLocation: Location = Location::parent();
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(xcm_constants::body::FELLOWSHIP_ADMIN_INDEX); pub const FellowshipAdminBodyId: BodyId = BodyId::Index(xcm_constants::body::FELLOWSHIP_ADMIN_INDEX);
pub AssetHub: Location = (Parent, Parachain(1000)).into(); 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 AssetHubUsdtId: AssetId = (PalletInstance(50), GeneralIndex(1984)).into();
pub UsdtAssetHub: LocatableAssetId = LocatableAssetId { pub UsdtAssetHub: LocatableAssetId = LocatableAssetId {
location: AssetHub::get(), location: AssetHub::get(),
......
...@@ -130,6 +130,8 @@ pub mod xcm { ...@@ -130,6 +130,8 @@ pub mod xcm {
const ROOT_INDEX: u32 = 0; const ROOT_INDEX: u32 = 0;
// The bodies corresponding to the Polkadot OpenGov Origins. // The bodies corresponding to the Polkadot OpenGov Origins.
pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1; 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; pub const TREASURER_INDEX: u32 = 2;
} }
} }
......
...@@ -34,9 +34,7 @@ use runtime_common::{ ...@@ -34,9 +34,7 @@ use runtime_common::{
}; };
use sp_core::ConstU32; use sp_core::ConstU32;
use westend_runtime_constants::{ use westend_runtime_constants::{
currency::CENTS, currency::CENTS, system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX,
system_parachain::*,
xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX},
}; };
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
...@@ -231,7 +229,7 @@ parameter_types! { ...@@ -231,7 +229,7 @@ parameter_types! {
// FellowshipAdmin pluralistic body. // FellowshipAdmin pluralistic body.
pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX); pub const FellowshipAdminBodyId: BodyId = BodyId::Index(FELLOWSHIP_ADMIN_INDEX);
// `Treasurer` pluralistic body. // `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. /// Type to convert the `GeneralAdmin` origin to a Plurality `Location` value.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment