Skip to content

Support XCM Calls #218

@joepetrowski

Description

@joepetrowski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions