wevm / wagmi

Reactive primitives for Ethereum apps
https://wagmi.sh
MIT License
5.92k stars 1.02k forks source link

Foundry wagmi generate broken with duplicate contract names from forge-std #4103

Closed bdphilly closed 3 months ago

bdphilly commented 3 months ago

Check existing issues

Describe the bug

Looks like there was a related fix a few weeks ago, however I'm still seeing the error.

Contract name "IERC721Enumerable" must be unique, Contract name "IERC721Metadata" must be unique.

Using forge-std v1.9.0, wagmi-cli v2.1.11

Steps To Reproduce

contract MyContract is ERC721Enumerable {
...
}
export default defineConfig({
    out: "src/generated.ts",
    plugins: [
        foundry({
            artifacts: '../generated/foundry/artifacts',
            include: [
                '**/MyContract.sol/MyContract.json',
            ]
        })
    ]
})

Run: $ yarn wagmi generate

What Wagmi package(s) are you using?

@wagmi/cli

Wagmi Version

2.10.8

Viem Version

2.16.4

TypeScript Version

5.0.2

github-actions[bot] commented 2 months ago

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.