Add new dispatchables to PalletXcm to allow remote locking #3546
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.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
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 aNoteAssetLocked
message tounlocker
withasset
andorigin
(converted to aMultiLocation
).unlock_asset(origin, asset: MultiAsset, locker: MultiLocation)
: Sends anUnlockAsset
instruction tolocker
forasset
IFF there is a registered remote lock forasset
and it is currently unused.The text was updated successfully, but these errors were encountered: