This commit is contained in:
Leonid Logvinov
2019-02-04 10:12:49 +01:00
parent 1d3fff32a2
commit 6943bbcacb
106 changed files with 1110 additions and 685 deletions

View File

@@ -195,9 +195,7 @@ export class Compiler {
path.basename(contractSource.path, constants.SOLIDITY_FILE_EXTENSION),
);
} else {
contractNamesToCompile = this._specifiedContracts.map(specifiedContract =>
path.basename(specifiedContract, constants.SOLIDITY_FILE_EXTENSION),
);
return this._specifiedContracts;
}
return contractNamesToCompile;
}
@@ -217,12 +215,9 @@ export class Compiler {
for (const contractName of contractNames) {
const spyResolver = new SpyResolver(this._resolver);
const contractSource = spyResolver.resolve(contractName);
const sourceTreeHashHex = getSourceTreeHash(
spyResolver,
path.join(this._contractsDir, contractSource.path),
).toString('hex');
const sourceTreeHashHex = getSourceTreeHash(spyResolver, contractSource.path).toString('hex');
const contractData = {
contractName,
contractName: path.basename(contractName, constants.SOLIDITY_FILE_EXTENSION),
currentArtifactIfExists: await getContractArtifactIfExistsAsync(this._artifactsDir, contractName),
sourceTreeHashHex: `0x${sourceTreeHashHex}`,
};