git.delta.rocks / unique-network / refs/commits / a6f37fbe5331

difftreelog

fix typo foreing -> foreign

Daniel Shiposha2022-09-06parent: #64ecfc5.patch.diff
in: master

18 files changed

modifiedCargo.lockdiffbeforeafterboth
5176 "pallet-evm-contract-helpers",5176 "pallet-evm-contract-helpers",
5177 "pallet-evm-migration",5177 "pallet-evm-migration",
5178 "pallet-evm-transaction-payment",5178 "pallet-evm-transaction-payment",
5179 "pallet-foreing-assets",5179 "pallet-foreign-assets",
5180 "pallet-fungible",5180 "pallet-fungible",
5181 "pallet-inflation",5181 "pallet-inflation",
5182 "pallet-nonfungible",5182 "pallet-nonfungible",
5846]5846]
58475847
5848[[package]]5848[[package]]
5849name = "pallet-foreing-assets"5849name = "pallet-foreign-assets"
5850version = "0.1.0"5850version = "0.1.0"
5851dependencies = [5851dependencies = [
5852 "frame-support",5852 "frame-support",
8496 "pallet-evm-contract-helpers",8496 "pallet-evm-contract-helpers",
8497 "pallet-evm-migration",8497 "pallet-evm-migration",
8498 "pallet-evm-transaction-payment",8498 "pallet-evm-transaction-payment",
8499 "pallet-foreing-assets",8499 "pallet-foreign-assets",
8500 "pallet-fungible",8500 "pallet-fungible",
8501 "pallet-inflation",8501 "pallet-inflation",
8502 "pallet-nonfungible",8502 "pallet-nonfungible",
12491 "pallet-evm-contract-helpers",12491 "pallet-evm-contract-helpers",
12492 "pallet-evm-migration",12492 "pallet-evm-migration",
12493 "pallet-evm-transaction-payment",12493 "pallet-evm-transaction-payment",
12494 "pallet-foreing-assets",12494 "pallet-foreign-assets",
12495 "pallet-fungible",12495 "pallet-fungible",
12496 "pallet-inflation",12496 "pallet-inflation",
12497 "pallet-nonfungible",12497 "pallet-nonfungible",
modifiedREADME.mddiffbeforeafterboth
195xtokens -> transfer195xtokens -> transfer
196196
197currencyId:197currencyId:
198 ForeingAsset198 ForeignAsset
199 <TOKEN_ID>199 <TOKEN_ID>
200200
201amount:201amount:
addedpallets/foreign-assets/Cargo.tomldiffbeforeafterboth

no changes

addedpallets/foreign-assets/src/impl_fungibles.rsdiffbeforeafterboth

no changes

addedpallets/foreign-assets/src/lib.rsdiffbeforeafterboth

no changes

addedpallets/foreign-assets/src/weights.rsdiffbeforeafterboth

no changes

deletedpallets/foreing-assets/Cargo.tomldiffbeforeafterboth

no changes

deletedpallets/foreing-assets/src/impl_fungibles.rsdiffbeforeafterboth

no changes

deletedpallets/foreing-assets/src/lib.rsdiffbeforeafterboth

no changes

deletedpallets/foreing-assets/src/weights.rsdiffbeforeafterboth

no changes

modifiedruntime/common/config/orml.rsdiffbeforeafterboth
26use xcm_builder::LocationInverter;26use xcm_builder::LocationInverter;
27use xcm_executor::XcmExecutor;27use xcm_executor::XcmExecutor;
28use sp_std::{vec, vec::Vec};28use sp_std::{vec, vec::Vec};
29use pallet_foreing_assets::{CurrencyId, NativeCurrency};29use pallet_foreign_assets::{CurrencyId, NativeCurrency};
30use crate::{30use crate::{
31 Runtime, Event, RelayChainBlockNumberProvider,31 Runtime, Event, RelayChainBlockNumberProvider,
32 runtime_common::config::{32 runtime_common::config::{
modifiedruntime/common/config/pallets/foreign_asset.rsdiffbeforeafterboth
1use crate::{Runtime, Event, Balances};1use crate::{Runtime, Event, Balances};
2use up_common::types::AccountId;2use up_common::types::AccountId;
33
4impl pallet_foreing_assets::Config for Runtime {4impl pallet_foreign_assets::Config for Runtime {
5 type Event = Event;5 type Event = Event;
6 type Currency = Balances;6 type Currency = Balances;
7 type RegisterOrigin = frame_system::EnsureRoot<AccountId>;7 type RegisterOrigin = frame_system::EnsureRoot<AccountId>;
modifiedruntime/common/config/xcm/foreignassets.rsdiffbeforeafterboth
23use xcm::latest::MultiAsset;23use xcm::latest::MultiAsset;
24use xcm_builder::{FungiblesAdapter, ConvertedConcreteAssetId};24use xcm_builder::{FungiblesAdapter, ConvertedConcreteAssetId};
25use xcm_executor::traits::{Convert as ConvertXcm, JustTry, FilterAssetLocation};25use xcm_executor::traits::{Convert as ConvertXcm, JustTry, FilterAssetLocation};
26use pallet_foreing_assets::{26use pallet_foreign_assets::{
27 AssetIds, AssetIdMapping, XcmForeignAssetIdMapping, NativeCurrency, FreeForAll, TryAsForeing,27 AssetIds, AssetIdMapping, XcmForeignAssetIdMapping, NativeCurrency, FreeForAll, TryAsForeign,
28 ForeignAssetId, CurrencyId,28 ForeignAssetId, CurrencyId,
29};29};
30use sp_std::{borrow::Borrow, marker::PhantomData};30use sp_std::{borrow::Borrow, marker::PhantomData};
31use crate::{Runtime, Balances, ParachainInfo, PolkadotXcm, ForeingAssets};31use crate::{Runtime, Balances, ParachainInfo, PolkadotXcm, ForeignAssets};
3232
33use super::{LocationToAccountId, RelayLocation};33use super::{LocationToAccountId, RelayLocation};
3434
39}39}
4040
41/// Allow checking in assets that have issuance > 0.41/// Allow checking in assets that have issuance > 0.
42pub struct NonZeroIssuance<AccountId, ForeingAssets>(PhantomData<(AccountId, ForeingAssets)>);42pub struct NonZeroIssuance<AccountId, ForeignAssets>(PhantomData<(AccountId, ForeignAssets)>);
4343
44impl<AccountId, ForeingAssets> Contains<<ForeingAssets as fungibles::Inspect<AccountId>>::AssetId>44impl<AccountId, ForeignAssets> Contains<<ForeignAssets as fungibles::Inspect<AccountId>>::AssetId>
45 for NonZeroIssuance<AccountId, ForeingAssets>45 for NonZeroIssuance<AccountId, ForeignAssets>
46where46where
47 ForeingAssets: fungibles::Inspect<AccountId>,47 ForeignAssets: fungibles::Inspect<AccountId>,
48{48{
49 fn contains(id: &<ForeingAssets as fungibles::Inspect<AccountId>>::AssetId) -> bool {49 fn contains(id: &<ForeignAssets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
50 !ForeingAssets::total_issuance(*id).is_zero()50 !ForeignAssets::total_issuance(*id).is_zero()
51 }51 }
52}52}
5353
56 ConvertXcm<MultiLocation, AssetId> for AsInnerId<AssetId, ConvertAssetId>56 ConvertXcm<MultiLocation, AssetId> for AsInnerId<AssetId, ConvertAssetId>
57where57where
58 AssetId: Borrow<AssetId>,58 AssetId: Borrow<AssetId>,
59 AssetId: TryAsForeing<AssetId, ForeignAssetId>,59 AssetId: TryAsForeign<AssetId, ForeignAssetId>,
60 AssetIds: Borrow<AssetId>,60 AssetIds: Borrow<AssetId>,
61{61{
62 fn convert_ref(id: impl Borrow<MultiLocation>) -> Result<AssetId, ()> {62 fn convert_ref(id: impl Borrow<MultiLocation>) -> Result<AssetId, ()> {
112 ));112 ));
113 }113 }
114114
115 match <AssetId as TryAsForeing<AssetId, ForeignAssetId>>::try_as_foreing(asset_id.clone()) {115 match <AssetId as TryAsForeign<AssetId, ForeignAssetId>>::try_as_foreign(asset_id.clone()) {
116 Some(fid) => match XcmForeignAssetIdMapping::<Runtime>::get_multi_location(fid) {116 Some(fid) => match XcmForeignAssetIdMapping::<Runtime>::get_multi_location(fid) {
117 Some(location) => Ok(location),117 Some(location) => Ok(location),
118 None => Err(()),118 None => Err(()),
125/// Means for transacting assets besides the native currency on this chain.125/// Means for transacting assets besides the native currency on this chain.
126pub type FungiblesTransactor = FungiblesAdapter<126pub type FungiblesTransactor = FungiblesAdapter<
127 // Use this fungibles implementation:127 // Use this fungibles implementation:
128 ForeingAssets,128 ForeignAssets,
129 // Use this currency when it is a fungible asset matching the given location or name:129 // Use this currency when it is a fungible asset matching the given location or name:
130 ConvertedConcreteAssetId<AssetIds, Balance, AsInnerId<AssetIds, JustTry>, JustTry>,130 ConvertedConcreteAssetId<AssetIds, Balance, AsInnerId<AssetIds, JustTry>, JustTry>,
131 // Convert an XCM MultiLocation into a local account id:131 // Convert an XCM MultiLocation into a local account id:
134 AccountId,134 AccountId,
135 // We only want to allow teleports of known assets. We use non-zero issuance as an indication135 // We only want to allow teleports of known assets. We use non-zero issuance as an indication
136 // that this asset is known.136 // that this asset is known.
137 NonZeroIssuance<AccountId, ForeingAssets>,137 NonZeroIssuance<AccountId, ForeignAssets>,
138 // The account to use for tracking teleports.138 // The account to use for tracking teleports.
139 CheckingAccount,139 CheckingAccount,
140>;140>;
modifiedruntime/common/config/xcm/nativeassets.rsdiffbeforeafterboth
30 Assets,30 Assets,
31 traits::{MatchesFungible, WeightTrader},31 traits::{MatchesFungible, WeightTrader},
32};32};
33use pallet_foreing_assets::{AssetIds, NativeCurrency};33use pallet_foreign_assets::{AssetIds, NativeCurrency};
34use sp_std::marker::PhantomData;34use sp_std::marker::PhantomData;
35use crate::{Balances, ParachainInfo};35use crate::{Balances, ParachainInfo};
36use super::{LocationToAccountId, RelayLocation};36use super::{LocationToAccountId, RelayLocation};
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
81 RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,81 RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,
8282
83 #[runtimes(opal)]83 #[runtimes(opal)]
84 ForeingAssets: pallet_foreing_assets::{Pallet, Call, Storage, Event<T>} = 80,84 ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,
8585
86 // Frontier86 // Frontier
87 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,87 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
123 "orml-tokens/std",123 "orml-tokens/std",
124 "orml-xtokens/std",124 "orml-xtokens/std",
125 "orml-traits/std",125 "orml-traits/std",
126 "pallet-foreing-assets/std"126 "pallet-foreign-assets/std"
127]127]
128limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']128limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
129opal-runtime = ['refungible', 'scheduler', 'rmrk', 'foreign-assets']129opal-runtime = ['refungible', 'scheduler', 'rmrk', 'foreign-assets']
460fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }460fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
461evm-coder = { default-features = false, path = '../../crates/evm-coder' }461evm-coder = { default-features = false, path = '../../crates/evm-coder' }
462up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }462up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }
463pallet-foreing-assets = { default-features = false, path = "../../pallets/foreing-assets" }463pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
464464
465################################################################################465################################################################################
466# Other Dependencies466# Other Dependencies
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
123 "orml-tokens/std",123 "orml-tokens/std",
124 "orml-xtokens/std",124 "orml-xtokens/std",
125 "orml-traits/std",125 "orml-traits/std",
126 "pallet-foreing-assets/std"126 "pallet-foreign-assets/std"
127]127]
128limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']128limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
129quartz-runtime = []129quartz-runtime = []
468fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }468fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
469evm-coder = { default-features = false, path = '../../crates/evm-coder' }469evm-coder = { default-features = false, path = '../../crates/evm-coder' }
470up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }470up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }
471pallet-foreing-assets = { default-features = false, path = "../../pallets/foreing-assets" }471pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
472472
473################################################################################473################################################################################
474# Other Dependencies474# Other Dependencies
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
124 "orml-tokens/std",124 "orml-tokens/std",
125 "orml-xtokens/std",125 "orml-xtokens/std",
126 "orml-traits/std",126 "orml-traits/std",
127 "pallet-foreing-assets/std"127 "pallet-foreign-assets/std"
128]128]
129limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']129limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
130unique-runtime = []130unique-runtime = []
460fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }460fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }
461evm-coder = { default-features = false, path = '../../crates/evm-coder' }461evm-coder = { default-features = false, path = '../../crates/evm-coder' }
462up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }462up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }
463pallet-foreing-assets = { default-features = false, path = "../../pallets/foreing-assets" }463pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
464464
465################################################################################465################################################################################
466# Other Dependencies466# Other Dependencies