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've updated hardhat-abi-exporter to Hardhat v3 (I think I'm the first person outside of Nomic to build a v3 plugin)
It went well! Code was fairly easy to read, debug and test. Excited to try Hardhat v3 node when it comes out. You can find the code here: ItsNickBarry/hardhat-abi-exporter#64
There are a few other plugins I would have liked to have v3 support for (docgen and ignition being the main two), but one step at a time. Let me know if there is any other way I can help
Why I think this could be useful to integrate into Hardhat
Viem is very commonly used nowadays and it requires having access to the ABI to have proper types for things like getLogs
You can't just use the .json ABI for viem to have proper types because of microsoft/TypeScript#32063, so to solve this I added a tsWrapper option to hardhat-abi-exporter that wraps the ABI JSON in a typescript file with as const so you can have proper type checking for your viem calls
I expect this to also be something a lot of other people want from hardhat
Search terms
No response
The text was updated successfully, but these errors were encountered:
Hey @SebastienGllmt, I have checked in with the team on this.
In Hardhat 3 the new compilation system generates typescript files containing the ABI information as part of the build artifacts. The types in those files can be consumed by Viem to get typing on Viem contract instances.
This capability is leveraged in our updated version of the hardhat-viem plugin, but the underlying code generation of typescript files is built-in to the new compilation pipeline.
From the issue description, it sounds as if this Hardhat 3 capability will meet your requirements or are there further capabilities of hardhat-abi-exporter we should consider?
Describe the feature
I've updated hardhat-abi-exporter to Hardhat v3 (I think I'm the first person outside of Nomic to build a v3 plugin)
It went well! Code was fairly easy to read, debug and test. Excited to try Hardhat v3
node
when it comes out. You can find the code here: ItsNickBarry/hardhat-abi-exporter#64There are a few other plugins I would have liked to have
v3
support for (docgen and ignition being the main two), but one step at a time. Let me know if there is any other way I can helpWhy I think this could be useful to integrate into Hardhat
Viem is very commonly used nowadays and it requires having access to the ABI to have proper types for things like
getLogs
You can't just use the
.json
ABI for viem to have proper types because of microsoft/TypeScript#32063, so to solve this I added atsWrapper
option tohardhat-abi-exporter
that wraps the ABI JSON in a typescript file withas const
so you can have proper type checking for your viem callsI expect this to also be something a lot of other people want from hardhat
Search terms
No response
The text was updated successfully, but these errors were encountered: