diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index c90e6c55a9..0e132b3521 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -39,10 +39,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, - CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, DescribeFamily, HashedDescription, + IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::traits::WithOriginFilter; @@ -70,6 +70,8 @@ pub type SovereignAccountOf = ( ChildParachainConvertsVia, // We can directly alias an `AccountId32` into a local account. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Our asset transactor. This is what allows us to interest with the runtime facilities from the @@ -174,140 +176,140 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true + return true; } } match call { RuntimeCall::System( frame_system::Call::kill_prefix { .. } | frame_system::Call::set_heap_pages { .. }, - ) | - RuntimeCall::Babe(..) | - RuntimeCall::Timestamp(..) | - RuntimeCall::Indices(..) | - RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan( - crowdloan::Call::create { .. } | - crowdloan::Call::contribute { .. } | - crowdloan::Call::withdraw { .. } | - crowdloan::Call::refund { .. } | - crowdloan::Call::dissolve { .. } | - crowdloan::Call::edit { .. } | - crowdloan::Call::poke { .. } | - crowdloan::Call::contribute_all { .. }, - ) | - RuntimeCall::Staking( - pallet_staking::Call::bond { .. } | - pallet_staking::Call::bond_extra { .. } | - pallet_staking::Call::unbond { .. } | - pallet_staking::Call::withdraw_unbonded { .. } | - pallet_staking::Call::validate { .. } | - pallet_staking::Call::nominate { .. } | - pallet_staking::Call::chill { .. } | - pallet_staking::Call::set_payee { .. } | - pallet_staking::Call::set_controller { .. } | - pallet_staking::Call::set_validator_count { .. } | - pallet_staking::Call::increase_validator_count { .. } | - pallet_staking::Call::scale_validator_count { .. } | - pallet_staking::Call::force_no_eras { .. } | - pallet_staking::Call::force_new_era { .. } | - pallet_staking::Call::set_invulnerables { .. } | - pallet_staking::Call::force_unstake { .. } | - pallet_staking::Call::force_new_era_always { .. } | - pallet_staking::Call::payout_stakers { .. } | - pallet_staking::Call::rebond { .. } | - pallet_staking::Call::reap_stash { .. } | - pallet_staking::Call::set_staking_configs { .. } | - pallet_staking::Call::chill_other { .. } | - pallet_staking::Call::force_apply_min_commission { .. }, - ) | - RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::Grandpa(..) | - RuntimeCall::ImOnline(..) | - RuntimeCall::Treasury(..) | - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda( - pallet_referenda::Call::place_decision_deposit { .. } | - pallet_referenda::Call::refund_decision_deposit { .. } | - pallet_referenda::Call::cancel { .. } | - pallet_referenda::Call::kill { .. } | - pallet_referenda::Call::nudge_referendum { .. } | - pallet_referenda::Call::one_fewer_deciding { .. }, - ) | - RuntimeCall::FellowshipCollective(..) | - RuntimeCall::FellowshipReferenda( - pallet_referenda::Call::place_decision_deposit { .. } | - pallet_referenda::Call::refund_decision_deposit { .. } | - pallet_referenda::Call::cancel { .. } | - pallet_referenda::Call::kill { .. } | - pallet_referenda::Call::nudge_referendum { .. } | - pallet_referenda::Call::one_fewer_deciding { .. }, - ) | - RuntimeCall::Claims( - super::claims::Call::claim { .. } | - super::claims::Call::mint_claim { .. } | - super::claims::Call::move_claim { .. }, - ) | - RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | - RuntimeCall::Identity( - pallet_identity::Call::add_registrar { .. } | - pallet_identity::Call::set_identity { .. } | - pallet_identity::Call::clear_identity { .. } | - pallet_identity::Call::request_judgement { .. } | - pallet_identity::Call::cancel_request { .. } | - pallet_identity::Call::set_fee { .. } | - pallet_identity::Call::set_account_id { .. } | - pallet_identity::Call::set_fields { .. } | - pallet_identity::Call::provide_judgement { .. } | - pallet_identity::Call::kill_identity { .. } | - pallet_identity::Call::add_sub { .. } | - pallet_identity::Call::rename_sub { .. } | - pallet_identity::Call::remove_sub { .. } | - pallet_identity::Call::quit_sub { .. }, - ) | - RuntimeCall::Society(..) | - RuntimeCall::Recovery(..) | - RuntimeCall::Vesting(..) | - RuntimeCall::Bounties( - pallet_bounties::Call::propose_bounty { .. } | - pallet_bounties::Call::approve_bounty { .. } | - pallet_bounties::Call::propose_curator { .. } | - pallet_bounties::Call::unassign_curator { .. } | - pallet_bounties::Call::accept_curator { .. } | - pallet_bounties::Call::award_bounty { .. } | - pallet_bounties::Call::claim_bounty { .. } | - pallet_bounties::Call::close_bounty { .. }, - ) | - RuntimeCall::ChildBounties(..) | - RuntimeCall::ElectionProviderMultiPhase(..) | - RuntimeCall::VoterList(..) | - RuntimeCall::NominationPools( - pallet_nomination_pools::Call::join { .. } | - pallet_nomination_pools::Call::bond_extra { .. } | - pallet_nomination_pools::Call::claim_payout { .. } | - pallet_nomination_pools::Call::unbond { .. } | - pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } | - pallet_nomination_pools::Call::withdraw_unbonded { .. } | - pallet_nomination_pools::Call::create { .. } | - pallet_nomination_pools::Call::create_with_pool_id { .. } | - pallet_nomination_pools::Call::set_state { .. } | - pallet_nomination_pools::Call::set_configs { .. } | - pallet_nomination_pools::Call::update_roles { .. } | - pallet_nomination_pools::Call::chill { .. }, - ) | - RuntimeCall::Hrmp(..) | - RuntimeCall::Registrar( - paras_registrar::Call::deregister { .. } | - paras_registrar::Call::swap { .. } | - paras_registrar::Call::remove_lock { .. } | - paras_registrar::Call::reserve { .. } | - paras_registrar::Call::add_lock { .. }, - ) | - RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { + ) + | RuntimeCall::Babe(..) + | RuntimeCall::Timestamp(..) + | RuntimeCall::Indices(..) + | RuntimeCall::Balances(..) + | RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } + | crowdloan::Call::contribute { .. } + | crowdloan::Call::withdraw { .. } + | crowdloan::Call::refund { .. } + | crowdloan::Call::dissolve { .. } + | crowdloan::Call::edit { .. } + | crowdloan::Call::poke { .. } + | crowdloan::Call::contribute_all { .. }, + ) + | RuntimeCall::Staking( + pallet_staking::Call::bond { .. } + | pallet_staking::Call::bond_extra { .. } + | pallet_staking::Call::unbond { .. } + | pallet_staking::Call::withdraw_unbonded { .. } + | pallet_staking::Call::validate { .. } + | pallet_staking::Call::nominate { .. } + | pallet_staking::Call::chill { .. } + | pallet_staking::Call::set_payee { .. } + | pallet_staking::Call::set_controller { .. } + | pallet_staking::Call::set_validator_count { .. } + | pallet_staking::Call::increase_validator_count { .. } + | pallet_staking::Call::scale_validator_count { .. } + | pallet_staking::Call::force_no_eras { .. } + | pallet_staking::Call::force_new_era { .. } + | pallet_staking::Call::set_invulnerables { .. } + | pallet_staking::Call::force_unstake { .. } + | pallet_staking::Call::force_new_era_always { .. } + | pallet_staking::Call::payout_stakers { .. } + | pallet_staking::Call::rebond { .. } + | pallet_staking::Call::reap_stash { .. } + | pallet_staking::Call::set_staking_configs { .. } + | pallet_staking::Call::chill_other { .. } + | pallet_staking::Call::force_apply_min_commission { .. }, + ) + | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) + | RuntimeCall::Grandpa(..) + | RuntimeCall::ImOnline(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::ConvictionVoting(..) + | RuntimeCall::Referenda( + pallet_referenda::Call::place_decision_deposit { .. } + | pallet_referenda::Call::refund_decision_deposit { .. } + | pallet_referenda::Call::cancel { .. } + | pallet_referenda::Call::kill { .. } + | pallet_referenda::Call::nudge_referendum { .. } + | pallet_referenda::Call::one_fewer_deciding { .. }, + ) + | RuntimeCall::FellowshipCollective(..) + | RuntimeCall::FellowshipReferenda( + pallet_referenda::Call::place_decision_deposit { .. } + | pallet_referenda::Call::refund_decision_deposit { .. } + | pallet_referenda::Call::cancel { .. } + | pallet_referenda::Call::kill { .. } + | pallet_referenda::Call::nudge_referendum { .. } + | pallet_referenda::Call::one_fewer_deciding { .. }, + ) + | RuntimeCall::Claims( + super::claims::Call::claim { .. } + | super::claims::Call::mint_claim { .. } + | super::claims::Call::move_claim { .. }, + ) + | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) + | RuntimeCall::Identity( + pallet_identity::Call::add_registrar { .. } + | pallet_identity::Call::set_identity { .. } + | pallet_identity::Call::clear_identity { .. } + | pallet_identity::Call::request_judgement { .. } + | pallet_identity::Call::cancel_request { .. } + | pallet_identity::Call::set_fee { .. } + | pallet_identity::Call::set_account_id { .. } + | pallet_identity::Call::set_fields { .. } + | pallet_identity::Call::provide_judgement { .. } + | pallet_identity::Call::kill_identity { .. } + | pallet_identity::Call::add_sub { .. } + | pallet_identity::Call::rename_sub { .. } + | pallet_identity::Call::remove_sub { .. } + | pallet_identity::Call::quit_sub { .. }, + ) + | RuntimeCall::Society(..) + | RuntimeCall::Recovery(..) + | RuntimeCall::Vesting(..) + | RuntimeCall::Bounties( + pallet_bounties::Call::propose_bounty { .. } + | pallet_bounties::Call::approve_bounty { .. } + | pallet_bounties::Call::propose_curator { .. } + | pallet_bounties::Call::unassign_curator { .. } + | pallet_bounties::Call::accept_curator { .. } + | pallet_bounties::Call::award_bounty { .. } + | pallet_bounties::Call::claim_bounty { .. } + | pallet_bounties::Call::close_bounty { .. }, + ) + | RuntimeCall::ChildBounties(..) + | RuntimeCall::ElectionProviderMultiPhase(..) + | RuntimeCall::VoterList(..) + | RuntimeCall::NominationPools( + pallet_nomination_pools::Call::join { .. } + | pallet_nomination_pools::Call::bond_extra { .. } + | pallet_nomination_pools::Call::claim_payout { .. } + | pallet_nomination_pools::Call::unbond { .. } + | pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } + | pallet_nomination_pools::Call::withdraw_unbonded { .. } + | pallet_nomination_pools::Call::create { .. } + | pallet_nomination_pools::Call::create_with_pool_id { .. } + | pallet_nomination_pools::Call::set_state { .. } + | pallet_nomination_pools::Call::set_configs { .. } + | pallet_nomination_pools::Call::update_roles { .. } + | pallet_nomination_pools::Call::chill { .. }, + ) + | RuntimeCall::Hrmp(..) + | RuntimeCall::Registrar( + paras_registrar::Call::deregister { .. } + | paras_registrar::Call::swap { .. } + | paras_registrar::Call::remove_lock { .. } + | paras_registrar::Call::reserve { .. } + | paras_registrar::Call::add_lock { .. }, + ) + | RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { .. - }) | - RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) | - RuntimeCall::Proxy(..) => true, + }) + | RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) + | RuntimeCall::Proxy(..) => true, _ => false, } } diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 6c45f1cec4..c8ccca4ab1 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -41,10 +41,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, - ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, + DescribeFamily, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::traits::WithOriginFilter; @@ -70,6 +70,8 @@ pub type SovereignAccountOf = ( ChildParachainConvertsVia, // We can directly alias an `AccountId32` into a local account. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Our asset transactor. This is what allows us to interact with the runtime assets from the point @@ -185,129 +187,129 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true + return true; } } match call { RuntimeCall::System( frame_system::Call::kill_prefix { .. } | frame_system::Call::set_heap_pages { .. }, - ) | - RuntimeCall::Babe(..) | - RuntimeCall::Timestamp(..) | - RuntimeCall::Indices(..) | - RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan( - crowdloan::Call::create { .. } | - crowdloan::Call::contribute { .. } | - crowdloan::Call::withdraw { .. } | - crowdloan::Call::refund { .. } | - crowdloan::Call::dissolve { .. } | - crowdloan::Call::edit { .. } | - crowdloan::Call::poke { .. } | - crowdloan::Call::contribute_all { .. }, - ) | - RuntimeCall::Staking( - pallet_staking::Call::bond { .. } | - pallet_staking::Call::bond_extra { .. } | - pallet_staking::Call::unbond { .. } | - pallet_staking::Call::withdraw_unbonded { .. } | - pallet_staking::Call::validate { .. } | - pallet_staking::Call::nominate { .. } | - pallet_staking::Call::chill { .. } | - pallet_staking::Call::set_payee { .. } | - pallet_staking::Call::set_controller { .. } | - pallet_staking::Call::set_validator_count { .. } | - pallet_staking::Call::increase_validator_count { .. } | - pallet_staking::Call::scale_validator_count { .. } | - pallet_staking::Call::force_no_eras { .. } | - pallet_staking::Call::force_new_era { .. } | - pallet_staking::Call::set_invulnerables { .. } | - pallet_staking::Call::force_unstake { .. } | - pallet_staking::Call::force_new_era_always { .. } | - pallet_staking::Call::payout_stakers { .. } | - pallet_staking::Call::rebond { .. } | - pallet_staking::Call::reap_stash { .. } | - pallet_staking::Call::set_staking_configs { .. } | - pallet_staking::Call::chill_other { .. } | - pallet_staking::Call::force_apply_min_commission { .. }, - ) | - RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::Grandpa(..) | - RuntimeCall::ImOnline(..) | - RuntimeCall::Treasury(..) | - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda( - pallet_referenda::Call::place_decision_deposit { .. } | - pallet_referenda::Call::refund_decision_deposit { .. } | - pallet_referenda::Call::cancel { .. } | - pallet_referenda::Call::kill { .. } | - pallet_referenda::Call::nudge_referendum { .. } | - pallet_referenda::Call::one_fewer_deciding { .. }, - ) | - RuntimeCall::Claims( - super::claims::Call::claim { .. } | - super::claims::Call::mint_claim { .. } | - super::claims::Call::move_claim { .. }, - ) | - RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | - RuntimeCall::Identity( - pallet_identity::Call::add_registrar { .. } | - pallet_identity::Call::set_identity { .. } | - pallet_identity::Call::clear_identity { .. } | - pallet_identity::Call::request_judgement { .. } | - pallet_identity::Call::cancel_request { .. } | - pallet_identity::Call::set_fee { .. } | - pallet_identity::Call::set_account_id { .. } | - pallet_identity::Call::set_fields { .. } | - pallet_identity::Call::provide_judgement { .. } | - pallet_identity::Call::kill_identity { .. } | - pallet_identity::Call::add_sub { .. } | - pallet_identity::Call::rename_sub { .. } | - pallet_identity::Call::remove_sub { .. } | - pallet_identity::Call::quit_sub { .. }, - ) | - RuntimeCall::Vesting(..) | - RuntimeCall::Bounties( - pallet_bounties::Call::propose_bounty { .. } | - pallet_bounties::Call::approve_bounty { .. } | - pallet_bounties::Call::propose_curator { .. } | - pallet_bounties::Call::unassign_curator { .. } | - pallet_bounties::Call::accept_curator { .. } | - pallet_bounties::Call::award_bounty { .. } | - pallet_bounties::Call::claim_bounty { .. } | - pallet_bounties::Call::close_bounty { .. }, - ) | - RuntimeCall::ChildBounties(..) | - RuntimeCall::ElectionProviderMultiPhase(..) | - RuntimeCall::VoterList(..) | - RuntimeCall::NominationPools( - pallet_nomination_pools::Call::join { .. } | - pallet_nomination_pools::Call::bond_extra { .. } | - pallet_nomination_pools::Call::claim_payout { .. } | - pallet_nomination_pools::Call::unbond { .. } | - pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } | - pallet_nomination_pools::Call::withdraw_unbonded { .. } | - pallet_nomination_pools::Call::create { .. } | - pallet_nomination_pools::Call::create_with_pool_id { .. } | - pallet_nomination_pools::Call::set_state { .. } | - pallet_nomination_pools::Call::set_configs { .. } | - pallet_nomination_pools::Call::update_roles { .. } | - pallet_nomination_pools::Call::chill { .. }, - ) | - RuntimeCall::Hrmp(..) | - RuntimeCall::Registrar( - paras_registrar::Call::deregister { .. } | - paras_registrar::Call::swap { .. } | - paras_registrar::Call::remove_lock { .. } | - paras_registrar::Call::reserve { .. } | - paras_registrar::Call::add_lock { .. }, - ) | - RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { + ) + | RuntimeCall::Babe(..) + | RuntimeCall::Timestamp(..) + | RuntimeCall::Indices(..) + | RuntimeCall::Balances(..) + | RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } + | crowdloan::Call::contribute { .. } + | crowdloan::Call::withdraw { .. } + | crowdloan::Call::refund { .. } + | crowdloan::Call::dissolve { .. } + | crowdloan::Call::edit { .. } + | crowdloan::Call::poke { .. } + | crowdloan::Call::contribute_all { .. }, + ) + | RuntimeCall::Staking( + pallet_staking::Call::bond { .. } + | pallet_staking::Call::bond_extra { .. } + | pallet_staking::Call::unbond { .. } + | pallet_staking::Call::withdraw_unbonded { .. } + | pallet_staking::Call::validate { .. } + | pallet_staking::Call::nominate { .. } + | pallet_staking::Call::chill { .. } + | pallet_staking::Call::set_payee { .. } + | pallet_staking::Call::set_controller { .. } + | pallet_staking::Call::set_validator_count { .. } + | pallet_staking::Call::increase_validator_count { .. } + | pallet_staking::Call::scale_validator_count { .. } + | pallet_staking::Call::force_no_eras { .. } + | pallet_staking::Call::force_new_era { .. } + | pallet_staking::Call::set_invulnerables { .. } + | pallet_staking::Call::force_unstake { .. } + | pallet_staking::Call::force_new_era_always { .. } + | pallet_staking::Call::payout_stakers { .. } + | pallet_staking::Call::rebond { .. } + | pallet_staking::Call::reap_stash { .. } + | pallet_staking::Call::set_staking_configs { .. } + | pallet_staking::Call::chill_other { .. } + | pallet_staking::Call::force_apply_min_commission { .. }, + ) + | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) + | RuntimeCall::Grandpa(..) + | RuntimeCall::ImOnline(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::ConvictionVoting(..) + | RuntimeCall::Referenda( + pallet_referenda::Call::place_decision_deposit { .. } + | pallet_referenda::Call::refund_decision_deposit { .. } + | pallet_referenda::Call::cancel { .. } + | pallet_referenda::Call::kill { .. } + | pallet_referenda::Call::nudge_referendum { .. } + | pallet_referenda::Call::one_fewer_deciding { .. }, + ) + | RuntimeCall::Claims( + super::claims::Call::claim { .. } + | super::claims::Call::mint_claim { .. } + | super::claims::Call::move_claim { .. }, + ) + | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) + | RuntimeCall::Identity( + pallet_identity::Call::add_registrar { .. } + | pallet_identity::Call::set_identity { .. } + | pallet_identity::Call::clear_identity { .. } + | pallet_identity::Call::request_judgement { .. } + | pallet_identity::Call::cancel_request { .. } + | pallet_identity::Call::set_fee { .. } + | pallet_identity::Call::set_account_id { .. } + | pallet_identity::Call::set_fields { .. } + | pallet_identity::Call::provide_judgement { .. } + | pallet_identity::Call::kill_identity { .. } + | pallet_identity::Call::add_sub { .. } + | pallet_identity::Call::rename_sub { .. } + | pallet_identity::Call::remove_sub { .. } + | pallet_identity::Call::quit_sub { .. }, + ) + | RuntimeCall::Vesting(..) + | RuntimeCall::Bounties( + pallet_bounties::Call::propose_bounty { .. } + | pallet_bounties::Call::approve_bounty { .. } + | pallet_bounties::Call::propose_curator { .. } + | pallet_bounties::Call::unassign_curator { .. } + | pallet_bounties::Call::accept_curator { .. } + | pallet_bounties::Call::award_bounty { .. } + | pallet_bounties::Call::claim_bounty { .. } + | pallet_bounties::Call::close_bounty { .. }, + ) + | RuntimeCall::ChildBounties(..) + | RuntimeCall::ElectionProviderMultiPhase(..) + | RuntimeCall::VoterList(..) + | RuntimeCall::NominationPools( + pallet_nomination_pools::Call::join { .. } + | pallet_nomination_pools::Call::bond_extra { .. } + | pallet_nomination_pools::Call::claim_payout { .. } + | pallet_nomination_pools::Call::unbond { .. } + | pallet_nomination_pools::Call::pool_withdraw_unbonded { .. } + | pallet_nomination_pools::Call::withdraw_unbonded { .. } + | pallet_nomination_pools::Call::create { .. } + | pallet_nomination_pools::Call::create_with_pool_id { .. } + | pallet_nomination_pools::Call::set_state { .. } + | pallet_nomination_pools::Call::set_configs { .. } + | pallet_nomination_pools::Call::update_roles { .. } + | pallet_nomination_pools::Call::chill { .. }, + ) + | RuntimeCall::Hrmp(..) + | RuntimeCall::Registrar( + paras_registrar::Call::deregister { .. } + | paras_registrar::Call::swap { .. } + | paras_registrar::Call::remove_lock { .. } + | paras_registrar::Call::reserve { .. } + | paras_registrar::Call::add_lock { .. }, + ) + | RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets { .. - }) | - RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) | - RuntimeCall::Proxy(..) => true, + }) + | RuntimeCall::Whitelist(pallet_whitelist::Call::whitelist_call { .. }) + | RuntimeCall::Proxy(..) => true, _ => false, } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index d59507e4bd..d8413c66bf 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -34,7 +34,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -67,9 +67,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, - // Foreign chain account alias into local accounts according to a hash of their standard - // description. - HashedDescription>, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. @@ -201,153 +200,153 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true + 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::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::refund { .. }, + 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::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::refund { .. }, ) | 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::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::refund { .. }, + 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::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::refund { .. }, ) | 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 { .. } ) ) } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 696462be9c..cbbca021f3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -30,8 +30,9 @@ 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, }; @@ -59,6 +60,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. @@ -122,32 +125,32 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true + 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::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(..) ) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 0965600c24..19b86ce3c3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -30,8 +30,9 @@ 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, }; @@ -59,6 +60,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. @@ -125,32 +128,32 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true + 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::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(..) ) } } diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index b4db73e3ab..c2b4cb9d4e 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -30,11 +30,12 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, - OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FixedWeightBounds, HashedDescription, IsConcrete, OriginToPluralityVoice, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -58,6 +59,8 @@ pub type LocationToAccountId = ( SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. @@ -134,68 +137,68 @@ impl Contains for SafeCallFilter { #[cfg(feature = "runtime-benchmarks")] { if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { - return true + return true; } } matches!( call, 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::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - RuntimeCall::XcmpQueue(..) | - RuntimeCall::DmpQueue(..) | - RuntimeCall::Alliance( + 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::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) + | RuntimeCall::XcmpQueue(..) + | RuntimeCall::DmpQueue(..) + | RuntimeCall::Alliance( // `init_members` accepts unbounded vecs as arguments, // but the call can be initiated only by root origin. - pallet_alliance::Call::init_members { .. } | - pallet_alliance::Call::vote { .. } | - pallet_alliance::Call::disband { .. } | - pallet_alliance::Call::set_rule { .. } | - pallet_alliance::Call::announce { .. } | - pallet_alliance::Call::remove_announcement { .. } | - pallet_alliance::Call::join_alliance { .. } | - pallet_alliance::Call::nominate_ally { .. } | - pallet_alliance::Call::elevate_ally { .. } | - pallet_alliance::Call::give_retirement_notice { .. } | - pallet_alliance::Call::retire { .. } | - pallet_alliance::Call::kick_member { .. } | - pallet_alliance::Call::close { .. } | - pallet_alliance::Call::abdicate_fellow_status { .. }, + pallet_alliance::Call::init_members { .. } + | pallet_alliance::Call::vote { .. } + | pallet_alliance::Call::disband { .. } + | pallet_alliance::Call::set_rule { .. } + | pallet_alliance::Call::announce { .. } + | pallet_alliance::Call::remove_announcement { .. } + | pallet_alliance::Call::join_alliance { .. } + | pallet_alliance::Call::nominate_ally { .. } + | pallet_alliance::Call::elevate_ally { .. } + | pallet_alliance::Call::give_retirement_notice { .. } + | pallet_alliance::Call::retire { .. } + | pallet_alliance::Call::kick_member { .. } + | pallet_alliance::Call::close { .. } + | pallet_alliance::Call::abdicate_fellow_status { .. }, ) | RuntimeCall::AllianceMotion( - pallet_collective::Call::vote { .. } | - pallet_collective::Call::disapprove_proposal { .. } | - pallet_collective::Call::close { .. }, + pallet_collective::Call::vote { .. } + | pallet_collective::Call::disapprove_proposal { .. } + | pallet_collective::Call::close { .. }, ) | RuntimeCall::FellowshipCollective( - pallet_ranked_collective::Call::add_member { .. } | - pallet_ranked_collective::Call::promote_member { .. } | - pallet_ranked_collective::Call::demote_member { .. } | - pallet_ranked_collective::Call::remove_member { .. }, + pallet_ranked_collective::Call::add_member { .. } + | pallet_ranked_collective::Call::promote_member { .. } + | pallet_ranked_collective::Call::demote_member { .. } + | pallet_ranked_collective::Call::remove_member { .. }, ) | RuntimeCall::FellowshipCore( - pallet_core_fellowship::Call::bump { .. } | - pallet_core_fellowship::Call::set_params { .. } | - pallet_core_fellowship::Call::set_active { .. } | - pallet_core_fellowship::Call::approve { .. } | - pallet_core_fellowship::Call::induct { .. } | - pallet_core_fellowship::Call::promote { .. } | - pallet_core_fellowship::Call::offboard { .. } | - pallet_core_fellowship::Call::submit_evidence { .. } | - pallet_core_fellowship::Call::import { .. }, + pallet_core_fellowship::Call::bump { .. } + | pallet_core_fellowship::Call::set_params { .. } + | pallet_core_fellowship::Call::set_active { .. } + | pallet_core_fellowship::Call::approve { .. } + | pallet_core_fellowship::Call::induct { .. } + | pallet_core_fellowship::Call::promote { .. } + | pallet_core_fellowship::Call::offboard { .. } + | pallet_core_fellowship::Call::submit_evidence { .. } + | pallet_core_fellowship::Call::import { .. }, ) ) }