difftreelog
fix IsReserve
in: master
6 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5692,6 +5692,7 @@
"orml-tokens",
"orml-traits",
"orml-vesting",
+ "orml-xcm-support",
"orml-xtokens",
"pallet-app-promotion",
"pallet-aura",
@@ -9142,6 +9143,7 @@
"orml-tokens",
"orml-traits",
"orml-vesting",
+ "orml-xcm-support",
"orml-xtokens",
"pallet-app-promotion",
"pallet-aura",
@@ -13418,6 +13420,7 @@
"orml-tokens",
"orml-traits",
"orml-vesting",
+ "orml-xcm-support",
"orml-xtokens",
"pallet-app-promotion",
"pallet-aura",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -181,6 +181,7 @@
orml-traits = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
orml-vesting = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
orml-xtokens = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
+orml-xcm-support = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
# Other
derivative = { version = "2.2.0", features = ["use_core"] }
runtime/common/config/xcm/foreignassets.rsdiffbeforeafterboth--- a/runtime/common/config/xcm/foreignassets.rs
+++ b/runtime/common/config/xcm/foreignassets.rs
@@ -14,10 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-use frame_support::{
- traits::{Get, ContainsPair},
- parameter_types,
-};
+use frame_support::{traits::Get, parameter_types};
use sp_runtime::traits::Convert;
use xcm::latest::{prelude::*, MultiAsset, MultiLocation};
use xcm_builder::{FungiblesAdapter, NoChecking, ConvertedConcreteId};
@@ -27,6 +24,8 @@
ForeignAssetId, CurrencyId,
};
use sp_std::{borrow::Borrow, marker::PhantomData};
+use orml_traits::location::AbsoluteReserveProvider;
+use orml_xcm_support::MultiNativeAsset;
use crate::{Runtime, Balances, ParachainInfo, PolkadotXcm, ForeignAssets};
use super::{LocationToAccountId, RelayLocation};
@@ -169,16 +168,7 @@
}
}
-pub struct AllAsset;
-impl ContainsPair<MultiAsset, MultiLocation> for AllAsset {
- fn contains(_asset: &MultiAsset, _origin: &MultiLocation) -> bool {
- // ? Shouldn't we query foreign-asset pallet here, because of the new non-local mint
- // location logic?
- true
- }
-}
-
-pub type IsReserve = AllAsset;
+pub type IsReserve = MultiNativeAsset<AbsoluteReserveProvider>;
pub type Trader<T> = FreeForAll<
pallet_configuration::WeightToFee<T, Balance>,
runtime/opal/Cargo.tomldiffbeforeafterboth130 "orml-traits/std",130 "orml-traits/std",131 "orml-vesting/std",131 "orml-vesting/std",132 "orml-xtokens/std",132 "orml-xtokens/std",133 "orml-xcm-support/std",133 "pallet-foreign-assets/std",134 "pallet-foreign-assets/std",134135135 'pallet-maintenance/std',136 'pallet-maintenance/std',217orml-traits = { workspace = true }218orml-traits = { workspace = true }218orml-vesting = { workspace = true }219orml-vesting = { workspace = true }219orml-xtokens = { workspace = true }220orml-xtokens = { workspace = true }221orml-xcm-support = { workspace = true }220pallet-aura = { workspace = true }222pallet-aura = { workspace = true }221pallet-authorship = { workspace = true }223pallet-authorship = { workspace = true }222pallet-balances = { workspace = true }224pallet-balances = { workspace = true }runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -129,6 +129,7 @@
"orml-traits/std",
"orml-vesting/std",
"orml-xtokens/std",
+ "orml-xcm-support/std",
"pallet-foreign-assets/std",
"pallet-maintenance/std",
]
@@ -209,6 +210,7 @@
orml-traits = { workspace = true }
orml-vesting = { workspace = true }
orml-xtokens = { workspace = true }
+orml-xcm-support = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -126,6 +126,7 @@
"orml-traits/std",
"orml-vesting/std",
"orml-xtokens/std",
+ "orml-xcm-support/std",
"pallet-foreign-assets/std",
"pallet-maintenance/std",
]
@@ -208,6 +209,7 @@
orml-traits = { workspace = true }
orml-vesting = { workspace = true }
orml-xtokens = { workspace = true }
+orml-xcm-support = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }