(gt configs.GasTable, evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64)
| 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) |
| 220 | if err != nil { |
| 221 | return 0, err |
| 222 | } |
| 223 | |
| 224 | var overflow bool |
| 225 | if gas, overflow = math.SafeAdd(gas, gt.ExtcodeCopy); overflow { |
| 226 | return 0, errGasUintOverflow |
| 227 | } |
| 228 | |
| 229 | wordGas, overflow := bigUint64(stack.Back(3)) |
| 230 | if overflow { |
| 231 | return 0, errGasUintOverflow |
| 232 | } |
| 233 | |
| 234 | if wordGas, overflow = math.SafeMul(toWordSize(wordGas), configs.CopyGas); overflow { |
| 235 | return 0, errGasUintOverflow |
| 236 | } |
| 237 | |
| 238 | if gas, overflow = math.SafeAdd(gas, wordGas); overflow { |
| 239 | return 0, errGasUintOverflow |
| 240 | } |
| 241 | return gas, nil |
| 242 | } |
| 243 | |
| 244 | func gasMLoad(gt configs.GasTable, evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { |
| 245 | var overflow bool |
nothing calls this directly
no test coverage detected