Skip to content

Allow specification of custom artifact glob in @typechain/hardhat #730

Open

Description

@ckoopmann

Currently the glob to match build artifacts for which to generate types is hardcoded here.

While the user can specify additional globs for "externalArtifacts" there is no way to disable type generation for selected contracts/artifacts.
One example where this is a problem is, if the user has multiple contracts with the same name which leads to Duplicate Identifier typescript errors.

Adding an optional config parameter to change the hardcoded glob (with the current pattern as the default) would fix this issue.

Activity

  1. ckoopmann commented on Jun 23, 2022

    @ckoopmann
    Author

    Fwiw: I'd be more than happy to implement this, if it's deemed a desirable feature. As far as I can see it should be done in just a few lines of code.

  2. ckoopmann commented on Jun 29, 2022

    @ckoopmann
    Author

    Went ahead and implemented this in #735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions