(gt configs.GasTable, evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64)
| 192 | } |
| 193 | |
| 194 | func gasCodeCopy(gt configs.GasTable, evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { |
| 195 | gas, err := memoryGasCost(mem, memorySize) |
| 196 | if err != nil { |
| 197 | return 0, err |
| 198 | } |
| 199 | |
| 200 | var overflow bool |
| 201 | if gas, overflow = math.SafeAdd(gas, GasFastestStep); overflow { |
| 202 | return 0, errGasUintOverflow |
| 203 | } |
| 204 | |
| 205 | wordGas, overflow := bigUint64(stack.Back(2)) |
| 206 | if overflow { |
| 207 | return 0, errGasUintOverflow |
| 208 | } |
| 209 | if wordGas, overflow = math.SafeMul(toWordSize(wordGas), configs.CopyGas); overflow { |
| 210 | return 0, errGasUintOverflow |
| 211 | } |
| 212 | if gas, overflow = math.SafeAdd(gas, wordGas); overflow { |
| 213 | return 0, errGasUintOverflow |
| 214 | } |
| 215 | return gas, nil |
| 216 | } |
| 217 | |
| 218 | func gasExtCodeCopy(gt configs.GasTable, evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { |
| 219 | gas, err := memoryGasCost(mem, memorySize) |
nothing calls this directly
no test coverage detected