How to handle two upgradable contracts in one repo?

How to properly handle two upgradable contracts inside one repository.
When I deploy both of them the Network Files are stored in one place. How to avoid such thing?

:computer: Environment

"@openzeppelin/contracts-upgradeable": "^4.8.0",
"@openzeppelin/hardhat-upgrades": "^1.21.0",

A network file includes all of the upgradeable contracts that you deployed for that network. The plugins don't support using separate network files for the same network.

The admin of proxy and proxies should be different but the are in same file. Solution is separate them in different projects?

You can use different projects. Or to just use a different admin, see the following issue that describes a workaround to open the network file and delete the admin field so that a new one is deployed.

1 Like