dethcrypto / dethcrypto/TypeChain
Add support for hardhat + ethers v6
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
I'm working on a new version of the `hardhat-ethers` plugin and I want to make sure that it works well with typechain. From what I can see, typechain's hardhat plugin hasn't been updated yet (which makes sense, because we haven't updated our plugin :sweat_smile:).
Some comments from looking at the codebase:
- The version of ethers used in `@typechain/hardhat` should be updated, and the dependency on `@typechain/ethers-v5` should be replaced with `@typechain/ethers-v6`
- I think some peer dependencies (`@ethersproject/abi` and `@ethersproject/providers`) in `@typechain/hardhat` could be dependencies. This is no strictly necessary, but reducing peer dependencies prevents conflicts down the road.
- `codegen/hardhat.ts` in `@typechain/target-ethers-v6` will need to be updated. Here I think we'll have to coordinate, but at the very least:
- The new version of the plugin will be called `@nomicfoundation/hardhat-ethers`, not `@nomiclabs`.
- `getContractAt` will also accept an `Addressable` as the address, so those types should be changed to `string | Addressable`.
I'll be working on this today and I'll comment here anything else I find.
Contributor guide
Assessment
This issue has not been assessed yet.