aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-04-12 19:06:01 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-04-13 09:18:29 +0800
commit54dcb0e11be09caf35e02792d47695685ba1f4cb (patch)
tree3e027108539be90a11e65b5b560506bd97e8216a /solc/CommandLineInterface.cpp
parentfe4fccaaf21dbb7cbfed9b758a3d8f12f979c6dc (diff)
downloaddexon-solidity-54dcb0e11be09caf35e02792d47695685ba1f4cb.tar.gz
dexon-solidity-54dcb0e11be09caf35e02792d47695685ba1f4cb.tar.zst
dexon-solidity-54dcb0e11be09caf35e02792d47695685ba1f4cb.zip
Keep gas values as a string in CompilerStack::gasEstimate
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index 90cc4769..947a2004 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -322,18 +322,9 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
{
Json::Value creation = estimates["creation"];
cout << "construction:" << endl;
- if (creation["executionCost"].isNull())
- cout << " infinite";
- else
- cout << " " << creation["executionCost"];
- if (creation["codeDepositCost"].isNull())
- cout << " + infinite";
- else
- cout << " + " << creation["codeDepositCost"];
- if (creation["totalCost"].isNull())
- cout << " = infinite";
- else
- cout << " = " << creation["totalCost"] << endl;
+ cout << " " << creation["executionCost"].asString();
+ cout << " + " << creation["codeDepositCost"].asString();
+ cout << " = " << creation["totalCost"].asString() << endl;
}
if (estimates["external"].isObject())
@@ -346,10 +337,7 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
cout << " fallback:\t";
else
cout << " " << name << ":\t";
- if (externalFunctions[name].isNull())
- cout << "infinite" << endl;
- else
- cout << externalFunctions[name] << endl;
+ cout << externalFunctions[name].asString() << endl;
}
}
@@ -360,10 +348,7 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
for (auto const& name: internalFunctions.getMemberNames())
{
cout << " " << name << ":\t";
- if (internalFunctions[name].isNull())
- cout << "infinite" << endl;
- else
- cout << internalFunctions[name] << endl;
+ cout << internalFunctions[name].asString() << endl;
}
}
}