Skip to content

Commit

Permalink
Merge pull request #1038 from UniqueNetwork/fix/xcmv3-settopic-barrier
Browse files Browse the repository at this point in the history
fix: use XCM barriers - pass SetTopic(ID)
  • Loading branch information
CertainLach authored Nov 14, 2023
2 parents a3f68ee + 1d2d3c8 commit 2ff692c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions runtime/opal/src/xcm_barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use frame_support::{match_types, traits::Everything};
use staging_xcm::latest::{Junctions::*, MultiLocation};
use staging_xcm_builder::{
AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
TrailingSetTopicAsId,
};

match_types! {
Expand All @@ -26,8 +27,8 @@ match_types! {
};
}

pub type Barrier = (
pub type Barrier = TrailingSetTopicAsId<(
TakeWeightCredit,
AllowExplicitUnpaidExecutionFrom<ParentOnly>,
AllowTopLevelPaidExecutionFrom<Everything>,
);
)>;
6 changes: 3 additions & 3 deletions runtime/quartz/src/xcm_barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use frame_support::{match_types, traits::Everything};
use staging_xcm::latest::{Junctions::*, MultiLocation};
use staging_xcm_builder::{
AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
AllowTopLevelPaidExecutionFrom, TakeWeightCredit, TrailingSetTopicAsId,
};

use crate::PolkadotXcm;
Expand All @@ -34,12 +34,12 @@ match_types! {
};
}

pub type Barrier = (
pub type Barrier = TrailingSetTopicAsId<(
TakeWeightCredit,
AllowExplicitUnpaidExecutionFrom<ParentOnly>,
AllowTopLevelPaidExecutionFrom<Everything>,
// Expected responses are OK.
AllowKnownQueryResponses<PolkadotXcm>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentOrSiblings>,
);
)>;
6 changes: 3 additions & 3 deletions runtime/unique/src/xcm_barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use frame_support::{match_types, traits::Everything};
use staging_xcm::latest::{Junctions::*, MultiLocation};
use staging_xcm_builder::{
AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, TakeWeightCredit,
AllowTopLevelPaidExecutionFrom, TakeWeightCredit, TrailingSetTopicAsId,
};

use crate::PolkadotXcm;
Expand All @@ -34,12 +34,12 @@ match_types! {
};
}

pub type Barrier = (
pub type Barrier = TrailingSetTopicAsId<(
TakeWeightCredit,
AllowExplicitUnpaidExecutionFrom<ParentOnly>,
AllowTopLevelPaidExecutionFrom<Everything>,
// Expected responses are OK.
AllowKnownQueryResponses<PolkadotXcm>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentOrSiblings>,
);
)>;

0 comments on commit 2ff692c

Please sign in to comment.