-
Notifications
You must be signed in to change notification settings - Fork 450
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
Move storage derives to ink
crate
#1400
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1400 +/- ##
==========================================
+ Coverage 71.62% 72.01% +0.38%
==========================================
Files 187 185 -2
Lines 5844 5813 -31
==========================================
Hits 4186 4186
+ Misses 1658 1627 -31
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Michael Müller <[email protected]>
b9e101f
to
d8da53d
Compare
Hey @ascjones , Are there any suggestions? Thanks~ |
Hi @xiyu1984, those methods and traits have been removed as part of the storage rework: see the release notes: https://github.com/paritytech/ink/blob/master/CHANGELOG.md#storage-rework |
Hi @ascjones , thanks a lot. My use case is that I need a re-entry call to a smart contract. That is, Contract A calls contract B, and then contract B calls back to contract A to update a state(a member of contract A). In the last version of ink, I use |
@xiyu1984 I can't compile it because I don't have a |
Hey @xgreenx, |
As discussed in #1223, one problem is that the storage traits derive macros (
Storable
,StorableHint
,StorageKey
,StorageLayout
) generate code which assumes the top levelink
crate is in scope e.g.::ink::storage::traits::StorageKey
. Therefore if a user were to import the standaloneink_storage
crate and use those derives, it would not work.This PR solves that by moving the storage derives into the
ink
crate itself, ensuring it is only possible to use those derives together with theink
crate.