From 8826531e50778616e7f98fc861c9ddb43df75b90 Mon Sep 17 00:00:00 2001 From: 0xAA Date: Sun, 24 Sep 2023 15:28:48 +0800 Subject: [PATCH] fix bug in `SET_VALUE()` Previously, the `SET_VALUE()` method is not terminated correctly. Calling SET_VALUE() will continue to call `GET_VALUE()`. A `Stop` opcode needs to be added at the end of `SET_VALUE()`. --- src/tutorial/simple-storage/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tutorial/simple-storage/README.md b/src/tutorial/simple-storage/README.md index 23310ef..1b20a35 100644 --- a/src/tutorial/simple-storage/README.md +++ b/src/tutorial/simple-storage/README.md @@ -70,6 +70,7 @@ Onto the fun part, the logic. Remember from the addTwo example we can read calld // Get pointer and store [VALUE] // [value_ptr, value] sstore // [] + stop // [] } ``` @@ -134,6 +135,7 @@ Now all of it together! // Get pointer and store [VALUE] // [value_ptr, value] sstore // [] + stop // [] } // getValue()