You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 😅).
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.
The text was updated successfully, but these errors were encountered:
Change the default target in the config to ethers-v6
In @typechain/ethers-v6:
Add generated typings for deployContract
Change ethers.utils.BytesLike to ethers.BytesLike
I think these changes should be enough. This would mean though that the next major version of @typechain/hardhat uses ethers v6 by default. The alternative is to release a separate plugin for v6... but I don't think that makes sense here.
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 😅).Some comments from looking at the codebase:
@typechain/hardhat
should be updated, and the dependency on@typechain/ethers-v5
should be replaced with@typechain/ethers-v6
@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:@nomicfoundation/hardhat-ethers
, not@nomiclabs
.getContractAt
will also accept anAddressable
as the address, so those types should be changed tostring | Addressable
.I'll be working on this today and I'll comment here anything else I find.
The text was updated successfully, but these errors were encountered: