fix(cli): support shared foundry artifact deployments#5132
Open
samsamtrum wants to merge 1 commit into
Open
Conversation
|
@samsamtrum is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for multiple named deployments sharing one Foundry ABI artifact in the CLI Foundry plugin.
Problem
When several deployed contracts share the same ABI artifact (for example
DAIandWETHboth usingERC20.json), the Foundry plugin can currently only emit the artifact contract name. That means only one generated config/address pair is available for the shared ABI use case.Changes
deploymentArtifactsmapping from deployment name to Foundry artifact name.deploymentsaddress mapping behavior intact.ERC20ABI artifact.Example:
This allows generated exports such as both
daiConfigandwethConfigwhile reusingerc20Abi.Verification
corepack pnpm install --ignore-scripts --frozen-lockfile --filter @wagmi/cli...corepack pnpm exec biome check --write packages/cli/src/plugins/foundry.ts packages/cli/src/plugins/foundry.test.tscorepack pnpm exec vitest run packages/cli/src/plugins/foundry.test.ts -t 'contracts supports multiple deployment names sharing one ABI artifact'corepack pnpm --filter @wagmi/cli run check:typesCloses #4396