Skip to content

Commit

Permalink
add proper verkle flag
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign committed Oct 1, 2024
1 parent ffc1f2d commit a00d50a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a00d50a

Please sign in to comment.