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 /libsolidity/codegen/ExpressionCompiler.cpp | |
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 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 3774e731..b5b10c30 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -23,17 +23,18 @@ #include <utility> #include <numeric> #include <boost/range/adaptor/reversed.hpp> -#include <libevmcore/Params.h> #include <libdevcore/Common.h> #include <libdevcore/SHA3.h> +#include <libethcore/ChainOperationParams.h> #include <libsolidity/ast/AST.h> #include <libsolidity/codegen/ExpressionCompiler.h> #include <libsolidity/codegen/CompilerContext.h> #include <libsolidity/codegen/CompilerUtils.h> #include <libsolidity/codegen/LValue.h> - using namespace std; +// TODO: FIXME: HOMESTEAD: XXX: @chriseth Params deprecated - use EVMSchedule instead. + namespace dev { namespace solidity @@ -1168,6 +1169,7 @@ void ExpressionCompiler::appendExternalFunctionCall( vector<ASTPointer<Expression const>> const& _arguments ) { + eth::EVMSchedule schedule;// TODO: Make relevant to current suppose context. solAssert( _functionType.takesArbitraryParameters() || _arguments.size() == _functionType.parameterTypes().size(), "" @@ -1276,11 +1278,11 @@ void ExpressionCompiler::appendExternalFunctionCall( { // send all gas except the amount needed to execute "SUB" and "CALL" // @todo this retains too much gas for now, needs to be fine-tuned. - u256 gasNeededByCaller = eth::c_callGas + 10; + u256 gasNeededByCaller = schedule.callGas + 10; if (_functionType.valueSet()) - gasNeededByCaller += eth::c_callValueTransferGas; + gasNeededByCaller += schedule.callValueTransferGas; if (!isCallCode) - gasNeededByCaller += eth::c_callNewAccountGas; // we never know + gasNeededByCaller += schedule.callNewAccountGas; // we never know m_context << gasNeededByCaller << eth::Instruction::GAS << |