OpenZeppelin / openzeppelin-upgrades

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

hardhat-upgrades causes compilation to always start from scratch for zksync #1012

Open novaknole opened 2 months ago

novaknole commented 2 months ago

I'm using this package inside my hardhat.config.ts as:

import '@openzeppelin/hardhat-upgrades';

Everything was working fine, but today, I added the support of zksolc compiler inside hardhat settings. The interesting thing is that if the above import is NOT commented, the following occurs:

  1. I try to compile contracts with zksync. Compilation works.
  2. if I re-run the compilation, it starts to compile them again from scratch.

If I comment out the above import, then:

  1. I try to compile contracts with zksync. Compilation works.
  2. if I re-run the compilation, it does NOT recompile the contracts.

What does hardhat-upgrades does that causes such behaviour ? I am using 1.23.1 version and latest version fails as well.

ericglau commented 2 months ago

For zkSync, you may need to use https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-upgradable.html instead.