aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/compiler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/deployer/src/compiler.ts')
-rw-r--r--packages/deployer/src/compiler.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts
index db06ccf43..e81df3c0a 100644
--- a/packages/deployer/src/compiler.ts
+++ b/packages/deployer/src/compiler.ts
@@ -131,10 +131,10 @@ export class Compiler {
shouldCompile = true;
} else {
const currentArtifact = currentArtifactIfExists as ContractArtifact;
- shouldCompile =
- currentArtifact.schemaVersion !== '2.0.0' ||
- !_.isEqual(currentArtifact.compiler.settings, this._compilerSettings) ||
- currentArtifact.sourceTreeHashHex !== sourceTreeHashHex;
+ const isUserOnLatestVersion = currentArtifact.schemaVersion === constants.LATEST_ARTIFACT_VERSION;
+ const didCompilerSettingsChange = !_.isEqual(currentArtifact.compiler.settings, this._compilerSettings);
+ const didSourceChange = currentArtifact.sourceTreeHashHex !== sourceTreeHashHex;
+ shouldCompile = isUserOnLatestVersion || didCompilerSettingsChange || didSourceChange;
}
if (!shouldCompile) {
return;
@@ -228,7 +228,7 @@ export class Compiler {
};
} else {
newArtifact = {
- schemaVersion: '2.0.0',
+ schemaVersion: constants.LATEST_ARTIFACT_VERSION,
contractName,
...contractVersion,
networks: {},