Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #324

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/aleo/03_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion documentation/leo/03_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion documentation/leo/10_basic_bank.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions documentation/leo/14_battleship.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion documentation/sdk/create-aleo-app/01_create_aleo_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -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鈥檒l take some time to scan for transactions on the blockchain, so let鈥檚 provide the *exact* record that we鈥檒l be pulling the fee from. This significantly quickens the deployment process, and you鈥檒l learn about decrypting records in the process.

Expand Down
2 changes: 1 addition & 1 deletion documentation/sdk/typescript/00_sdk_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down