hardhat-tenderly icon indicating copy to clipboard operation
hardhat-tenderly copied to clipboard

dependency issue with hardhat-deploy-ethers

Open samlaf opened this issue 2 years ago • 6 comments

See this issue that I opened in hardhat-deploy-ethers: https://github.com/wighawag/hardhat-deploy-ethers/issues/26

the creator of hardhat-deploy-ethers suggests that hardhat-tenderly does not hardcode its version of hardhat-ethers, to prevent such issues (hardhat-deploy-ethers is a fork of hardhat-ethers).

samlaf avatar Jul 05 '22 08:07 samlaf

we are also blocked on this. It looks like moving @nomiclabs/hardhat-ethers to peerDependencies is sufficient. I will fork and test this later. As far as I can tell, hardhat-tenderly does not rely on any specific APIs of hardhat-ethers that would make it necessary to pin it in dependencies, since it is actually imported to wrap certain deployment functions to do automatic verification.

iantanwx avatar Jul 10 '22 03:07 iantanwx

@samlaf adding the following to package.json works for yarn:

  "resolutions": {
    "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13"
  }

See the yarn docs on resolutions for more. For npm, the equivalent is overrides.

iantanwx avatar Jul 29 '22 10:07 iantanwx

Oh wow ok I’ll give it a try when I get back to this project. Thanks :)

samlaf avatar Jul 30 '22 00:07 samlaf

It looks like moving @nomiclabs/hardhat-ethers to peerDependencies is sufficient

Agree. Also worth mentioning that this is one of our recommended practices when building Hardhat plugins.

fvictorio avatar Sep 20 '22 18:09 fvictorio

tsc complaining several Duplicate identifier errors with @nomiclabs/hardhat-ethers

samlaf adding the following to package.json works for yarn:

  "resolutions": {
    "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13"
  }

See the yarn docs on resolutions for more. For npm, the equivalent is overrides.

This resolved it for now

sebastiantf avatar Oct 13 '22 16:10 sebastiantf

@samlaf adding the following to package.json works for yarn:

  "resolutions": {
    "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13"
  }

See the yarn docs on resolutions for more. For npm, the equivalent is overrides.

For those using PNPM

  "pnpm": {
    "overrides": {
      "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13"
    }
  },

matthewlilley avatar Nov 01 '22 17:11 matthewlilley