aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/deployer/src/deployer.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/deployer/src/deployer.ts b/packages/deployer/src/deployer.ts
index fe959e405..c8c3a9a06 100644
--- a/packages/deployer/src/deployer.ts
+++ b/packages/deployer/src/deployer.ts
@@ -82,6 +82,9 @@ export class Deployer {
data,
gas,
};
+ if (_.isUndefined(compilerOutput.abi)) {
+ throw new Error(`ABI not found in ${contractName} artifacts`);
+ }
const abi = compilerOutput.abi;
const constructorAbi = _.find(abi, { type: AbiType.Constructor }) as ConstructorAbi;
const constructorArgs = _.isUndefined(constructorAbi) ? [] : constructorAbi.inputs;
@@ -151,6 +154,9 @@ export class Deployer {
): Promise<void> {
const contractArtifactIfExists: ContractArtifact = this._loadContractArtifactIfExists(contractName);
const compilerOutput = Deployer._getContractCompilerOutputFromArtifactIfExists(contractArtifactIfExists);
+ if (_.isUndefined(compilerOutput.abi)) {
+ throw new Error(`ABI not found in ${contractName} artifacts`);
+ }
const abi = compilerOutput.abi;
const encodedConstructorArgs = encoder.encodeConstructorArgsFromAbi(args, abi);
const newContractData: ContractNetworkData = {