-
Notifications
You must be signed in to change notification settings - Fork 774
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(codec)!: ambiguity unit8[] and bytes #613
Conversation
@@ -117,7 +117,7 @@ macro_rules! impl_abi_type { | |||
} | |||
|
|||
impl_abi_type!( | |||
Vec<u8> => Bytes, | |||
Vec<u8> => Array(Box::new(ParamType::Uint(8))), |
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.
I think this won't work, because bytes memory
which translates to Vec<u8>
will now be translate to Array(Uint(8))
as a uint8[]
.
Could we make bytes memory
translate to ethers::core::Bytes
?
(I think that's probably the bug here, given the tests' output)
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.
LGTM
Motivation
Vec<u8>
since it was used forbytes
andunit8[]
alike.Solution
bytes
isethers::types::Bytes
andunit8[]
isVec<u8>
This is a breaking change but can we fixed easily with
into()
conventionsPR Checklist