Skip to content

feat: Soften duplicate contract name in the case contracts have identical ABIs - #4694

Closed
silasdavis wants to merge 1 commit into
wevm:mainfrom
silasdavis:sd/foundry-cross-project
Closed

feat: Soften duplicate contract name in the case contracts have identical ABIs#4694
silasdavis wants to merge 1 commit into
wevm:mainfrom
silasdavis:sd/foundry-cross-project

Conversation

@silasdavis

@silasdavis silasdavis commented Jun 2, 2025

Copy link
Copy Markdown

This is useful for instance when contracts appear as duplicates when ingesting from a single Foundry project that depends on others foundry projects.

In this case getArtifactPaths() in the Foundry plugin pick up the same contracts twice since they end up existing in both out/ directories. I don't think there is a reliable to heuristic to de-duplicate them at this level.

It seems like duck-typing contracts by the ABI should be fine, it could always be enabled via an option.

…ical ABIs

This is useful for instance when contracts appear as duplicates when
ingesting from a single Foundry project that depends on others foundry
projects.

In this case `getArtifactPaths()` in the Foundry plugin pick up the same
contracts twice since they end up existing in both `out/` directories. I
don't think there is a reliable to heuristic to de-duplicate them at
this level.

It seems like duck-typing contracts by the ABI should be fine, it could
always be enabled via an option.

Signed-off-by: Silas Davis <silas@inco.network>
@changeset-bot

changeset-bot Bot commented Jun 2, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 82ba5ff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 2, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wagmi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2025 11:52am

@silasdavis silasdavis changed the title feat: Soften duplicate contract name in the case contracts have ident… feat: Soften duplicate contract name in the case contracts have identical ABIs Jun 2, 2025
@silasdavis

Copy link
Copy Markdown
Author

I just want to put this out for a sense check before going to town on the rest of contribution requirements, let me know what you think.

@silasdavis

Copy link
Copy Markdown
Author

closing for correct description of root cause after debugging some more: #4695

@silasdavis
silasdavis deleted the sd/foundry-cross-project branch June 2, 2025 12:03
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.

1 participant