diff --git a/docs/book/src/forc/manifest_reference.md b/docs/book/src/forc/manifest_reference.md index 2924cd07553..be543ccef50 100644 --- a/docs/book/src/forc/manifest_reference.md +++ b/docs/book/src/forc/manifest_reference.md @@ -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. @@ -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. diff --git a/docs/book/src/forc/workspaces.md b/docs/book/src/forc/workspaces.md index 7f4ab6d608a..9ba96d65fa9 100644 --- a/docs/book/src/forc/workspaces.md +++ b/docs/book/src/forc/workspaces.md @@ -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 diff --git a/docs/book/src/sway-program-types/libraries.md b/docs/book/src/sway-program-types/libraries.md index 04abbc03ab9..37c30554d05 100644 --- a/docs/book/src/sway-program-types/libraries.md +++ b/docs/book/src/sway-program-types/libraries.md @@ -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 diff --git a/docs/reference/src/documentation/examples/wallet.md b/docs/reference/src/documentation/examples/wallet.md index 2da0e801887..5aef3c95160 100644 --- a/docs/reference/src/documentation/examples/wallet.md +++ b/docs/reference/src/documentation/examples/wallet.md @@ -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}} diff --git a/docs/reference/src/documentation/language/program-types/contract.md b/docs/reference/src/documentation/language/program-types/contract.md index dd4c4d3fa52..364033a8f3f 100644 --- a/docs/reference/src/documentation/language/program-types/contract.md +++ b/docs/reference/src/documentation/language/program-types/contract.md @@ -8,7 +8,7 @@ A smart contract consists of two parts: - [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`) @@ -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 for Contract`. diff --git a/docs/reference/src/documentation/operations/assertions/revert.md b/docs/reference/src/documentation/operations/assertions/revert.md index a525fbe05e7..bf528c0f7b7 100644 --- a/docs/reference/src/documentation/operations/assertions/revert.md +++ b/docs/reference/src/documentation/operations/assertions/revert.md @@ -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 diff --git a/docs/reference/src/documentation/operations/storage/libraries/storage-vec.md b/docs/reference/src/documentation/operations/storage/libraries/storage-vec.md index de717b6a50f..9e9380df129 100644 --- a/docs/reference/src/documentation/operations/storage/libraries/storage-vec.md +++ b/docs/reference/src/documentation/operations/storage/libraries/storage-vec.md @@ -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`.