I am currently working on transferring NFTs from one chain to another using XCM. To accomplish this, I need to remove the NFTs from the storage of the source chain and add them to the storage of Pallet-nfts present at destination chain. I would greatly appreciate it if anyone could provide me with some ideas related to this.
1 Answer
The Transact
instruction allows for the execution of calls (from a RuntimeCall in a FRAME-based system, to a smart contract function call in an EVM-based system) in a consensus system. With this you can modify storage of another chain with a XCM transaction.
The perfect example you can look at is this: transact_mint_nft from the XCM Docs, that shows you how the parachain A creates a NFT Collection and mint an NFT on the relay chain.
To understand transfers read this How can I transfer assets using XCM?.
And for examples of NFT transfers you can take a look in the examples of the XCM simulator: teleport_nft and reserve_asset_transfer_nft.