Allow Queries and Subscriptions (#4150)

* Allow Queries and Subscriptions

* Formatting

* Formatting
This commit is contained in:
Gavin Wood
2021-10-27 15:13:12 +02:00
committed by GitHub
parent 4c042b1de3
commit d7513f5313
3 changed files with 32 additions and 12 deletions
+8 -4
View File
@@ -84,10 +84,10 @@ use constants::{currency::*, fee::*, time::*};
use frame_support::traits::InstanceFilter;
use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, BackingToPlurality, ChildParachainAsNative, ChildParachainConvertsVia,
ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds,
IsConcrete, LocationInverter, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, UsingComponents,
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, BackingToPlurality,
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsConcrete, LocationInverter,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, UsingComponents,
};
use xcm_executor::XcmExecutor;
@@ -672,6 +672,10 @@ pub type Barrier = (
TakeWeightCredit,
AllowTopLevelPaidExecutionFrom<Everything>,
AllowUnpaidExecutionFrom<IsInVec<AllowUnpaidFrom>>, // <- Trusted parachains get free execution
// Expected responses are OK.
AllowKnownQueryResponses<XcmPallet>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<Everything>,
);
pub struct XcmConfig;