-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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 to move v6 and u16, u32, u256 support #5659
Conversation
|
💳 Wallet Extension has been built, you can download the packaged extension here: https://github.com/MystenLabs/sui/actions/runs/3358431058#artifacts |
@damirka I could use some feedback on the BCS TS module please. |
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.
Overall looks good to me, but I'm not personally familiar with this process of updating our move integration, so holding off on the stamp for that reason.
@@ -591,5 +619,5 @@ fn convert_string_to_u128(s: &str) -> Result<u128, anyhow::Error> { | |||
if !s.starts_with(HEX_PREFIX) { | |||
bail!("Unable to convert {s} to unsigned int.",); | |||
} | |||
u128::from_str_radix(s.trim_start_matches(HEX_PREFIX), 16).map_err(|e| e.into()) | |||
U256::from_str_radix(s.trim_start_matches(HEX_PREFIX), 16).map_err(|e| e.into()) |
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.
Is there a performance implication to changing from a built-in type to the library type here? Maybe not something we care about, but I wanted to check.
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.
There probably is. I can try to benchmark this and follow up with a tweak if needed.
@@ -7,8 +7,11 @@ import { SuiObjectRef } from './objects'; | |||
|
|||
bcs | |||
.registerVectorType('vector<u8>', 'u8') | |||
.registerVectorType('vector<u16>', 'u16') |
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.
Heads up @damirka, potential merge conflict with your recent BCS TS library work.
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.
Thanks! I expected this to happen and will use "theirs".
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.
Overall looks good to me. Multiple vector definitions will go away once #5427 is landed.
After ensuring Move v6 types are backward compatible and not breaking existing Sui, we're now ready to migrate to Move v6.
This enables newer features including new integer support like u16, u32, u256.
Follow up PRs will flesh out new integer support for Typescript modules & apps if needed.