Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

Unable to pass initializer arguments when using proposeUpgrade #202

Description

I'm using defender and hardhat for my project that uses a Transparent proxy.

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.

Here is my hardhat task :

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);
    }
  });

Is there a work around for this?

PS : I do not want to deploy the implementation before hand manually then propose the upgrade.

Thank you in advance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions