-
Notifications
You must be signed in to change notification settings - Fork 431
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
Use pallet-contracts-uapi #2038
Conversation
Cargo.toml
Outdated
# TODO update once released | ||
pallet-contracts-uapi = { path = "../polkadot-sdk/substrate/frame/contracts/uapi", default-features = false } |
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.
We need to wait upcoming release of this package before we can merge this
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2038 +/- ##
==========================================
+ Coverage 53.47% 53.73% +0.25%
==========================================
Files 221 223 +2
Lines 6984 7040 +56
Branches 3082 3141 +59
==========================================
+ Hits 3735 3783 +48
- Misses 3249 3257 +8 ☔ View full report in Codecov by Sentry. |
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the
Link to the run | Last update: Tue Jan 23 18:10:18 CET 2024 |
Test with inline always fix clip
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.
All in all looks pretty good.
It would still be interesting to know in a couple of cases (e.g. call-builder-return-value
and contract-storage
) why the contracts are 250 bytes or so bigger. I remember you looking into it previosly and overall the diffs don't seem as big now, and in many cases small reductions in size.
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.
LGTM
mm pallet-contracts-uapi@5.0.0 is actually a buggy version, thus the tests are not passing here we will have to wait for the next release of the crate |
@ascjones, I published the package under |
We now have a
pallet-contracts-uapi
crate (see issue paritytech/polkadot-sdk#2189) that expose all the host functions that a contract can import.This PR remove the functions that were originally defined in https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs and use the one defined in this crate instead.
Some shared structs like Return and CallFlags are also now imported from this crate instead of being redefined in ink!
Note: Depends on the next crates.io release of
pallet-contracts-uapi