openzeppelin-upgrades icon indicating copy to clipboard operation
openzeppelin-upgrades copied to clipboard

typescript support not working

Open FredCoen opened this issue 3 years ago • 4 comments

Is there an additional package i need to download to have type support with oz-upgrades?

Screenshot 2022-08-16 at 12 35 35

FredCoen avatar Aug 16 '22 10:08 FredCoen

You need to install the plugin and peer dependencies, and import the upgrades plugin in your hardhat config file. See https://docs.openzeppelin.com/upgrades-plugins/1.x/hardhat-upgrades for examples.

If using hardhat.config.js: require("@openzeppelin/hardhat-upgrades"); or if using hardhat.config.ts: import "@openzeppelin/hardhat-upgrades";

ericglau avatar Aug 16 '22 15:08 ericglau

it seems to be clashing with the plugin:

import 'hardhat-deploy'

is this known issue?

FredCoen avatar Aug 18 '22 07:08 FredCoen

Can you clarify what you mean by "clashing"? Note that there is no integration between these two plugins at the moment. See this forum post.

ericglau avatar Aug 18 '22 14:08 ericglau

it seems to be clashing with the plugin:

import 'hardhat-deploy'

is this known issue?

Try to provide more detailed context about the issue :) for example copy and paste output log or attach some screenshot like above.

Hardhat plugin dependency clashes might occur, for example, you can't use hardhat-network-helper and ethereum-waffle together. This is explained in hardhat docs.

Also, make sure you include/exclude appropriate directories in your tsconfig. I experienced that hardhat upgrade module not defined error when this is not set correctly.

developerasun avatar Aug 27 '22 10:08 developerasun