Hardhat plugin always rebuilds typechain artifacts
See original GitHub issueBug with the @typechain/hardhat
package.
When using the typechain plugin for hardhat, typechain artifacts will always be rebuilt, even if the smart contracts haven’t changed. While this isn’t breaking, it adds an additional few seconds to every time a hardhat command is run.
Is there any way that the plugin could detect that the typechain artifacts are out of date? Perhaps check the modified time of the artifacts compared to the source solidity files and only regenerate if needed?
I’d be interested in fixing this and submitting it as a PR if it’s not already in progress.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
TypeChain/index.ts at master - hardhat - GitHub
TypeScript bindings for Ethereum smart contracts - TypeChain/index.ts at ... if this is not full rebuilding, always re-generate types for external artifacts.
Read more >Compiling your contracts | Ethereum development ... - Hardhat
The compiled artifacts will be saved in the artifacts/ directory by default, or whatever your configured artifacts path is.
Read more >@typechain/hardhat - npm
This plugin overrides the compile task and automatically generates new Typechain artifacts on each compilation. There is an optional flag --no- ...
Read more >TypeChain: TypeScript Bindings for Ethereum Smart Contracts
TypeChain always will rewrite existing files. You should not commit them. ... To make it work great with Hardhat, use Hardhat plugin.
Read more >awesome-solidity - Ben Kremer
paulrberg/solidity-template - Github template for writing contracts (uses: Hardhat, TypeChain, Ethers, Waffle, Solhint, Solcover, Prettier Plugin Solidity).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wanted to come back and say thank you so much for adding this feature. Really appreciate it!
Pretty sure you can. Will think about it and get back to this tomorrow.