aboutsummaryrefslogtreecommitdiffstats
path: root/solidityExecutionFramework.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-28 20:39:04 +0800
committerChristian <c@ethdev.com>2015-01-28 20:39:04 +0800
commit77374a46cef6308c58465f5197919d9ac67cb666 (patch)
treee1d319d59f326702451b0c6a895d298491bcd42f /solidityExecutionFramework.h
parentf9109f2eea0f84e37b42d7ec635e97732e1c1d93 (diff)
downloaddexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.gz
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.zst
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.zip
Cleaner solution to provide standard sources.
Diffstat (limited to 'solidityExecutionFramework.h')
-rw-r--r--solidityExecutionFramework.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/solidityExecutionFramework.h b/solidityExecutionFramework.h
index 271a594c..208e9ae8 100644
--- a/solidityExecutionFramework.h
+++ b/solidityExecutionFramework.h
@@ -45,10 +45,12 @@ public:
bytes const& compileAndRun(std::string const& _sourceCode, u256 const& _value = 0, std::string const& _contractName = "")
{
- dev::solidity::CompilerStack compiler;
+ // add standard sources only if contract name is given
+ dev::solidity::CompilerStack compiler(!_contractName.empty());
try
{
- compiler.compile(_sourceCode, m_optimize);
+ compiler.addSource("", _sourceCode);
+ compiler.compile(m_optimize);
}
catch(boost::exception const& _e)
{