diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 308b5b219da1..aba226b3baab 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -491,98 +491,97 @@ impl InstanceFilter 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(pallet_proxy::Call::reject_announcement { .. }) - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + RuntimeCall::Proxy(pallet_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(pallet_nfts::Call::create { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::transfer_ownership { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_team { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_collection_max_supply { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::lock_collection { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + 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(pallet_nfts::Call::create { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::transfer_ownership { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_team { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_collection_max_supply { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::lock_collection { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) | + RuntimeCall::Uniques(pallet_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(pallet_nfts::Call::force_mint { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::update_mint_settings { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::mint_pre_signed { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_attributes_pre_signed { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::lock_item_transfer { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::unlock_item_transfer { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::lock_item_properties { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_metadata { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::clear_metadata { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_collection_metadata { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::clear_collection_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) - | RuntimeCall::Uniques(pallet_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(pallet_nfts::Call::force_mint { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::update_mint_settings { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::mint_pre_signed { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_attributes_pre_signed { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::lock_item_transfer { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::unlock_item_transfer { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::lock_item_properties { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_metadata { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::clear_metadata { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_collection_metadata { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::clear_collection_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } ), ProxyType::Collator => matches!( c, - RuntimeCall::CollatorSelection { .. } - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + RuntimeCall::CollatorSelection { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } ), } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index c124d49e8586..7b2b97dfe716 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -282,205 +282,203 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true; + return true } } // Allow to change dedicated storage items (called by governance-like) match call { RuntimeCall::System(frame_system::Call::set_storage { items }) - if items.iter().all(|(k, _)| k.eq(&bridging::XcmBridgeHubRouterByteFee::key())) - || items.iter().all(|(k, _)| k.eq(&Flavor::key())) => - { - return true - }, + if items.iter().all(|(k, _)| k.eq(&bridging::XcmBridgeHubRouterByteFee::key())) || + items.iter().all(|(k, _)| k.eq(&Flavor::key())) => + return true, _ => (), }; matches!( call, - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) - | RuntimeCall::System( - frame_system::Call::set_heap_pages { .. } - | frame_system::Call::set_code { .. } - | frame_system::Call::set_code_without_checks { .. } - | frame_system::Call::kill_prefix { .. }, - ) | RuntimeCall::ParachainSystem(..) - | RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::CollatorSelection( - pallet_collator_selection::Call::set_desired_candidates { .. } - | pallet_collator_selection::Call::set_candidacy_bond { .. } - | pallet_collator_selection::Call::register_as_candidate { .. } - | pallet_collator_selection::Call::leave_intent { .. } - | pallet_collator_selection::Call::set_invulnerables { .. } - | pallet_collator_selection::Call::add_invulnerable { .. } - | pallet_collator_selection::Call::remove_invulnerable { .. }, - ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) - | RuntimeCall::XcmpQueue(..) - | RuntimeCall::DmpQueue(..) - | RuntimeCall::Assets( - pallet_assets::Call::create { .. } - | pallet_assets::Call::force_create { .. } - | pallet_assets::Call::start_destroy { .. } - | pallet_assets::Call::destroy_accounts { .. } - | pallet_assets::Call::destroy_approvals { .. } - | pallet_assets::Call::finish_destroy { .. } - | pallet_assets::Call::block { .. } - | pallet_assets::Call::mint { .. } - | pallet_assets::Call::burn { .. } - | pallet_assets::Call::transfer { .. } - | pallet_assets::Call::transfer_keep_alive { .. } - | pallet_assets::Call::force_transfer { .. } - | pallet_assets::Call::freeze { .. } - | pallet_assets::Call::thaw { .. } - | pallet_assets::Call::freeze_asset { .. } - | pallet_assets::Call::thaw_asset { .. } - | pallet_assets::Call::transfer_ownership { .. } - | pallet_assets::Call::set_team { .. } - | pallet_assets::Call::set_metadata { .. } - | pallet_assets::Call::clear_metadata { .. } - | pallet_assets::Call::force_set_metadata { .. } - | pallet_assets::Call::force_clear_metadata { .. } - | pallet_assets::Call::force_asset_status { .. } - | pallet_assets::Call::approve_transfer { .. } - | pallet_assets::Call::cancel_approval { .. } - | pallet_assets::Call::force_cancel_approval { .. } - | pallet_assets::Call::transfer_approved { .. } - | pallet_assets::Call::touch { .. } - | pallet_assets::Call::touch_other { .. } - | pallet_assets::Call::refund { .. } - | pallet_assets::Call::refund_other { .. }, + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | + RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | RuntimeCall::ParachainSystem(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Balances(..) | + RuntimeCall::CollatorSelection( + pallet_collator_selection::Call::set_desired_candidates { .. } | + pallet_collator_selection::Call::set_candidacy_bond { .. } | + pallet_collator_selection::Call::register_as_candidate { .. } | + pallet_collator_selection::Call::leave_intent { .. } | + pallet_collator_selection::Call::set_invulnerables { .. } | + pallet_collator_selection::Call::add_invulnerable { .. } | + pallet_collator_selection::Call::remove_invulnerable { .. }, + ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | + RuntimeCall::Assets( + pallet_assets::Call::create { .. } | + pallet_assets::Call::force_create { .. } | + pallet_assets::Call::start_destroy { .. } | + pallet_assets::Call::destroy_accounts { .. } | + pallet_assets::Call::destroy_approvals { .. } | + pallet_assets::Call::finish_destroy { .. } | + pallet_assets::Call::block { .. } | + pallet_assets::Call::mint { .. } | + pallet_assets::Call::burn { .. } | + pallet_assets::Call::transfer { .. } | + pallet_assets::Call::transfer_keep_alive { .. } | + pallet_assets::Call::force_transfer { .. } | + pallet_assets::Call::freeze { .. } | + pallet_assets::Call::thaw { .. } | + pallet_assets::Call::freeze_asset { .. } | + pallet_assets::Call::thaw_asset { .. } | + pallet_assets::Call::transfer_ownership { .. } | + pallet_assets::Call::set_team { .. } | + pallet_assets::Call::set_metadata { .. } | + pallet_assets::Call::clear_metadata { .. } | + pallet_assets::Call::force_set_metadata { .. } | + pallet_assets::Call::force_clear_metadata { .. } | + pallet_assets::Call::force_asset_status { .. } | + pallet_assets::Call::approve_transfer { .. } | + pallet_assets::Call::cancel_approval { .. } | + pallet_assets::Call::force_cancel_approval { .. } | + pallet_assets::Call::transfer_approved { .. } | + pallet_assets::Call::touch { .. } | + pallet_assets::Call::touch_other { .. } | + pallet_assets::Call::refund { .. } | + pallet_assets::Call::refund_other { .. }, ) | RuntimeCall::ForeignAssets( - pallet_assets::Call::create { .. } - | pallet_assets::Call::force_create { .. } - | pallet_assets::Call::start_destroy { .. } - | pallet_assets::Call::destroy_accounts { .. } - | pallet_assets::Call::destroy_approvals { .. } - | pallet_assets::Call::finish_destroy { .. } - | pallet_assets::Call::block { .. } - | pallet_assets::Call::mint { .. } - | pallet_assets::Call::burn { .. } - | pallet_assets::Call::transfer { .. } - | pallet_assets::Call::transfer_keep_alive { .. } - | pallet_assets::Call::force_transfer { .. } - | pallet_assets::Call::freeze { .. } - | pallet_assets::Call::thaw { .. } - | pallet_assets::Call::freeze_asset { .. } - | pallet_assets::Call::thaw_asset { .. } - | pallet_assets::Call::transfer_ownership { .. } - | pallet_assets::Call::set_team { .. } - | pallet_assets::Call::set_metadata { .. } - | pallet_assets::Call::clear_metadata { .. } - | pallet_assets::Call::force_set_metadata { .. } - | pallet_assets::Call::force_clear_metadata { .. } - | pallet_assets::Call::force_asset_status { .. } - | pallet_assets::Call::approve_transfer { .. } - | pallet_assets::Call::cancel_approval { .. } - | pallet_assets::Call::force_cancel_approval { .. } - | pallet_assets::Call::transfer_approved { .. } - | pallet_assets::Call::touch { .. } - | pallet_assets::Call::touch_other { .. } - | pallet_assets::Call::refund { .. } - | pallet_assets::Call::refund_other { .. }, + pallet_assets::Call::create { .. } | + pallet_assets::Call::force_create { .. } | + pallet_assets::Call::start_destroy { .. } | + pallet_assets::Call::destroy_accounts { .. } | + pallet_assets::Call::destroy_approvals { .. } | + pallet_assets::Call::finish_destroy { .. } | + pallet_assets::Call::block { .. } | + pallet_assets::Call::mint { .. } | + pallet_assets::Call::burn { .. } | + pallet_assets::Call::transfer { .. } | + pallet_assets::Call::transfer_keep_alive { .. } | + pallet_assets::Call::force_transfer { .. } | + pallet_assets::Call::freeze { .. } | + pallet_assets::Call::thaw { .. } | + pallet_assets::Call::freeze_asset { .. } | + pallet_assets::Call::thaw_asset { .. } | + pallet_assets::Call::transfer_ownership { .. } | + pallet_assets::Call::set_team { .. } | + pallet_assets::Call::set_metadata { .. } | + pallet_assets::Call::clear_metadata { .. } | + pallet_assets::Call::force_set_metadata { .. } | + pallet_assets::Call::force_clear_metadata { .. } | + pallet_assets::Call::force_asset_status { .. } | + pallet_assets::Call::approve_transfer { .. } | + pallet_assets::Call::cancel_approval { .. } | + pallet_assets::Call::force_cancel_approval { .. } | + pallet_assets::Call::transfer_approved { .. } | + pallet_assets::Call::touch { .. } | + pallet_assets::Call::touch_other { .. } | + pallet_assets::Call::refund { .. } | + pallet_assets::Call::refund_other { .. }, ) | RuntimeCall::PoolAssets( - pallet_assets::Call::force_create { .. } - | pallet_assets::Call::block { .. } - | pallet_assets::Call::burn { .. } - | pallet_assets::Call::transfer { .. } - | pallet_assets::Call::transfer_keep_alive { .. } - | pallet_assets::Call::force_transfer { .. } - | pallet_assets::Call::freeze { .. } - | pallet_assets::Call::thaw { .. } - | pallet_assets::Call::freeze_asset { .. } - | pallet_assets::Call::thaw_asset { .. } - | pallet_assets::Call::transfer_ownership { .. } - | pallet_assets::Call::set_team { .. } - | pallet_assets::Call::set_metadata { .. } - | pallet_assets::Call::clear_metadata { .. } - | pallet_assets::Call::force_set_metadata { .. } - | pallet_assets::Call::force_clear_metadata { .. } - | pallet_assets::Call::force_asset_status { .. } - | pallet_assets::Call::approve_transfer { .. } - | pallet_assets::Call::cancel_approval { .. } - | pallet_assets::Call::force_cancel_approval { .. } - | pallet_assets::Call::transfer_approved { .. } - | pallet_assets::Call::touch { .. } - | pallet_assets::Call::touch_other { .. } - | pallet_assets::Call::refund { .. } - | pallet_assets::Call::refund_other { .. }, + pallet_assets::Call::force_create { .. } | + pallet_assets::Call::block { .. } | + pallet_assets::Call::burn { .. } | + pallet_assets::Call::transfer { .. } | + pallet_assets::Call::transfer_keep_alive { .. } | + pallet_assets::Call::force_transfer { .. } | + pallet_assets::Call::freeze { .. } | + pallet_assets::Call::thaw { .. } | + pallet_assets::Call::freeze_asset { .. } | + pallet_assets::Call::thaw_asset { .. } | + pallet_assets::Call::transfer_ownership { .. } | + pallet_assets::Call::set_team { .. } | + pallet_assets::Call::set_metadata { .. } | + pallet_assets::Call::clear_metadata { .. } | + pallet_assets::Call::force_set_metadata { .. } | + pallet_assets::Call::force_clear_metadata { .. } | + pallet_assets::Call::force_asset_status { .. } | + pallet_assets::Call::approve_transfer { .. } | + pallet_assets::Call::cancel_approval { .. } | + pallet_assets::Call::force_cancel_approval { .. } | + pallet_assets::Call::transfer_approved { .. } | + pallet_assets::Call::touch { .. } | + pallet_assets::Call::touch_other { .. } | + pallet_assets::Call::refund { .. } | + pallet_assets::Call::refund_other { .. }, ) | RuntimeCall::AssetConversion( - pallet_asset_conversion::Call::create_pool { .. } - | pallet_asset_conversion::Call::add_liquidity { .. } - | pallet_asset_conversion::Call::remove_liquidity { .. } - | pallet_asset_conversion::Call::swap_tokens_for_exact_tokens { .. } - | pallet_asset_conversion::Call::swap_exact_tokens_for_tokens { .. }, + pallet_asset_conversion::Call::create_pool { .. } | + pallet_asset_conversion::Call::add_liquidity { .. } | + pallet_asset_conversion::Call::remove_liquidity { .. } | + pallet_asset_conversion::Call::swap_tokens_for_exact_tokens { .. } | + pallet_asset_conversion::Call::swap_exact_tokens_for_tokens { .. }, ) | RuntimeCall::NftFractionalization( - pallet_nft_fractionalization::Call::fractionalize { .. } - | pallet_nft_fractionalization::Call::unify { .. }, + pallet_nft_fractionalization::Call::fractionalize { .. } | + pallet_nft_fractionalization::Call::unify { .. }, ) | RuntimeCall::Nfts( - pallet_nfts::Call::create { .. } - | pallet_nfts::Call::force_create { .. } - | pallet_nfts::Call::destroy { .. } - | pallet_nfts::Call::mint { .. } - | pallet_nfts::Call::force_mint { .. } - | pallet_nfts::Call::burn { .. } - | pallet_nfts::Call::transfer { .. } - | pallet_nfts::Call::lock_item_transfer { .. } - | pallet_nfts::Call::unlock_item_transfer { .. } - | pallet_nfts::Call::lock_collection { .. } - | pallet_nfts::Call::transfer_ownership { .. } - | pallet_nfts::Call::set_team { .. } - | pallet_nfts::Call::force_collection_owner { .. } - | pallet_nfts::Call::force_collection_config { .. } - | pallet_nfts::Call::approve_transfer { .. } - | pallet_nfts::Call::cancel_approval { .. } - | pallet_nfts::Call::clear_all_transfer_approvals { .. } - | pallet_nfts::Call::lock_item_properties { .. } - | pallet_nfts::Call::set_attribute { .. } - | pallet_nfts::Call::force_set_attribute { .. } - | pallet_nfts::Call::clear_attribute { .. } - | pallet_nfts::Call::approve_item_attributes { .. } - | pallet_nfts::Call::cancel_item_attributes_approval { .. } - | pallet_nfts::Call::set_metadata { .. } - | pallet_nfts::Call::clear_metadata { .. } - | pallet_nfts::Call::set_collection_metadata { .. } - | pallet_nfts::Call::clear_collection_metadata { .. } - | pallet_nfts::Call::set_accept_ownership { .. } - | pallet_nfts::Call::set_collection_max_supply { .. } - | pallet_nfts::Call::update_mint_settings { .. } - | pallet_nfts::Call::set_price { .. } - | pallet_nfts::Call::buy_item { .. } - | pallet_nfts::Call::pay_tips { .. } - | pallet_nfts::Call::create_swap { .. } - | pallet_nfts::Call::cancel_swap { .. } - | pallet_nfts::Call::claim_swap { .. }, + pallet_nfts::Call::create { .. } | + pallet_nfts::Call::force_create { .. } | + pallet_nfts::Call::destroy { .. } | + pallet_nfts::Call::mint { .. } | + pallet_nfts::Call::force_mint { .. } | + pallet_nfts::Call::burn { .. } | + pallet_nfts::Call::transfer { .. } | + pallet_nfts::Call::lock_item_transfer { .. } | + pallet_nfts::Call::unlock_item_transfer { .. } | + pallet_nfts::Call::lock_collection { .. } | + pallet_nfts::Call::transfer_ownership { .. } | + pallet_nfts::Call::set_team { .. } | + pallet_nfts::Call::force_collection_owner { .. } | + pallet_nfts::Call::force_collection_config { .. } | + pallet_nfts::Call::approve_transfer { .. } | + pallet_nfts::Call::cancel_approval { .. } | + pallet_nfts::Call::clear_all_transfer_approvals { .. } | + pallet_nfts::Call::lock_item_properties { .. } | + pallet_nfts::Call::set_attribute { .. } | + pallet_nfts::Call::force_set_attribute { .. } | + pallet_nfts::Call::clear_attribute { .. } | + pallet_nfts::Call::approve_item_attributes { .. } | + pallet_nfts::Call::cancel_item_attributes_approval { .. } | + pallet_nfts::Call::set_metadata { .. } | + pallet_nfts::Call::clear_metadata { .. } | + pallet_nfts::Call::set_collection_metadata { .. } | + pallet_nfts::Call::clear_collection_metadata { .. } | + pallet_nfts::Call::set_accept_ownership { .. } | + pallet_nfts::Call::set_collection_max_supply { .. } | + pallet_nfts::Call::update_mint_settings { .. } | + pallet_nfts::Call::set_price { .. } | + pallet_nfts::Call::buy_item { .. } | + pallet_nfts::Call::pay_tips { .. } | + pallet_nfts::Call::create_swap { .. } | + pallet_nfts::Call::cancel_swap { .. } | + pallet_nfts::Call::claim_swap { .. }, ) | RuntimeCall::Uniques( - pallet_uniques::Call::create { .. } - | pallet_uniques::Call::force_create { .. } - | pallet_uniques::Call::destroy { .. } - | pallet_uniques::Call::mint { .. } - | pallet_uniques::Call::burn { .. } - | pallet_uniques::Call::transfer { .. } - | pallet_uniques::Call::freeze { .. } - | pallet_uniques::Call::thaw { .. } - | pallet_uniques::Call::freeze_collection { .. } - | pallet_uniques::Call::thaw_collection { .. } - | pallet_uniques::Call::transfer_ownership { .. } - | pallet_uniques::Call::set_team { .. } - | pallet_uniques::Call::approve_transfer { .. } - | pallet_uniques::Call::cancel_approval { .. } - | pallet_uniques::Call::force_item_status { .. } - | pallet_uniques::Call::set_attribute { .. } - | pallet_uniques::Call::clear_attribute { .. } - | pallet_uniques::Call::set_metadata { .. } - | pallet_uniques::Call::clear_metadata { .. } - | pallet_uniques::Call::set_collection_metadata { .. } - | pallet_uniques::Call::clear_collection_metadata { .. } - | pallet_uniques::Call::set_accept_ownership { .. } - | pallet_uniques::Call::set_collection_max_supply { .. } - | pallet_uniques::Call::set_price { .. } - | pallet_uniques::Call::buy_item { .. } + pallet_uniques::Call::create { .. } | + pallet_uniques::Call::force_create { .. } | + pallet_uniques::Call::destroy { .. } | + pallet_uniques::Call::mint { .. } | + pallet_uniques::Call::burn { .. } | + pallet_uniques::Call::transfer { .. } | + pallet_uniques::Call::freeze { .. } | + pallet_uniques::Call::thaw { .. } | + pallet_uniques::Call::freeze_collection { .. } | + pallet_uniques::Call::thaw_collection { .. } | + pallet_uniques::Call::transfer_ownership { .. } | + pallet_uniques::Call::set_team { .. } | + pallet_uniques::Call::approve_transfer { .. } | + pallet_uniques::Call::cancel_approval { .. } | + pallet_uniques::Call::force_item_status { .. } | + pallet_uniques::Call::set_attribute { .. } | + pallet_uniques::Call::clear_attribute { .. } | + pallet_uniques::Call::set_metadata { .. } | + pallet_uniques::Call::clear_metadata { .. } | + pallet_uniques::Call::set_collection_metadata { .. } | + pallet_uniques::Call::clear_collection_metadata { .. } | + pallet_uniques::Call::set_accept_ownership { .. } | + pallet_uniques::Call::set_collection_max_supply { .. } | + pallet_uniques::Call::set_price { .. } | + pallet_uniques::Call::buy_item { .. } ) | RuntimeCall::ToWococoXcmRouter( pallet_xcm_bridge_hub_router::Call::report_bridge_status { .. } ) | RuntimeCall::ToRococoXcmRouter( diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index a257042233d9..63d96692fe52 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -42,10 +42,9 @@ use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_router_primitives::inbound::MessageToXcm; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; -use sp_runtime::traits::AccountIdConversion; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, + traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index d2a41ab6d580..989410ce7bd2 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -41,23 +41,24 @@ use parachains_common::{ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use rococo_runtime_constants::system_parachain::SystemParachains; +use snowbridge_router_primitives::outbound::EthereumBlobExporter; use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeesToAccount, HashedDescription, DescribeFamily, DescribeAllTerminal + XcmFeesToAccount, }; use xcm_executor::{ traits::{ExportXcm, WithOriginFilter}, XcmExecutor, }; -use snowbridge_router_primitives::outbound::EthereumBlobExporter; parameter_types! { pub storage Flavor: RuntimeFlavor = RuntimeFlavor::default(); @@ -222,12 +223,12 @@ impl Contains for SafeCallFilter { BridgeGrandpaWococoInstance, >::initialize { .. }) | RuntimeCall::EthereumBeaconClient( - snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } - | snowbridge_ethereum_beacon_client::Call::set_owner { .. } - | snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, + snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } | + snowbridge_ethereum_beacon_client::Call::set_owner { .. } | + snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumInboundQueue( - snowbridge_inbound_queue::Call::set_owner { .. } - | snowbridge_inbound_queue::Call::set_operating_mode { .. }, + snowbridge_inbound_queue::Call::set_owner { .. } | + snowbridge_inbound_queue::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumOutboundQueue( snowbridge_outbound_queue::Call::set_owner { .. } | snowbridge_outbound_queue::Call::set_operating_mode { .. }, @@ -335,12 +336,17 @@ pub type XcmRouter = WithUniqueTopic<( #[cfg(feature = "runtime-benchmarks")] pub(crate) mod benchmark_helper { - use crate::xcm_config::{MultiAssets, MultiLocation, SendError, SendResult, SendXcm, Xcm, XcmHash}; + use crate::xcm_config::{ + MultiAssets, MultiLocation, SendError, SendResult, SendXcm, Xcm, XcmHash, + }; pub struct DoNothingRouter; impl SendXcm for DoNothingRouter { type Ticket = (); - fn validate(_dest: &mut Option, _msg: &mut Option>) -> SendResult<()> { + fn validate( + _dest: &mut Option, + _msg: &mut Option>, + ) -> SendResult<()> { Ok(((), MultiAssets::new())) } fn deliver(_: ()) -> Result { @@ -440,7 +446,7 @@ impl ExportXcm for BridgeHubRococoOrBridgeHubWococoSwitchExporter { destination, message, ) - .map(|result| ((Ethereum {chain_id: 15}, result.0), result.1)) // TODO get network ID + .map(|result| ((Ethereum { chain_id: 15 }, result.0), result.1)) // TODO get network ID }, _ => unimplemented!("Unsupported network: {:?}", network), } @@ -451,9 +457,8 @@ impl ExportXcm for BridgeHubRococoOrBridgeHubWococoSwitchExporter { match network { Rococo => ToBridgeHubRococoHaulBlobExporter::deliver(ticket), Wococo => ToBridgeHubWococoHaulBlobExporter::deliver(ticket), - location if location == EthereumNetwork::get() && network == Rococo => { - SnowbridgeExporter::deliver(ticket) - }, + location if location == EthereumNetwork::get() && network == Rococo => + SnowbridgeExporter::deliver(ticket), _ => unimplemented!("Unsupported network: {:?}", network), } }