aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-17 18:49:45 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-07-26 22:05:16 +0800
commit6848199b66d9cadae901f71dcf944fe9aa927eeb (patch)
tree3fb478a531be2eddae472ef8100f6eed9e75ba74 /libsolidity/interface/CompilerStack.h
parentfa5a7efb45de72d0a83e2e0bdb9b967f76f0c070 (diff)
downloaddexon-solidity-6848199b66d9cadae901f71dcf944fe9aa927eeb.tar.gz
dexon-solidity-6848199b66d9cadae901f71dcf944fe9aa927eeb.tar.zst
dexon-solidity-6848199b66d9cadae901f71dcf944fe9aa927eeb.zip
Add CompilerStack::setLibraries
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r--libsolidity/interface/CompilerStack.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h
index 1bfb193d..39875c32 100644
--- a/libsolidity/interface/CompilerStack.h
+++ b/libsolidity/interface/CompilerStack.h
@@ -96,6 +96,13 @@ public:
/// Sets path remappings in the format "context:prefix=target"
void setRemappings(std::vector<std::string> const& _remappings);
+ /// Sets library addresses. Addresses are cleared iff @a _libraries is missing.
+ /// Will not take effect before running compile.
+ void setLibraries(std::map<std::string, h160> const& _libraries = std::map<std::string, h160>{})
+ {
+ m_libraries = _libraries;
+ }
+
/// Resets the compiler to a state where the sources are not parsed or even removed.
/// Sets the state to SourcesSet if @a _keepSources is true, otherwise to Empty.
/// All settings, with the exception of remappings, are reset.
@@ -121,8 +128,7 @@ public:
/// @returns false on error.
bool compile(
bool _optimize = false,
- unsigned _runs = 200,
- std::map<std::string, h160> const& _libraries = std::map<std::string, h160>{}
+ unsigned _runs = 200
);
/// @returns the assembled object for a contract.