Skip to content

Commit

Permalink
Warn instead of error on incompatible solc version
Browse files Browse the repository at this point in the history
  • Loading branch information
BlinkyStitt authored Feb 26, 2019
1 parent a23c6a0 commit f9c3d30
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Compiler, CompilerOptions } from '@0x/sol-compiler';
import { logUtils } from '@0x/utils';
import * as fs from 'fs';
import * as glob from 'glob';
import * as path from 'path';
Expand Down Expand Up @@ -77,11 +78,10 @@ export class TruffleArtifactAdapter extends AbstractArtifactAdapter {
const artifact = JSON.parse(fs.readFileSync(artifactFileName).toString());
const compilerVersion = artifact.compiler.version;
if (!compilerVersion.startsWith(this._solcVersion)) {
throw new Error(
`${artifact.contractName} was compiled with solidity ${compilerVersion} but specified version is ${
logUtils.warn(`${artifact.contractName} was compiled with solidity ${compilerVersion} but specified version is ${
this._solcVersion
} making it impossible to process traces`,
);
} making it impossible to process traces. Skipping...`);
continue;
}
}
}
Expand Down

0 comments on commit f9c3d30

Please sign in to comment.