I was using a proxy, and everything was working fine, but at some point during an upgrade, the plugin started calling the upgradeTo function with the old implementation as the argument.
This makes further upgrades impossible.
It might be related to the forceImport function.
Could you please explain why this happens?
pragma solidity ^0.8.9;
contract View is UUPSUpgradeable, Initializable{}
"@openzeppelin/contracts-upgradeable": "^4.9.6",
"@openzeppelin/hardhat-upgrades": "^3.0.1",
"hardhat": "^2.22.12",
contract = await upgrades.upgradeProxy(contractAddress, contractFactory)
const contractFactory = await ethers.getContractFactory(contractName, {
libraries: libs,
})
const _ = await upgrades.forceImport(contractAddress, contractFactory)