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

XCM v3: Integrate NonFungibleAsset traits #865

Closed
gavofyork opened this issue Feb 19, 2022 · 3 comments · Fixed by #3455
Closed

XCM v3: Integrate NonFungibleAsset traits #865

gavofyork opened this issue Feb 19, 2022 · 3 comments · Fixed by #3455
Labels
T6-XCM This PR/Issue is related to XCM.

Comments

@gavofyork
Copy link
Member

gavofyork commented Feb 19, 2022

Integrate NonFungibleAsset traits into the XCM assets system to make NFTs transferable between chains.

@gavofyork gavofyork changed the title Integrate NonFungibleAsset traits into the XCM assets system to make NFTs transferable between chains. XCM v3: Integrate NonFungibleAsset traits Feb 19, 2022
@Sophia-Gold Sophia-Gold transferred this issue from paritytech/polkadot Aug 24, 2023
claravanstaden added a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
* Adds some comments to the Update payload fields.
helin6 pushed a commit to boolnetwork/polkadot-sdk that referenced this issue Feb 5, 2024
…tytech#865)

* Align `GasWeightMapping` with Substrate `do_pre_dispatch` logic

* Add `without_base_extrinsic` param

* fmt
@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Mar 25, 2024
@bkontur
Copy link
Contributor

bkontur commented Apr 3, 2024

Some partial work was done: #2924 and #2796

And also there is older PR for NonFungiblesV2Adapter #1242

@bkontur bkontur moved this to Backlog in Parity Roadmap Apr 3, 2024
@bkontur
Copy link
Contributor

bkontur commented Apr 4, 2024

Integrate NonFungibleAsset traits into the XCM assets system to make NFTs transferable between chains.

@Szegoo @liamaharon Are we missing anything else to accomplish this? Are there any open issues for XCM NFTs transfer?

@Szegoo
Copy link
Contributor

Szegoo commented Apr 4, 2024

The only thing missing AFAIK is benchmarking XCM NFT transfers correctly, which is fixed here: #3455

github-merge-queue bot pushed a commit that referenced this issue Apr 17, 2024
This PR introduces changes enabling the transfer of coretime regions via
XCM.

TL;DR: There are two primary issues that are resolved in this PR:

1. The `mint` and `burn` functions were not implemented for coretime
regions. These operations are essential for moving assets to and from
the XCM holding register.
2. The transfer of non-fungible assets through XCM was previously
disallowed. This was due to incorrectly benchmarking non-fungible asset
transfers via XCM, which led to assigning it a weight of `Weight::Max`,
effectively preventing its execution.

### `mint_into` and `burn` implementation

This PR addresses the issue with cross-chain transferring regions back
to the Coretime chain. Remote reserve transfers are performed by
withdrawing and depositing the asset to and from the holding registry.
This requires the asset to support burning and minting functionality.

This PR adds burning and minting; however, they work a bit differently
than usual so that the associated region record is not lost when
burning. Instead of removing all the data, burning will set the owner of
the region to `None`, and when minting it back, it will set it to an
actual value. So, when cross-chain transferring, withdrawing into the
registry will remove the region from its original owner, and when
depositing it from the registry, it will set its owner to another
account

This was originally implemented in this PR: #3455, however we decided to
move all of it to this single PR
(#3455 (comment))

### Fixes made in this PR

- Update the `XcmReserveTransferFilter` on coretime chain since it is
meant as a reserve chain for coretime regions.
- Update the XCM benchmark to use `AssetTransactor` instead of assuming
`pallet-balances` for fungible transfers.
- Update the XCM benchmark to properly measure weight consumption for
nonfungible reserve asset transfers. ATM reserve transfers via the
extrinsic do not work since the weight for it is set to `Weight::max()`.

Closes: #865

---------

Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Dónal Murray <donalm@seadanda.dev>
@github-project-automation github-project-automation bot moved this from Backlog to Done in Parity Roadmap Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants