Skip to content

Commit

Permalink
Remove DenyReserveTransferToRelayChain
Browse files Browse the repository at this point in the history
  • Loading branch information
jiguantong committed May 21, 2024
1 parent a4465e1 commit 1baf268
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 48 deletions.
43 changes: 19 additions & 24 deletions runtime/darwinia/src/pallets/polkadot_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,34 +109,29 @@ pub type XcmOriginToTransactDispatchOrigin = (
pallet_xcm::XcmPassthrough<RuntimeOrigin>,
);

pub type Barrier = xcm_builder::TrailingSetTopicAsId<
xcm_builder::DenyThenTry<
xcm_builder::DenyReserveTransferToRelayChain,
pub type Barrier = xcm_builder::TrailingSetTopicAsId<(
xcm_builder::TakeWeightCredit,
xcm_builder::WithComputedOrigin<
(
xcm_builder::TakeWeightCredit,
xcm_builder::WithComputedOrigin<
(
// 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::AllowUnpaidExecutionFrom<
darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality,
>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<
darwinia_common_runtime::xcm_configs::ParentOrSiblings,
>,
),
UniversalLocation,
ConstU32<8>,
// 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::AllowUnpaidExecutionFrom<
darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality,
>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<
darwinia_common_runtime::xcm_configs::ParentOrSiblings,
>,
// Expected responses are OK.
xcm_builder::AllowKnownQueryResponses<PolkadotXcm>,
),
UniversalLocation,
ConstU32<8>,
>,
>;
// Expected responses are OK.
xcm_builder::AllowKnownQueryResponses<PolkadotXcm>,
)>;

frame_support::parameter_types! {
pub const MaxAssetsIntoHolding: u32 = 64;
Expand Down
43 changes: 19 additions & 24 deletions runtime/pangolin/src/pallets/polkadot_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,34 +109,29 @@ pub type XcmOriginToTransactDispatchOrigin = (
pallet_xcm::XcmPassthrough<RuntimeOrigin>,
);

pub type Barrier = xcm_builder::TrailingSetTopicAsId<
xcm_builder::DenyThenTry<
xcm_builder::DenyReserveTransferToRelayChain,
pub type Barrier = xcm_builder::TrailingSetTopicAsId<(
xcm_builder::TakeWeightCredit,
xcm_builder::WithComputedOrigin<
(
xcm_builder::TakeWeightCredit,
xcm_builder::WithComputedOrigin<
(
// 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<
darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality,
>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<
darwinia_common_runtime::xcm_configs::ParentOrSiblings,
>,
),
UniversalLocation,
ConstU32<8>,
// 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<
darwinia_common_runtime::xcm_configs::ParentOrParentsExecutivePlurality,
>,
// Subscriptions for version tracking are OK.
xcm_builder::AllowSubscriptionsFrom<
darwinia_common_runtime::xcm_configs::ParentOrSiblings,
>,
// Expected responses are OK.
xcm_builder::AllowKnownQueryResponses<PolkadotXcm>,
),
UniversalLocation,
ConstU32<8>,
>,
>;
// Expected responses are OK.
xcm_builder::AllowKnownQueryResponses<PolkadotXcm>,
)>;

frame_support::parameter_types! {
pub const MaxAssetsIntoHolding: u32 = 64;
Expand Down

0 comments on commit 1baf268

Please sign in to comment.