Skip to content

Commit

Permalink
fix callcode touching
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Sep 13, 2024
1 parent 218365f commit 09ad133
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/vm/gas_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,6 @@ func gasCallCode(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memory
if gas, overflow = math.SafeAdd(gas, memoryGas); overflow {
return 0, ErrGasUintOverflow
}
if evm.chainRules.IsEIP4762 {
address := common.Address(stack.Back(1).Bytes20())
transfersValue := !stack.Back(2).IsZero()
if transfersValue {
gas, overflow = math.SafeAdd(gas, evm.Accesses.TouchAndChargeValueTransfer(contract.Address().Bytes()[:], address.Bytes()[:]))
if overflow {
return 0, ErrGasUintOverflow
}
}
}
evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0))
if err != nil {
return 0, err
Expand Down

0 comments on commit 09ad133

Please sign in to comment.