Currently, our multisig is the owner of our proxy therefore, a proposal must be made before upgrading the implementation contract.
When creating a proposal, I do not see an option to pass initializer arguments.
task("propose-multisig-upgrade", "Propose a new updated contract to be upgraded via multisig")
.addParam("proxy", "Address of the proxy")
.addParam("name", "Name of the updated implementation contract (must be existant in artifacts)")
.setAction(async (taskArgs, hre) => {
try {
const NewImplementation = await hre.ethers.getContractFactory(taskArgs.name);
console.log("Preparing proposal...");
const proposal = await hre.defender.proposeUpgrade(taskArgs.proxy, NewImplementation);
console.log("Upgrade proposal created at:", proposal.url);
return proposal.url;
} catch (error) {
console.log(error);
}
});
PS : I do not want to deploy the implementation before hand manually then propose the upgrade.
Thank you in advance.