Skip to content

fix(dyn-abi): enforce signed int string width - #1136

Merged
DaniPopes merged 2 commits into
alloy-rs:mainfrom
0xalpharush:bug/a2-int-string-underflow
Jun 30, 2026
Merged

DaniPopes merged 2 commits into
alloy-rs:mainfrom
0xalpharush:bug/a2-int-string-underflow

Conversation

@0xalpharush

@0xalpharush 0xalpharush commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Validate the final signed I256 value produced by DynSolType::Int(n).coerce_str.
  • Keep int8 minimum value -128 accepted while rejecting below-minimum strings such as -129.

Regression

  • Extended coerce_int_overflow, which failed before the fix because int8 string coercion accepted -129.

Test Plan

  • cargo test -p alloy-dyn-abi coerce_int_overflow

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