Skip to content

Commit

Permalink
kusama: General Admin to Location mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
muharem committed Jul 15, 2024
1 parent c5080e4 commit ad92061
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions relay/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
//! XCM configurations for the Kusama runtime.

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

/// Type to convert an `Origin` type value into a `Location` value which represents an interior
Expand All @@ -250,9 +252,15 @@ pub type StakingAdminToPlurality =
/// Type to convert the Fellows origin to a Plurality `Location` value.
pub type FellowsToPlurality = OriginToPluralityVoice<RuntimeOrigin, Fellows, FellowsBodyId>;

/// Type to convert the `GeneralAdmin` origin to a Plurality `Location` value.
pub type GeneralAdminToPlurality =
OriginToPluralityVoice<RuntimeOrigin, GeneralAdmin, GeneralAdminBodyId>;

/// Type to convert a pallet `Origin` type value into a `Location` value which represents an
/// interior location of this chain for a destination chain.
pub type LocalPalletOrSignedOriginToLocation = (
// GeneralAdmin origin to be used in XCM as a corresponding Plurality `Location` value.
GeneralAdminToPlurality,
// StakingAdmin origin to be used in XCM as a corresponding Plurality `Location` value.
StakingAdminToPlurality,
// Fellows origin to be used in XCM as a corresponding Plurality `Location` value.
Expand Down

0 comments on commit ad92061

Please sign in to comment.