dethcrypto / dethcrypto/TypeChain
Allow specification of custom artifact glob in @typechain/hardhat
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
Currently the glob to match build artifacts for which to generate types is hardcoded [here](https://github.com/dethcrypto/TypeChain/blob/92faf28a91fa17a6cb9c34bd29ea9b2cae5d57b3/packages/hardhat/src/index.ts#L69).
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.
Contributor guide
Assessment
This issue has not been assessed yet.