From the code lines you’ve posted, would existingContract.address,
give you the proxy? Or is that your old implementation address?
In my upgrade script, from the tutorial I followed in OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat
I have this
async function main() {
const proxyAddress = '0xC031c8F6C360E18b232F4728b336AA6394668F48'; // CHANGEIT - change this to your PROXY address, not impl, not timelock, PROXY
const catnipUpdate = await ethers.getContractFactory("Catnip");
console.log("Preparing upgrade...");
const catnipUpdateAddress = await upgrades.prepareUpgrade(proxyAddress, catnipUpdate);
console.log("catnipUpdateAddress at:", catnipUpdateAddress);
}
You may have to deploy with some arguments, but the first address is the proxyAddress, which would be your existingContract.address