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

Add subxt like generation of the Call enum #1675

Closed
Tracked by #114
athei opened this issue Feb 23, 2023 · 2 comments
Closed
Tracked by #114

Add subxt like generation of the Call enum #1675

athei opened this issue Feb 23, 2023 · 2 comments
Labels
B-feature-request A request for a new feature.

Comments

@athei
Copy link
Contributor

athei commented Feb 23, 2023

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.

@pmikolajczyk41
Copy link
Member

I've already started looking at it some time ago and I'm planning to work on that next week as a follow-up to the mentioned PR :)

@athei
Copy link
Contributor Author

athei commented Jul 30, 2023

call_runtime will be deprecated in favour of execute_xcm as the Call is not stable enough to use it in contracts. Hence we don't want to build more codegen around it. We rather double down on XCM.

@athei athei closed this as completed Jul 30, 2023
@athei athei reopened this Jul 30, 2023
@athei athei closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-feature-request A request for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants