Skip to content

Commit

Permalink
remove hard coded 0x60 for push1 check
Browse files Browse the repository at this point in the history
  • Loading branch information
hexoscott committed Nov 26, 2024
1 parent 7d1f0fb commit ecc6722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/vm/evm_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (evm *EVM) call_zkevm(typ OpCode, caller ContractRef, addr libcommon.Addres
// zk - up to fork 10 we cannot handle a contract code that ends with just a push and nothing to push to the stack
// so check for this scenario
if !evm.chainConfig.IsForkID10(evm.Context.BlockNumber) {
if len(code) > 0 && code[len(code)-1] == 0x60 {
if len(code) > 0 && code[len(code)-1] == byte(PUSH1) {
return nil, gas, ErrInvalidCode
}
}
Expand Down

0 comments on commit ecc6722

Please sign in to comment.