Skip to content

fix(dyn-abi): error on primitive EIP-712 data - #1138

Merged
DaniPopes merged 2 commits into
alloy-rs:mainfrom
0xalpharush:bug/a4-eip712-primitive-primary
Jun 30, 2026
Merged

DaniPopes merged 2 commits into
alloy-rs:mainfrom
0xalpharush:bug/a4-eip712-primitive-primary

Conversation

@0xalpharush

@0xalpharush 0xalpharush commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Return an error when EIP-712 encode_data resolves to a primitive value instead of a struct-like encodable payload.
  • Remove the unwrap() path that could panic for primitive-named primary types.

Regression

  • Added primitive_primary_type_returns_error, which failed before the fix by panicking in TypedData::encode_data.

Test Plan

  • cargo test -p alloy-dyn-abi --features eip712 primitive_primary_type_returns_error

@0xalpharush
0xalpharush marked this pull request as ready for review June 30, 2026 18:06
@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Jun 30, 2026
@DaniPopes
DaniPopes merged commit 14d7ad1 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