mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Introduce Fellowship into Collectives (#2186)
* Fellowship into Collectives * cargo.lock * tracks alias * allow to send Fellows origin over XCM * update todos, remove duplication of type * use Collectives location for Fellows body * alias for ranks constants * benchmarks * proxy for Fellowship * docs * correct copyright date * Apply suggestions from code review Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * rustfmt * remove council, update origins * renames * remove tech committee from promote origin * renames * doc nits * weights with new api * sane weights for pallet_scheduler * XCM tweaks for OpenGov (#2305) * updated xcm configs for collectives and statemint * remove xcm send from safe filter * remove prod_or_fast * remove empty line * drop redundant aggregation * remove match arm duplication --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
@@ -65,13 +65,16 @@ use parachains_common::{
|
||||
Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
|
||||
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
};
|
||||
use xcm_config::{KsmLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig};
|
||||
use xcm_config::{
|
||||
FellowshipLocation, GovernanceLocation, KsmLocation, TrustBackedAssetsConvertedConcreteId,
|
||||
XcmConfig,
|
||||
};
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
|
||||
// Polkadot imports
|
||||
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, IsVoiceOfBody};
|
||||
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
||||
use xcm::latest::BodyId;
|
||||
use xcm_executor::XcmExecutor;
|
||||
@@ -228,12 +231,10 @@ parameter_types! {
|
||||
// https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271
|
||||
pub const MetadataDepositBase: Balance = deposit(1, 68);
|
||||
pub const MetadataDepositPerByte: Balance = deposit(0, 1);
|
||||
pub const ExecutiveBody: BodyId = BodyId::Executive;
|
||||
}
|
||||
|
||||
/// We allow root and the Relay Chain council to execute privileged asset operations.
|
||||
pub type AssetsForceOrigin =
|
||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
||||
/// We allow root to execute privileged asset operations.
|
||||
pub type AssetsForceOrigin = EnsureRoot<AccountId>;
|
||||
|
||||
// Called "Trust Backed" assets because these are generally registered by some account, and users of
|
||||
// the asset assume it has some claimed backing. The pallet is called `Assets` in
|
||||
@@ -492,10 +493,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||
type ControllerOrigin = EitherOfDiverse<
|
||||
EnsureRoot<AccountId>,
|
||||
EnsureXcm<(
|
||||
IsMajorityOfBody<KsmLocation, ExecutiveBody>,
|
||||
IsVoiceOfBody<KsmLocation, FellowsBodyId>,
|
||||
)>,
|
||||
EnsureXcm<IsVoiceOfBody<FellowshipLocation, FellowsBodyId>>,
|
||||
>;
|
||||
type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin;
|
||||
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
|
||||
@@ -543,13 +541,10 @@ parameter_types! {
|
||||
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
|
||||
}
|
||||
|
||||
/// We allow root, the Relay Chain council and the StakingAdmin to execute privileged collator selection operations.
|
||||
/// We allow root the StakingAdmin to execute privileged collator selection operations.
|
||||
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
|
||||
EnsureRoot<AccountId>,
|
||||
EnsureXcm<(
|
||||
IsMajorityOfBody<KsmLocation, ExecutiveBody>,
|
||||
IsVoiceOfBody<KsmLocation, StakingAdminBodyId>,
|
||||
)>,
|
||||
EnsureXcm<IsVoiceOfBody<GovernanceLocation, StakingAdminBodyId>>,
|
||||
>;
|
||||
|
||||
impl pallet_collator_selection::Config for Runtime {
|
||||
|
||||
@@ -52,6 +52,8 @@ parameter_types! {
|
||||
pub TrustBackedAssetsPalletLocation: MultiLocation =
|
||||
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
|
||||
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
||||
pub const GovernanceLocation: MultiLocation = MultiLocation::parent();
|
||||
pub const FellowshipLocation: MultiLocation = MultiLocation::parent();
|
||||
}
|
||||
|
||||
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
|
||||
|
||||
Reference in New Issue
Block a user