hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

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

Open kopax opened this issue 1 year ago • 1 comments

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

kopax avatar Oct 01 '24 10:10 kopax

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

videvian avatar Oct 04 '24 22:10 videvian

Closing this issue as the work item is already being tracked here: https://github.com/NomicFoundation/hardhat/issues/5555.

ChristopherDedominici avatar Nov 25 '24 14:11 ChristopherDedominici