aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-23 20:34:42 +0800
committerchriseth <c@ethdev.com>2015-09-23 20:34:42 +0800
commit317d1732183d2ae1d5fbabac4d130b5819069af0 (patch)
tree5c5d0b3b67881473fc950fab939eea784cda0359 /solc/CommandLineInterface.cpp
parent028f561dac6aec0692daa8217b0ee1e3a0c5aa72 (diff)
downloaddexon-solidity-317d1732183d2ae1d5fbabac4d130b5819069af0.tar.gz
dexon-solidity-317d1732183d2ae1d5fbabac4d130b5819069af0.tar.zst
dexon-solidity-317d1732183d2ae1d5fbabac4d130b5819069af0.zip
Fix "combined json" output.
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index cfc8a5e0..d810399c 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -74,6 +74,7 @@ static string const g_stdinFileName = "<stdin>";
/// Possible arguments to for --combined-json
static set<string> const g_combinedJsonArgs{
"bin",
+ "bin-runtime",
"clone-bin",
"opcodes",
"abi",
@@ -144,7 +145,7 @@ void CommandLineInterface::handleBinary(string const& _contract)
if (m_args.count(g_argRuntimeBinaryStr))
{
if (m_args.count("output-dir"))
- createFile(_contract + ".bin", m_compiler->runtimeObject(_contract).toHex());
+ createFile(_contract + ".bin-runtime", m_compiler->runtimeObject(_contract).toHex());
else
{
cout << "Binary of the runtime part: " << endl;
@@ -545,6 +546,7 @@ void CommandLineInterface::handleCombinedJSON()
Json::Value output(Json::objectValue);
+ output["version"] = ::dev::solidity::VersionString;
set<string> requests;
boost::split(requests, m_args["combined-json"].as<string>(), boost::is_any_of(","));
vector<string> contracts = m_compiler->contractNames();
@@ -559,7 +561,9 @@ void CommandLineInterface::handleCombinedJSON()
if (requests.count("abi"))
contractData["abi"] = m_compiler->interface(contractName);
if (requests.count("bin"))
- contractData["bin"] = m_compiler->runtimeObject(contractName).toHex();
+ contractData["bin"] = m_compiler->object(contractName).toHex();
+ if (requests.count("bin-runtime"))
+ contractData["bin-runtime"] = m_compiler->runtimeObject(contractName).toHex();
if (requests.count("clone-bin"))
contractData["clone-bin"] = m_compiler->cloneObject(contractName).toHex();
if (requests.count("opcodes"))