-
Notifications
You must be signed in to change notification settings - Fork 443
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
Update chain extension example to show argument passing #1029
Conversation
🦑 📈 ink! Example Contracts ‒ Size Change Report 📉 🦑These are the results of building the
Link to the run | Last update: Wed Nov 24 07:11:14 CET 2021 |
The failing CI step seems to be unrelated to this change and prevalent among other current PRs. |
examples/rand-extension/lib.rs
Outdated
@@ -88,9 +88,9 @@ mod rand_extension { | |||
|
|||
/// Update the value from the runtimes random source. |
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.
Could you update this comment here and describe the effect of the subject
argument?
Codecov Report
@@ Coverage Diff @@
## master #1029 +/- ##
==========================================
- Coverage 78.87% 75.13% -3.75%
==========================================
Files 246 246
Lines 9260 9258 -2
==========================================
- Hits 7304 6956 -348
- Misses 1956 2302 +346
Continue to review full report at Codecov.
|
It's fixed now, it was an issue with one of the GitHub tokens. |
@justinfrevert Could you also merge |
Thanks for grabbing it, @HCastano |
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.
Thanks @justinfrevert!
@justinfrevert Are you up for answering the StackExchange question as well? |
I gave it a shot. Let me know how that looks. |
Great, thx! We should also incorporate your answer into our |
* Add argument to rand-extension example * add appropriate runtime and test example changes * Clarify rand-extension comment wrt subject argument * Update examples/rand-extension/lib.rs Co-authored-by: Hernando Castano <[email protected]> Co-authored-by: Michael Müller <[email protected]>
This changes the
rand-extension
Ink! example code to pass along an argument from the contract to the chain extension in the runtime. This PR addresses the first ToDo here, which is a repeat user question. I verified this works in a Substrate node on my machine.