I found here 2 ways to mock Smart contract but they all limited to ethers.js v5:

Today hardhat-toolbox is at version 4 and migrated away from hardhat-waffle to use @nomicfoundation/hardhat-chai-matchers, supposedly a drop-in replacement, but it seems to be with no support for mocking. We've seen complains here

At the time of this writing, is there any way to mock smart contract using ethers v6 or I'd be force to downgrade my whole Dapp environement to ethers v5?

PS: Here is github issue to subscribe to with the hope that smock might bring supports to new hardhat-toolbox version

  • Having the same issue right now, smock doesn't seem to be actively developed anymore at all. Commented Mar 20 at 12:09
  • 1
    I ended up going for foundry for most of my unittest
    – codekoriko
    Commented Mar 22 at 1:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.