rhlsthrm / hardhat-typechain

TypeChain tasks for Buidler
MIT License
18 stars 13 forks source link

Update to typechain v3 #7

Open andreujuanc opened 3 years ago

andreujuanc commented 3 years ago

Hi, i tried out the pluging and it didnt work. There was an error generating the types, later I figured it was typechain: I generated manually the types by updating to typechain@3.0.0 and ts-generator@0.1.1 and ran typechain --target ethers-v5 --outDir tmp './artifacts/*.json'

Types were generated successfully. Best

ghost commented 3 years ago

Had the same issue. I'm getting syntax error from prettier trying to parse import type ...

Screen Shot 2020-10-16 at 2 59 29 PM

It looks like @typechain/ethers-v5 removed the explicit dependency on prettier >= 2 which is required to parse import type declarations. The prettier >= 2 dependency is now in the typechain package so as @andreujuanc said, upgrading to typechain v3 should fix it.

For a temporary workaround use @typechain/ethers-v5@1.0.0