Closed zhangyongzhe20 closed 3 years ago
@zhangyongzhe20 did you add import '@typechain/hardhat';
in your hardhat.config.ts
?
also do remember to update your tsconfig.json
to add a path
so that you can import from '@typechained'
.
if it still didn't work, try yarn compile --force
(usually when there's no change to contract, the types generation won't be triggered, and --force
just force hardhat to re-compile them)
The typechained folder is generated after running yarn compile --force
. Thanks @alxiong
It seems that the typechained folder is not generated, cause it's cannot be found in during test.
This is my config file: