Skip to content

Commit f29b148

Browse files
committed
fix
Signed-off-by: Ignacio Hagopian <[email protected]>
1 parent e98688e commit f29b148

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/vm/instructions.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,11 @@ func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
408408

409409
if interpreter.evm.chainRules.IsVerkle {
410410
addr := common.Address(a.Bytes20())
411-
if _, isPrecompile := interpreter.evm.precompile(addr); !isPrecompile {
411+
if _, isPrecompile := interpreter.evm.precompile(addr); isPrecompile {
412+
if !scope.Contract.UseGas(params.WarmStorageReadCostEIP2929) {
413+
return nil, ErrExecutionReverted
414+
}
415+
} else {
412416
chargedGas, ok := interpreter.evm.Accesses.TouchBasicData(addr[:], false, scope.Contract.UseGas)
413417
if !ok || (chargedGas == 0 && !scope.Contract.UseGas(params.WarmStorageReadCostEIP2929)) {
414418
return nil, ErrExecutionReverted

0 commit comments

Comments
 (0)