diff --git a/packages/devtools-evm-hardhat/src/tasks/deploy.ts b/packages/devtools-evm-hardhat/src/tasks/deploy.ts index e1b8f98ca..a08da672d 100644 --- a/packages/devtools-evm-hardhat/src/tasks/deploy.ts +++ b/packages/devtools-evm-hardhat/src/tasks/deploy.ts @@ -237,7 +237,7 @@ const action: ActionType = async ( return results } -task(TASK_LZ_DEPLOY, 'Deploy LayerZero contracts') +task(TASK_LZ_DEPLOY, 'Deploy LayerZero contracts', action) .addParam( 'networks', 'List of comma-separated networks. If not provided, all networks will be deployed', @@ -259,4 +259,3 @@ task(TASK_LZ_DEPLOY, 'Deploy LayerZero contracts') false, types.boolean ) - .setAction(action) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/errors/decode.ts b/packages/ua-devtools-evm-hardhat/src/tasks/errors/decode.ts index 988c8ce53..413d0d22b 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/errors/decode.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/errors/decode.ts @@ -78,7 +78,6 @@ export const action: ActionType = async ({ hash, logLevel = 'info' }, return error } -task(TASK_LZ_ERRORS_DECODE, 'Decodes custom error data based') +task(TASK_LZ_ERRORS_DECODE, 'Decodes custom error data based', action) .addPositionalParam('hash', 'Encoded contract error hash (including the 0x prefix)', undefined, types.string, false) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) - .setAction(action) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/errors/list.ts b/packages/ua-devtools-evm-hardhat/src/tasks/errors/list.ts index d28de74c3..76620c827 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/errors/list.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/errors/list.ts @@ -76,8 +76,7 @@ export const action: ActionType = async ( printVerticalTable(rows) } -task(TASK_LZ_ERRORS_LIST, 'List all custom errors from your project') +task(TASK_LZ_ERRORS_LIST, 'List all custom errors from your project', action) .addParam('containing', 'Only show custom errors containing a string', '', types.string) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) .addFlag('showSourcePath', 'Show contract source path') - .setAction(action) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.check.ts b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.check.ts index e318712fb..9bc54dcb9 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.check.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.check.ts @@ -16,7 +16,7 @@ interface TaskArgs { logLevel?: string } -export const checkWire: ActionType = async ({ oappConfig: oappConfigPath, logLevel = 'info' }) => { +const action: ActionType = async ({ oappConfig: oappConfigPath, logLevel = 'info' }) => { printLogo() // We'll set the global logging level to get as much info as needed @@ -81,8 +81,8 @@ export const checkWire: ActionType = async ({ oappConfig: oappConfigPa task( TASK_LZ_OAPP_CONFIG_CHECK, - 'outputs visual console table to show current state of oapp connections via configuration' + 'outputs visual console table to show current state of oapp connections via configuration', + action ) .addParam('oappConfig', 'Path to your LayerZero OApp config', undefined, types.string) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) - .setAction(checkWire) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.default.ts b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.default.ts index 86a6b05fa..e21911440 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.default.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.default.ts @@ -18,10 +18,7 @@ interface TaskArgs { json?: boolean } -export const getDefaultConfig: ActionType = async ( - { logLevel = 'info', networks: networksArgument, json }, - hre -) => { +const action: ActionType = async ({ logLevel = 'info', networks: networksArgument, json }, hre) => { // We'll set the global logging level to get as much info as needed setDefaultLogLevel(logLevel) const logger = createLogger() @@ -121,7 +118,8 @@ export const getDefaultConfig: ActionType = async ( task( TASK_LZ_OAPP_CONFIG_GET_DEFAULT, - 'Outputs the default Send and Receive Messaging Library versions and the default application config' + 'Outputs the default Send and Receive Messaging Library versions and the default application config', + action ) .addParam('networks', 'Comma-separated list of networks', undefined, types.csv, true) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) @@ -132,4 +130,3 @@ task( types.boolean, true ) - .setAction(getDefaultConfig) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.executor.ts b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.executor.ts index 376c6c17d..05abffc99 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.executor.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.executor.ts @@ -11,10 +11,7 @@ interface TaskArgs { networks?: string[] } -export const getExecutorConfig: ActionType = async ( - { logLevel = 'info', networks: networksArgument }, - hre -) => { +const action: ActionType = async ({ logLevel = 'info', networks: networksArgument }, hre) => { // We'll set the global logging level to get as much info as needed setDefaultLogLevel(logLevel) @@ -47,8 +44,8 @@ export const getExecutorConfig: ActionType = async ( task( TASK_LZ_OAPP_CONFIG_GET_EXECUTOR, - 'Outputs the Executors destination configurations including the native max cap amount ' + 'Outputs the Executors destination configurations including the native max cap amount', + action ) .addParam('networks', 'Comma-separated list of networks', undefined, types.csv, true) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) - .setAction(getExecutorConfig) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.ts b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.ts index 9e4926c5e..f3124385e 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.get.ts @@ -13,7 +13,7 @@ interface TaskArgs { oappConfig: string } -export const getOAppConfig: ActionType = async ({ logLevel = 'info', oappConfig }) => { +const action: ActionType = async ({ logLevel = 'info', oappConfig }) => { // We'll set the global logging level to get as much info as needed setDefaultLogLevel(logLevel) @@ -110,8 +110,8 @@ export const getOAppConfig: ActionType = async ({ logLevel = 'info', o task( TASK_LZ_OAPP_CONFIG_GET, - 'Outputs the default Send and Receive Messaging Library versions and the default application config' + 'Outputs the default Send and Receive Messaging Library versions and the default application config', + action ) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) .addParam('oappConfig', 'Path to your LayerZero OApp config', undefined, types.string) - .setAction(getOAppConfig) diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.init.ts b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.init.ts index 32d8df64b..26d62ab12 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.init.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/config.init.ts @@ -91,7 +91,7 @@ const action: ActionType = async ({ logLevel = 'info' }, hre): Promise } if (process.env.LZ_ENABLE_EXPERIMENTAL_TASK_LZ_OAPP_CONFIG_INIT) { - task(TASK_LZ_OAPP_CONFIG_INIT, 'Initialize an OApp configuration file') + task(TASK_LZ_OAPP_CONFIG_INIT, 'Initialize an OApp configuration file', action) .addParam('oappConfig', 'Path to the new LayerZero OApp config', undefined, types.string) .addParam('logLevel', 'Logging level. One of: error, warn, info, verbose, debug, silly', 'info', types.logLevel) .addParam( @@ -100,5 +100,4 @@ if (process.env.LZ_ENABLE_EXPERIMENTAL_TASK_LZ_OAPP_CONFIG_INIT) { false, types.boolean ) - .setAction(action) } diff --git a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/wire/subtask.configure.ts b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/wire/subtask.configure.ts index 78361f465..056449028 100644 --- a/packages/ua-devtools-evm-hardhat/src/tasks/oapp/wire/subtask.configure.ts +++ b/packages/ua-devtools-evm-hardhat/src/tasks/oapp/wire/subtask.configure.ts @@ -49,8 +49,7 @@ const action: ActionType = async ({ } } -subtask(SUBTASK_LZ_OAPP_WIRE_CONFIGURE, 'Create a list of OmniTransactions that configure your OApp') +subtask(SUBTASK_LZ_OAPP_WIRE_CONFIGURE, 'Create a list of OmniTransactions that configure your OApp', action) .addParam('graph', 'Configuration of you OApp of type OAppOmniGraph', undefined, types.any) .addParam('configurator', 'Configuration function of type OAppConfigurator', undefined, types.any, true) .addParam('oappFactory', 'SDK factory for OApp SDK of type OAppFactory', undefined, types.any, true) - .setAction(action)