NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.28k stars 1.41k forks source link

Monorepo cannot patch ethers du to hardhat-toolbox using obselete version of hardhat-gas-reporter #5795

Open kopax opened 1 month ago

kopax commented 1 month ago

Version of Hardhat

2.22.12

What happened?

I removed hardhat-gas-reporter as I needed to patch my version of ether v6.13.1 and hardhat-gas-reporter was blocking as it use an obselete version of ether v5.

Now I have the following error when forking:

Error HH801: Plugin @nomicfoundation/hardhat-toolbox requires the following dependencies to be installed: hardhat-gas-reporter.
Please run: npm install --save-dev "hardhat-gas-reporter@^1.0.8"

Looking at https://github.com/cgewecke/hardhat-gas-reporter/blob/v2.2.1/package.json, it seems that hardhat-gas-reporter already support ether 6 since v2, however, hardhat toolbox as a peerDependencies for it using 1.0.8, outdated.

I have tried to install the 2.2.1, but the fork command just hang, I guess it is not compatible.

Minimal reproduction steps

In a mono repo, install ethers v6 and hardhat-toolbox, then run yarn why ethers

Search terms

Relates to https://github.com/cgewecke/hardhat-gas-reporter/issues/246

ethos-vitalii commented 1 month ago

Seems related to https://github.com/NomicFoundation/hardhat/issues/5555