difftreelog
feat allow explicit unpaid execution from parent
in: master
3 files changed
runtime/opal/src/xcm_barrier.rsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// 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::traits::Everything;17use frame_support::{match_types, traits::Everything};18use xcm::latest::{Junctions::*, MultiLocation};18use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit};19use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit, AllowExplicitUnpaidExecutionFrom};2021match_types! {22 pub type ParentOnly: impl Contains<MultiLocation> = {23 MultiLocation { parents: 1, interior: Here }24 };25}192620pub type Barrier = (TakeWeightCredit, AllowTopLevelPaidExecutionFrom<Everything>);27pub type Barrier = (28 TakeWeightCredit,29 AllowExplicitUnpaidExecutionFrom<ParentOnly>,30 AllowTopLevelPaidExecutionFrom<Everything>,31);2132runtime/quartz/src/xcm_barrier.rsdiffbeforeafterboth18use xcm::latest::{Junctions::*, MultiLocation};18use xcm::latest::{Junctions::*, MultiLocation};19use xcm_builder::{19use xcm_builder::{20 AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,20 AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,21 AllowTopLevelPaidExecutionFrom,21 AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom,22};22};232324use crate::PolkadotXcm;24use crate::PolkadotXcm;252526match_types! {26match_types! {27 pub type ParentOnly: impl Contains<MultiLocation> = {28 MultiLocation { parents: 1, interior: Here }29 };3027 pub type ParentOrSiblings: impl Contains<MultiLocation> = {31 pub type ParentOrSiblings: impl Contains<MultiLocation> = {28 MultiLocation { parents: 1, interior: Here } |32 MultiLocation { parents: 1, interior: Here } |323633pub type Barrier = (37pub type Barrier = (34 TakeWeightCredit,38 TakeWeightCredit,39 AllowExplicitUnpaidExecutionFrom<ParentOnly>,35 AllowTopLevelPaidExecutionFrom<Everything>,40 AllowTopLevelPaidExecutionFrom<Everything>,36 // Expected responses are OK.41 // Expected responses are OK.37 AllowKnownQueryResponses<PolkadotXcm>,42 AllowKnownQueryResponses<PolkadotXcm>,runtime/unique/src/xcm_barrier.rsdiffbeforeafterboth18use xcm::latest::{Junctions::*, MultiLocation};18use xcm::latest::{Junctions::*, MultiLocation};19use xcm_builder::{19use xcm_builder::{20 AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,20 AllowKnownQueryResponses, AllowSubscriptionsFrom, TakeWeightCredit,21 AllowTopLevelPaidExecutionFrom,21 AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom,22};22};232324use crate::PolkadotXcm;24use crate::PolkadotXcm;252526match_types! {26match_types! {27 pub type ParentOnly: impl Contains<MultiLocation> = {28 MultiLocation { parents: 1, interior: Here }29 };3027 pub type ParentOrSiblings: impl Contains<MultiLocation> = {31 pub type ParentOrSiblings: impl Contains<MultiLocation> = {28 MultiLocation { parents: 1, interior: Here } |32 MultiLocation { parents: 1, interior: Here } |323633pub type Barrier = (37pub type Barrier = (34 TakeWeightCredit,38 TakeWeightCredit,39 AllowExplicitUnpaidExecutionFrom<ParentOnly>,35 AllowTopLevelPaidExecutionFrom<Everything>,40 AllowTopLevelPaidExecutionFrom<Everything>,36 // Expected responses are OK.41 // Expected responses are OK.37 AllowKnownQueryResponses<PolkadotXcm>,42 AllowKnownQueryResponses<PolkadotXcm>,