Skip to content

Consider adding hardhat-abi-exporter to Hardhat itself #5984

Open
@SebastienGllmt

Description

@SebastienGllmt

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: solidstate-network/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

Metadata

Metadata

Assignees

Labels

status:needs-more-infoThere's not enough information to start working on this issue

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions