mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 05:41:07 +00:00
XCM: Replace council XCM origin with general admin (#7633)
* XCM: Replace council XCM origin with general admin * Fixes * Fixes * Update runtime/polkadot/src/xcm_config.rs Co-authored-by: ordian <write@reusable.software> * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: ordian <write@reusable.software> Co-authored-by: command-bot <>
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
//! XCM configuration for Rococo.
|
||||
|
||||
use super::{
|
||||
parachains_origin, AccountId, AllPalletsWithSystem, Balances, CouncilCollective, Dmp, ParaId,
|
||||
Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmPallet,
|
||||
parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, ParaId, Runtime,
|
||||
RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmPallet,
|
||||
};
|
||||
use frame_support::{
|
||||
match_types, parameter_types,
|
||||
@@ -36,8 +36,8 @@ use sp_core::ConstU32;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, BackingToPlurality,
|
||||
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
||||
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
|
||||
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
|
||||
MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
|
||||
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
|
||||
@@ -322,33 +322,15 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type Aliasers = Nothing;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const CollectiveBodyId: BodyId = BodyId::Unit;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const CouncilBodyId: BodyId = BodyId::Executive;
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
parameter_types! {
|
||||
pub ReachableDest: Option<MultiLocation> = Some(Parachain(1000).into());
|
||||
}
|
||||
|
||||
/// Type to convert the council origin to a Plurality `MultiLocation` value.
|
||||
pub type CouncilToPlurality = BackingToPlurality<
|
||||
RuntimeOrigin,
|
||||
pallet_collective::Origin<Runtime, CouncilCollective>,
|
||||
CouncilBodyId,
|
||||
>;
|
||||
|
||||
/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior
|
||||
/// location of this chain.
|
||||
pub type LocalOriginToLocation = (
|
||||
// We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality
|
||||
// of the `Unit` body.
|
||||
CouncilToPlurality,
|
||||
// And a usual Signed origin to be used in XCM as a corresponding AccountId32
|
||||
// A usual Signed origin to be used in XCM as a corresponding AccountId32
|
||||
SignedToAccountId32<RuntimeOrigin, AccountId, ThisNetwork>,
|
||||
);
|
||||
impl pallet_xcm::Config for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user