Skip to content

Interface to expose Call enum structure from construct_runtime for XCM Transact callers #813

@KiChjang

Description

@KiChjang

Right now, the way to construct a Transact XCM safely is to import the foreign chain's runtime crate and use its Call enum to encode/decode incoming/outgoing XCM Transact instructions. This is obviously not a practical or scalable solution, since a runtime crate is pretty large in size, and pulling it in as a dependency is going to considerably bloat code sizes, not to mention elongate compilation times.

What teams do nowadays instead is to have a local representation of the SCALE-encoded foreign Call enum. This is not ideal either since it can easily go out of sync with the foreign chain, which would make Transact instructions to the foreign fail.

We'll need to create some kind of interface based on the Call enum without requiring devs to pull in an entire runtime crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T6-XCMThis PR/Issue is related to XCM.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions