From d567c58d3b2b8d858977c310b2978e65a587b968 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 7 Feb 2019 13:10:08 +0100 Subject: Fix a bug when ast and legacyAST were not present in the artifacts even if requested --- packages/sol-compiler/CHANGELOG.json | 4 ++++ packages/sol-compiler/src/utils/compiler.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 977699ad6..78db31b0f 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -13,6 +13,10 @@ { "note": "Remove `bin_paths` and fetch the list of soliidty compilers from github", "pr": "TODO" + }, + { + "note": "Fix a bug when ast and legacyAST were not present in the artifacts even if requested", + "pr": "TODO" } ] }, diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts index 34aa1a3b8..28049e453 100644 --- a/packages/sol-compiler/src/utils/compiler.ts +++ b/packages/sol-compiler/src/utils/compiler.ts @@ -251,7 +251,7 @@ export function getSourcesWithDependencies( contractPath: string, fullSources: { [sourceName: string]: { id: number } }, ): { sourceCodes: { [sourceName: string]: string }; sources: { [sourceName: string]: { id: number } } } { - const sources = { [contractPath]: { id: fullSources[contractPath].id } }; + const sources = { [contractPath]: fullSources[contractPath] }; const sourceCodes = { [contractPath]: resolver.resolve(contractPath).source }; recursivelyGatherDependencySources( resolver, -- cgit v1.2.3