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: fixed bytes dyn abi packed encoding #671

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

michprev
Copy link
Contributor

Motivation

Packed encoding does not extend fixed bytes to 32-byte words.

Solution

Using the actual size of the fixed bytes without extending.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@michprev michprev requested a review from prestwich as a code owner June 17, 2024 21:18
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Thanks! This looks like a typo that should be min since we don't want to go over 32 bytes and panic in case the input is invalid. I also added some tests.

@DaniPopes DaniPopes merged commit 754a53a into alloy-rs:main Jun 17, 2024
30 checks passed
klkvr pushed a commit that referenced this pull request Aug 4, 2024
* fix: fixed bytes dyn abi packed encoding

* chore: use min, add tests

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
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