hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

Make hardhat-chai-matchers compatible with hardhat-viem / library-agnostic

Open schaable opened this issue 1 year ago • 5 comments

The hardhat-chai-matchers plugin is currently only compatible with hardhat-ethers. This issue aims to see if there's interest in making it work with hardhat-viem and other Ethereum libraries. Please upvote or comment if you think this would be an useful feature.

schaable avatar Feb 15 '24 18:02 schaable

viem is great imo, hopefully we can support this when able.

dennis-gonzales avatar Mar 23 '24 11:03 dennis-gonzales

Would love to have this! much more cleaner with the matchers!

andreujuanc avatar May 01 '24 12:05 andreujuanc

To add to that, hardhat-chain-matchers now uses the chaiAsPromised library which is not maintained anymore and is incompatible with chai 5. So it would make sense to upgrade / replace that as well while getting viem going.

mwawrusch avatar May 02 '24 06:05 mwawrusch

+1

petdomaa100 avatar May 13 '24 17:05 petdomaa100

I put up a PR to add a viem specific package for chai matchers: #5252

In case anyone finds it useful, in the meantime, I deployed it here: https://www.npmjs.com/package/hardhat-chai-matchers-viem

johnpm-12 avatar May 20 '24 23:05 johnpm-12