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

Allow treasury to send XCM calls #19

Closed
wants to merge 5 commits into from
Closed
Changes from 4 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
11 changes: 9 additions & 2 deletions relay/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

use super::{
parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, Fellows, ParaId, Runtime,
RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, TransactionByteFee, WeightToFee,
XcmPallet,
RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, TransactionByteFee, Treasurer,
WeightToFee, XcmPallet,
};
use frame_support::{
match_types, parameter_types,
Expand Down Expand Up @@ -353,6 +353,8 @@ parameter_types! {
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
// Fellows pluralistic body.
pub const FellowsBodyId: BodyId = BodyId::Technical;
// Treasurer pluralistic body.
pub const TreasurerBodyId: BodyId = BodyId::Treasury;
}

#[cfg(feature = "runtime-benchmarks")]
Expand All @@ -374,13 +376,18 @@ pub type StakingAdminToPlurality =
/// Type to convert the Fellows origin to a Plurality `MultiLocation` value.
pub type FellowsToPlurality = OriginToPluralityVoice<RuntimeOrigin, Fellows, FellowsBodyId>;

/// Type to convert the Treasury origin to a Plurality `MultiLocation` value.
pub type TreasurerToPlurality = OriginToPluralityVoice<RuntimeOrigin, Treasurer, TreasurerBodyId>;

/// Type to convert a pallet `Origin` type value into a `MultiLocation` value which represents an interior location
/// of this chain for a destination chain.
pub type LocalPalletOriginToLocation = (
// StakingAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value.
StakingAdminToPlurality,
// Fellows origin to be used in XCM as a corresponding Plurality `MultiLocation` value.
FellowsToPlurality,
// Treasurer origin to be used in XCM as a corresponding Plurality `MultiLocation` value.
TreasurerToPlurality,
);

impl pallet_xcm::Config for Runtime {
Expand Down