-
Notifications
You must be signed in to change notification settings - Fork 443
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
Storage refactoring docs #1592
base: master
Are you sure you want to change the base?
Storage refactoring docs #1592
Conversation
@Artemka374 are you going to continue driving this forward? |
Hi! Yes, we would like to drive this forward. I've updated the documentation to link to existing chapters on ink!'s website. We think that this documentation can serve as a more "deep dive" guide, with comparison of ink! 4 storage to ink! 3, and can be a companion to the documentation served on use.ink. |
8524c5c
to
1ddbb95
Compare
Mapping, | ||
}; | ||
|
||
/// Non-packed type with |
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.
/// Non-packed type with | |
/// Non-packed type |
In ink! v4.0.0-beta the way storage works was refactored. | ||
|
||
## Pre-ink! v4.0.0-beta storage |
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.
Can you remove the section on how it was done before?
It was fine when you created the PR, but we have the migration guide from 3.x to 4.x by now, which covers it.
@@ -0,0 +1,340 @@ | |||
# Storage refactoring |
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.
The examples
folder was renamed to integration-tests
by now, can you do it in this PR as well?
@@ -0,0 +1,30 @@ | |||
[package] | |||
name = "complex_storage_structures" | |||
version = "4.0.0-beta" |
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.
version = "4.0.0-beta" | |
version = "4.1" |
pub trait BalancesStateManagement { | ||
fn increase_balance_state(&mut self, amount: u128); | ||
fn decrease_balance_state(&mut self, amount: u128); | ||
fn get_balance_state(&self) -> u128; | ||
} |
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.
I don't think we need this for the example
derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout) | ||
)] | ||
pub struct TokenManagement< | ||
KEY: StorageKey, |
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.
Do we need the KEY
here to demonstrate what you're trying to get at?
Mapping, | ||
}; | ||
|
||
/// Non-packed type with |
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.
with...?
1ddbb95
to
873a05b
Compare
I've rebased this branch and applied the above suggestions. |
No description provided.