Skip to content

Add subxt like generation of the Call enum #1675

@athei

Description

@athei

The call_runtime API offered by pallet-contracts allows contracts to pass an encoded Call to the runtime which then executes it.

The API still has a few issues:

  • It is unstable (it will stay unstable if we don't start tinkering with it)
  • Dispatchables can't return data on Ok. This is a constraint in FRAME. But I think it can be changed (I am looking into this).
  • We don't have support for call_runtime in ink!, yet ( Support call_runtime #1641).

As of right now those call data structures need to be constructed manually which is quite cumbersome. We need some code generation that constructs the Call enum of a runtime from metadata which can then be passed to call_runtime.

The code for this should already exist within subxt. We need to make it conveniently accessible within ink!.

This is the inverse direction of #1674.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions