Implement seal_is_contract and seal_caller_is_origin#1129
Implement seal_is_contract and seal_caller_is_origin#1129agryaznov merged 20 commits intouse-ink:masterfrom
seal_is_contract and seal_caller_is_origin#1129Conversation
…act with self.env()
and seal_caller_is_origin`seal_is_contract and seal_caller_is_origin
|
Hmm, I didn't notice the initial PR in the substrate so I didn't comment there. But maybe better to implement the function that returns |
HCastano
left a comment
There was a problem hiding this comment.
It looks like it works, but needs a bit of cleanup
3d71b32 to
02ca62a
Compare
02ca62a to
5617aeb
Compare
@HCastano thanks for your review! Here comes the cleaned-up version |
|
Some notes:
|
I think we should have both functions. |
Agree. When is possible we will use cheaper |
Please do fix any |
But I think the node version used might be too old if the new features are used in the examples? How do I update the node there? It appears to be installed in the CI image? |
The |
|
@agryaznov You should see the CI output if you click on "Details" right of the failed jobs. You can also reproduce it locally, this list here should give some hints: https://github.com/paritytech/ink/blob/master/CONTRIBUTING.md#checklist (it might be a bit outdated though, so better ask before trying to figure out why something isn't working). |
Is it build with |
|
This reverts commit a40fab1.
Codecov Report
@@ Coverage Diff @@
## master #1129 +/- ##
=======================================
Coverage 78.69% 78.69%
=======================================
Files 252 252
Lines 9395 9395
=======================================
Hits 7393 7393
Misses 2002 2002
Continue to review full report at Codecov.
|
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the
Link to the run | Last update: Wed Feb 23 12:27:29 CET 2022 |
|
CI issues seem to be fixed now. |
cmichi
left a comment
There was a problem hiding this comment.
I've got only some nitpicks, looks good besides that, we can merge after those are fixed.
Could you click "Resolve conversation" for the comments by reviewers which were resolved? That makes it easier to follow what's going on. Thanks!
Co-authored-by: Michael Müller <mich@elmueller.net>
…mental_off_chain eingine
|
Will take a look at this again today, sorry! |
|
I'm not sure why ink-waterfall ci now fails. It began to fall with an error starting from this commit which changes nothing apart from comment typos. |
It's not your fault, it's because we currently don't use fixed nightly versions anywhere in CI. Since yesterday the Rust nightly version contains a bug which makes For this PR we can ignore the |
HCastano
left a comment
There was a problem hiding this comment.
Couple small things, but looks good!
My take on resolving comments: as a reviewer I want to be the one to mark comments as resolved. That way I'm able to get a refresher on what comments I've made, and judge whether or not they were actually resolved correctly
| /// pub fn is_contract(&mut self, account_id: AccountId) -> bool { | ||
| /// self.env().is_contract(&account_id) | ||
| /// } |
There was a problem hiding this comment.
| /// pub fn is_contract(&mut self, account_id: AccountId) -> bool { | |
| /// self.env().is_contract(&account_id) | |
| /// } | |
| /// pub fn is_contract(&mut self, account_id: &AccountId) -> bool { | |
| /// self.env().is_contract(account_id) | |
| /// } |
There was a problem hiding this comment.
Hm, no, this won't work as Ink messages can't take references as params.
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
|
The other tests need to be green, though :) |
athei
left a comment
There was a problem hiding this comment.
LGTM. You can merge once the CI is green.
Follow-up for paritytech/substrate#10789.
Needed for #804.