Enable cross-chain NFT transfers on asset-hub (#2796)

This PR introduces the following changes:

- [x] Adds a `UniquesTransactor` to asset-hub-rococo
- [x] Adds a `UniquesTransactor` to asset-hub-westend

We can't add a transactor for `pallet-nfts` like we do for
`pallet-uniques` because `pallet-nfts` uses `nonfungibles_v2::Mutate`
instead of `nonfungibles::Mutate`, and making that work would be out of
scope of this PR.

With these modifications, reserve-based NFT cross-chain transfers can be
performed on asset-hub.

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Sergej Sakac
2024-01-19 16:14:26 +01:00
committed by GitHub
parent 66b2fa2e59
commit 50a2e28b00
7 changed files with 122 additions and 32 deletions
@@ -76,9 +76,9 @@ use parachains_common::{
impls::DealWithFees,
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
rococo::{consensus::*, currency::*, fee::WeightToFee},
AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header, Nonce,
Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
NORMAL_DISPATCH_RATIO, SLOT_DURATION,
AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, CollectionId, Hash,
Header, ItemId, Nonce, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS,
MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
};
use sp_runtime::{Perbill, RuntimeDebug};
use xcm_config::{
@@ -773,8 +773,8 @@ parameter_types! {
impl pallet_uniques::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type CollectionId = u32;
type ItemId = u32;
type CollectionId = CollectionId;
type ItemId = ItemId;
type Currency = Balances;
type ForceOrigin = AssetsForceOrigin;
type CollectionDeposit = UniquesCollectionDeposit;
@@ -831,8 +831,8 @@ parameter_types! {
impl pallet_nfts::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type CollectionId = u32;
type ItemId = u32;
type CollectionId = CollectionId;
type ItemId = ItemId;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>;
type ForceOrigin = AssetsForceOrigin;