ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.65k stars 3.29k forks source link

Smock doesn't work with Hardhat 2.4.0 #1110

Closed alcuadrado closed 3 years ago

alcuadrado commented 3 years ago

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'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.

smartcontracts commented 3 years ago

Thanks for the report. Will take a look at this today.