mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Provide new account gas for low-level callcode/delegatecall
This commit is contained in:
parent
7e07eb6eea
commit
39dba0efe8
@ -3,6 +3,7 @@
|
|||||||
Features:
|
Features:
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
* Code Generator: Provide "new account gas" for low-level ``callcode`` and ``delegatecall``.
|
||||||
|
|
||||||
### 0.4.14 (2017-07-31)
|
### 0.4.14 (2017-07-31)
|
||||||
|
|
||||||
|
@ -1712,7 +1712,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
|
|||||||
u256 gasNeededByCaller = eth::GasCosts::callGas + 10;
|
u256 gasNeededByCaller = eth::GasCosts::callGas + 10;
|
||||||
if (_functionType.valueSet())
|
if (_functionType.valueSet())
|
||||||
gasNeededByCaller += eth::GasCosts::callValueTransferGas;
|
gasNeededByCaller += eth::GasCosts::callValueTransferGas;
|
||||||
if (!isCallCode && !isDelegateCall && !existenceChecked)
|
if (!existenceChecked)
|
||||||
gasNeededByCaller += eth::GasCosts::callNewAccountGas; // we never know
|
gasNeededByCaller += eth::GasCosts::callNewAccountGas; // we never know
|
||||||
m_context << gasNeededByCaller << Instruction::GAS << Instruction::SUB;
|
m_context << gasNeededByCaller << Instruction::GAS << Instruction::SUB;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user