OpenZeppelin / openzeppelin-upgrades

Plugins for Hardhat and Foundry to deploy and manage upgradeable contracts on Ethereum.
MIT License
629 stars 270 forks source link

typescript support not working #630

Open FredCoen opened 2 years ago

FredCoen commented 2 years ago

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

Screenshot 2022-08-16 at 12 35 35

ericglau commented 2 years ago

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";

FredCoen commented 2 years ago

it seems to be clashing with the plugin:

import 'hardhat-deploy'

is this known issue?

ericglau commented 2 years ago

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.

developerasun commented 2 years ago

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.