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. |
| @@ -88,9 +88,9 @@ mod rand_extension { | |||
|
|
|||
| /// Update the value from the runtimes random source. | |||
There was a problem hiding this comment.
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 |
|
@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 <hernando@hcastano.com> Co-authored-by: Michael Müller <michi@parity.io>
This changes the
rand-extensionInk! 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.