TypeChain
TypeChain copied to clipboard
Allow specification of custom artifact glob in @typechain/hardhat
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.
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.
Went ahead and implemented this in https://github.com/dethcrypto/TypeChain/pull/735