Skip to content

fix(dyn-abi): require tuple match arity - #1137

Merged
DaniPopes merged 2 commits into
alloy-rs:mainfrom
0xalpharush:bug/a3-tuple-matches-arity
Jun 30, 2026
Merged

DaniPopes merged 2 commits into
alloy-rs:mainfrom
0xalpharush:bug/a3-tuple-matches-arity

Conversation

@0xalpharush

@0xalpharush 0xalpharush commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Require tuple type and value lengths to match before comparing zipped tuple elements.
  • Apply the same length check when an EIP-712 custom struct type is matched against a plain tuple value.

Regression

  • Added tuple_matches_rejects_short_values, which failed before the fix because a two-element tuple type matched a one-element tuple value.

Test Plan

  • cargo test -p alloy-dyn-abi tuple_matches_rejects_short_values

@0xalpharush
0xalpharush marked this pull request as ready for review June 30, 2026 18:05
@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Jun 30, 2026
@DaniPopes
DaniPopes merged commit 0c5e22c into alloy-rs:main Jun 30, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants