When a project using Smock upgrades to Hardhat 2.4.0, it stops working because hardhat/internal/hardhat-network/stack-traces/revert-reasons doesn't exist anymore.
We now have a class in hardhat/internal/hardhat-network/provider/return-data that deals with revert reasons, panic codes and custom errors.
BTW, we are planning to start using package.json's exports field some time in the future, and as a side-effect, things from internal/ won't be exposed anymore. We will keep you posted about this, and help you make Smock work without internal APIs.
To Reproduce
This was reported by Synthetix. Cloning their repo and upgrading Hardhat should work. It's probably easier to reproduce it in a new project though.
Describe the bug
When a project using Smock upgrades to Hardhat 2.4.0, it stops working because
hardhat/internal/hardhat-network/stack-traces/revert-reasons
doesn't exist anymore.We now have a class in
hardhat/internal/hardhat-network/provider/return-data
that deals with revert reasons, panic codes and custom errors.BTW, we are planning to start using
package.json
'sexports
field some time in the future, and as a side-effect, things frominternal/
won't be exposed anymore. We will keep you posted about this, and help you make Smock work without internal APIs.To Reproduce
This was reported by Synthetix. Cloning their repo and upgrading Hardhat should work. It's probably easier to reproduce it in a new project though.