Skip to content

Commit

Permalink
refactor: add error for non evm chaintype
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchainguyy committed Oct 3, 2024
1 parent 7ae295f commit 8c40ea1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions evm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8c40ea1

Please sign in to comment.