Rename confusing warp command option (#3769)

### Description

- Rename confusing warp command option
- Make option names consistent

### Backward compatibility

Yes
pull/3785/head
J M Rossy 6 months ago committed by GitHub
parent 03ca2d1df7
commit 344a716e6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 16
      typescript/cli/src/commands/config.ts
  2. 10
      typescript/cli/src/commands/deploy.ts
  3. 4
      typescript/cli/src/commands/hook.ts
  4. 4
      typescript/cli/src/commands/ism.ts
  5. 10
      typescript/cli/src/commands/options.ts
  6. 4
      typescript/cli/src/commands/send.ts

@ -14,7 +14,7 @@ import {
import { CommandModuleWithContext } from '../context/types.js';
import { log, logGreen } from '../logger.js';
import { inputFileOption, outputFileOption } from './options.js';
import { inputFileCommandOption, outputFileCommandOption } from './options.js';
/**
* Parent command
@ -64,7 +64,7 @@ const createIsmConfigCommand: CommandModuleWithContext<{
command: 'ism',
describe: 'Create a basic or advanced ISM config for a validator set',
builder: {
out: outputFileOption('./configs/ism.yaml'),
out: outputFileCommandOption('./configs/ism.yaml'),
advanced: {
type: 'boolean',
describe: 'Create an advanced ISM configuration',
@ -85,7 +85,7 @@ const createHookConfigCommand: CommandModuleWithContext<{ out: string }> = {
command: 'hooks',
describe: 'Create a new hooks config (required & default)',
builder: {
out: outputFileOption('./configs/hooks.yaml'),
out: outputFileCommandOption('./configs/hooks.yaml'),
},
handler: async ({ context, out }) => {
await createHooksConfigMap({ context, outPath: out });
@ -99,7 +99,7 @@ const createWarpRouteDeployConfigCommand: CommandModuleWithContext<{
command: 'warp',
describe: 'Create a new Warp Route deployment config',
builder: {
out: outputFileOption('./configs/warp-route-deployment.yaml'),
out: outputFileCommandOption('./configs/warp-route-deployment.yaml'),
},
handler: async ({ context, out }) => {
await createWarpRouteDeployConfig({ context, outPath: out });
@ -128,7 +128,7 @@ const validateChainCommand: CommandModuleWithContext<{ path: string }> = {
command: 'chain',
describe: 'Validate a chain config file',
builder: {
path: inputFileOption,
path: inputFileCommandOption,
},
handler: async ({ path }) => {
readChainConfigs(path);
@ -141,7 +141,7 @@ const validateIsmCommand: CommandModuleWithContext<{ path: string }> = {
command: 'ism',
describe: 'Validate the basic ISM config file',
builder: {
path: inputFileOption,
path: inputFileCommandOption,
},
handler: async ({ path }) => {
readMultisigConfig(path);
@ -154,7 +154,7 @@ const validateIsmAdvancedCommand: CommandModuleWithContext<{ path: string }> = {
command: 'ism-advanced',
describe: 'Validate the advanced ISM config file',
builder: {
path: inputFileOption,
path: inputFileCommandOption,
},
handler: async ({ path }) => {
readIsmConfig(path);
@ -167,7 +167,7 @@ const validateWarpCommand: CommandModuleWithContext<{ path: string }> = {
command: 'warp',
describe: 'Validate a Warp Route deployment config file',
builder: {
path: inputFileOption,
path: inputFileCommandOption,
},
handler: async ({ path }) => {
readWarpRouteDeployConfig(path);

@ -14,12 +14,12 @@ import {
agentConfigCommandOption,
agentTargetsCommandOption,
coreTargetsCommandOption,
dryRunOption,
dryRunCommandOption,
fromAddressCommandOption,
hookCommandOption,
ismCommandOption,
originCommandOption,
warpConfigCommandOption,
warpDeploymentConfigCommandOption,
} from './options.js';
/**
@ -84,7 +84,7 @@ const coreCommand: CommandModuleWithWriteContext<{
ism: ismCommandOption,
hook: hookCommandOption,
agent: agentConfigCommandOption(false, './configs/agent.json'),
'dry-run': dryRunOption,
'dry-run': dryRunCommandOption,
'from-address': fromAddressCommandOption,
},
handler: async ({ context, targets, ism, hook, agent, dryRun }) => {
@ -121,8 +121,8 @@ const warpCommand: CommandModuleWithWriteContext<{
command: 'warp',
describe: 'Deploy Warp Route contracts',
builder: {
config: warpConfigCommandOption,
'dry-run': dryRunOption,
config: warpDeploymentConfigCommandOption,
'dry-run': dryRunCommandOption,
'from-address': fromAddressCommandOption,
},
handler: async ({ context, config, dryRun }) => {

@ -7,7 +7,7 @@ import { log } from '../logger.js';
import {
addressCommandOption,
chainCommandOption,
outputFileOption,
outputFileCommandOption,
} from './options.js';
/**
@ -38,7 +38,7 @@ export const read: CommandModuleWithContext<{
demandOption: true,
},
address: addressCommandOption('Address of the Hook to read.', true),
out: outputFileOption(),
out: outputFileCommandOption(),
},
handler: async (args) => {
await readHookConfig(args);

@ -7,7 +7,7 @@ import { log } from '../logger.js';
import {
addressCommandOption,
chainCommandOption,
outputFileOption,
outputFileCommandOption,
} from './options.js';
/**
@ -43,7 +43,7 @@ export const read: CommandModuleWithContext<{
'Address of the Interchain Security Module to read.',
true,
),
out: outputFileOption(),
out: outputFileCommandOption(),
},
handler: async (argv) => {
await readIsmConfig(argv);

@ -79,7 +79,7 @@ export const hookCommandOption: Options = {
'A path to a JSON or YAML file with Hook configs (for every chain)',
};
export const warpConfigCommandOption: Options = {
export const warpDeploymentConfigCommandOption: Options = {
type: 'string',
description:
'A path to a JSON or YAML file with a warp route deployment config.',
@ -87,7 +87,7 @@ export const warpConfigCommandOption: Options = {
alias: 'w',
};
export const warpConfigOption: Options = {
export const warpCoreConfigCommandOption: Options = {
type: 'string',
description: 'File path to Warp Route config',
alias: 'w',
@ -106,14 +106,14 @@ export const agentConfigCommandOption = (
default: defaultPath,
});
export const outputFileOption = (defaultPath?: string): Options => ({
export const outputFileCommandOption = (defaultPath?: string): Options => ({
type: 'string',
description: 'Output file path',
default: defaultPath,
alias: 'o',
});
export const inputFileOption: Options = {
export const inputFileCommandOption: Options = {
type: 'string',
description: 'Input file path',
alias: 'i',
@ -126,7 +126,7 @@ export const fromAddressCommandOption: Options = {
alias: 'f',
};
export const dryRunOption: Options = {
export const dryRunCommandOption: Options = {
type: 'string',
description:
'Chain name to fork and simulate deployment. Please ensure an anvil node instance is running during execution via `anvil`.',

@ -6,7 +6,7 @@ import { log } from '../logger.js';
import { sendTestMessage } from '../send/message.js';
import { sendTestTransfer } from '../send/transfer.js';
import { warpConfigOption } from './options.js';
import { warpCoreConfigCommandOption } from './options.js';
/**
* Parent command
@ -110,7 +110,7 @@ const transferCommand: CommandModuleWithWriteContext<
describe: 'Send a test token transfer on a warp route',
builder: {
...messageOptions,
warp: warpConfigOption,
warp: warpCoreConfigCommandOption,
wei: {
type: 'string',
description: 'Amount in wei to send',

Loading…
Cancel
Save