diff options
author | chriseth <c@ethdev.com> | 2015-09-23 21:55:14 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-09-23 21:55:14 +0800 |
commit | 09f1f1e5955fc358697b49542c6c8eb42496ef10 (patch) | |
tree | 981526ea6f8baa5269baa0ca19c239fbf7aa5fee | |
parent | efdea76d5eb026777e89b8683413184bf8c5287d (diff) | |
parent | 317d1732183d2ae1d5fbabac4d130b5819069af0 (diff) | |
download | dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.tar dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.tar.gz dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.tar.bz2 dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.tar.lz dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.tar.xz dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.tar.zst dexon-solidity-09f1f1e5955fc358697b49542c6c8eb42496ef10.zip |
Merge pull request #89 from chriseth/fixCombinedJson
Fix "combined json" output.
-rw-r--r-- | solc/CommandLineInterface.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 587dcded..a1f5fd66 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; @@ -550,6 +551,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(); @@ -564,7 +566,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")) |