aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/gas_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/gas_table.go')
-rw-r--r--core/vm/gas_table.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go
index 10b4f719a..df79f86ec 100644
--- a/core/vm/gas_table.go
+++ b/core/vm/gas_table.go
@@ -347,6 +347,17 @@ func gasCreate2(gt params.GasTable, evm *EVM, contract *Contract, stack *Stack,
if gas, overflow = math.SafeAdd(gas, params.Create2Gas); overflow {
return 0, errGasUintOverflow
}
+ wordGas, overflow := bigUint64(stack.Back(2))
+ if overflow {
+ return 0, errGasUintOverflow
+ }
+ if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Sha3WordGas); overflow {
+ return 0, errGasUintOverflow
+ }
+ if gas, overflow = math.SafeAdd(gas, wordGas); overflow {
+ return 0, errGasUintOverflow
+ }
+
return gas, nil
}