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

Deprecate xcm::body::TREASURER_INDEX constant, use standard Treasury varian instead #149

Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fixed the lowering of Asset Hub existential deposits.
- MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169)
- Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137))
- Deprecate the `xcm::body::TREASURER_INDEX` constant and use the standard `Treasury` variant from the `xcm::BodyId` type instead ([polkadot-fellows/runtimes#149](https://github.com/polkadot-fellows/runtimes/pull/149))

### Removed

Expand Down
2 changes: 2 additions & 0 deletions relay/polkadot/constants/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ pub mod xcm {
// The bodies corresponding to the Polkadot OpenGov Origins.
pub const FELLOWSHIP_ADMIN_INDEX: u32 = 1;
// The body corresponding to the Treasurer OpenGov track.
#[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 relay/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ use frame_support::{
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use polkadot_runtime_constants::{
currency::CENTS,
system_parachain::*,
xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX},
currency::CENTS, system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX,
};
use runtime_common::{
xcm_sender::{ChildParachainRouter, ExponentialPrice},
Expand Down Expand Up @@ -238,7 +236,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 `MultiLocation` value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use parachains_common::{
xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains},
};
use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_constants::{system_parachain, xcm as xcm_constants};
use polkadot_runtime_constants::system_parachain;
use sp_runtime::traits::AccountIdConversion;
use system_parachains_constants::TREASURY_PALLET_ID;
use xcm::latest::prelude::*;
Expand Down Expand Up @@ -58,7 +58,7 @@ parameter_types! {
pub const GovernanceLocation: MultiLocation = MultiLocation::parent();
pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into();
pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating();
pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX);
pub const TreasurerBodyId: BodyId = BodyId::Treasury;
}

/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
Expand Down
Loading