mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Introduce OpenGov into Polkadot (#6701)
* OpenGov for Polkadot * Integrate OpenGov into XCM * Formatting * Missing files * Remove Gov1 from Kusama * Fixes * Update runtime/polkadot/src/governance/origins.rs Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> * Revert scheduler origin changes * Fixes * Docs * Remove todo * Docs * Move Fellowship to Collectives (#6718) * FellowshipAdmin origin over xcm * accept Fellows origin from Collectives * remove Fellowship * remove unreachable arm * define benchmarks * correct comment for DOLLARS constant * Add OpenGov Calls to Proxy Definitions (#6729) * add opengov calls to proxy definitions * fix build * Update runtime/polkadot/src/governance/mod.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update runtime/polkadot/src/governance/tracks.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update runtime/polkadot/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update runtime/polkadot/src/governance/origins.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update runtime/polkadot/src/governance/mod.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update old.rs * Update old.rs * weights with new api * XCM tweaks for OpenGov (#6855) * pass xcm origin, allow unpaid form Collectives and Fellows, whitelist call * unpaid execution only for Fellows * Apply suggestions from code review Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * rename const namespace to system_parachains * remove prod_or_fast --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * remove unused import --------- Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: parity-processbot <> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
@@ -17,9 +17,8 @@
|
||||
//! XCM configurations for the Kusama runtime.
|
||||
|
||||
use super::{
|
||||
parachains_origin, AccountId, AllPalletsWithSystem, Balances, CouncilCollective, Fellows,
|
||||
ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, WeightToFee,
|
||||
XcmPallet,
|
||||
parachains_origin, AccountId, AllPalletsWithSystem, Balances, Fellows, ParaId, Runtime,
|
||||
RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, WeightToFee, XcmPallet,
|
||||
};
|
||||
use frame_support::{
|
||||
match_types, parameter_types,
|
||||
@@ -31,8 +30,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, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
|
||||
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds,
|
||||
@@ -200,49 +199,6 @@ impl Contains<RuntimeCall> for SafeCallFilter {
|
||||
RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
|
||||
RuntimeCall::Grandpa(..) |
|
||||
RuntimeCall::ImOnline(..) |
|
||||
RuntimeCall::Democracy(
|
||||
pallet_democracy::Call::second { .. } |
|
||||
pallet_democracy::Call::vote { .. } |
|
||||
pallet_democracy::Call::emergency_cancel { .. } |
|
||||
pallet_democracy::Call::fast_track { .. } |
|
||||
pallet_democracy::Call::veto_external { .. } |
|
||||
pallet_democracy::Call::cancel_referendum { .. } |
|
||||
pallet_democracy::Call::delegate { .. } |
|
||||
pallet_democracy::Call::undelegate { .. } |
|
||||
pallet_democracy::Call::clear_public_proposals { .. } |
|
||||
pallet_democracy::Call::unlock { .. } |
|
||||
pallet_democracy::Call::remove_vote { .. } |
|
||||
pallet_democracy::Call::remove_other_vote { .. } |
|
||||
pallet_democracy::Call::blacklist { .. } |
|
||||
pallet_democracy::Call::cancel_proposal { .. },
|
||||
) |
|
||||
RuntimeCall::Council(
|
||||
pallet_collective::Call::vote { .. } |
|
||||
pallet_collective::Call::close_old_weight { .. } |
|
||||
pallet_collective::Call::disapprove_proposal { .. } |
|
||||
pallet_collective::Call::close { .. },
|
||||
) |
|
||||
RuntimeCall::TechnicalCommittee(
|
||||
pallet_collective::Call::vote { .. } |
|
||||
pallet_collective::Call::close_old_weight { .. } |
|
||||
pallet_collective::Call::disapprove_proposal { .. } |
|
||||
pallet_collective::Call::close { .. },
|
||||
) |
|
||||
RuntimeCall::PhragmenElection(
|
||||
pallet_elections_phragmen::Call::remove_voter { .. } |
|
||||
pallet_elections_phragmen::Call::submit_candidacy { .. } |
|
||||
pallet_elections_phragmen::Call::renounce_candidacy { .. } |
|
||||
pallet_elections_phragmen::Call::remove_member { .. } |
|
||||
pallet_elections_phragmen::Call::clean_defunct_voters { .. },
|
||||
) |
|
||||
RuntimeCall::TechnicalMembership(
|
||||
pallet_membership::Call::add_member { .. } |
|
||||
pallet_membership::Call::remove_member { .. } |
|
||||
pallet_membership::Call::swap_member { .. } |
|
||||
pallet_membership::Call::change_key { .. } |
|
||||
pallet_membership::Call::set_prime { .. } |
|
||||
pallet_membership::Call::clear_prime { .. },
|
||||
) |
|
||||
RuntimeCall::Treasury(..) |
|
||||
RuntimeCall::ConvictionVoting(..) |
|
||||
RuntimeCall::Referenda(
|
||||
@@ -377,7 +333,6 @@ impl xcm_executor::Config for XcmConfig {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const CouncilBodyId: BodyId = BodyId::Executive;
|
||||
// StakingAdmin pluralistic body.
|
||||
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
|
||||
// Fellows pluralistic body.
|
||||
@@ -389,19 +344,9 @@ 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
|
||||
SignedToAccountId32<RuntimeOrigin, AccountId, ThisNetwork>,
|
||||
);
|
||||
@@ -416,9 +361,6 @@ pub type FellowsToPlurality = OriginToPluralityVoice<RuntimeOrigin, Fellows, Fel
|
||||
/// 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 = (
|
||||
// We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality of the
|
||||
// `Unit` body.
|
||||
CouncilToPlurality,
|
||||
// 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.
|
||||
|
||||
Reference in New Issue
Block a user