TL;DR
Similar with the earlier Khala proposal , we propose to open HRMP communication between Composable Picasso and Karura.
Summary
We propose to open a bi-directional channel between Kurara and Composable Picasso. Initially, the main usecase will be to transfer HKO and KAR between the two chains and bring some Karura assets to the coming Composable products such as Pablo and Angular.
Proposal
There is no on-chain proposal yet; #TBD.
Technical details:
The procedure for opening the channels is as follows:
-
Karura propose to request to open Karura to Composable Picasso HRMP channel
-
Wait until proposal on step 1 get approved & encated
-
Composable Picasso propose to accept the request and request to open Composable Picasso to Karura HRMP channel(Batch call)
-
Wait until proposal on step 3 get approved & encated
-
Karura propose to accept Composable Picasso to Karura HRMP channel
-
Wait until proposals on step 5 are approved & enacted
-
Wait for another session on Kusama for the change to be effective
-
XCM based crosschain transfer will be possible at this stage.
The extrinsics that need to be executed on the relay chain , are:
-
For step 1:
hrmp.hrmpInitOpenChannel(recipient: 2087, proposedMaxCapacity: 1000, proposedMaxMessageSize: 102400)
, which hex-encoded is0x3c0027080000e803000000900100
-
For step 3: first call is
hrmp.hrmpAcceptOpenChannel(sender: 2000)
, second call ishrmp.hrmpInitOpenChannel(recipient: 2000, proposedMaxCapacity: 1000, proposedMaxMessageSize: 102400)
, the batch call hex-encoded is0x1802083c01d00700003c00d0070000e803000000900100
-
For step 5:
hrmp.hrmpAcceptOpenChannel(sender: 2087)
, which hex-encoded is0x3c0127080000
The proposedMaxCapacity
and proposedMaxMessageSize
are set to the values of Kusama’s configuration.activeConfig.hrmpChannelMaxCapacity
and configuration.activeConfig.hrmpChannelMaxMessageSize
values, respectively.
These extrinsics need to be called with the parachain’s sovereign account as origin. To achieve this, on the Composable Picasso side we will use relayerXcm
pallet to send xcm message to the relaychain, by executing the following extrinsic from the parachain. Karura should make a open request call and a accept request call with its orml-xcm pallet.
ormlXcm.send(
dest: XcmVersionedMultiLocation
{
V1: {
parents: 1
interior: Here
}
},
message: XcmVersionedXcm
{
V2: [
{
WithdrawAsset: [
{
id: {
Concrete: {
parents: 0,
interior: 'Here'
}
},
fun: {
Fungible: '1000000000000'
}
}
]
},
{
BuyExecution: {
fees: {
id: {
Concrete: {
parents: 0,
interior: 'Here'
}
},
fun: {
Fungible: '1000000000000'
}
},
weightLimit: 'Unlimited'
}
},
{
Transact: {
originType: 'Native',
requireWeightAtMost: '1000000000',
call: {
encoded: 0x1802083c01d00700003c00d0070000e803000000900100
}
}
},
{
DepositAsset: {
assets: {
Wild: 'All'
},
maxAssets: 1,
beneficiary: {
parents: 0,
interior: {
X1: {
AccountId32: {
network: 'Any',
id : 0x7061726127080000000000000000000000000000000000000000000000000000,
}
}
}
}
}
}
]
}
})
As a prerequisite, the parachain’s sovereign account must contain at least 10 KSM to be locked as collateral (5 for each channel direction), plus some KSM to pay for xcm execution fees.