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

[Bug] Nested structs not hashed correctly #257

Closed
notonamap opened this issue Aug 31, 2023 · 2 comments · Fixed by #258
Closed

[Bug] Nested structs not hashed correctly #257

notonamap opened this issue Aug 31, 2023 · 2 comments · Fixed by #258
Labels
bug Something isn't working

Comments

@notonamap
Copy link

notonamap commented Aug 31, 2023

Component

sol-type

What version of Alloy are you on?

alloy-sol-types v0.3.2

Operating System

Linux

Describe the bug

Could it be that there's a keccak256 too much here? Seems to mess up encoding of nested structs

#[inline]
fn eip712_data_word<'a>(rust: &Self::RustType) -> Word {
keccak256(rust.eip712_hash_struct())
}

@notonamap notonamap added the bug Something isn't working label Aug 31, 2023
@notonamap notonamap changed the title [Bug] Encoding of nested structs not correct [Bug] Nested structs not hashed correctly Aug 31, 2023
@prestwich
Copy link
Member

prestwich commented Aug 31, 2023

Thanks! Fix is #258

@notonamap
Copy link
Author

thanks for fixing it! library is looking really great so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants