Skip to content
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

fix: Display vector byte if movestring can't format to utf8 #2393

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

qShirley
Copy link
Contributor

@qShirley qShirley commented Aug 9, 2024

Summary

Summary about this PR

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2024 5:20am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Aug 9, 2024 5:20am

Ok(s) => {
write!(f, "{}", s)
}
Err(_) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoveString is new with utf8 check in the contract, and the Rust implementation should also check utf8

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If MoveString is a transaction argument or directly deserialized via bcs::from_bcs, we can not check the utf8.

@jolestar
Copy link
Contributor

jolestar commented Aug 9, 2024

I merge this PR first, but we need to add a test case.

@jolestar jolestar merged commit 8507301 into rooch-network:main Aug 9, 2024
7 checks passed
@qShirley
Copy link
Contributor Author

qShirley commented Aug 9, 2024

I have a simple test in local, but more test is better

@qShirley qShirley deleted the fix_movestring_display branch August 9, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System Panic
3 participants