From a00d50aa1590d7bed660723e2aa2fc7e58d64559 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 1 Oct 2024 15:58:26 -0300 Subject: [PATCH] add proper verkle flag Signed-off-by: Ignacio Hagopian --- core/vm/instructions.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 6006ab52b5aa..ff4dc65d215d 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -800,7 +800,8 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt if !scope.Contract.UseGas(interpreter.evm.callGasTemp) { return nil, ErrOutOfGas } - if !chargeCallVariantEIP4762(interpreter.evm, scope) { + + if interpreter.evm.chainRules.IsEIP4762 && !chargeCallVariantEIP4762(interpreter.evm, scope) { return nil, ErrExecutionReverted } @@ -845,7 +846,7 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt } func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if !chargeCallVariantEIP4762(interpreter.evm, scope) { + if interpreter.evm.chainRules.IsEIP4762 && !chargeCallVariantEIP4762(interpreter.evm, scope) { return nil, ErrExecutionReverted } // Pop gas. The actual gas is in interpreter.evm.callGasTemp. @@ -883,7 +884,7 @@ func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([ } func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if !chargeCallVariantEIP4762(interpreter.evm, scope) { + if interpreter.evm.chainRules.IsEIP4762 && !chargeCallVariantEIP4762(interpreter.evm, scope) { return nil, ErrExecutionReverted } stack := scope.Stack @@ -914,7 +915,7 @@ func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext } func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if !chargeCallVariantEIP4762(interpreter.evm, scope) { + if interpreter.evm.chainRules.IsEIP4762 && !chargeCallVariantEIP4762(interpreter.evm, scope) { return nil, ErrExecutionReverted } // Pop gas. The actual gas is in interpreter.evm.callGasTemp.