Delete .openzeppelin uncarefully and can not uprade contracts.How to fix it?

You can reconstruct the network file by deploying your upgradeable contract to a local Hardhat network, and then copying the generated network file to the right location for the network you need (e.g. .openzeppelin/mainnet.json) and replacing the addresses with those on mainnet.

1 Like