Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Jul 31, 2024
1 parent fe2be1a commit bdbbce9
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions sui/deploy-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,34 @@ async function upgradePackage(client, keypair, packageToUpgrade, contractConfig,
}

const getDeployGatewayOptions = () => {
return [
new Option('--signers <signers>', 'JSON with the initial signer set').env('SIGNERS'),
new Option('--operator <operator>', 'operator for the gateway (defaults to the deployer address)').env('OPERATOR'),
new Option('--minimumRotationDelay <minimumRotationDelay>', 'minium delay for signer rotations (in second)')
.argParser((val) => parseInt(val) * 1000)
.default(24 * 60 * 60),
new Option('--domainSeparator <domainSeparator>', 'domain separator'),
new Option('--nonce <nonce>', 'nonce for the signer (defaults to HashZero)'),
new Option('--previousSigners <previousSigners>', 'number of previous signers to retain').default('15'),
new Option('--policy <policy>', 'upgrade policy for upgrade cap: For example, use "any_upgrade" to allow all types of upgrades')
.choices(['any_upgrade', 'code_upgrade', 'dep_upgrade'])
.default('any_upgrade'),
];
return [
new Option('--signers <signers>', 'JSON with the initial signer set').env('SIGNERS'),
new Option('--operator <operator>', 'operator for the gateway (defaults to the deployer address)').env('OPERATOR'),
new Option('--minimumRotationDelay <minimumRotationDelay>', 'minium delay for signer rotations (in second)')
.argParser((val) => parseInt(val) * 1000)
.default(24 * 60 * 60),
new Option('--domainSeparator <domainSeparator>', 'domain separator'),
new Option('--nonce <nonce>', 'nonce for the signer (defaults to HashZero)'),
new Option('--previousSigners <previousSigners>', 'number of previous signers to retain').default('15'),
new Option('--policy <policy>', 'upgrade policy for upgrade cap: For example, use "any_upgrade" to allow all types of upgrades')
.choices(['any_upgrade', 'code_upgrade', 'dep_upgrade'])
.default('any_upgrade'),
];
};

const addDeployOptions = (program) => {
switch (program.name()) {
case 'AxelarGateway':
getDeployGatewayOptions().forEach((option) => program.addOption(option));
break;
case 'GasService':
case 'Test':
break;
default:
throw new Error(`Unsupported package: ${program.name()}. `);
}
switch (program.name()) {
case 'AxelarGateway':
getDeployGatewayOptions().forEach((option) => program.addOption(option));
break;
case 'GasService':
case 'Test':
break;
default:
throw new Error(`Unsupported package: ${program.name()}. `);
}

return program;
return program;
};

module.exports = {
Expand Down

0 comments on commit bdbbce9

Please sign in to comment.