From 20d868e82f5b860f283d51d4a04c27cc080e94a6 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 8 Oct 2024 10:28:26 -0700 Subject: [PATCH] Fix stack underflow issue --- eth/tracers/native/zero.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/tracers/native/zero.go b/eth/tracers/native/zero.go index 3d4c05b51a6..65c32c30069 100644 --- a/eth/tracers/native/zero.go +++ b/eth/tracers/native/zero.go @@ -115,7 +115,7 @@ func (t *zeroTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, sco slot := libcommon.Hash(stackData[stackLen-1].Bytes32()) t.addAccountToTrace(caller) t.addSLOADToAccount(caller, slot) - case stackLen >= 1 && op == vm.SSTORE: + case stackLen >= 2 && op == vm.SSTORE: slot := libcommon.Hash(stackData[stackLen-1].Bytes32()) t.addAccountToTrace(caller) t.addSSTOREToAccount(caller, slot, stackData[stackLen-2].Clone())