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/abi fun int128 encoding #25

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Conversation

colindickson
Copy link
Contributor

No description provided.

@@ -245,11 +245,12 @@ fn to_token(name: &proc_macro2::TokenStream, kind: &ParamType) -> proc_macro2::T
}
ParamType::Bytes => quote! { ethabi::Token::Bytes(#name.clone()) },
ParamType::FixedBytes(_) => quote! { ethabi::Token::FixedBytes(#name.as_ref().to_vec()) },
ParamType::Int(_) => {
ParamType::Int(size) => {
let full_signed_bytes_init = if size == 128 { 0x00 } else { 0xff };
Copy link
Collaborator

@maoueh maoueh Dec 11, 2023

Choose a reason for hiding this comment

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

The 128 check feels weird, why a i128 would be different than a i64. I'm surprised here.

If you use 0x00 directly.

@colindickson colindickson force-pushed the fix/abi-fun-int128-encoding branch from 1f9691e to e41fe60 Compare December 13, 2023 15:21
@colindickson colindickson force-pushed the fix/abi-fun-int128-encoding branch from e41fe60 to 4f59667 Compare December 13, 2023 19:11
@colindickson colindickson merged commit 4f59667 into develop Dec 13, 2023
3 checks passed
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.

2 participants