-
Notifications
You must be signed in to change notification settings - Fork 86
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] [break] Support TypeTag and StructTag to canonical string with prefix #2515
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
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 named object ID in the unit test and the testsuit *.feature files also need to be updated.
let test_type_tag = TypeTag::from_str(type_tag_str)?; | ||
assert_eq!(type_tag_str, test_type_tag.to_string()); | ||
assert_eq!(type_tag_canonical_str, test_type_tag.to_canonical_string()); | ||
Ok(()) | ||
} | ||
|
||
#[test] | ||
fn test_strange_format_type_tag() -> Result<()> { | ||
let type_tag_str = "0x900f053234b0ba66ad062b277896b28e049f2813d388da375efcd54b6e429dbe::coin::Coin<0000000000000000000000000000000000000000000000000000000000000003::gas_coin::GasCoin>"; |
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.
This is an invalid type_tag_str, we do not need to support it.
Summary
TypeTag
,StructTag
andAccountAddress
to canonical string with prefix0x
.0x00000000000000000000000000000001::string::String
or0x0000000000000000000000000000000a::module_name1::type_name1<0x0000000000000000000000000000000a::module_name2::type_name2<u64>>
Other impacts include possible break of SDK and front-end applications, please confirm @wow-sven
to_canonical_string()
method of TypeTag, StructTag and AccountAddress returns a prefix containing 0x by default