|
|
@ -77,9 +77,9 @@ export class CompilerArtefacts extends Plugin { |
|
|
|
const contractsData = Object.values(contractsDataByFilename) |
|
|
|
const contractsData = Object.values(contractsDataByFilename) |
|
|
|
if (contractsData && contractsData.length) { |
|
|
|
if (contractsData && contractsData.length) { |
|
|
|
const index = contractsData.findIndex((contractsObj) => Object.keys(contractsObj).includes(contractName)) |
|
|
|
const index = contractsData.findIndex((contractsObj) => Object.keys(contractsObj).includes(contractName)) |
|
|
|
if (index != -1) return contractsData[index][contractName] |
|
|
|
if (index !== -1) return contractsData[index][contractName] |
|
|
|
else throw new Error(`Could not find artifacts for ${contractName}. Make sure it is compiled.`) |
|
|
|
else throw new Error(`Could not find artifacts for ${contractName}. Make sure it is compiled.`) |
|
|
|
} else throw new Error(`No contract compiled`) |
|
|
|
} else throw new Error('No contract compiled') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getCompilerAbstract (file) { |
|
|
|
getCompilerAbstract (file) { |
|
|
|