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

Add new dispatchables to PalletXcm to allow remote locking #3546

Open
2 tasks done
IkerAlus opened this issue Mar 1, 2024 · 2 comments
Open
2 tasks done

Add new dispatchables to PalletXcm to allow remote locking #3546

IkerAlus opened this issue Mar 1, 2024 · 2 comments
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known. T6-XCM This PR/Issue is related to XCM.

Comments

@IkerAlus
Copy link
Contributor

IkerAlus commented Mar 1, 2024

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

At the moment, chains implementing the PalletXcm do not allow their users to utilise the remote locking functionalities introduced in XCM v3. There are no interfaces exposed directly to users to create XCM messages with the instructions LockAsset, UnlockAsset, etc.

Request

Implement several dispatchables in the PalletXcm to allow the user journey for remote locking as explained in the examples of the XCM docs: https://paritytech.github.io/xcm-docs/journey/locks/locks.html

Solution

Following the original vision of XCM v3: Remote locking the idea would be to implement two new dispatchables as:

  • lock_asset(origin, asset: MultiAsset, unlocker: MultiLocation): Locks asset owned by origin with ID (b"xcm_lock", unlocker).encode(). Sends a NoteAssetLocked message to unlocker with asset and origin (converted to a MultiLocation).
  • unlock_asset(origin, asset: MultiAsset, locker: MultiLocation): Sends an UnlockAsset instruction to locker for asset IFF there is a registered remote lock for asset and it is currently unused.
@IkerAlus IkerAlus added the I5-enhancement An additional feature request. label Mar 1, 2024
@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label Mar 1, 2024
@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Mar 25, 2024
@bkchr
Copy link
Member

bkchr commented Jun 7, 2024

With allowing execute_xcm in pallet-xcm this should be solved? Aka you can just write a XCM message that does what you want to do?

@acatangiu
Copy link
Contributor

With allowing execute_xcm in pallet-xcm this should be solved? Aka you can just write a XCM message that does what you want to do?

Yes, exactly! We should focus on building (off-chain) tools to create these specialized XCMs that can then be dispatched on any XCM-enabled chain.

(I just opened an RFC describing the same idea for asset transfers #4736)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known. T6-XCM This PR/Issue is related to XCM.
Projects
Status: Next to pick up
Development

No branches or pull requests

4 participants