From 2c66aa64cd5510b59df1ee1251ad28d6def88878 Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:13:55 +0800 Subject: [PATCH 1/6] fix typo --- documentation/aleo/03_language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/aleo/03_language.md b/documentation/aleo/03_language.md index 3cc44686d..ab28bdd09 100644 --- a/documentation/aleo/03_language.md +++ b/documentation/aleo/03_language.md @@ -422,7 +422,7 @@ finalize transfer_public_to_private: get.or_use account[r0] 0u64 into r2; // Decrements `account[r0]` by `r1`. - // If `r2 - r1` underflows, `trasfer_public_to_private` is reverted. + // If `r2 - r1` underflows, `transfer_public_to_private` is reverted. sub r2 r1 into r3; // Updates the balance of the sender. From 9a4a84f6da3c07f8281e2cb0c642781452da1ec5 Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:14:06 +0800 Subject: [PATCH 2/6] fix typo --- documentation/leo/03_language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/leo/03_language.md b/documentation/leo/03_language.md index d5db03f7b..8844ce990 100644 --- a/documentation/leo/03_language.md +++ b/documentation/leo/03_language.md @@ -305,7 +305,7 @@ Arrays can contain primitive data types, structs, or arrays. Structs and records Arrays can be iterated over using a for loop. ```leo -// Initalize a boolean array of length 4 +// Initialize a boolean array of length 4 let arr: [bool; 4] = [true, false, true, false]; // Nested Array From c28cb3d6a9052c93d09281065699b384cb7619ec Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:14:17 +0800 Subject: [PATCH 3/6] fix typo --- documentation/leo/10_basic_bank.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/leo/10_basic_bank.md b/documentation/leo/10_basic_bank.md index ff50811d5..1f4bb7d57 100644 --- a/documentation/leo/10_basic_bank.md +++ b/documentation/leo/10_basic_bank.md @@ -14,7 +14,7 @@ Note that the program can be easily extended to include addition features such a You may have already guessed that this program has a few bugs. We list some of them below: - `withdraw` can only be invoked by the bank. A malicious bank could lock users' tokens by not invoking `withdraw`. - `withdraw` fails if the sum of the interest and principal is greater than the user's balance. -- User's can increase their principal by depositing tokens multiple times, including immediately before withdrawl. +- User's can increase their principal by depositing tokens multiple times, including immediately before withdrawal. - Integer division rounds down; if the calculated interest is too small, then it will be rounded down to zero. Can you find any others? From 09d1be0c92207d48638df3e215963b519ba87f12 Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:14:28 +0800 Subject: [PATCH 4/6] fix typo --- documentation/leo/14_battleship.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/leo/14_battleship.md b/documentation/leo/14_battleship.md index 88de01b6b..f4ae891e3 100644 --- a/documentation/leo/14_battleship.md +++ b/documentation/leo/14_battleship.md @@ -358,7 +358,7 @@ This contains only the result of Player 1's previous fire coordinate they had se If you check Player 2's ships configuration, you'll note their entire bottom row is covered by two ships, so sample valid hits on the bottom row would be: 1u64, 2u64, 4u64, 8u64, 16u64, 32u64, 64u64, and 128u64. Since Player 1's first fire coordinate (1u64) was a hit, the `hits_and_misses` field is also 1u64. -Player 1's next move will consume this `move.record`, which will update Player 1's board with the hit-or-miss, as well as figure out the result of Player 2's fire coordinate. Now that Player 1 has some `played_tiles`, they can no longer choose an alread-played fire coordinate. For example, running `aleo run play 'board_state.record' 'move.record' 1u64` will fail, because 1u64 has already been played. +Player 1's next move will consume this `move.record`, which will update Player 1's board with the hit-or-miss, as well as figure out the result of Player 2's fire coordinate. Now that Player 1 has some `played_tiles`, they can no longer choose an already-played fire coordinate. For example, running `aleo run play 'board_state.record' 'move.record' 1u64` will fail, because 1u64 has already been played. ## 8: Player 1 Takes The 3rd Turn @@ -794,7 +794,7 @@ We can make the observation that the original bitstring is always shifted by a p To ensure that the remaining number is a power of 2, we can use a bit trick. See the bit trick for ensuring a bitstring is a power of 2 section. -In the code, you'll notice one extra step. Dividing a ship placement bitstring by a ship bitstring representation could result in 0, and then subtracting by 1 will result in an underflow. In that case, we know the ship placement is not valid, so we can set a number which is gauranteed to not be a power of 2. +In the code, you'll notice one extra step. Dividing a ship placement bitstring by a ship bitstring representation could result in 0, and then subtracting by 1 will result in an underflow. In that case, we know the ship placement is not valid, so we can set a number which is guaranteed to not be a power of 2. ### Splitting a row or column From 67067a66e5e863b93bcb27d4663abd3adacbc36a Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:14:39 +0800 Subject: [PATCH 5/6] fix typo --- documentation/sdk/create-aleo-app/01_create_aleo_app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/sdk/create-aleo-app/01_create_aleo_app.md b/documentation/sdk/create-aleo-app/01_create_aleo_app.md index f990b2b83..6f157af63 100644 --- a/documentation/sdk/create-aleo-app/01_create_aleo_app.md +++ b/documentation/sdk/create-aleo-app/01_create_aleo_app.md @@ -129,7 +129,7 @@ leo execute main Let's get back to deploying! -When you deploy a program, the record that you requested from the faucet is the one that will be used in order to pay for deployment. Looking in `App.jsx`, the web worker is called in order to start the deployment. Following that to `src/workers/worker.js` we see that the WASM is initalized, which allows for computation to run efficiently in the browser, and that the program manager contains methods for authoring, deploying, and interacting with Aleo programs. +When you deploy a program, the record that you requested from the faucet is the one that will be used in order to pay for deployment. Looking in `App.jsx`, the web worker is called in order to start the deployment. Following that to `src/workers/worker.js` we see that the WASM is initialized, which allows for computation to run efficiently in the browser, and that the program manager contains methods for authoring, deploying, and interacting with Aleo programs. Thing is, we can hit deploy right now, but it’ll take some time to scan for transactions on the blockchain, so let’s provide the *exact* record that we’ll be pulling the fee from. This significantly quickens the deployment process, and you’ll learn about decrypting records in the process. From 9fb519efd1d80d26a7ed0981e4487b909bd46d0a Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:14:50 +0800 Subject: [PATCH 6/6] fix typo --- documentation/sdk/typescript/00_sdk_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/sdk/typescript/00_sdk_overview.md b/documentation/sdk/typescript/00_sdk_overview.md index bb5412a71..d0c87a0dd 100644 --- a/documentation/sdk/typescript/00_sdk_overview.md +++ b/documentation/sdk/typescript/00_sdk_overview.md @@ -1143,7 +1143,7 @@ finalize transfer_public: ``` From the perspective of the caller of the API, this is as simple as executing a normal Aleo function. Given the inputs -to a function with a finalize scope that updates a mapping are valid, the mapping will either be intialized or updated +to a function with a finalize scope that updates a mapping are valid, the mapping will either be initialized or updated by the Aleo network. All the user of the SDK must do is ensure that the inputs to the function are valid. If function inputs are Invalid, the Network will return an error, but the fee paid for the transaction will still be