difftreelog
fix typo foreing -> foreign
in: master
18 files changed
Cargo.lockdiffbeforeafterboth5176 "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]584758475848[[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",README.mddiffbeforeafterboth195xtokens -> transfer195xtokens -> transfer196196197currencyId:197currencyId:198 ForeingAsset198 ForeignAsset199 <TOKEN_ID>199 <TOKEN_ID>200200201amount:201amount:pallets/foreign-assets/Cargo.tomldiffbeforeafterbothno changes
pallets/foreign-assets/src/impl_fungibles.rsdiffbeforeafterbothno changes
pallets/foreign-assets/src/lib.rsdiffbeforeafterbothno changes
pallets/foreign-assets/src/weights.rsdiffbeforeafterbothno changes
pallets/foreing-assets/Cargo.tomldiffbeforeafterbothno changes
pallets/foreing-assets/src/impl_fungibles.rsdiffbeforeafterbothno changes
pallets/foreing-assets/src/lib.rsdiffbeforeafterbothno changes
pallets/foreing-assets/src/weights.rsdiffbeforeafterbothno changes
runtime/common/config/orml.rsdiffbeforeafterboth26use 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::{runtime/common/config/pallets/foreign_asset.rsdiffbeforeafterboth1use crate::{Runtime, Event, Balances};1use crate::{Runtime, Event, Balances};2use up_common::types::AccountId;2use up_common::types::AccountId;334impl 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>;runtime/common/config/xcm/foreignassets.rsdiffbeforeafterboth23use 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};323233use super::{LocationToAccountId, RelayLocation};33use super::{LocationToAccountId, RelayLocation};343439}39}404041/// 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)>);434344impl<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>46where46where47 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}535356 ConvertXcm<MultiLocation, AssetId> for AsInnerId<AssetId, ConvertAssetId>56 ConvertXcm<MultiLocation, AssetId> for AsInnerId<AssetId, ConvertAssetId>57where57where58 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 }114114115 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 indication136 // 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>;runtime/common/config/xcm/nativeassets.rsdiffbeforeafterboth30 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};runtime/common/construct_runtime/mod.rsdiffbeforeafterboth81 RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,81 RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,828283 #[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,858586 // Frontier86 // Frontier87 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,87 EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,runtime/opal/Cargo.tomldiffbeforeafterboth123 "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" }464464465################################################################################465################################################################################466# Other Dependencies466# Other Dependenciesruntime/quartz/Cargo.tomldiffbeforeafterboth123 "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" }472472473################################################################################473################################################################################474# Other Dependencies474# Other Dependenciesruntime/unique/Cargo.tomldiffbeforeafterboth124 "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" }464464465################################################################################465################################################################################466# Other Dependencies466# Other Dependencies