Skip to content

Commit

Permalink
Align xcm configs (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiguantong authored Jul 19, 2024
1 parent ebd695a commit 6bb4ab8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion runtime/crab/src/pallets/polkadot_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ pub type Barrier = xcm_builder::TrailingSetTopicAsId<
xcm_builder::AllowTopLevelPaidExecutionFrom<frame_support::traits::Everything>,
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
// get free execution.
xcm_builder::AllowUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
xcm_builder::AllowExplicitUnpaidExecutionFrom<
xcm_config::ParentOrParentsPlurality,
>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<xcm_config::ParentRelayOrSiblingParachains>,
),
Expand Down
7 changes: 4 additions & 3 deletions runtime/darwinia/src/pallets/polkadot_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ frame_support::parameter_types! {
pub const MaxInstructions: u32 = 100;
/// A temporary weight value for each XCM instruction.
/// NOTE: This should be removed after we account for PoV weights.
pub const TempFixedXcmWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(1_000_000_000, 0);
pub SelfReserve: Location = Location::new(
0,
[PalletInstance(<Balances as frame_support::traits::PalletInfoAccess>::index() as u8)]
Expand Down Expand Up @@ -120,7 +121,7 @@ pub type Barrier = xcm_builder::TrailingSetTopicAsId<(
xcm_builder::AllowTopLevelPaidExecutionFrom<frame_support::traits::Everything>,
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
// get free execution.
xcm_builder::AllowUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
xcm_builder::AllowExplicitUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<xcm_config::ParentRelayOrSiblingParachains>,
),
Expand Down Expand Up @@ -226,7 +227,7 @@ impl xcm_executor::Config for XcmExecutorConfig {
type UniversalAliases = frame_support::traits::Nothing;
// Teleporting is disabled.
type UniversalLocation = UniversalLocation;
type Weigher = XcmWeigher;
type Weigher = xcm_builder::FixedWeightBounds<TempFixedXcmWeight, RuntimeCall, MaxInstructions>;
type XcmSender = XcmRouter;
}

Expand All @@ -247,7 +248,7 @@ impl pallet_xcm::Config for Runtime {
type SovereignAccountOf = LocationToAccountId;
type TrustedLockers = ();
type UniversalLocation = UniversalLocation;
type Weigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
type Weigher = XcmWeigher;
type WeightInfo = pallet_xcm::TestWeightInfo;
type XcmExecuteFilter = frame_support::traits::Everything;
type XcmExecutor = xcm_executor::XcmExecutor<XcmExecutorConfig>;
Expand Down
2 changes: 2 additions & 0 deletions runtime/koi/src/pallets/polkadot_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ pub type Barrier = xcm_builder::TrailingSetTopicAsId<(
// If the message is one that immediately attemps to pay for execution, then
// allow it.
xcm_builder::AllowTopLevelPaidExecutionFrom<frame_support::traits::Everything>,
// Parent, its pluralities (i.e. governance bodies), and the Fellows plurality
// get free execution.
xcm_builder::AllowExplicitUnpaidExecutionFrom<xcm_config::ParentOrParentsPlurality>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<xcm_config::ParentRelayOrSiblingParachains>,
Expand Down

0 comments on commit 6bb4ab8

Please sign in to comment.