Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Kusama origins as xcm multi_location #6273

Merged
merged 18 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 0 additions & 13 deletions runtime/kusama/constants/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@ pub mod fee {
}
}

/// XCM protocol related constants.
pub mod xcm {
/// Pluralistic bodies existing within the consensus.
pub mod body {
// Preallocated for the Root body.
#[allow(dead_code)]
const ROOT_INDEX: u32 = 0;
// The bodies corresponding to the runtime origins representing a plurality voice given via a referendum.
pub const STAKING_ADMIN_INDEX: u32 = 1;
pub const FELLOWS_INDEX: u32 = 2;
}
}

#[cfg(test)]
mod tests {
use super::{
Expand Down
5 changes: 2 additions & 3 deletions runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use super::{
RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, WeightToFee, XcmPallet,
};
use frame_support::{match_types, parameter_types, traits::Everything};
use kusama_runtime_constants::xcm::body::{FELLOWS_INDEX, STAKING_ADMIN_INDEX};
use runtime_common::{xcm_sender, ToAuthor};
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down Expand Up @@ -156,9 +155,9 @@ impl xcm_executor::Config for XcmConfig {
parameter_types! {
pub const CouncilBodyId: BodyId = BodyId::Executive;
// StakingAdmin pluralistic body.
pub const StakingAdminBodyId: BodyId = BodyId::Index(STAKING_ADMIN_INDEX);
pub const StakingAdminBodyId: BodyId = BodyId::Defence;
// Fellows pluralistic body.
pub const FellowsBodyId: BodyId = BodyId::Index(FELLOWS_INDEX);
pub const FellowsBodyId: BodyId = BodyId::Technical;
}

/// Type to convert the council origin to a Plurality `MultiLocation` value.
Expand Down
6 changes: 6 additions & 0 deletions xcm/src/v0/junction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ pub enum BodyId {
/// The unambiguous judicial body (this doesn't exist on Polkadot, but if it were to get a "grand oracle", it
/// may be considered as that).
Judicial,
/// The unambiguous defence body (for Polkadot, an opinion on the topic given via a public referendum).
Defence,
/// The unambiguous administration body (for Polkadot, an opinion on the topic given via a public referendum).
muharem marked this conversation as resolved.
Show resolved Hide resolved
Administration,
/// The unambiguous treasury body (for Polkadot, an opinion on the topic given via a public referendum).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments in the parentheses are all wrong for all 3 of these variants.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you advice?

muharem marked this conversation as resolved.
Show resolved Hide resolved
Treasury,
}

/// A part of a pluralistic body.
Expand Down