You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With paritytech/substrate#9276 implemented, we can now introduce seal_call_runtime into ink!, providing contracts with the ability of dispatching calls into the runtime.
ToDo
Add a new ink! API function self.env().call_runtime(…) analog to our other env() API functions (e.g. with UI tests under crates/lang/macro/tests/ui/). See the linked issue for the contracts pallet API.
Add an example which demonstrates how to call into the runtime. It should be possible to do this analog to the rand-extension example.
Implement a test for this new example in the ink-waterfall.
Add a section to the ink-docs, describing how this new functionality can be used.
The text was updated successfully, but these errors were encountered:
You have to keep in mind that extrinsics cannot return any data (only success/fail). They communicate via events with the offchain world. So something like rand-extension isn't possible with seal_call_runtime. It is unstable for a reason. There are several open questions around it:
Is it OK that it can't return data or should we make an effort to deliver events (asynchronously) to contracts?
There are issues around stability. Contract APIs must be stable but extrinsics are allowed to change. Once you allow some extrinsic to be called from a contract it puts a heavy burden on the runtime to never change this API.
With paritytech/substrate#9276 implemented, we can now introduce
seal_call_runtime
into ink!, providing contracts with the ability of dispatching calls into the runtime.ToDo
self.env().call_runtime(…)
analog to our otherenv()
API functions (e.g. with UI tests undercrates/lang/macro/tests/ui/
). See the linked issue for thecontracts
pallet API.rand-extension
example.The text was updated successfully, but these errors were encountered: