From ce87984cc1d3b6f9e1784da831dbdf008853c2c6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 17 Mar 2017 12:30:50 +0000 Subject: [PATCH] Parse remappings in StandardCompiler --- libsolidity/interface/StandardCompiler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index fd6977167..444ce02e5 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -45,6 +45,11 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) Json::Value const& settings = _input.get("settings", Json::Value()); + vector remappings; + for (auto const& remapping: settings.get("remappings", Json::Value())) + remappings.push_back(remapping.asString()); + m_compilerStack.setRemappings(remappings); + Json::Value optimizerSettings = settings.get("optimizer", Json::Value()); bool optimize = optimizerSettings.get("enabled", Json::Value(false)).asBool(); unsigned optimizeRuns = optimizerSettings.get("runs", Json::Value(200u)).asUInt();