Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Ensure artifacts are saved with db info #3524

Merged
merged 1 commit into from
Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/workflow-compile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ const WorkflowCompile = {

await fse.ensureDir(config.contracts_build_directory);

const artifacts = contracts.map(Shims.NewToLegacy.forContract);
await config.artifactor.saveAll(artifacts);

if (options.db && options.db.enabled === true && contracts.length > 0) {
const db = connect(config);
const project = await Project.initialize({
Expand All @@ -126,10 +123,13 @@ const WorkflowCompile = {
directory: config.working_directory
}
});
await project.loadCompile({
({contracts} = await project.loadCompile({
result: {contracts, compilations}
});
}));
}

const artifacts = contracts.map(Shims.NewToLegacy.forContract);
await config.artifactor.saveAll(artifacts);
}
};

Expand Down