style: Migrate to stable-only rustfmt configuration
- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml - Removed features: imports_granularity, wrap_comments, comment_width, reorder_impl_items, spaces_around_ranges, binop_separator, match_arm_blocks, trailing_semicolon, trailing_comma - Format all 898 affected files with stable rustfmt - Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
+4
-1
@@ -101,7 +101,10 @@ fn asset_hub_pezkuwichain_genesis(
|
||||
) -> serde_json::Value {
|
||||
// Verify total PEZ minted at genesis equals PEZ_TOTAL_SUPPLY (5 billion)
|
||||
debug_assert_eq!(
|
||||
PEZ_TREASURY_ALLOCATION + PEZ_REWARDS_POOL + PEZ_FOUNDER_ALLOCATION + PEZ_PRESALE_ALLOCATION,
|
||||
PEZ_TREASURY_ALLOCATION
|
||||
+ PEZ_REWARDS_POOL
|
||||
+ PEZ_FOUNDER_ALLOCATION
|
||||
+ PEZ_PRESALE_ALLOCATION,
|
||||
PEZ_TOTAL_SUPPLY,
|
||||
"PEZ genesis allocations must equal total supply"
|
||||
);
|
||||
|
||||
@@ -609,99 +609,99 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
ProxyType::Any => true,
|
||||
ProxyType::NonTransfer => !matches!(
|
||||
c,
|
||||
RuntimeCall::Balances { .. } |
|
||||
RuntimeCall::Assets { .. } |
|
||||
RuntimeCall::NftFractionalization { .. } |
|
||||
RuntimeCall::Nfts { .. } |
|
||||
RuntimeCall::Uniques { .. }
|
||||
RuntimeCall::Balances { .. }
|
||||
| RuntimeCall::Assets { .. }
|
||||
| RuntimeCall::NftFractionalization { .. }
|
||||
| RuntimeCall::Nfts { .. }
|
||||
| RuntimeCall::Uniques { .. }
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Assets => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Assets { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. } |
|
||||
RuntimeCall::NftFractionalization { .. } |
|
||||
RuntimeCall::Nfts { .. } |
|
||||
RuntimeCall::Uniques { .. }
|
||||
RuntimeCall::Assets { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
| RuntimeCall::NftFractionalization { .. }
|
||||
| RuntimeCall::Nfts { .. }
|
||||
| RuntimeCall::Uniques { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::AssetOwner => matches!(
|
||||
c,
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::create { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::destroy { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::redeposit { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::transfer_ownership { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_team { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::lock_collection { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::create { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::destroy { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::transfer_ownership { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_team { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_attribute { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_attribute { .. }) |
|
||||
RuntimeCall::Uniques(
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::create { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::destroy { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::redeposit { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::transfer_ownership { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_team { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_max_supply { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::lock_collection { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::create { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::destroy { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::transfer_ownership { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::set_team { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::set_metadata { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::set_attribute { .. })
|
||||
| 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::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
) | RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::AssetManager => matches!(
|
||||
c,
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::block { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::force_mint { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::update_mint_settings { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::mint_pre_signed { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_attributes_pre_signed { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_transfer { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::unlock_item_transfer { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_properties { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_metadata { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::clear_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::mint { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::burn { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::freeze { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::thaw { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::freeze_collection { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::thaw_collection { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::block { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::force_mint { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::update_mint_settings { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::mint_pre_signed { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_attributes_pre_signed { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_transfer { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::unlock_item_transfer { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_properties { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_metadata { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::clear_metadata { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_metadata { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::clear_collection_metadata { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::mint { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::burn { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::freeze { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::thaw { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::freeze_collection { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::thaw_collection { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,12 +44,14 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min((*count as u64).max(1))),
|
||||
AllOfCounted { count, .. } =>
|
||||
weight.saturating_mul(MAX_ASSETS.min((*count as u64).max(1))),
|
||||
AllOfCounted { count, .. } => {
|
||||
weight.saturating_mul(MAX_ASSETS.min((*count as u64).max(1)))
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,10 +722,10 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
fn filter(&self, c: &RuntimeCall) -> bool {
|
||||
match self {
|
||||
ProxyType::Any => true,
|
||||
ProxyType::OldSudoBalances |
|
||||
ProxyType::OldIdentityJudgement |
|
||||
ProxyType::OldAuction |
|
||||
ProxyType::OldParaRegistration => false,
|
||||
ProxyType::OldSudoBalances
|
||||
| ProxyType::OldIdentityJudgement
|
||||
| ProxyType::OldAuction
|
||||
| ProxyType::OldParaRegistration => false,
|
||||
ProxyType::NonTransfer => !matches!(
|
||||
c,
|
||||
RuntimeCall::Balances { .. } |
|
||||
@@ -744,109 +744,109 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Assets => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Assets { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. } |
|
||||
RuntimeCall::NftFractionalization { .. } |
|
||||
RuntimeCall::Nfts { .. } |
|
||||
RuntimeCall::Uniques { .. }
|
||||
RuntimeCall::Assets { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
| RuntimeCall::NftFractionalization { .. }
|
||||
| RuntimeCall::Nfts { .. }
|
||||
| RuntimeCall::Uniques { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::AssetOwner => matches!(
|
||||
c,
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::create { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::destroy { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::redeposit { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::transfer_ownership { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_team { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_max_supply { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::lock_collection { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::create { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::destroy { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::transfer_ownership { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_team { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_attribute { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::clear_attribute { .. }) |
|
||||
RuntimeCall::Uniques(
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::create { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::destroy { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::redeposit { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::transfer_ownership { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_team { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_max_supply { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::lock_collection { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::create { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::destroy { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::transfer_ownership { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::set_team { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::set_metadata { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::set_attribute { .. })
|
||||
| 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::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
) | RuntimeCall::Uniques(pezpallet_uniques::Call::set_collection_max_supply { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::AssetManager => matches!(
|
||||
c,
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::block { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. }) |
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::force_mint { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::update_mint_settings { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::mint_pre_signed { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_attributes_pre_signed { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_transfer { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::unlock_item_transfer { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_properties { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_metadata { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::clear_metadata { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_metadata { .. }) |
|
||||
RuntimeCall::Nfts(pezpallet_nfts::Call::clear_collection_metadata { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::mint { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::burn { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::freeze { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::thaw { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::freeze_collection { .. }) |
|
||||
RuntimeCall::Uniques(pezpallet_uniques::Call::thaw_collection { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::block { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. })
|
||||
| RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::force_mint { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::update_mint_settings { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::mint_pre_signed { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_attributes_pre_signed { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_transfer { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::unlock_item_transfer { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::lock_item_properties { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_metadata { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::clear_metadata { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::set_collection_metadata { .. })
|
||||
| RuntimeCall::Nfts(pezpallet_nfts::Call::clear_collection_metadata { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::mint { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::burn { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::freeze { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::thaw { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::freeze_collection { .. })
|
||||
| RuntimeCall::Uniques(pezpallet_uniques::Call::thaw_collection { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
// New variants introduced by the Asset Hub Migration from the Relay Chain.
|
||||
ProxyType::Governance => matches!(
|
||||
c,
|
||||
RuntimeCall::Treasury(..) |
|
||||
RuntimeCall::Utility(..) |
|
||||
RuntimeCall::ConvictionVoting(..) |
|
||||
RuntimeCall::Referenda(..) |
|
||||
RuntimeCall::Whitelist(..)
|
||||
RuntimeCall::Treasury(..)
|
||||
| RuntimeCall::Utility(..)
|
||||
| RuntimeCall::ConvictionVoting(..)
|
||||
| RuntimeCall::Referenda(..)
|
||||
| RuntimeCall::Whitelist(..)
|
||||
),
|
||||
ProxyType::Staking => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Staking(..) |
|
||||
RuntimeCall::Session(..) |
|
||||
RuntimeCall::Utility(..) |
|
||||
RuntimeCall::NominationPools(..) |
|
||||
RuntimeCall::VoterList(..)
|
||||
RuntimeCall::Staking(..)
|
||||
| RuntimeCall::Session(..)
|
||||
| RuntimeCall::Utility(..)
|
||||
| RuntimeCall::NominationPools(..)
|
||||
| RuntimeCall::VoterList(..)
|
||||
)
|
||||
},
|
||||
ProxyType::NominationPools => {
|
||||
@@ -864,10 +864,10 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
(ProxyType::Assets, ProxyType::AssetManager) => true,
|
||||
(
|
||||
ProxyType::NonTransfer,
|
||||
ProxyType::Collator |
|
||||
ProxyType::Governance |
|
||||
ProxyType::Staking |
|
||||
ProxyType::NominationPools,
|
||||
ProxyType::Collator
|
||||
| ProxyType::Governance
|
||||
| ProxyType::Staking
|
||||
| ProxyType::NominationPools,
|
||||
) => true,
|
||||
_ => false,
|
||||
}
|
||||
|
||||
@@ -47,12 +47,14 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min((*count as u64).max(1))),
|
||||
AllOfCounted { count, .. } =>
|
||||
weight.saturating_mul(MAX_ASSETS.min((*count as u64).max(1))),
|
||||
AllOfCounted { count, .. } => {
|
||||
weight.saturating_mul(MAX_ASSETS.min((*count as u64).max(1)))
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,9 +284,9 @@ impl Contains<Location> for FellowshipEntities {
|
||||
fn contains(location: &Location) -> bool {
|
||||
matches!(
|
||||
location.unpack(),
|
||||
(1, [Teyrchain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }]) |
|
||||
(1, [Teyrchain(COLLECTIVES_ID), PalletInstance(64)]) |
|
||||
(1, [Teyrchain(COLLECTIVES_ID), PalletInstance(65)])
|
||||
(1, [Teyrchain(COLLECTIVES_ID), Plurality { id: BodyId::Technical, .. }])
|
||||
| (1, [Teyrchain(COLLECTIVES_ID), PalletInstance(64)])
|
||||
| (1, [Teyrchain(COLLECTIVES_ID), PalletInstance(65)])
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,8 +113,9 @@ pub mod foreign_assets_reserves {
|
||||
// At first, start migrating assets.
|
||||
None => Self::asset_step(None),
|
||||
// Migrate any remaining assets.
|
||||
Some(MigrationState::Asset(maybe_last_asset)) =>
|
||||
Self::asset_step(Some(maybe_last_asset)),
|
||||
Some(MigrationState::Asset(maybe_last_asset)) => {
|
||||
Self::asset_step(Some(maybe_last_asset))
|
||||
},
|
||||
// After the last asset, migration is finished.
|
||||
Some(MigrationState::Finished) => {
|
||||
tracing::info!(target: "runtime::ForeignAssetsReservesMigration", "migration finished");
|
||||
|
||||
@@ -73,8 +73,9 @@ pub(crate) fn assert_matches_reserve_asset_deposited_instructions<RuntimeCall: D
|
||||
})
|
||||
.expect("expected instruction BuyExecution")
|
||||
.match_next_inst(|instr| match instr {
|
||||
DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary =>
|
||||
Ok(()),
|
||||
DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => {
|
||||
Ok(())
|
||||
},
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("expected instruction DepositAsset");
|
||||
|
||||
@@ -615,9 +615,9 @@ pub fn teleports_for_foreign_assets_works<
|
||||
);
|
||||
let asset_to_teleport_away = asset_minimum_asset_balance * 3;
|
||||
assert!(
|
||||
asset_to_teleport_away <
|
||||
(target_account_balance_before_teleport -
|
||||
asset_minimum_asset_balance.into())
|
||||
asset_to_teleport_away
|
||||
< (target_account_balance_before_teleport
|
||||
- asset_minimum_asset_balance.into())
|
||||
.into()
|
||||
);
|
||||
|
||||
@@ -1190,12 +1190,12 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
|
||||
.with_session_keys(collator_session_keys.session_keys())
|
||||
.with_balances(vec![(
|
||||
foreign_creator_as_account_id.clone(),
|
||||
existential_deposit +
|
||||
asset_deposit +
|
||||
metadata_deposit_base +
|
||||
metadata_deposit_per_byte_eta +
|
||||
buy_execution_fee_amount.into() +
|
||||
buy_execution_fee_amount.into(),
|
||||
existential_deposit
|
||||
+ asset_deposit
|
||||
+ metadata_deposit_base
|
||||
+ metadata_deposit_per_byte_eta
|
||||
+ buy_execution_fee_amount.into()
|
||||
+ buy_execution_fee_amount.into(),
|
||||
)])
|
||||
.with_tracing()
|
||||
.build()
|
||||
@@ -1209,11 +1209,11 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
|
||||
&foreign_creator_as_account_id
|
||||
),
|
||||
existential_deposit +
|
||||
asset_deposit + metadata_deposit_base +
|
||||
metadata_deposit_per_byte_eta +
|
||||
buy_execution_fee_amount.into() +
|
||||
buy_execution_fee_amount.into()
|
||||
existential_deposit
|
||||
+ asset_deposit + metadata_deposit_base
|
||||
+ metadata_deposit_per_byte_eta
|
||||
+ buy_execution_fee_amount.into()
|
||||
+ buy_execution_fee_amount.into()
|
||||
);
|
||||
additional_checks_before();
|
||||
|
||||
@@ -1549,9 +1549,9 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
|
||||
// then verify the arithmetics check out on final balance.
|
||||
let delivery_fees_buffer = 40_000_000_000u128;
|
||||
// drip 2xED + transfer_amount + delivery_fees_buffer to Alice account
|
||||
let alice_account_init_balance = existential_deposit.saturating_mul(2.into()) +
|
||||
balance_to_transfer.into() +
|
||||
delivery_fees_buffer.into();
|
||||
let alice_account_init_balance = existential_deposit.saturating_mul(2.into())
|
||||
+ balance_to_transfer.into()
|
||||
+ delivery_fees_buffer.into();
|
||||
let _ = <pezpallet_balances::Pezpallet<Runtime>>::deposit_creating(
|
||||
&alice_account,
|
||||
alice_account_init_balance,
|
||||
@@ -1565,9 +1565,9 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
|
||||
// we just check here, that user retains enough balance after withdrawal
|
||||
// and also we check if `balance_to_transfer` is more than `existential_deposit`,
|
||||
assert!(
|
||||
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account) -
|
||||
balance_to_transfer.into()) >=
|
||||
existential_deposit
|
||||
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account)
|
||||
- balance_to_transfer.into())
|
||||
>= existential_deposit
|
||||
);
|
||||
// SA has just ED
|
||||
assert_eq!(
|
||||
@@ -1609,8 +1609,9 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
|
||||
.into_iter()
|
||||
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
|
||||
.find_map(|e| match e {
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
|
||||
Some(message_hash),
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => {
|
||||
Some(message_hash)
|
||||
},
|
||||
_ => None,
|
||||
});
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
// we just check here, that user retains enough balance after withdrawal
|
||||
// and also we check if `balance_to_transfer` is more than `existential_deposit`,
|
||||
assert!(
|
||||
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account) -
|
||||
balance_to_transfer.into()) >=
|
||||
existential_deposit
|
||||
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account)
|
||||
- balance_to_transfer.into())
|
||||
>= existential_deposit
|
||||
);
|
||||
// SA has just ED
|
||||
assert_eq!(
|
||||
@@ -220,8 +220,9 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
.into_iter()
|
||||
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
|
||||
.find_map(|e| match e {
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
|
||||
Some(message_hash),
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => {
|
||||
Some(message_hash)
|
||||
},
|
||||
_ => None,
|
||||
});
|
||||
|
||||
@@ -268,7 +269,9 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
// explicit unpaid execution on BridgeHub)
|
||||
UnpaidExecution { weight_limit, check_origin }
|
||||
if weight_limit == &Unlimited && check_origin.is_none() =>
|
||||
Ok(()),
|
||||
{
|
||||
Ok(())
|
||||
},
|
||||
_ => Err(ProcessMessageError::BadFormat),
|
||||
})
|
||||
.expect("contains UnpaidExecution")
|
||||
@@ -322,8 +325,8 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
|
||||
let delivery_fees_account_balance_after =
|
||||
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&delivery_fees_account);
|
||||
assert!(
|
||||
delivery_fees_account_balance_after - delivery_fees.into() >=
|
||||
delivery_fees_account_balance_before
|
||||
delivery_fees_account_balance_after - delivery_fees.into()
|
||||
>= delivery_fees_account_balance_before
|
||||
);
|
||||
}
|
||||
})
|
||||
|
||||
+3
-2
@@ -44,8 +44,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
+3
-2
@@ -302,8 +302,9 @@ pub struct AllowFromEthereumFrontend;
|
||||
impl Contains<Location> for AllowFromEthereumFrontend {
|
||||
fn contains(location: &Location) -> bool {
|
||||
match location.unpack() {
|
||||
(1, [Teyrchain(para_id), PalletInstance(index)]) =>
|
||||
return *para_id == ASSET_HUB_ID && *index == FRONTEND_PALLET_INDEX,
|
||||
(1, [Teyrchain(para_id), PalletInstance(index)]) => {
|
||||
return *para_id == ASSET_HUB_ID && *index == FRONTEND_PALLET_INDEX
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
@@ -47,8 +47,9 @@ where
|
||||
message.matcher().match_next_inst_while(
|
||||
|_| true,
|
||||
|inst| match inst {
|
||||
ExportMessage { network, .. } if ToGlobalConsensus::contains(network) =>
|
||||
Err(ProcessMessageError::Unsupported),
|
||||
ExportMessage { network, .. } if ToGlobalConsensus::contains(network) => {
|
||||
Err(ProcessMessageError::Unsupported)
|
||||
},
|
||||
_ => Ok(ControlFlow::Continue(())),
|
||||
},
|
||||
)?;
|
||||
|
||||
@@ -122,8 +122,9 @@ where
|
||||
) -> Result<bool, ProcessMessageError> {
|
||||
use AggregateMessageOrigin::*;
|
||||
match origin {
|
||||
Here | Parent | Sibling(_) =>
|
||||
XcmpProcessor::process_message(message, origin, meter, id),
|
||||
Here | Parent | Sibling(_) => {
|
||||
XcmpProcessor::process_message(message, origin, meter, id)
|
||||
},
|
||||
Snowbridge(_) => SnowbridgeProcessor::process_message(message, origin, meter, id),
|
||||
SnowbridgeV2(_) => Err(ProcessMessageError::Unsupported),
|
||||
}
|
||||
@@ -155,8 +156,9 @@ where
|
||||
) -> Result<bool, ProcessMessageError> {
|
||||
use AggregateMessageOrigin::*;
|
||||
match origin {
|
||||
Here | Parent | Sibling(_) =>
|
||||
XcmpProcessor::process_message(message, origin, meter, id),
|
||||
Here | Parent | Sibling(_) => {
|
||||
XcmpProcessor::process_message(message, origin, meter, id)
|
||||
},
|
||||
Snowbridge(_) => SnowbridgeProcessor::process_message(message, origin, meter, id),
|
||||
SnowbridgeV2(_) => SnowbridgeProcessorV2::process_message(message, origin, meter, id),
|
||||
}
|
||||
|
||||
@@ -303,8 +303,8 @@ pub fn relayed_incoming_message_works<Runtime, AllPalletsWithoutSystem, MPI>(
|
||||
// value here is tricky - there are several transaction payment pallets and we don't
|
||||
// want to introduce additional bounds and traits here just for that, so let's just
|
||||
// select some presumably large value
|
||||
core::cmp::max::<Runtime::Balance>(Runtime::ExistentialDeposit::get(), 1u32.into()) *
|
||||
100_000_000u32.into(),
|
||||
core::cmp::max::<Runtime::Balance>(Runtime::ExistentialDeposit::get(), 1u32.into())
|
||||
* 100_000_000u32.into(),
|
||||
)],
|
||||
|| {
|
||||
let mut alice = [0u8; 32];
|
||||
@@ -445,8 +445,8 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
let buy_execution_fee_amount = 5_000_000_000_000_u128;
|
||||
let buy_execution_fee = (TokenLocation::get(), buy_execution_fee_amount).into();
|
||||
|
||||
let balance_needed = <Runtime as pezpallet_balances::Config>::ExistentialDeposit::get() +
|
||||
buy_execution_fee_amount.into();
|
||||
let balance_needed = <Runtime as pezpallet_balances::Config>::ExistentialDeposit::get()
|
||||
+ buy_execution_fee_amount.into();
|
||||
let source_account_id =
|
||||
LocationToAccountId::convert_location(&source).expect("valid location");
|
||||
let _ = <pezpallet_balances::Pezpallet<Runtime>>::mint_into(
|
||||
@@ -563,8 +563,8 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
|
||||
let buy_execution_fee_amount = 2_500_000_000_000_u128;
|
||||
let buy_execution_fee = (TokenLocation::get(), buy_execution_fee_amount).into();
|
||||
|
||||
let balance_needed = <Runtime as pezpallet_balances::Config>::ExistentialDeposit::get() +
|
||||
buy_execution_fee_amount.into();
|
||||
let balance_needed = <Runtime as pezpallet_balances::Config>::ExistentialDeposit::get()
|
||||
+ buy_execution_fee_amount.into();
|
||||
let source_account_id =
|
||||
LocationToAccountId::convert_location(&expected_source).expect("valid location");
|
||||
let _ = <pezpallet_balances::Pezpallet<Runtime>>::mint_into(
|
||||
|
||||
@@ -332,49 +332,49 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
ProxyType::NonTransfer => !matches!(c, RuntimeCall::Balances { .. }),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Alliance => matches!(
|
||||
c,
|
||||
RuntimeCall::AllianceMotion { .. } |
|
||||
RuntimeCall::Alliance { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::AllianceMotion { .. }
|
||||
| RuntimeCall::Alliance { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Fellowship => matches!(
|
||||
c,
|
||||
RuntimeCall::FellowshipCollective { .. } |
|
||||
RuntimeCall::FellowshipReferenda { .. } |
|
||||
RuntimeCall::FellowshipCore { .. } |
|
||||
RuntimeCall::FellowshipSalary { .. } |
|
||||
RuntimeCall::FellowshipTreasury { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::FellowshipCollective { .. }
|
||||
| RuntimeCall::FellowshipReferenda { .. }
|
||||
| RuntimeCall::FellowshipCore { .. }
|
||||
| RuntimeCall::FellowshipSalary { .. }
|
||||
| RuntimeCall::FellowshipTreasury { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Ambassador => matches!(
|
||||
c,
|
||||
RuntimeCall::AmbassadorCollective { .. } |
|
||||
RuntimeCall::AmbassadorReferenda { .. } |
|
||||
RuntimeCall::AmbassadorContent { .. } |
|
||||
RuntimeCall::AmbassadorCore { .. } |
|
||||
RuntimeCall::AmbassadorSalary { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::AmbassadorCollective { .. }
|
||||
| RuntimeCall::AmbassadorReferenda { .. }
|
||||
| RuntimeCall::AmbassadorContent { .. }
|
||||
| RuntimeCall::AmbassadorCore { .. }
|
||||
| RuntimeCall::AmbassadorSalary { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Secretary => matches!(
|
||||
c,
|
||||
RuntimeCall::SecretaryCollective { .. } |
|
||||
RuntimeCall::SecretarySalary { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::SecretaryCollective { .. }
|
||||
| RuntimeCall::SecretarySalary { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -44,8 +44,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
@@ -524,39 +524,39 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Broker => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Broker { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Broker { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::CoretimeRenewer => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::renew { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::renew { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::OnDemandPurchaser => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::purchase_credit { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::purchase_credit { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -44,8 +44,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
@@ -522,39 +522,39 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Broker => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Broker { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Broker { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::CoretimeRenewer => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::renew { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::renew { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::OnDemandPurchaser => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::purchase_credit { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Broker(pezpallet_broker::Call::purchase_credit { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,8 +43,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
@@ -562,29 +562,29 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Identity => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Identity { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Identity { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::IdentityJudgement => matches!(
|
||||
c,
|
||||
RuntimeCall::Identity(pezpallet_identity::Call::provide_judgement { .. }) |
|
||||
RuntimeCall::Utility(..) |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Identity(pezpallet_identity::Call::provide_judgement { .. })
|
||||
| RuntimeCall::Utility(..)
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,8 +43,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
@@ -477,29 +477,29 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
||||
),
|
||||
ProxyType::CancelProxy => matches!(
|
||||
c,
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. }) |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Proxy(pezpallet_proxy::Call::reject_announcement { .. })
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Identity => {
|
||||
matches!(
|
||||
c,
|
||||
RuntimeCall::Identity { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Identity { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
)
|
||||
},
|
||||
ProxyType::IdentityJudgement => matches!(
|
||||
c,
|
||||
RuntimeCall::Identity(pezpallet_identity::Call::provide_judgement { .. }) |
|
||||
RuntimeCall::Utility(..) |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::Identity(pezpallet_identity::Call::provide_judgement { .. })
|
||||
| RuntimeCall::Utility(..)
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
ProxyType::Collator => matches!(
|
||||
c,
|
||||
RuntimeCall::CollatorSelection { .. } |
|
||||
RuntimeCall::Utility { .. } |
|
||||
RuntimeCall::Multisig { .. }
|
||||
RuntimeCall::CollatorSelection { .. }
|
||||
| RuntimeCall::Utility { .. }
|
||||
| RuntimeCall::Multisig { .. }
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,8 +43,9 @@ impl WeighAssets for AssetFilter {
|
||||
WildFungibility::Fungible => weight,
|
||||
// Magic number 2 has to do with the fact that we could have up to 2 times
|
||||
// MaxAssetsIntoHolding in the worst-case scenario.
|
||||
WildFungibility::NonFungible =>
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
|
||||
WildFungibility::NonFungible => {
|
||||
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64)
|
||||
},
|
||||
},
|
||||
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
|
||||
@@ -525,14 +525,17 @@ impl<
|
||||
GovernanceOrigin::Location(location) if location == Location::here() => {
|
||||
panic!("Location::here() not supported, use GovernanceOrigin::Origin instead")
|
||||
},
|
||||
GovernanceOrigin::Location(location) =>
|
||||
execute_xcm(call, location, None).ensure_complete().map_err(Either::Right),
|
||||
GovernanceOrigin::LocationAndDescendOrigin(location, descend_origin) =>
|
||||
GovernanceOrigin::Location(location) => {
|
||||
execute_xcm(call, location, None).ensure_complete().map_err(Either::Right)
|
||||
},
|
||||
GovernanceOrigin::LocationAndDescendOrigin(location, descend_origin) => {
|
||||
execute_xcm(call, location, Some(descend_origin))
|
||||
.ensure_complete()
|
||||
.map_err(Either::Right),
|
||||
GovernanceOrigin::Origin(origin) =>
|
||||
call.dispatch(origin).map(|_| ()).map_err(|e| Either::Left(e.error)),
|
||||
.map_err(Either::Right)
|
||||
},
|
||||
GovernanceOrigin::Origin(origin) => {
|
||||
call.dispatch(origin).map(|_| ()).map_err(|e| Either::Left(e.error))
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,8 +643,9 @@ impl<
|
||||
.into_iter()
|
||||
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
|
||||
.find_map(|e| match e {
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
|
||||
Some(message_hash),
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => {
|
||||
Some(message_hash)
|
||||
},
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -272,8 +272,8 @@ where
|
||||
{
|
||||
fn contains(asset: &Asset, origin: &Location) -> bool {
|
||||
let loc = Origin::get();
|
||||
&loc == origin &&
|
||||
matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) }
|
||||
&loc == origin
|
||||
&& matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) }
|
||||
if asset_loc.starts_with(&Prefix::get()))
|
||||
}
|
||||
}
|
||||
@@ -331,8 +331,8 @@ impl<AssetLocation: Get<Location>, Origin: Get<Location>> ContainsPair<Asset, Lo
|
||||
{
|
||||
fn contains(asset: &Asset, origin: &Location) -> bool {
|
||||
tracing::trace!(target: "xcm::contains", ?asset, ?origin, "AssetFromChain");
|
||||
*origin == Origin::get() &&
|
||||
matches!(asset.id.clone(), AssetId(id) if id == AssetLocation::get())
|
||||
*origin == Origin::get()
|
||||
&& matches!(asset.id.clone(), AssetId(id) if id == AssetLocation::get())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -59,8 +59,9 @@ pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
|
||||
};
|
||||
|
||||
let patch = match id.as_ref() {
|
||||
pezsp_genesis_builder::DEV_RUNTIME_PRESET =>
|
||||
genesis_fn(vec![Sr25519Keyring::Alice.public().into()]),
|
||||
pezsp_genesis_builder::DEV_RUNTIME_PRESET => {
|
||||
genesis_fn(vec![Sr25519Keyring::Alice.public().into()])
|
||||
},
|
||||
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => genesis_fn(vec![
|
||||
Sr25519Keyring::Alice.public().into(),
|
||||
Sr25519Keyring::Bob.public().into(),
|
||||
|
||||
@@ -401,8 +401,8 @@ impl WeightToFeePolynomial for WeightToFee {
|
||||
// in Pezkuwichain, extrinsic base weight (smallest non-zero weight) is mapped to 1
|
||||
// MILLI_UNIT: in our template, we map to 1/10 of that, or 1/10 MILLI_UNIT
|
||||
let p = YAP / 10;
|
||||
let q = 100 *
|
||||
Balance::from(
|
||||
let q = 100
|
||||
* Balance::from(
|
||||
pezframe_support::weights::constants::ExtrinsicBaseWeight::get().ref_time(),
|
||||
);
|
||||
vec![WeightToFeeCoefficient {
|
||||
|
||||
Reference in New Issue
Block a user