From 3b989f1e2501ceaddf4747781c549a7604ae5894 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Wed, 8 Apr 2026 15:27:59 +0200 Subject: [PATCH] core: undo unnecessary change --- core/vm/instructions.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 84855bf845..10ea09ed8b 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -516,6 +516,9 @@ func opSload(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) { } func opSstore(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) { + if evm.readOnly { + return nil, ErrWriteProtection + } loc := scope.Stack.pop() val := scope.Stack.pop() evm.StateDB.SetState(scope.Contract.Address(), loc.Bytes32(), val.Bytes32())