difftreelog
fix remove AllowUnpaidExecutionFrom from barrier
in: master
3 files changed
runtime/opal/src/xcm_barrier.rsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617use frame_support::{17use frame_support::{weights::Weight, traits::Everything};18 {match_types, weights::Weight},19 traits::Everything,20};21use xcm::{18use xcm::{latest::Xcm, v1::MultiLocation};22 latest::Xcm,23 v1::{BodyId, Junction::*, Junctions::*, MultiLocation},24};25use xcm_builder::{AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, TakeWeightCredit};19use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit};26use xcm_executor::traits::ShouldExecute;20use xcm_executor::traits::ShouldExecute;272128use crate::runtime_common::config::xcm::{DenyThenTry, DenyTransact};22use crate::runtime_common::config::xcm::{DenyThenTry, DenyTransact};2930match_types! {31 pub type ParentOrParentsUnitPlurality: impl Contains<MultiLocation> = {32 MultiLocation { parents: 1, interior: Here } |33 MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) }34 };35}362337/// Execution barrier that just takes `max_weight` from `weight_credit`.24/// Execution barrier that just takes `max_weight` from `weight_credit`.38///25///56 (43 (57 TakeWeightCredit,44 TakeWeightCredit,58 AllowTopLevelPaidExecutionFrom<Everything>,45 AllowTopLevelPaidExecutionFrom<Everything>,59 AllowUnpaidExecutionFrom<ParentOrParentsUnitPlurality>,60 // ^^^ Parent & its unit plurality gets free execution61 AllowAllDebug,46 AllowAllDebug,62 ),47 ),63>;48>;runtime/quartz/src/xcm_barrier.rsdiffbeforeafterboth19 traits::{Get, Everything},19 traits::{Get, Everything},20};20};21use sp_std::{vec, vec::Vec};21use sp_std::{vec, vec::Vec};22use xcm::v1::{BodyId, Junction::*, Junctions::*, MultiLocation};22use xcm::v1::{Junction::*, Junctions::*, MultiLocation};23use xcm_builder::{23use xcm_builder::{24 AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowUnpaidExecutionFrom, TakeWeightCredit,24 AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,25 AllowTopLevelPaidExecutionFrom,25 AllowTopLevelPaidExecutionFrom,26};26};272731};31};323233match_types! {33match_types! {34 pub type ParentOrParentsExecutivePlurality: impl Contains<MultiLocation> = {35 MultiLocation { parents: 1, interior: Here } |36 MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) }37 };38 pub type ParentOrSiblings: impl Contains<MultiLocation> = {34 pub type ParentOrSiblings: impl Contains<MultiLocation> = {39 MultiLocation { parents: 1, interior: Here } |35 MultiLocation { parents: 1, interior: Here } |40 MultiLocation { parents: 1, interior: X1(_) }36 MultiLocation { parents: 1, interior: X1(_) }79 (75 (80 TakeWeightCredit,76 TakeWeightCredit,81 AllowTopLevelPaidExecutionFrom<Everything>,77 AllowTopLevelPaidExecutionFrom<Everything>,82 // Parent and its exec plurality get free execution83 AllowUnpaidExecutionFrom<ParentOrParentsExecutivePlurality>,84 // Expected responses are OK.78 // Expected responses are OK.85 AllowKnownQueryResponses<PolkadotXcm>,79 AllowKnownQueryResponses<PolkadotXcm>,86 // Subscriptions for version tracking are OK.80 // Subscriptions for version tracking are OK.runtime/unique/src/xcm_barrier.rsdiffbeforeafterboth19 traits::{Get, Everything},19 traits::{Get, Everything},20};20};21use sp_std::{vec, vec::Vec};21use sp_std::{vec, vec::Vec};22use xcm::v1::{BodyId, Junction::*, Junctions::*, MultiLocation};22use xcm::v1::{Junction::*, Junctions::*, MultiLocation};23use xcm_builder::{23use xcm_builder::{24 AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowUnpaidExecutionFrom, TakeWeightCredit,24 AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,25 AllowTopLevelPaidExecutionFrom,25 AllowTopLevelPaidExecutionFrom,26};26};272731};31};323233match_types! {33match_types! {34 pub type ParentOrParentsExecutivePlurality: impl Contains<MultiLocation> = {35 MultiLocation { parents: 1, interior: Here } |36 MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) }37 };38 pub type ParentOrSiblings: impl Contains<MultiLocation> = {34 pub type ParentOrSiblings: impl Contains<MultiLocation> = {39 MultiLocation { parents: 1, interior: Here } |35 MultiLocation { parents: 1, interior: Here } |40 MultiLocation { parents: 1, interior: X1(_) }36 MultiLocation { parents: 1, interior: X1(_) }79 (75 (80 TakeWeightCredit,76 TakeWeightCredit,81 AllowTopLevelPaidExecutionFrom<Everything>,77 AllowTopLevelPaidExecutionFrom<Everything>,82 // Parent and its exec plurality get free execution83 AllowUnpaidExecutionFrom<ParentOrParentsExecutivePlurality>,84 // Expected responses are OK.78 // Expected responses are OK.85 AllowKnownQueryResponses<PolkadotXcm>,79 AllowKnownQueryResponses<PolkadotXcm>,86 // Subscriptions for version tracking are OK.80 // Subscriptions for version tracking are OK.