Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Update upgrade:facets > facets params to be a regular param
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Sep 25, 2023
1 parent fa59df9 commit 6bdf993
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tasks/upgrade/upgradeFacets/upgradeFacets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ type TaskArgs = {
proxyAdminPkey?: string;
};

// Sample syntax: npx hardhat upgrade:facets --yes --network mumbai "AccountsStrategy"

task("upgrade:facets", "Will redeploy and upgrade all facets that use AccountStorage struct")
.addOptionalParam(
"accountsDiamond",
Expand All @@ -33,19 +31,17 @@ task("upgrade:facets", "Will redeploy and upgrade all facets that use AccountSto
cliTypes.address
)

.addVariadicPositionalParam(
.addParam(
"facets",
"List of facets to upgrade. If set to 'all', will upgrade all facets."
"List of facets to upgrade. If set to 'all', will upgrade all facets.",
undefined,
cliTypes.array.string
)
.addFlag("skipVerify", "Skip contract verification")
.addFlag("yes", "Automatic yes to prompt.")
.addOptionalParam("proxyAdminPkey", "The pkey for the prod proxy admin multisig")
.setAction(async (taskArgs: TaskArgs, hre) => {
try {
if (taskArgs.facets.length === 0) {
throw new Error("Must provide at least one facet name or pass 'all'");
}

const facetsToUpgrade = /^all$/i.test(taskArgs.facets[0]) ? ALL_FACET_NAMES : taskArgs.facets;

const isConfirmed =
Expand Down

0 comments on commit 6bdf993

Please sign in to comment.