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

Support XCM Calls #218

Open
joepetrowski opened this issue May 13, 2022 · 0 comments
Open

Support XCM Calls #218

joepetrowski opened this issue May 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@joepetrowski
Copy link
Contributor

There are some XCM calls that would be sensible to support from TxWrapper. These should be divided between core functions but leave room for extensibility. For example, the core functionality should handle calls from the Relay Chain or between Trusted Teleporters and the Relay Chain. However, when it comes to non-trusted teleporters (the majority of chains that use reserve backed transfers), each parachain could have its own API to construct the XCM Instructions, so there should be some extensibility so that txwrapper-myparachain can put its own API into the wrapper.

Relay Chain Calls

  • teleport_assets: As TrustedTeleporters can only be changed in a Relay Chain runtime upgrade, we can hard code in some guard rails here. For example, throw a warning if a user tries to construct a teleport to a non-trusted chain.
  • reserve_transfer_assets: Can construct, but the destination chain will need the proper handlers to do something with the message. The docs should warn users that they should know what they are doing here.

Parachain Calls

For Statemint and trusted teleporters, the teleport_assets call can be used for sending DOT/KSM to the Relay Chain.

For parachains that use reserve transfers, we can probably make a module that paras who directly use polkadotXcm can use reserve_transfer_assets, but parachains can put any API around the instructions. For example, here is some code from Karura.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants