Closed tjchern closed 6 years ago
Yes, it's OK. You may find the same behavior in go-ethereum code as well.
Basically, value transfer call costs 9,000
gas in addition. So, even if whole STIPEND_CALL
gets refunded, it'll cost 6,700
gas.
OK, Thank you very much
When contract A has an op CALL, if value is not zero, then the adjustedCallGas add STIPEND_CALL, and the adjustedCallGas will passed into the new contract B as gas limit. so, if the new contract B return immediately, it will refund the gas(equals to gas limit), at this time, the contract A will gain the gas limit. I have checked the issue https://github.com/ethereum/EIPs/issues/1285, and I know why need the STIPEND_CALL, but is the code OK? Thank you