-
Notifications
You must be signed in to change notification settings - Fork 447
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
Support call_runtime
#1641
Support call_runtime
#1641
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add entry in CHANGELOG.md
under Unreleased
section and README.md
for the example?
@SkymanOne I've added a line in the CHANGELOG and a README file for the example |
Codecov Report
@@ Coverage Diff @@
## master #1641 +/- ##
==========================================
- Coverage 70.76% 64.15% -6.61%
==========================================
Files 206 206
Lines 6416 6394 -22
==========================================
- Hits 4540 4102 -438
- Misses 1876 2292 +416
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: German <german.nikolishin@gmail.com>
Also could you please satisfy the CI? It seems that it fails on the e2e test added in this very PR. |
I have no idea why linker fails :| |
Alright, this wasmtime issue might cause the failure. Could be solved by changing its version down there in the dependency tree. Or, just wait for the recent substrate crates get published to crates.io (will require version bumps in ink_e2e dependencies) |
@agryaznov sorry, but I don't know how to properly add this wasmtime dependency (adding |
@agryaznov are you gonna take care of helping out wit the CI here, or do you need help from me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmikolajczyk41 to fix the CI bump versions in your e2e test's Cargo.toml
as suggested.
Also, note that those tests have been moved to another directory (see #1659), so you need to merge master into your branch.
examples/call-runtime/Cargo.toml
Outdated
|
||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } | ||
scale-info = { version = "2.3", default-features = false, features = ["derive"], optional = true } | ||
sp-io = { version = "12.0.0", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…_runtime # Conflicts: # CHANGELOG.md # crates/env/Cargo.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A final patch: please, update the changelog as requested. Aside from that, LGTM! Thanks a lot for your contribution!
@pmikolajczyk41 Thank you for this nice contribution! We would like to give you a tip for the work you've put into this PR 😊 . Could you edit your description of this PR and add either one of those?
or
|
@cmichi address added - thank you! |
/tip medium |
@cmichi A medium tip was successfully submitted for pmikolajczyk41 (15fdtPm7jNN9VZk5LokKcmBVfmYZkCXdjPpaPVL2w7WgCgRY on polkadot). https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips |
@@ -50,7 +53,6 @@ compatible with the ink! `4.0.0` release. | |||
|
|||
For full compatibility requirements see the [migration guide](https://use.ink/faq/migrating-from-ink-3-to-4/#compatibility). | |||
|
|||
### Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, why was this removed? Looks accidental @pmikolajczyk41 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must have done this during some semi-automatic merging - that explains the last request for change above :|
This PR is the first step towards supporting runtime calls directly from a contract.
Passing call
For now, we settle up with a bit inconvenient approach, where the contract is responsible for providing properly encoded call. As the next step we propose to extend
Environment
trait with (feature-gated)type RuntimeCall
, which could be then set up to the proper enum generated by e.g.subxt
. Before this however, we would like to have custom environment support in the e2e framework.Testing locally
Launch
substrate-contracts-node
withtype CallFilter = frame_support::traits::Everything;
in the runtime declaration (forpallet_contracts
configuration).Closes #854
polkadot address: 15fdtPm7jNN9VZk5LokKcmBVfmYZkCXdjPpaPVL2w7WgCgRY