diff --git a/source/libraries/ContractCompiler.ts b/source/libraries/ContractCompiler.ts index 727f94cec..6b286c712 100644 --- a/source/libraries/ContractCompiler.ts +++ b/source/libraries/ContractCompiler.ts @@ -103,10 +103,9 @@ export class ContractCompiler { if (abi === undefined) continue; const bytecode = compilerOutput.contracts[relativeFilePath][contractName].evm.bytecode.object; if (bytecode === undefined) continue; - // don't include interfaces - if (/^I[A-Z].*/.test(contractName)) continue; - // TODO: turn this into an error once we establish naming convention for abstract methods - if (bytecode.length === 0) continue; + // don't include interfaces or Abstract contracts + if (/^(?:I|Base)[A-Z].*/.test(contractName)) continue; + if (bytecode.length === 0) throw new Error("Contract: " + contractName + " has no bytecode, but this is not expected. It probably doesn't implement all its abstract methods"); result.contracts[relativeFilePath] = { [contractName]: {