From bfb73cb02b1312bf187d903993bdd44be1bf36de Mon Sep 17 00:00:00 2001 From: Al <80943867+al-ias@users.noreply.github.com> Date: Fri, 22 Jul 2022 19:40:24 +0200 Subject: [PATCH 1/3] Fix hoisting example --- solidity.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity.html.markdown b/solidity.html.markdown index c52d2002..2006333e 100644 --- a/solidity.html.markdown +++ b/solidity.html.markdown @@ -435,7 +435,7 @@ function increment(uint x) view returns (uint x) { // Functions hoisted - and can assign a function to a variable function a() { var z = b; - b(); + z(); } function b() { From 6de5f8152b6fc61c1b240ece1d0bf5c37f8e431d Mon Sep 17 00:00:00 2001 From: Al <80943867+al-ias@users.noreply.github.com> Date: Fri, 22 Jul 2022 19:40:54 +0200 Subject: [PATCH 2/3] Fix delete example --- solidity.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity.html.markdown b/solidity.html.markdown index 2006333e..fc9c8788 100644 --- a/solidity.html.markdown +++ b/solidity.html.markdown @@ -278,7 +278,7 @@ f(22); // call // Delete can be called on most types // (does NOT destroy value, but sets value to 0, the initial value) -uint x = 5; +delete x; // Destructuring/Tuples From 40e69760e93322603cf1780f9f54793a5aefaaa3 Mon Sep 17 00:00:00 2001 From: Al <80943867+al-ias@users.noreply.github.com> Date: Sun, 24 Jul 2022 21:17:41 +0200 Subject: [PATCH 3/3] Fix missing semicolon --- solidity.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity.html.markdown b/solidity.html.markdown index fc9c8788..f60ba30f 100644 --- a/solidity.html.markdown +++ b/solidity.html.markdown @@ -494,7 +494,7 @@ Coin.LogSent().watch({}, '', function(error, result) { // '_' (underscore) often included as last line in body, and indicates // function being called should be placed there modifier onlyAfter(uint _time) { require (now >= _time); _; } -modifier onlyOwner { require(msg.sender == owner) _; } +modifier onlyOwner { require(msg.sender == owner); _; } // commonly used with state machines modifier onlyIfStateA (State currState) { require(currState == State.A) _; }