How to disable typechain by default? #4736
Unanswered
AlissonRS
asked this question in
Troubleshooting
Replies: 1 comment
-
Hi @AlissonRS, sorry for not responding sooner! As far as I know, there's no way in typechain to configure this. But you can disable it yourself by overriding the compile task: task("compile").setAction(async function (args, hre, runSuper) {
return runSuper({ ...args, noTypechain: true });
}); Is that workaround enough for you? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I run
hardhat compile
task, it automatically generates types via typechain:I don't want this behavior. If I want types generated, I'd like to explicitly run
hardhat typechain
task for that.The reason is that I have the types under version control because I distribute them via NPM package. However, we also use
solidity-coverage
to run coverage on our unit tests, and because it uses different compiler configs than we have in ourhardhat.config.ts
file, it modifies types with different bytecode, so devs can accidentally push types with the bytecode generated by coverage task.From what I know, it's not possible to disable type generation when running
hardhat coverage
as it just runs thecompile
task internally before running.Beta Was this translation helpful? Give feedback.
All reactions