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

Update teleport functionality to XCM V2/V3 #9127

Closed
1 task done
PierreBesson opened this issue Mar 8, 2023 · 13 comments · Fixed by #9529
Closed
1 task done

Update teleport functionality to XCM V2/V3 #9127

PierreBesson opened this issue Mar 8, 2023 · 13 comments · Fixed by #9529
Milestone

Comments

@PierreBesson
Copy link
Contributor

  • I'm submitting a ...

    • Bug report
  • What is the current behavior and expected behavior?

When using the polkadot.js apps teleport UI, trying to send WND from Westend to either Westmint (para 1000) or Westend-Collective (para 1001) crashes when clicking the Teleport button. We don't see the "submit transaction popup" as expected.

image

Here is the error we have in the browser console:

Uncaught Error: createType(Call):: Call: failed decoding xcmPallet.limitedTeleportAssets:: Struct: failed on args: {"dest":"{\"_enum\":{\"V2\":\"XcmV2MultiLocation\",\"V3\":\"XcmV3MultiLocation\"}}","beneficiary":"{\"_enum\":{\"V2\":\"XcmV2MultiLocation\",\"V3\":\"XcmV3MultiLocation\"}}","assets":"{\"_enum\":{\"V2\":\"XcmV2MultiassetMultiAssets\",\"V3\":\"XcmV3MultiassetMultiAssets\"}}","fee_asset_item":"u32","weight_limit":"{\"_enum\":{\"Unlimited\":\"Null\",\"Limited\":\"SpWeightsWeightV2Weight\"}}"}:: Struct: failed on dest: {"_enum":{"V2":"XcmV2MultiLocation","V3":"XcmV3MultiLocation"}}:: Cannot map Enum JSON, unable to find 'V1' in v2, v3
    at h (modu.ff40a6106d8303b6.js:50:68488)
    at j.createTypeUnsafe (modu.ff40a6106d8303b6.js:50:154258)
    at o (modu.ff40a6106d8303b6.js:50:366989)
    at r (modu.ff808c477751f58f.js:1:89034)
    at comm.6d578ff57f493e65.js:1129:2511
    at comm.6d578ff57f493e65.js:115:327
    at Object.je (modu.fc3ee6efdaa06c24.js:2:22463)
    at Ue (modu.fc3ee6efdaa06c24.js:2:22617)
    at modu.fc3ee6efdaa06c24.js:2:42478
    at Ar (modu.fc3ee6efdaa06c24.js:2:42572)
h @ modu.ff40a6106d8303b6.js:50
createTypeUnsafe @ modu.ff40a6106d8303b6.js:50
o @ modu.ff40a6106d8303b6.js:50
r @ modu.ff808c477751f58f.js:1
(anonymous) @ comm.6d578ff57f493e65.js:1129
(anonymous) @ comm.6d578ff57f493e65.js:115
je @ modu.fc3ee6efdaa06c24.js:2
Ue @ modu.fc3ee6efdaa06c24.js:2
(anonymous) @ modu.fc3ee6efdaa06c24.js:2
Ar @ modu.fc3ee6efdaa06c24.js:2
zr @ modu.fc3ee6efdaa06c24.js:2
(anonymous) @ modu.fc3ee6efdaa06c24.js:2
uu @ modu.fc3ee6efdaa06c24.js:2
Le @ modu.fc3ee6efdaa06c24.js:2
Vr @ modu.fc3ee6efdaa06c24.js:2
Qt @ modu.fc3ee6efdaa06c24.js:2
$t @ modu.fc3ee6efdaa06c24.js:2
  • What is the motivation for changing the behavior?

I assume the issue is caused by the UI is trying to use XCM v1 when only v2 and v3 are supported.

  • Please tell us about your environment:

    • Version: api v10.0.1; apps v0.124.2-121
    • Environment:
      • Browser : Chromium Version 110.0.5481.77 (Official Build) (64-bit)
@joepetrowski
Copy link
Contributor

Example of a successful teleport: https://westend.subscan.io/extrinsic/14944991-2

@jacogr
Copy link
Member

jacogr commented Mar 8, 2023

Will disable this in the meantime until a PR comes in to adjust upwards. (Will be quite some time from my side before I can attempt a look, so best course of action is disabling)

@PierreBesson
Copy link
Contributor Author

@joepetrowski am I correct that this was introduced by paritytech/cumulus#2222
Has there been some kind of announcement ? Will this be reaching Statemine, mainnet parachains soon ?

@joepetrowski
Copy link
Contributor

@joepetrowski am I correct that this was introduced by paritytech/cumulus#2222 Has there been some kind of announcement ? Will this be reaching Statemine, mainnet parachains soon ?

No that only relates to Transact instructions. Teleport is OK.

@jacogr
Copy link
Member

jacogr commented Mar 10, 2023

For future reference if somebody picks this up.

  1. This is where the message gets created to teleport -

    const params = useMemo(
    () => [
    {
    V1: isParaTeleport
    ? {
    interior: 'Here',
    parents: 1
    }
    : {
    interior: {
    X1: {
    ParaChain: recipientParaId
    }
    },
    parents: 0
    }
    },
    {
    V1: {
    interior: {
    X1: {
    AccountId32: {
    id: api.createType('AccountId32', recipientId).toHex(),
    network: 'Any'
    }
    }
    },
    parents: 0
    }
    },
    {
    V1: [{
    fun: {
    Fungible: amount
    },
    id: {
    Concrete: {
    interior: 'Here',
    parents: isParaTeleport
    ? 1
    : 0
    }
    }
    }]
    },
    0,
    { Unlimited: null }
    ],
    [api, amount, isParaTeleport, recipientId, recipientParaId]
    );

  2. This needs to be re-enabled again to make it show on the UI (aka remove these) -

    // TODO We need to move to XCM v3 at some point, until such time we disable
    // this functionality (we really should have kept it until later versions)
    isHidden: true,

@gilescope
Copy link
Contributor

gilescope commented Mar 10, 2023

Replacing V1 with V2 might well do the trick. I don't think a lot changed between those two versions. But possibly hold off on fixing this till the xcm v3 runtime has enacted on the relay chain.

@PierreBesson
Copy link
Contributor Author

PierreBesson commented Mar 10, 2023

Yes switching from V1 to V2 (just replace V1 strings by V2) fixed it in our faucet app paritytech/polkadot-testnet-faucet#225.

@jacogr jacogr changed the title Unable to teleport from Westend to Westend-Collective due to XCM v1 no longer supported Update teleport functionality to XCM V2/V3 Mar 13, 2023
@jacogr jacogr added this to the todo milestone Mar 14, 2023
@jacogr jacogr removed the -size-m label Mar 14, 2023
@pmensik
Copy link

pmensik commented Mar 22, 2023

Hello, when can we expect this issue to be fixed? Thank you

@bogdanpopey
Copy link

i can't believe it is not fixed until now and actually no wallet supports teleporting.

@gilescope
Copy link
Contributor

gilescope commented May 22, 2023 via email

@bogdanpopey
Copy link

Thanks. But i've finally hacked this myself. And the solution is that easy that i shall not even mention it. Honestly. I hope this gets fixed here as well. thank you all and i hope my comment helps the ones who are really in need for this feature like i was :)

@joshuacheong
Copy link

joshuacheong commented May 26, 2023

Hi all, any ETA on when will the Teleport UI be available again? Now it is a major blocker if there is no DOT teleportation to Statemint from Polkadot, how will people get their USDT or other assets off from Statemint if they dont have DOT to pay for gas? This problem is exacerbated when Binance had just integrated Statemint's USDT as a withdrawal or deposit capability. Please address this 🙏

@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants