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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typos #5198

Merged
merged 2 commits into from
Oct 18, 2023
Merged
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
4 changes: 2 additions & 2 deletions docs/book/src/forc/manifest_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `Forc.toml` (the _manifest_ file) is a compulsory file for each package and
* `organization` — The organization of the project.
* `license`— The project license.
* `entry` — The entry point for the compiler to start parsing from.
* For the recomended way of selecting an entry point of large libraries please take a look at: [Libraries](./../sway-program-types/libraries.md)
* For the recommended way of selecting an entry point of large libraries please take a look at: [Libraries](./../sway-program-types/libraries.md)
* `implicit-std` - Controls whether provided `std` version (with the current `forc` version) will get added as a dependency _implicitly_. _Unless you know what you are doing, leave this as default._
* `forc-version` - The minimum forc version required for this project to work properly.

Expand Down Expand Up @@ -166,7 +166,7 @@ Note that each key after the `[patch]` is a URL of the source that is being patc

## The `[contract-dependencies]` section

The `[contract-dependenices]` table can be used to declare contract dependencies for a Sway contract or script. Contract dependencies are the set of contracts that our contract or script may interact with. Declaring `[contract-dependencies]` makes it easier to refer to contracts in your Sway source code without having to manually update IDs each time a new version is deployed. Instead, we can use forc to pin and update contract dependencies just like we do for regular library dependencies.
The `[contract-dependencies]` table can be used to declare contract dependencies for a Sway contract or script. Contract dependencies are the set of contracts that our contract or script may interact with. Declaring `[contract-dependencies]` makes it easier to refer to contracts in your Sway source code without having to manually update IDs each time a new version is deployed. Instead, we can use forc to pin and update contract dependencies just like we do for regular library dependencies.

Contracts declared under `[contract-dependencies]` are built and pinned just like regular `[dependencies]` however rather than importing each contract dependency's entire public namespace we instead import their respective contract IDs as `CONTRACT_ID` constants available via each contract dependency's namespace root. This means you can use a contract dependency's ID as if it were declared as a `pub const` in the root of the contract dependency package as demonstrated in the example below.

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/forc/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ members = ["member1", "path/to/member2"]
std = { git = "https://github.com/fuellabs/sway", branch = "test" }
```

In the above example each occurance of `std` as a dependency in the workspace will be changed with `std` from `test` branch of sway repo.
In the above example each occurrence of `std` as a dependency in the workspace will be changed with `std` from `test` branch of sway repo.

## Some `forc` commands that support workspaces

Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/sway-program-types/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ $ tree

As `internal_lib` is an internal library, it can be imported into `main.sw` as follows:

- Use the `mod` keyword followed by the library name to make the internal library a dependancy
- Use the `mod` keyword followed by the library name to make the internal library a dependency
- Use the `use` keyword with a `::` separating the name of the library and the imported item(s)

```sway
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/src/documentation/examples/wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The [`interface`](../language/program-types/contract.md) contains a function whi

## Implementation

When receiving funds we assert that the wallet accepts the base asset and we track the amount sent. When transfering funds out of the wallet we assert that only the owner can perform the transfer.
When receiving funds we assert that the wallet accepts the base asset and we track the amount sent. When transferring funds out of the wallet we assert that only the owner can perform the transfer.

```sway
{{#include ../../code/examples/wallet_example/src/main.sw:implementation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A smart contract consists of two parts:

<!--no toc-->
- [Application Binary Interface (`ABI`)](#application-binary-interface-abi)
- [Implementation of the `ABI`](#implementating-the-abi)
- [Implementation of the `ABI`](#implementation-the-abi)

## Application Binary Interface (`ABI`)

Expand All @@ -24,7 +24,7 @@ Inside the declaration are function signatures, annotations denoting the interac
{{#include ../../../code/language/program-types/contracts/interface/src/lib.sw}}
```

## Implementating the `ABI`
## Implementation the `ABI`

Similar to [traits](https://doc.rust-lang.org/rust-by-example/trait.html) in Rust implementing the `ABI` is done with the syntax `impl <name-of-abi> for Contract`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `revert` function is automatically imported into every program from the [pre
The function will behave differently depending on the context in which it is used:

- When used inside a [predicate](../../language/program-types/predicate.md) the function will panic and crash the program
- Otherwise it will revert the virutal machine
- Otherwise it will revert the virtual machine

## Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are two `storage` variables: `balance` & `user`. `balance` takes a single

## Reading from Storage

Retrieving data from a storage variable is done through the `.get(index)` method. That is to say that we state which index by specifiying it inside `.get()` and appending that to the end of the storage variable.
Retrieving data from a storage variable is done through the `.get(index)` method. That is to say that we state which index by specifying it inside `.get()` and appending that to the end of the storage variable.

In this example we look at how we can retrieve a single value `balance` and how we can unpack multiple values from `user`.

Expand Down
Loading