chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -24,10 +24,10 @@ use scale_info::TypeInfo;
pub use bp_bridge_hub_pezcumulus::*;
use bp_messages::*;
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
use pezbp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
};
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
use pezframe_support::{
dispatch::DispatchClass,
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
@@ -25,9 +25,9 @@ use crate::{
*,
};
use alloc::{vec, vec::Vec};
use hex_literal::hex;
use pezcumulus_primitives_core::ParaId;
use pezframe_support::build_struct_json_patch;
use hex_literal::hex;
use pezsp_core::crypto::UncheckedInto;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
@@ -43,7 +43,9 @@ use assets_common::{
AssetIdForPoolAssets, AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert,
};
use bp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
use pezcumulus_pezpallet_teyrchain_system::{RelayNumberMonotonicallyIncreases, RelaychainDataProvider};
use pezcumulus_pezpallet_teyrchain_system::{
RelayNumberMonotonicallyIncreases, RelaychainDataProvider,
};
use pezcumulus_primitives_core::AggregateMessageOrigin;
use pezsp_api::impl_runtime_apis;
use pezsp_core::{crypto::KeyTypeId, OpaqueMetadata};
@@ -104,8 +106,8 @@ mod tests;
pub use pezsp_runtime::BuildStorage;
// Pezkuwi imports
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezkuwi_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
#[cfg(feature = "runtime-benchmarks")]
use xcm::latest::prelude::{
Asset, Assets as XcmAssets, Fungible, Here, InteriorLocation, Junction, Junction::*, Location,
@@ -658,8 +660,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_metadata { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_metadata { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_attribute { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_collection_metadata { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
RuntimeCall::Uniques(
pezpallet_uniques::Call::clear_collection_metadata { .. }
) | RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
),
@@ -1151,7 +1154,8 @@ impl pezpallet_treasury::Config for Runtime {
type AssetKind = ();
type Beneficiary = AccountId;
type BeneficiaryLookup = pezsp_runtime::traits::IdentityLookup<Self::Beneficiary>;
type Paymaster = pezframe_support::traits::tokens::pay::PayFromAccount<Balances, TreasuryAccount>;
type Paymaster =
pezframe_support::traits::tokens::pay::PayFromAccount<Balances, TreasuryAccount>;
type BalanceConverter = pezframe_support::traits::tokens::UnityAssetBalanceConversion;
type PayoutPeriod = PayoutSpendPeriod;
type BlockNumberProvider = pezframe_system::Pezpallet<Runtime>;
@@ -17,10 +17,10 @@
use super::*;
use pezcumulus_primitives_core::relay_chain::SessionIndex;
use pezframe_election_provider_support::{ElectionDataProvider, SequentialPhragmen};
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
use pezpallet_election_provider_multi_block::{self as multi_block, SolutionAccuracyOf};
use pezpallet_staking_async::UseValidatorsMap;
use pezpallet_staking_async_rc_client as rc_client;
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
use pezsp_runtime::{
transaction_validity::TransactionPriority, FixedPointNumber, FixedU128, SaturatedConversion,
};
@@ -139,7 +139,8 @@ impl multi_block::verifier::Config for Runtime {
type MaxBackersPerWinner = MaxBackersPerWinner;
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
type SolutionDataProvider = MultiBlockElectionSigned;
type WeightInfo = weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
type WeightInfo =
weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
}
parameter_types! {
@@ -178,7 +179,8 @@ impl multi_block::unsigned::Config for Runtime {
type OffchainSolver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>>;
type MinerTxPriority = MinerTxPriority;
type OffchainRepeat = OffchainRepeat;
type WeightInfo = weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
type WeightInfo =
weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
}
parameter_types! {
@@ -288,7 +290,8 @@ impl pezpallet_staking_async::Config for Runtime {
type VoterList = VoterList;
type TargetList = UseValidatorsMap<Self>;
type MaxValidatorSet = MaxValidatorSet;
type NominationsQuota = pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
type NominationsQuota =
pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
type MaxUnlockingChunks = pezframe_support::traits::ConstU32<32>;
type HistoryDepth = pezframe_support::traits::ConstU32<84>;
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
@@ -27,7 +27,8 @@ fn sane_block_weight() {
use pezpallet_balances::WeightInfo;
let block = RuntimeBlockWeights::get().max_block;
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
let transfer = base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
let transfer =
base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
let fit = block.checked_div_per_component(&transfer).unwrap_or_default();
assert!(fit >= 1000, "{} should be at least 1000", fit);
@@ -38,7 +39,8 @@ fn sane_block_weight() {
fn sane_transfer_fee() {
use pezpallet_balances::WeightInfo;
let base = RuntimeBlockWeights::get().get(DispatchClass::Normal).base_extrinsic;
let transfer = base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
let transfer =
base + weights::pezpallet_balances::WeightInfo::<Runtime>::transfer_allow_death();
let fee: Balance = fee::WeightToFee::weight_to_fee(&transfer);
assert!(fee <= CENTS, "{} MILLICENTS should be at most 1000", fee / MILLICENTS);
@@ -15,10 +15,11 @@
// limitations under the License.
pub mod block_weights;
pub mod extrinsic_weights;
pub mod paritydb_weights;
pub mod pezcumulus_pezpallet_teyrchain_system;
pub mod pezcumulus_pezpallet_weight_reclaim;
pub mod pezcumulus_pezpallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezframe_system;
pub mod pezframe_system_extensions;
pub mod pezpallet_asset_conversion;
@@ -49,7 +50,6 @@ pub mod pezpallet_uniques;
pub mod pezpallet_utility;
pub mod pezpallet_xcm;
pub mod pezpallet_xcm_bridge_hub_router;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod xcm;
@@ -35,10 +35,10 @@ use pezframe_support::{
},
};
use pezframe_system::EnsureRoot;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezkuwichain_runtime_constants::system_teyrchain::ASSET_HUB_ID;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezsp_runtime::traits::{AccountIdConversion, TryConvertInto};
use testnet_teyrchains_constants::pezkuwichain::snowbridge::{
EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX,
@@ -271,8 +271,8 @@ pub type Barrier = TrailingSetTopicAsId<
// If the message is one that immediately attempts to pay for execution, then
// allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet and
// BridgeHub get free execution.
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet
// and BridgeHub get free execution.
AllowExplicitUnpaidExecutionFrom<(
ParentOrParentsPlurality,
Equals<RelayTreasuryLocation>,
@@ -33,6 +33,7 @@ use asset_test_pezutils::{
ExtBuilder, GovernanceOrigin, SlotDurations,
};
use codec::{Decode, Encode};
use hex_literal::hex;
use pezframe_support::{
assert_noop, assert_ok, parameter_types,
traits::{
@@ -43,7 +44,6 @@ use pezframe_support::{
},
weights::{Weight, WeightToFee as WeightToFeeT},
};
use hex_literal::hex;
use pezsp_consensus_aura::SlotDuration;
use pezsp_core::crypto::Ss58Codec;
use pezsp_runtime::traits::MaybeEquivalence;
@@ -21,11 +21,11 @@ extern crate alloc;
pub use bp_bridge_hub_pezcumulus::*;
use bp_messages::*;
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
use codec::{Decode, Encode};
use pezbp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
};
pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
use codec::{Decode, Encode};
use pezframe_support::{
dispatch::DispatchClass,
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
@@ -20,9 +20,9 @@ use crate::{
*,
};
use alloc::{vec, vec::Vec};
use hex_literal::hex;
use pezcumulus_primitives_core::ParaId;
use pezframe_support::build_struct_json_patch;
use hex_literal::hex;
use pezsp_core::crypto::UncheckedInto;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
@@ -23,11 +23,11 @@ use pezframe_support::{
traits::{tokens::UnityOrOuterConversion, EitherOf, EitherOfDiverse, FromContains},
};
use pezframe_system::EnsureRootWithSuccess;
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezkuwi_runtime_common::{
impls::{ContainsParts, VersionedLocatableAsset},
prod_or_fast,
};
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezsp_runtime::{traits::IdentityLookup, Percent};
use teyrchains_common::pay::{LocalPay, VersionedLocatableAccount};
use xcm::latest::BodyId;
@@ -36,7 +36,9 @@ pub mod governance;
mod migrations;
mod staking;
use governance::{pezpallet_custom_origins, FellowshipAdmin, GeneralAdmin, StakingAdmin, Treasurer};
use governance::{
pezpallet_custom_origins, FellowshipAdmin, GeneralAdmin, StakingAdmin, Treasurer,
};
extern crate alloc;
@@ -48,7 +50,9 @@ use assets_common::{
};
use bp_asset_hub_zagros::CreateForeignAssetDeposit;
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezcumulus_pezpallet_teyrchain_system::{RelayNumberMonotonicallyIncreases, RelaychainDataProvider};
use pezcumulus_pezpallet_teyrchain_system::{
RelayNumberMonotonicallyIncreases, RelaychainDataProvider,
};
use pezcumulus_primitives_core::{relay_chain::AccountIndex, AggregateMessageOrigin, ParaId};
use pezframe_support::{
construct_runtime, derive_impl,
@@ -783,8 +787,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_metadata { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_metadata { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_attribute { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_collection_metadata { .. }) |
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
RuntimeCall::Uniques(
pezpallet_uniques::Call::clear_collection_metadata { .. }
) | RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. }) |
RuntimeCall::Utility { .. } |
RuntimeCall::Multisig { .. }
),
@@ -1521,7 +1526,8 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
},
Err(e) => {
tracing::error!(target: "bridges::on_runtime_upgrade", error=?e, "Failed to destroy undecodable NFT item");
return <Runtime as pezframe_system::Config>::DbWeight::get().reads_writes(0, writes);
return <Runtime as pezframe_system::Config>::DbWeight::get()
.reads_writes(0, writes);
},
}
@@ -1533,7 +1539,8 @@ impl pezframe_support::traits::OnRuntimeUpgrade for DeleteUndecodableStorage {
},
Err(e) => {
tracing::error!(target: "bridges::on_runtime_upgrade", error=?e, "Failed to destroy undecodable NFT item");
return <Runtime as pezframe_system::Config>::DbWeight::get().reads_writes(0, writes);
return <Runtime as pezframe_system::Config>::DbWeight::get()
.reads_writes(0, writes);
},
}
@@ -18,10 +18,10 @@ use super::*;
use pezcumulus_primitives_core::relay_chain::SessionIndex;
use pezframe_election_provider_support::{ElectionDataProvider, SequentialPhragmen};
use pezframe_support::traits::EitherOf;
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
use pezpallet_election_provider_multi_block::{self as multi_block, SolutionAccuracyOf};
use pezpallet_staking_async::UseValidatorsMap;
use pezpallet_staking_async_rc_client as rc_client;
use pezkuwi_runtime_common::{prod_or_fast, BalanceToU256, U256ToBalance};
use pezsp_runtime::{
transaction_validity::TransactionPriority, FixedPointNumber, FixedU128, SaturatedConversion,
};
@@ -140,7 +140,8 @@ impl multi_block::verifier::Config for Runtime {
type MaxBackersPerWinner = MaxBackersPerWinner;
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
type SolutionDataProvider = MultiBlockElectionSigned;
type WeightInfo = weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
type WeightInfo =
weights::pezpallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
}
parameter_types! {
@@ -179,7 +180,8 @@ impl multi_block::unsigned::Config for Runtime {
type OffchainSolver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>>;
type MinerTxPriority = MinerTxPriority;
type OffchainRepeat = OffchainRepeat;
type WeightInfo = weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
type WeightInfo =
weights::pezpallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
}
parameter_types! {
@@ -289,7 +291,8 @@ impl pezpallet_staking_async::Config for Runtime {
type VoterList = VoterList;
type TargetList = UseValidatorsMap<Self>;
type MaxValidatorSet = MaxValidatorSet;
type NominationsQuota = pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
type NominationsQuota =
pezpallet_staking_async::FixedNominationsQuota<{ MaxNominations::get() }>;
type MaxUnlockingChunks = pezframe_support::traits::ConstU32<32>;
type HistoryDepth = pezframe_support::traits::ConstU32<84>;
type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch;
@@ -14,13 +14,14 @@
// limitations under the License.
pub mod block_weights;
pub mod extrinsic_weights;
pub mod inmemorydb_weights;
pub mod paritydb_weights;
pub mod pezcumulus_pezpallet_teyrchain_system;
pub mod pezcumulus_pezpallet_weight_reclaim;
pub mod pezcumulus_pezpallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezframe_system;
pub mod pezframe_system_extensions;
pub mod inmemorydb_weights;
pub mod pezpallet_ah_ops;
pub mod pezpallet_asset_conversion;
pub mod pezpallet_asset_conversion_ops;
@@ -61,10 +62,9 @@ pub mod pezpallet_vesting;
pub mod pezpallet_whitelist;
pub mod pezpallet_xcm;
pub mod pezpallet_xcm_bridge_hub_router;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod pezsnowbridge_pezpallet_system_backend;
pub mod pezsnowbridge_pezpallet_system_frontend;
pub mod rocksdb_weights;
pub mod xcm;
pub use block_weights::constants::BlockExecutionWeight;
@@ -38,9 +38,9 @@ use pezframe_support::{
PalletId,
};
use pezframe_system::EnsureRoot;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezsnowbridge_outbound_queue_primitives::v2::exporter::PausableExporter;
use pezsp_runtime::traits::{AccountIdConversion, TryConvertInto};
use testnet_teyrchains_constants::zagros::locations::AssetHubParaId;
@@ -325,8 +325,8 @@ pub type Barrier = TrailingSetTopicAsId<
// If the message is one that immediately attempts to pay for execution, then
// allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet and
// sibling teyrchains get free execution.
// Parent, its pluralities (i.e. governance bodies), relay treasury pezpallet
// and sibling teyrchains get free execution.
AllowExplicitUnpaidExecutionFrom<(
ParentOrParentsPlurality,
Equals<RelayTreasuryLocation>,
@@ -40,6 +40,7 @@ use asset_test_pezutils::{
};
use assets_common::local_and_foreign_assets::ForeignAssetReserveData;
use codec::{Decode, Encode};
use hex_literal::hex;
use pezframe_support::{
assert_err, assert_noop, assert_ok, parameter_types,
traits::{
@@ -55,7 +56,6 @@ use pezframe_support::{
},
weights::{Weight, WeightToFee as WeightToFeeT},
};
use hex_literal::hex;
use pezpallet_revive::{
test_utils::builder::{BareInstantiateBuilder, Contract},
Code,
@@ -89,8 +89,9 @@ const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32];
const ERC20_PVM: &[u8] =
include_bytes!("../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/erc20.polkavm");
const FAKE_ERC20_PVM: &[u8] =
include_bytes!("../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/fake_erc20.polkavm");
const FAKE_ERC20_PVM: &[u8] = include_bytes!(
"../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/fake_erc20.polkavm"
);
const EXPENSIVE_ERC20_PVM: &[u8] = include_bytes!(
"../../../../../../bizinikiwi/pezframe/revive/fixtures/erc20/expensive_erc20.polkavm"
@@ -38,7 +38,8 @@ pub struct AssetPairFactory<Target, SelfParaId, PalletId, L = Location>(
PhantomData<(Target, SelfParaId, PalletId, L)>,
);
impl<Target: Get<L>, SelfParaId: Get<ParaId>, PalletId: Get<u32>, L: TryFrom<Location> + Debug>
pezpallet_asset_conversion::BenchmarkHelper<L> for AssetPairFactory<Target, SelfParaId, PalletId, L>
pezpallet_asset_conversion::BenchmarkHelper<L>
for AssetPairFactory<Target, SelfParaId, PalletId, L>
where
<L as TryFrom<Location>>::Error: Debug,
{
@@ -137,7 +137,10 @@ where
}
/// Helper function to convert `Balance` with Location` to `Asset`
pub fn convert_balance<T: pezframe_support::pezpallet_prelude::Get<Location>, Balance: TryInto<u128>>(
pub fn convert_balance<
T: pezframe_support::pezpallet_prelude::Get<Location>,
Balance: TryInto<u128>,
>(
balance: Balance,
) -> Result<Asset, FungiblesAccessError> {
match balance.try_into() {
@@ -74,8 +74,8 @@ pub type TrustBackedAssetsConvertedConcreteId<
pub type UniquesConvertedConcreteId<UniquesPalletLocation> = MatchedConvertedConcreteId<
CollectionId,
ItemId,
// The asset starts with the uniques pezpallet. The `CollectionId` of the asset is specified as a
// junction within the pezpallet itself.
// The asset starts with the uniques pezpallet. The `CollectionId` of the asset is specified as
// a junction within the pezpallet itself.
StartsWith<UniquesPalletLocation>,
CollectionIdForUniquesConvert<UniquesPalletLocation>,
TryConvertInto,
@@ -175,8 +175,8 @@ pub type PoolAssetsConvertedConcreteId<PoolAssetsPalletLocation, Balance> =
TryConvertInto,
>;
/// Adapter implementation for accessing pools (`pezpallet_asset_conversion`) that uses `AssetKind` as
/// a `xcm::v*` which could be different from the `xcm::latest`.
/// Adapter implementation for accessing pools (`pezpallet_asset_conversion`) that uses `AssetKind`
/// as a `xcm::v*` which could be different from the `xcm::latest`.
pub struct PoolAdapter<Runtime>(PhantomData<Runtime>);
impl<
Runtime: pezpallet_asset_conversion::Config<PoolId = (L, L), AssetKind = L>,
@@ -230,15 +230,17 @@ impl<
/// Helper function for filtering pool.
pub fn iter_assets_in_pool_with(asset: &L) -> impl Iterator<Item = L> + '_ {
pezpallet_asset_conversion::Pools::<Runtime>::iter_keys().filter_map(|(asset_1, asset_2)| {
if asset_1 == *asset {
Some(asset_2)
} else if asset_2 == *asset {
Some(asset_1)
} else {
None
}
})
pezpallet_asset_conversion::Pools::<Runtime>::iter_keys().filter_map(
|(asset_1, asset_2)| {
if asset_1 == *asset {
Some(asset_2)
} else if asset_2 == *asset {
Some(asset_1)
} else {
None
}
},
)
}
}
@@ -883,7 +883,8 @@ pub fn asset_transactor_transfer_with_pallet_assets_instance_works<
From<AssetId> + Into<AssetId>,
<Runtime as pezpallet_assets::Config<AssetsPalletInstance>>::AssetIdParameter:
From<AssetId> + Into<AssetId>,
<Runtime as pezpallet_assets::Config<AssetsPalletInstance>>::Balance: From<Balance> + Into<u128>,
<Runtime as pezpallet_assets::Config<AssetsPalletInstance>>::Balance:
From<Balance> + Into<u128>,
<Runtime as pezframe_system::Config>::AccountId:
Into<<<Runtime as pezframe_system::Config>::RuntimeOrigin as OriginTrait>::AccountId>,
<<Runtime as pezframe_system::Config>::Lookup as StaticLookup>::Source:
@@ -1199,11 +1200,15 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
.with_tracing()
.build()
.execute_with(|| {
assert!(<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
.collect::<Vec<_>>()
.is_empty());
assert!(
<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
.collect::<Vec<_>>()
.is_empty()
);
assert_eq!(
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&foreign_creator_as_account_id),
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
&foreign_creator_as_account_id
),
existential_deposit +
asset_deposit + metadata_deposit_base +
metadata_deposit_per_byte_eta +
@@ -1289,9 +1294,11 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
assert!(events.any(|e| matches!(e, pezpallet_assets::Event::TeamChanged { .. })));
// check assets after
assert!(!<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
.collect::<Vec<_>>()
.is_empty());
assert!(
!<pezpallet_assets::Pezpallet<Runtime, ForeignAssetsPalletInstance>>::asset_ids()
.collect::<Vec<_>>()
.is_empty()
);
// check update metadata
use pezframe_support::traits::fungibles::roles::Inspect as InspectRoles;
@@ -1320,10 +1327,13 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
Some(bob_account.clone())
);
assert!(
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&foreign_creator_as_account_id) >=
existential_deposit + buy_execution_fee_amount.into(),
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
&foreign_creator_as_account_id
) >= existential_deposit + buy_execution_fee_amount.into(),
"Free balance: {:?} should be ge {:?}",
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&foreign_creator_as_account_id),
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
&foreign_creator_as_account_id
),
existential_deposit + buy_execution_fee_amount.into()
);
assert_metadata::<
@@ -1701,9 +1711,10 @@ where
assert_eq!(execution_fees, expected_weight_native_fee);
// We need some balance to create an asset.
assert_ok!(
pezpallet_balances::Pezpallet::<Runtime>::mint_into(&test_account, 3_000_000_000_000,)
);
assert_ok!(pezpallet_balances::Pezpallet::<Runtime>::mint_into(
&test_account,
3_000_000_000_000,
));
// Now we try to use an asset that's not in a pool.
let asset_id = 1984u32; // USDT.