Hey, I am getting this error when I want to upgrade my contract. The thing is that I didn't change any state variables. I just change some functions and their visibility/payable. Here is the script I used for upgrading:
const { ethers, upgrades } = require('hardhat');
async function main() {
const NewVersion = await ethers.getContractFactory("MyContractV1");
console.log("Upgrading...");
await upgrades.upgradeProxy("MY PROXY ADDRESS IN HERE", NewVersion);
console.log("Upgraded!")
}
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});