-
Notifications
You must be signed in to change notification settings - Fork 108
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
feat: add serde impls to Blob and Bytes48 #342
Conversation
4c95d6b
to
81dd299
Compare
Hey. Can you tell us why you need the serde impls and the from_hex() is not sufficient for your needs? Is it just for testing purposes? |
I'd like to use We provide these traits on almost all basic types so it's possible for API consumers to use the serde ecosystem in their own applications. With the serde impl, it would also become possible to use these types directly for RPC serialization instead of requiring conversion to another type that uses |
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.
Makes sense. For completeness, could we add serde impls for Bytes32
too?
just added! |
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.
Great. Thanks for adding that. LGTM 👍
Thanks! |
This adds serde
Serialize
andDeserialize
implementations that work with a0x
prefix.