-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[Docs] - add 0x prefix and change SuiAddress and ObjectID to lowercase #1867
Conversation
2951044
to
5d1ea57
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.
Thank you so much, Patrick! I have just a couple of comments/questions. Otherwise, LGTM! Adding Ade for another set of eyes. Thanks again!
doc/src/build/json-rpc.md
Outdated
@@ -153,7 +153,7 @@ The signing tool will create and print out the signature and public key informat | |||
You will see output resembling: | |||
```shell | |||
2022-04-25T18:50:06.031722Z INFO sui::sui_commands: Data to sign : VHJhbnNhY3Rpb25EYXRhOjoAAFHe8jecgzoGWyGlZ1sJ2KBFN8aZF7NIkDsM+3X8mrVCa7adg9HnVqUBAAAAAAAAACDOlrjlT0A18D0DqJLTU28ChUfRFtgHprmuOGCHYdv8YVHe8jecgzoGWyGlZ1sJ2KBFN8aZdZnY6h3kyWFtB38Wyg6zjN7KzAcBAAAAAAAAACDxI+LSHrFUxU0G8bPMXhF+46hpchJ22IHlpPv4FgNvGOgDAAAAAAAA | |||
2022-04-25T18:50:06.031765Z INFO sui::sui_commands: Address : 51DEF2379C833A065B21A5675B09D8A04537C699 | |||
2022-04-25T18:50:06.031765Z INFO sui::sui_commands: Address : 0x51DEF2379C833A065B21A5675B09D8A04537C699 |
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.
Should the letters be lower case here?
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.
good catch! it should be lowercase
Readonly: false | ||
ID: 0x124bbde643189b573c98d05c092f4927225421d7 | ||
Version: 1 | ||
Owner: Account Address ( 0x62cd5bc220b28a34265bcb24995fb45a51d39832 ) |
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 this spacing in parenthesis correct?
( 0x62cd5bc220b28a34265bcb24995fb45a51d39832 )
@@ -201,11 +201,11 @@ curl --location --request POST $SUI_RPC_HOST \ | |||
"method": "sui_moveCall", | |||
"params": [ | |||
"{{owner_address}}", | |||
"0000000000000000000000000000000000000002", | |||
"0x2", |
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 allow short form everywhere?
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.
yes, I have done some test manually and a unit test here
sui/sui_types/src/unit_tests/base_types_tests.rs
Lines 198 to 215 in d4d894e
#[test] | |
fn test_object_id_zero_padding() { | |
let hex = "0x2"; | |
let long_hex = "0x0000000000000000000000000000000000000002"; | |
let long_hex_alt = "0000000000000000000000000000000000000002"; | |
let obj_id_1 = ObjectID::from_hex_literal(hex).unwrap(); | |
let obj_id_2 = ObjectID::from_hex_literal(long_hex).unwrap(); | |
let obj_id_3 = ObjectID::from_hex(long_hex_alt).unwrap(); | |
let obj_id_4: ObjectID = serde_json::from_str(&format!("\"{}\"", hex)).unwrap(); | |
let obj_id_5: ObjectID = serde_json::from_str(&format!("\"{}\"", long_hex)).unwrap(); | |
let obj_id_6: ObjectID = serde_json::from_str(&format!("\"{}\"", long_hex_alt)).unwrap(); | |
assert_eq!(SUI_FRAMEWORK_ADDRESS, obj_id_1.0); | |
assert_eq!(SUI_FRAMEWORK_ADDRESS, obj_id_2.0); | |
assert_eq!(SUI_FRAMEWORK_ADDRESS, obj_id_3.0); | |
assert_eq!(SUI_FRAMEWORK_ADDRESS, obj_id_4.0); | |
assert_eq!(SUI_FRAMEWORK_ADDRESS, obj_id_5.0); | |
assert_eq!(SUI_FRAMEWORK_ADDRESS, obj_id_6.0); | |
} |
Should be allowed everywhere
#1867) * add 0x prefix and change SuiAddress and ObjectID to lowercase * add 0x prefix and change SuiAddress and ObjectID to lowercase * address Pr comment
#1867) * add 0x prefix and change SuiAddress and ObjectID to lowercase * add 0x prefix and change SuiAddress and ObjectID to lowercase * address Pr comment
This is the doc changes for #1800.
I have added 0x prefix to all the addresses and object ID, also output of
objects
command now prints a table, I have included the change in docs as well.