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

Commit

Permalink
XCM tweaks for OpenGov (#2305)
Browse files Browse the repository at this point in the history
* updated xcm configs for collectives and statemint

* remove xcm send from safe filter

* remove prod_or_fast

* remove empty line

* drop redundant aggregation
  • Loading branch information
muharem authored Mar 12, 2023
1 parent ed4b336 commit 63796bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 9 additions & 4 deletions parachains/runtimes/assets/statemint/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ match_types! {
MultiLocation { parents: 1, interior: Here } |
MultiLocation { parents: 1, interior: X1(_) }
};
pub type FellowsPlurality: impl Contains<MultiLocation> = {
MultiLocation { parents: 1, interior: X2(Parachain(1001), Plurality { id: BodyId::Technical, ..}) }
};
}

/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
Expand Down Expand Up @@ -177,7 +180,8 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_collator_selection::Call::set_desired_candidates { .. } |
pallet_collator_selection::Call::set_candidacy_bond { .. } |
pallet_collator_selection::Call::register_as_candidate { .. } |
pallet_collator_selection::Call::leave_intent { .. },
pallet_collator_selection::Call::leave_intent { .. } |
pallet_collator_selection::Call::set_invulnerables { .. },
) |
RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
RuntimeCall::XcmpQueue(..) |
Expand Down Expand Up @@ -237,7 +241,8 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_uniques::Call::set_collection_max_supply { .. } |
pallet_uniques::Call::set_price { .. } |
pallet_uniques::Call::buy_item { .. },
) => true,
) |
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) => true,
_ => false,
}
}
Expand All @@ -254,8 +259,8 @@ pub type Barrier = DenyThenTry<
(
// If the message is one that immediately attemps to pay for execution, then allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent and its plurality (i.e. governance bodies) gets free execution.
AllowExplicitUnpaidExecutionFrom<ParentOrParentsPlurality>,
// Parent, its plurality (i.e. governance bodies) and Fellows plurality gets free execution.
AllowExplicitUnpaidExecutionFrom<(ParentOrParentsPlurality, FellowsPlurality)>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentOrSiblings>,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,13 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_collective::Call::disapprove_proposal { .. } |
pallet_collective::Call::close { .. },
) |
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) => true,
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) |
RuntimeCall::FellowshipCollective(
pallet_ranked_collective::Call::add_member { .. } |
pallet_ranked_collective::Call::promote_member { .. } |
pallet_ranked_collective::Call::demote_member { .. } |
pallet_ranked_collective::Call::remove_member { .. },
) => true,
_ => false,
}
}
Expand Down

0 comments on commit 63796bd

Please sign in to comment.