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

Ability to query correct Xcm destination weights #969

Open
jacogr opened this issue Jun 7, 2021 · 0 comments
Open

Ability to query correct Xcm destination weights #969

jacogr opened this issue Jun 7, 2021 · 0 comments
Labels
I5-enhancement An additional feature request. T6-XCM This PR/Issue is related to XCM.

Comments

@jacogr
Copy link

jacogr commented Jun 7, 2021

Currently on the asset teleports, we need to specify the destination weight. (Effectively calculated from the BaseXcmWeight) From a use perspective, this is currently hardcoded and already has some issues between different chains (e.g. Westend vs Kusama) since the parameters are different.

It would be optimal and much less error prone if we were to expose an rpc along the lines of queryXcmWeight(Xcm) -> Weight (copy-and-pasted from Gav's suggestion) that can be used to estimate this value. Since we pass in the encoded Xcm call, we can use it to estimate any Xcm message, not just the one I wish to use it for in the short term.

This can be used for -

  • the dest weight
  • calculations with the WeightToFee (the above RPC would, in a perfect world, already return this)

Obviously getting this value 100% correct is quite important here, getting it wrong can lead to sending assets via teleport into a black hole.

@Sophia-Gold Sophia-Gold transferred this issue from paritytech/polkadot Aug 24, 2023
@the-right-joyce the-right-joyce added I5-enhancement An additional feature request. and removed J0-enhancement labels Aug 25, 2023
claravanstaden added a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
Co-authored-by: Vincent Geddes <vincent@snowfork.com>
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Mar 25, 2024
bkchr pushed a commit that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

No branches or pull requests

4 participants