diff --git a/core/vm/instructions.go b/core/vm/instructions.go index e5926e9adc..2a55f64e42 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -578,6 +578,11 @@ func opGas(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte } func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.evm.TxContext.Is5806 { + if scope.Contract.CodeHash == types.EmptyCodeHash || scope.Contract.CodeHash == (common.Hash{}) { + return nil, ErrEip5806Write + } + } if interpreter.readOnly { return nil, ErrWriteProtection }