Conversation
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑
These are the results when building the
Link to the run | Last update: Thu Mar 2 13:59:11 CET 2023 |
Codecov Report
@@ Coverage Diff @@
## master #1698 +/- ##
==========================================
+ Coverage 70.72% 70.82% +0.10%
==========================================
Files 205 205
Lines 6409 6407 -2
==========================================
+ Hits 4533 4538 +5
+ Misses 1876 1869 -7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
I like having Hash instead of [u8; 32], but changing the env/api function signature would require a MAJOR version bump.
It's too early in the life of 4.0 to start keeping release branches around so that master can contain breaking changes like this.
While it would be fine to add the function with the new signature to EnvAccess, I'd add it with the old signature ([u8; 32] ) for consistency.
You're right, didn't consider that. I wonder if there is a compromise using |
Adding a Therefore I have gone with adding a |
crates/env/src/api.rs
Outdated
| <EnvInstance as OnInstance>::on_instance(|instance| instance.set_code_hash(code_hash)) | ||
| } | ||
|
|
||
| /// **New version of this function which will replace [`set_code_hash`] in `v5.0`** |
There was a problem hiding this comment.
Can you create a follow-up ticket for removing the comment and renaming the function? Can also add the Hernando wishlist there:
I like having
Hashinstead of[u8; 32], but changing theenv/apifunction signature would require aMAJORversion bump.
set_code_hash2which accepts theHashenvironment type instead of concrete[u8; 32]to match other methods which handle code hashes.EnvAccessto allow callingself.env.set_code_hash(&code_hash), which callsset_code_hash2.set_code_hashimpl, which will be replaced by theset_code_hash2impl in the next MAJOR release