hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

No mention of MockContract, deployMockContract or MockProvider in migration from waffle documentation

Open tuler opened this issue 2 years ago • 7 comments

The new documentation for migrating away from waffle to Hardhat Chai Matchers says it is meant to be a drop-in replacement, but makes no mention of MockContract, deployMockContract or MockProvider provided by waffle.

tuler avatar Jul 21 '22 03:07 tuler

This issue is also being tracked on Linear.

We use Linear to manage our development process, but we keep the conversations on Github.

LINEAR-ID: 6c55eca9-be19-44e8-8c37-0990d60d149d

github-actions[bot] avatar Jul 21 '22 03:07 github-actions[bot]

Hi @tuler, Did you finally manage to find how to use MockContract, deployMockContract or MockProvider with the new hardhat-toolbox / hardhat-chai-matchers please ?

knzeng-e avatar Dec 01 '22 09:12 knzeng-e

@knzeng-e we are using @ethereum-waffle/mock-contract

tuler avatar Dec 01 '22 10:12 tuler

Hi @tuler! How are you doing? Did you install @ethereum-waffle/mock-contract only and It worked with hardhat-chai-matchers??? Because I tried it and now all my tests cases are broken :S

ccejas avatar Jan 05 '23 14:01 ccejas

Hey everyone. Just wanted to clarify the situation. Do i have to install @ethereum-waffle/mock-contract to use deployMockContract? If so, how hardhat-chai-matchers is a drop-in replacement?

mlshv avatar Feb 09 '23 07:02 mlshv

Bump.

Would be helpful to see Hardhat Chai Matchers implement these features, especially since Hardhat is not producing an error when using both Hardhat Chai Matchers and Hardhat Waffle together.

SonOfMosiah avatar Feb 14 '23 19:02 SonOfMosiah

Bump.

Hey @tuler, any quick tips on using @ethereum-waffle/mock-contract with Hardhat Chai Matchers? Struggling here.

Also, @NomicFoundation, we need better mocking support. Any insights?

Cheers.

bioharz avatar Jan 21 '24 13:01 bioharz