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

Implement infrastructure for smart contract to call back into runtime #42

Closed
1 of 4 tasks
Robbepop opened this issue Mar 27, 2019 · 1 comment · Fixed by #124
Closed
1 of 4 tasks

Implement infrastructure for smart contract to call back into runtime #42

Robbepop opened this issue Mar 27, 2019 · 1 comment · Fixed by #124
Labels
A-ink_lang [ink_lang] Work item B-enhancement New feature or request
Projects

Comments

@Robbepop
Copy link
Collaborator

Robbepop commented Mar 27, 2019

Currently smart contracts are pretty isolated.
Wearing thick gloves one can call other remote smart contracts and even call back into the runtime, however, there is currently no support from the pDSL for doing that.

What we would like is a clean approach in calling into the runtime from the smart contract side.
This can be done by using ext_dispatch_call from the SRML contracts runtime module. It's documentation is currently unclear (at least to me) - further investigation needed.

Also we maybe need some infrastructure around it.

  • Find out how ext_dispatch_call is supposed to be called from a smart contract.
  • Implement ext_dispatch_call rudimentary in pdsl_core
  • Implement ext_dispatch_call in pdsl_model
  • Optionally provide additional helper framework in order to improve the user experience while using ext_dispatch_call as good as possible for the current state of pDSL.
@Robbepop Robbepop added B-enhancement New feature or request D-medium A-ink_lang [ink_lang] Work item labels Mar 27, 2019
@Robbepop
Copy link
Collaborator Author

For an MVP we want pdsl_core to depend on Substrate's node-runtime crate to have a common set of types to operate on. This also includes types such as Call which we can then use to make simple dispatches in pDSL to its underlying runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_lang [ink_lang] Work item B-enhancement New feature or request
Projects
No open projects
Sub0
  
In Progress
Development

Successfully merging a pull request may close this issue.

1 participant