Skip to content

fix(json-abi): dedup canonical signatures - #1151

Merged
DaniPopes merged 2 commits into
alloy-rs:mainfrom
figtracer:fig/dedup-abi-signatures
Jul 16, 2026
Merged

DaniPopes merged 2 commits into
alloy-rs:mainfrom
figtracer:fig/dedup-abi-signatures

Conversation

@figtracer

@figtracer figtracer commented Jul 16, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

JsonAbi::dedup compares complete ABI parameters, so inherited declarations with the same canonical signature are retained when only parameter metadata such as names differs. Passing such an ABI to sol! then produces duplicate items. In Foundry, this makes forge bind panic for the reproduction in foundry-rs/foundry#11538.

Solution

Keep the existing Vec::dedup_by flow, but compare canonical signatures instead of complete parameter metadata. The regression test covers all three item kinds, different parameter names, and retaining distinct overloads.

@figtracer
figtracer marked this pull request as ready for review July 16, 2026 11:17
@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Jul 16, 2026
@DaniPopes
DaniPopes merged commit ca7508b into alloy-rs:main Jul 16, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy Jul 16, 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