3

How do you tranfer wrapped DOT (AssetId: 340,282,366,920,938,463,463,374,607,431,768,211,455) on Astar/Shiden to Polkadot/Kusama using XCM?

Following this guide from Astar XCM documentation, this demonstrates how to transfer DOT from Kusama to Shiden (mapped to wrapped DOT) using the XCM instruction limited_reserve_transfer_asset.

What is the equivalent XCM instruction to perform the transfer in the other direction?

I have attempted to execute the following XCM instruction using chopsticks, but failed with "Failed to transfer Asset".

let message = Xcm(vec![
  DescendOrigin,
  TransferWithdrawAsset {
    assets: (Here, amount).into(),
    dest: MultiLocation::parent(),
    xcm: Xcm(vec![
        DepositAsset {
          assets: All.into(),
          beneficiary: AccountId32 { 
              id: contract_pub_key
              network: None 
          }.into(),
        },
      ]),
  },
]);

1 Answer 1

4

To transfer DOT back to Polkadot, you can use orml-xtokens pallet in Astar:

enter image description here

2
  • What is are the underlying XCM program I would need to construct without using xtokens? I need to know the exact list of XCM instructions which is executed to accomplish this transfer of wrapped DOT to Polkadot.
    – Snowmead
    Commented Oct 23, 2023 at 19:07
  • 2
    Please refer to orml-xtoken source code here, which is the case for transferring to the reserve chain. It applies to DOT transfer to Polkadot: github.com/open-web3-stack/open-runtime-module-library/blob/…
    – Shaun
    Commented Oct 25, 2023 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.