From 8c40ea106f301b8eb59c882d1e75166bfef07a02 Mon Sep 17 00:00:00 2001 From: blockchainguyy Date: Thu, 3 Oct 2024 18:18:17 +0530 Subject: [PATCH] refactor: add error for non evm chaintype --- evm/utils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/evm/utils.js b/evm/utils.js index 749f83c6..522a9094 100644 --- a/evm/utils.js +++ b/evm/utils.js @@ -648,6 +648,11 @@ const mainProcessor = async (options, processCommand, save = true, catchErr = fa chains = chains.filter((chain) => !config.chains[chain].chainType || config.chains[chain].chainType === 'evm'); } else if (options.chainNames) { chains = options.chainNames.split(','); + chains.forEach((chain) => { + if (config.chains[chain].chainType && config.chains[chain].chainType !== 'evm') { + throw new Error(`Cannot run script for a non EVM chain: ${chain}`); + } + }); } if (chains.length === 0) {