--- a/runtime/common/config/xcm/foreignassets.rs +++ b/runtime/common/config/xcm/foreignassets.rs @@ -18,7 +18,7 @@ traits::{Contains, Get, fungibles}, parameter_types, }; -use sp_runtime::traits::{Zero, Convert}; +use sp_runtime::traits::Convert; use xcm::v1::{Junction::*, MultiLocation, Junctions::*}; use xcm::latest::MultiAsset; use xcm_builder::{FungiblesAdapter, ConvertedConcreteAssetId}; @@ -38,16 +38,16 @@ pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } -/// Allow checking in assets that have issuance > 0. -pub struct NonZeroIssuance(PhantomData<(AccountId, ForeignAssets)>); +/// No teleports are allowed +pub struct NoTeleports(PhantomData<(AccountId, ForeignAssets)>); impl Contains<>::AssetId> - for NonZeroIssuance + for NoTeleports where ForeignAssets: fungibles::Inspect, { - fn contains(id: &>::AssetId) -> bool { - !ForeignAssets::total_issuance(*id).is_zero() + fn contains(_id: &>::AssetId) -> bool { + false } } @@ -132,9 +132,8 @@ LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): AccountId, - // We only want to allow teleports of known assets. We use non-zero issuance as an indication - // that this asset is known. - NonZeroIssuance, + // No teleports are allowed + NoTeleports, // The account to use for tracking teleports. CheckingAccount, >;