SolCompilerArtifactAdapter now doesn't return the ContractData for interfaces

This commit is contained in:
Leonid Logvinov
2019-01-21 15:52:37 +01:00
parent 9d9ab2f1ee
commit ddb0e29253
2 changed files with 9 additions and 1 deletions

View File

@@ -3,12 +3,16 @@
"version": "6.0.0",
"changes": [
{
"note": "`SolCompilerArtifactsAdapter` now uses `SolResolver` under the hood which allows to resolve `NPM` dependencies properly",
"note": "`SolCompilerArtifactAdapter` now uses `SolResolver` under the hood which allows to resolve `NPM` dependencies properly",
"pr": "TODO"
},
{
"note": "Cache the `utils.getContractDataIfExists` leading to faster execution",
"pr": "TODO"
},
{
"note": "`SolCompilerArtifactAdapter` now doesn't return the `ContractData` for interfaces",
"pr": "TODO"
}
]
},

View File

@@ -66,6 +66,10 @@ export class SolCompilerArtifactAdapter extends AbstractArtifactAdapter {
runtimeBytecode: artifact.compilerOutput.evm.deployedBytecode.object,
sourceMapRuntime: artifact.compilerOutput.evm.deployedBytecode.sourceMap,
};
if (contractData.bytecode === '0x' && contractData.runtimeBytecode === '0x') {
// That's an interface contract
continue;
}
contractsData.push(contractData);
}
return contractsData;