mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #89 from chriseth/fixCombinedJson
Fix "combined json" output.
This commit is contained in:
commit
09f1f1e595
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user