Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: align LocationToAccount derivation #1928

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 148 additions & 148 deletions cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal,
EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
DescribePalletTerminal, EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete,
LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus,
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -68,9 +69,8 @@ pub type LocationToAccountId = (
SiblingParachainConvertsVia<Sibling, AccountId>,
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
AccountId32Aliases<RelayNetwork, AccountId>,
// Foreign chain account alias into local accounts according to a hash of their standard
// description.
HashedDescription<AccountId, DescribeFamily<DescribePalletTerminal>>,
// Foreign locations alias into accounts according to a hash of their standard description.
HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>>,
);

/// Means for transacting the native currency on this chain.
Expand Down Expand Up @@ -205,153 +205,153 @@ impl Contains<RuntimeCall> 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 { .. }
)
)
}
Expand Down
Loading
Loading