From f633379e28c2d7d3659ec48e7d8561050d6fbc8c Mon Sep 17 00:00:00 2001 From: zqh Date: Mon, 21 Mar 2022 14:42:23 +0800 Subject: [PATCH 1/3] add fiter with Everything --- orml | 2 +- runtime/acala/src/xcm_config.rs | 1 + runtime/karura/src/xcm_config.rs | 1 + runtime/mandala/src/xcm_config.rs | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/orml b/orml index 0a5a2df3b..fecbe0197 160000 --- a/orml +++ b/orml @@ -1 +1 @@ -Subproject commit 0a5a2df3b796f1fcfec3c4c32cc853716fa6c3da +Subproject commit fecbe0197ac0c1380424d193a46289d3846cbf1d diff --git a/runtime/acala/src/xcm_config.rs b/runtime/acala/src/xcm_config.rs index ee23d760b..b3d513e60 100644 --- a/runtime/acala/src/xcm_config.rs +++ b/runtime/acala/src/xcm_config.rs @@ -355,4 +355,5 @@ impl orml_xtokens::Config for Runtime { type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; + type MultiLocationsFilter = Everything; } diff --git a/runtime/karura/src/xcm_config.rs b/runtime/karura/src/xcm_config.rs index dc7efcd93..9c973742b 100644 --- a/runtime/karura/src/xcm_config.rs +++ b/runtime/karura/src/xcm_config.rs @@ -328,6 +328,7 @@ impl orml_xtokens::Config for Runtime { type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; + type MultiLocationsFilter = Everything; } pub type LocalAssetTransactor = MultiCurrencyAdapter< diff --git a/runtime/mandala/src/xcm_config.rs b/runtime/mandala/src/xcm_config.rs index 47f8aa329..ed0b31972 100644 --- a/runtime/mandala/src/xcm_config.rs +++ b/runtime/mandala/src/xcm_config.rs @@ -345,4 +345,5 @@ impl orml_xtokens::Config for Runtime { type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; + type MultiLocationsFilter = Everything; } From 2aa5c8b06349c2939c3f6040f5a2d444d97a717f Mon Sep 17 00:00:00 2001 From: zqh Date: Mon, 21 Mar 2022 18:16:22 +0800 Subject: [PATCH 2/3] add reserve provider --- orml | 2 +- runtime/acala/src/xcm_config.rs | 4 +++- runtime/karura/src/xcm_config.rs | 4 +++- runtime/mandala/src/xcm_config.rs | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/orml b/orml index fecbe0197..a060819a7 160000 --- a/orml +++ b/orml @@ -1 +1 @@ -Subproject commit fecbe0197ac0c1380424d193a46289d3846cbf1d +Subproject commit a060819a722850ccaf945b78760c6c25f45a44e5 diff --git a/runtime/acala/src/xcm_config.rs b/runtime/acala/src/xcm_config.rs index b3d513e60..e6c8443cb 100644 --- a/runtime/acala/src/xcm_config.rs +++ b/runtime/acala/src/xcm_config.rs @@ -29,6 +29,7 @@ pub use frame_support::{ traits::{Everything, Get, Nothing}, weights::Weight, }; +use orml_traits::location::AbsoluteReserveProvider; use orml_traits::{parameter_type_with_key, MultiCurrency}; use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; use pallet_xcm::XcmPassthrough; @@ -150,7 +151,7 @@ impl xcm_executor::Config for XcmConfig { // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; - type IsReserve = MultiNativeAsset; + type IsReserve = MultiNativeAsset; // Teleporting is disabled. type IsTeleporter = (); type LocationInverter = LocationInverter; @@ -356,4 +357,5 @@ impl orml_xtokens::Config for Runtime { type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; type MultiLocationsFilter = Everything; + type ReserveProvider = AbsoluteReserveProvider; } diff --git a/runtime/karura/src/xcm_config.rs b/runtime/karura/src/xcm_config.rs index 9c973742b..ff2675b3b 100644 --- a/runtime/karura/src/xcm_config.rs +++ b/runtime/karura/src/xcm_config.rs @@ -30,6 +30,7 @@ pub use frame_support::{ weights::Weight, }; use module_support::HomaSubAccountXcm; +use orml_traits::location::AbsoluteReserveProvider; use orml_traits::{parameter_type_with_key, MultiCurrency}; use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; use pallet_xcm::XcmPassthrough; @@ -212,7 +213,7 @@ impl xcm_executor::Config for XcmConfig { // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; - type IsReserve = MultiNativeAsset; + type IsReserve = MultiNativeAsset; // Teleporting is disabled. type IsTeleporter = (); type LocationInverter = LocationInverter; @@ -329,6 +330,7 @@ impl orml_xtokens::Config for Runtime { type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; type MultiLocationsFilter = Everything; + type ReserveProvider = AbsoluteReserveProvider; } pub type LocalAssetTransactor = MultiCurrencyAdapter< diff --git a/runtime/mandala/src/xcm_config.rs b/runtime/mandala/src/xcm_config.rs index ed0b31972..98865fa7a 100644 --- a/runtime/mandala/src/xcm_config.rs +++ b/runtime/mandala/src/xcm_config.rs @@ -29,6 +29,7 @@ pub use frame_support::{ traits::{Everything, Get, Nothing}, weights::Weight, }; +use orml_traits::location::AbsoluteReserveProvider; use orml_traits::{parameter_type_with_key, MultiCurrency}; use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; use pallet_xcm::XcmPassthrough; @@ -141,7 +142,7 @@ impl xcm_executor::Config for XcmConfig { // How to withdraw and deposit an asset. type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; - type IsReserve = MultiNativeAsset; + type IsReserve = MultiNativeAsset; // Teleporting is disabled. type IsTeleporter = (); type LocationInverter = LocationInverter; @@ -346,4 +347,5 @@ impl orml_xtokens::Config for Runtime { type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; type MultiLocationsFilter = Everything; + type ReserveProvider = AbsoluteReserveProvider; } From b1d61e7dd94773bc101d89f281b6f9f0208d8dff Mon Sep 17 00:00:00 2001 From: zqh Date: Mon, 21 Mar 2022 18:21:05 +0800 Subject: [PATCH 3/3] update import --- runtime/acala/src/xcm_config.rs | 3 +-- runtime/karura/src/xcm_config.rs | 3 +-- runtime/mandala/src/xcm_config.rs | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/runtime/acala/src/xcm_config.rs b/runtime/acala/src/xcm_config.rs index e6c8443cb..99c621749 100644 --- a/runtime/acala/src/xcm_config.rs +++ b/runtime/acala/src/xcm_config.rs @@ -29,8 +29,7 @@ pub use frame_support::{ traits::{Everything, Get, Nothing}, weights::Weight, }; -use orml_traits::location::AbsoluteReserveProvider; -use orml_traits::{parameter_type_with_key, MultiCurrency}; +use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key, MultiCurrency}; use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; diff --git a/runtime/karura/src/xcm_config.rs b/runtime/karura/src/xcm_config.rs index ff2675b3b..9d16af432 100644 --- a/runtime/karura/src/xcm_config.rs +++ b/runtime/karura/src/xcm_config.rs @@ -30,8 +30,7 @@ pub use frame_support::{ weights::Weight, }; use module_support::HomaSubAccountXcm; -use orml_traits::location::AbsoluteReserveProvider; -use orml_traits::{parameter_type_with_key, MultiCurrency}; +use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key, MultiCurrency}; use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; diff --git a/runtime/mandala/src/xcm_config.rs b/runtime/mandala/src/xcm_config.rs index 98865fa7a..54cd0c20d 100644 --- a/runtime/mandala/src/xcm_config.rs +++ b/runtime/mandala/src/xcm_config.rs @@ -29,8 +29,7 @@ pub use frame_support::{ traits::{Everything, Get, Nothing}, weights::Weight, }; -use orml_traits::location::AbsoluteReserveProvider; -use orml_traits::{parameter_type_with_key, MultiCurrency}; +use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key, MultiCurrency}; use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling;