From 39dba0efe83c5f6309ac2582d92a7150a9d6b0d8 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 1 Aug 2017 12:56:36 +0100 Subject: Provide new account gas for low-level callcode/delegatecall --- Changelog.md | 1 + libsolidity/codegen/ExpressionCompiler.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index d36b02b5..7e4606bd 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ Features: Bugfixes: + * Code Generator: Provide "new account gas" for low-level ``callcode`` and ``delegatecall``. ### 0.4.14 (2017-07-31) diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index d661e1b1..2c8cfd76 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1712,7 +1712,7 @@ void ExpressionCompiler::appendExternalFunctionCall( u256 gasNeededByCaller = eth::GasCosts::callGas + 10; if (_functionType.valueSet()) gasNeededByCaller += eth::GasCosts::callValueTransferGas; - if (!isCallCode && !isDelegateCall && !existenceChecked) + if (!existenceChecked) gasNeededByCaller += eth::GasCosts::callNewAccountGas; // we never know m_context << gasNeededByCaller << Instruction::GAS << Instruction::SUB; } -- cgit