polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.74k stars 1.53k forks source link

UI to transfer KSM to parachain #5737

Open xlc opened 3 years ago

xlc commented 3 years ago

Not every parachain supports receive KSM via XCM but for parachain that supports it (i.e. Karura), it will be useful to have a dialog somewhere to allow people to send their KSM to the parachain.

This is an example of a successful transfer

https://kusama.subscan.io/extrinsic/0x49fef96552d462baf5fee3b89d47d1bf516d9bfe1348f09f87b7d055f4b87fd0 https://karura.subscan.io/block/55562?tab=event

jacogr commented 3 years ago

See https://github.com/polkadot-js/apps/blob/master/packages/apps-config/src/endpoints/productionRelayKusama.ts#L28

(The reverse to -1, indicating the relay, can be specified on the para)

This is all assuming it uses the same teleport as eg. Statemint.

For other non-teleport, it is one of those things where testing effort (dev mode) is significantly higher and live chains means access to tokens (and burning quite a bit based on history of doing this stuff), so it will have to wait for a bit.

EDIT: This is also "quite" useful for anything xcm-related - https://github.com/paritytech/polkadot-sdk/issues/969

xlc commented 3 years ago

KSM cannot be teleported to community chains. Teleport is only supported between trusted chain only (i.e. parachains that fully controlled by relaychain governance).

So we need something different. I've already tested xcmPallet.reserveTransferAssets and it works well as long as the dest weight is high enough.

For the reverse side (Karura to Kusama), people will need to use xtokens pallet to transfer which is not enabled on Karura yet so I think it is fine to not support it. We will have it enabled in our own dApp when the runtime opens it.

Also it is possible to mint lost KSM in Karura back via governance. So let me know if you need help to get your KSM back during testing while I still have the power.