git.delta.rocks / unique-network / refs/commits / 5db935735ab9

difftreelog

fix IsReserve

Daniel Shiposha2023-03-27parent: #1e19d54.patch.diff
in: master

6 files changed

modifiedCargo.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",
modifiedCargo.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"] }
modifiedruntime/common/config/xcm/foreignassets.rsdiffbeforeafterboth
15// 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/>.
1616
17use frame_support::{17use frame_support::{traits::Get, parameter_types};
18 traits::{Get, ContainsPair},
19 parameter_types,
20};
21use sp_runtime::traits::Convert;18use sp_runtime::traits::Convert;
22use xcm::latest::{prelude::*, MultiAsset, MultiLocation};19use xcm::latest::{prelude::*, MultiAsset, MultiLocation};
27 ForeignAssetId, CurrencyId,24 ForeignAssetId, CurrencyId,
28};25};
29use sp_std::{borrow::Borrow, marker::PhantomData};26use sp_std::{borrow::Borrow, marker::PhantomData};
27use orml_traits::location::AbsoluteReserveProvider;
28use orml_xcm_support::MultiNativeAsset;
30use crate::{Runtime, Balances, ParachainInfo, PolkadotXcm, ForeignAssets};29use crate::{Runtime, Balances, ParachainInfo, PolkadotXcm, ForeignAssets};
3130
32use super::{LocationToAccountId, RelayLocation};31use super::{LocationToAccountId, RelayLocation};
169 }168 }
170}169}
171
172pub struct AllAsset;
173impl ContainsPair<MultiAsset, MultiLocation> for AllAsset {
174 fn contains(_asset: &MultiAsset, _origin: &MultiLocation) -> bool {
175 // ? Shouldn't we query foreign-asset pallet here, because of the new non-local mint
176 // location logic?
177 true
178 }
179}
180170
181pub type IsReserve = AllAsset;171pub type IsReserve = MultiNativeAsset<AbsoluteReserveProvider>;
182172
183pub type Trader<T> = FreeForAll<173pub type Trader<T> = FreeForAll<
184 pallet_configuration::WeightToFee<T, Balance>,174 pallet_configuration::WeightToFee<T, Balance>,
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -130,6 +130,7 @@
 	"orml-traits/std",
 	"orml-vesting/std",
 	"orml-xtokens/std",
+	"orml-xcm-support/std",
 	"pallet-foreign-assets/std",
 
 	'pallet-maintenance/std',
@@ -217,6 +218,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 }
modifiedruntime/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 }
modifiedruntime/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 }