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
Hi @bogdan, revertedWithCustomError is a Hardhat Chai matcher, which were designed to work specifically with hardhat-ethers. It won’t work as expected with hardhat-viem.
We’re planning to introduce viem-specific matchers in Hardhat 3. For now, the simplest alternative is to assert the rejection message directly:
Version of Hardhat
2.22.17
What happened?
revertedWithCustomError
requiresinterface
property to exist on an object, which is not present for contract obtained fromgetContractAt
Minimal reproduction steps
Search terms
hardhat-chai-matchers chai revert test
The text was updated successfully, but these errors were encountered: