diff options
author | Gav Wood <i@gavwood.com> | 2015-11-21 21:34:21 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-11-21 21:34:21 +0800 |
commit | bff172cf656843dd0f05def1f920be3d98df9640 (patch) | |
tree | 0f2d0c5841dc487d0235f74f77a350d4196246da /solc | |
parent | 9997aac1637727d735e1c474da6ecf9d98f072cf (diff) | |
download | dexon-solidity-bff172cf656843dd0f05def1f920be3d98df9640.tar.gz dexon-solidity-bff172cf656843dd0f05def1f920be3d98df9640.tar.zst dexon-solidity-bff172cf656843dd0f05def1f920be3d98df9640.zip |
Fix up for new API from EIP-1.1.
Diffstat (limited to 'solc')
-rw-r--r-- | solc/CommandLineInterface.cpp | 6 | ||||
-rw-r--r-- | solc/jsonCompiler.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index b4121574..376196e1 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -34,7 +34,6 @@ #include <libdevcore/CommonData.h> #include <libdevcore/CommonIO.h> #include <libevmcore/Instruction.h> -#include <libevmcore/Params.h> #include <libsolidity/interface/Version.h> #include <libsolidity/parsing/Scanner.h> #include <libsolidity/parsing/Parser.h> @@ -239,6 +238,7 @@ void CommandLineInterface::handleMeta(DocumentationType _type, string const& _co void CommandLineInterface::handleGasEstimation(string const& _contract) { + eth::EVMSchedule schedule; // TODO: make it relevant to the SealEngine/EnvInfo. using Gas = GasEstimator::GasConsumption; if (!m_compiler->assemblyItems(_contract) && !m_compiler->runtimeAssemblyItems(_contract)) return; @@ -248,8 +248,8 @@ void CommandLineInterface::handleGasEstimation(string const& _contract) Gas gas = GasEstimator::functionalEstimation(*items); u256 bytecodeSize(m_compiler->runtimeObject(_contract).bytecode.size()); cout << "construction:" << endl; - cout << " " << gas << " + " << (bytecodeSize * eth::c_createDataGas) << " = "; - gas += bytecodeSize * eth::c_createDataGas; + cout << " " << gas << " + " << (bytecodeSize * schedule.createDataGas) << " = "; + gas += bytecodeSize * schedule.createDataGas; cout << gas << endl; } if (eth::AssemblyItems const* items = m_compiler->runtimeAssemblyItems(_contract)) diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index 43164807..cb3eeefd 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -27,7 +27,6 @@ #include <libdevcore/CommonData.h> #include <libdevcore/CommonIO.h> #include <libevmcore/Instruction.h> -#include <libevmcore/Params.h> #include <libsolidity/parsing/Scanner.h> #include <libsolidity/parsing/Parser.h> #include <libsolidity/ast/ASTPrinter.h> @@ -67,6 +66,7 @@ Json::Value gasToJson(GasEstimator::GasConsumption const& _gas) Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract) { + eth::EVMSchedule schedule;// TODO: make relevant to supposed context. Json::Value gasEstimates(Json::objectValue); using Gas = GasEstimator::GasConsumption; if (!_compiler.assemblyItems(_contract) && !_compiler.runtimeAssemblyItems(_contract)) @@ -77,7 +77,7 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract) u256 bytecodeSize(_compiler.runtimeObject(_contract).bytecode.size()); Json::Value creationGas(Json::arrayValue); creationGas[0] = gasToJson(gas); - creationGas[1] = gasToJson(bytecodeSize * eth::c_createDataGas); + creationGas[1] = gasToJson(bytecodeSize * schedule.createDataGas); gasEstimates["creation"] = creationGas; } if (eth::AssemblyItems const* items = _compiler.runtimeAssemblyItems(_contract)) |