-
Notifications
You must be signed in to change notification settings - Fork 355
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
Migrate from IntKey
to new naked int key
#564
Conversation
3a6d5ac
to
1bdd257
Compare
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. Mostly cosmetic, looks better.
@@ -113,7 +112,7 @@ pub fn execute_register_merkle_root( | |||
|
|||
let stage = LATEST_STAGE.update(deps.storage, |stage| -> StdResult<_> { Ok(stage + 1) })?; | |||
|
|||
MERKLE_ROOT.save(deps.storage, U8Key::from(stage), &merkle_root)?; | |||
MERKLE_ROOT.save(deps.storage, stage, &merkle_root)?; |
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.
👍🏼
Regarding deprecation / removal of the |
69a4dc5
to
f432eb9
Compare
f432eb9
to
237ddee
Compare
@@ -336,6 +339,7 @@ pub type I128Key = IntKey<i128>; | |||
/// let k = U64Key::new(12345); | |||
/// let k = U32Key::from(12345); | |||
/// let k: U16Key = 12345.into(); | |||
#[deprecated(note = "It is suggested to use naked int types instead of IntKey wrapper")] |
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.
👍🏼
9baed5b
to
0862505
Compare
closes #549
I succesfully replaced every
IntKey
usage both in contracts and packages (other then implementation itself + tests + de).Looking at overall progress, I could actually remove whole
IntKey
implementation along with deserialization.I wonder if it wouldn't be too drastic? This seems to be major change, although from end user POV nothing changes - it's all internal.