Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Foundry plugin fails with duplicate contract error #1815

Closed
1 task done
Amirjab21 opened this issue Feb 8, 2023 · 3 comments
Closed
1 task done

bug: Foundry plugin fails with duplicate contract error #1815

Amirjab21 opened this issue Feb 8, 2023 · 3 comments
Labels
Needs Reproduction Misc: Needs Reproduction

Comments

@Amirjab21
Copy link

Amirjab21 commented Feb 8, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

0.1.5

Current Behavior

When I try to use the Foundry plugin to generate my hooks, it gives an error about needing contracts to be unique. It complains about the OpenZeppelin contracts e.g ERC20, IERC20.

I'm unable to exclude these contracts from registering with this config file

export default defineConfig({
  out: "generated.ts",
  plugins: [
    foundry({
      exclude: [
        // the following patterns are excluded by default
        'Common.sol/**',
        'Components.sol/**',
        'Script.sol/**',
        'StdAssertions.sol/**',
        'StdError.sol/**',
        'StdCheats.sol/**',
        'StdMath.sol/**',
        'StdJson.sol/**',
        'StdStorage.sol/**',
        'StdUtils.sol/**',
        'Vm.sol/**',
        'console.sol/**',
        'console2.sol/**',
        'test.sol/**',
        '**.s.sol/*.json',
        '**.t.sol/*.json',
        'interfaces/**',
        '**/IWETH.sol',
        'node_modules/**',
        '@openzeppelin/**',
        'openzeppelin/**',
        '@openzeppelin-contracts/**',
        'openzeppelin-contracts/**',
        'out/**',
        'forge-std/**',
        'solmate/**',
        'ERC20Upgradeable.sol',
        '**/I**.sol',
        'openzeppelin-contracts-upgradeable/**',
        '@openzeppelin-contracts-upgradeable/**',
        "IERC20.sol",
        "ERC20/**",
        "IERC20/**"
      ],
      project: '../foundry',
    }),
    react(),
  ],
});

Expected Behavior

No response

Steps To Reproduce

No response

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

@tmm
Copy link
Member

tmm commented Feb 8, 2023

Thanks for reporting! Can you post a minimal reproducible example? A basic Foundry project that reproduces this is fine.

@tmm tmm added the Needs Reproduction Misc: Needs Reproduction label Feb 8, 2023
@tmm tmm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
@tmm
Copy link
Member

tmm commented Feb 8, 2023

Please re-open this issue when there is a minimal reproducible example.

Copy link
Contributor

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 other comments you can create a new discussion.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Reproduction Misc: Needs Reproduction
Projects
None yet
Development

No branches or pull requests

2 participants