Skip to content

Align xcm configs #1542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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