diff --git a/docs/learn/tutorials/cross-calls/cross-calls.md b/docs/learn/tutorials/cross-calls/cross-calls.md index c50d791..e39bcc2 100644 --- a/docs/learn/tutorials/cross-calls/cross-calls.md +++ b/docs/learn/tutorials/cross-calls/cross-calls.md @@ -454,7 +454,7 @@ pub fn get_addresses(&self) -> Vec { } ``` -Same in `MainContract`. We will have `get_addesses_call`, `flip_delegate`, `get_delegate` and `get_addresses_delegate`. +Same in `MainContract`. We will have `get_addresses_call`, `flip_delegate`, `get_delegate` and `get_addresses_delegate`. Filename: main_contract/ diff --git a/docs/learn/tutorials/dex/factory/create-pair.md b/docs/learn/tutorials/dex/factory/create-pair.md index cea005b..2064c11 100644 --- a/docs/learn/tutorials/dex/factory/create-pair.md +++ b/docs/learn/tutorials/dex/factory/create-pair.md @@ -10,7 +10,7 @@ If you are starting the tutorial from here, please check out this [branch](https We will implement the [createPair](https://github.com/Uniswap/v2-core/blob/ee547b17853e71ed4e0101ccfd52e70d5acded58/contracts/UniswapV2Factory.sol#L23) function of the Factory contract. In the *./logics/traits/factory.rs* file, add the **create_pair** function to the Factory trait, as well as the internal child function **_instantiate_pair** that will need to be implemented in the contract crate. -The reason why we need an internal **_instantiate_pair** function here is because the instantiate builder is not part of the `#[openbrush::wrapper]`, so we will need to use the one from ink! by importing the Pair contract as an `ink-as-dependancy`. +The reason why we need an internal **_instantiate_pair** function here is because the instantiate builder is not part of the `#[openbrush::wrapper]`, so we will need to use the one from ink! by importing the Pair contract as an `ink-as-dependency`. The **create_pair** message function returns the address of the instantiated Pair contract. The function that emits a create_pair event will also have to be implemented in the contract: ```rust diff --git a/docs/learn/tutorials/dex/pair/storage.md b/docs/learn/tutorials/dex/pair/storage.md index 2c2d856..4ae1a32 100644 --- a/docs/learn/tutorials/dex/pair/storage.md +++ b/docs/learn/tutorials/dex/pair/storage.md @@ -189,7 +189,7 @@ pub trait Pair { } ``` -Openbrush provides `#[openbrush::trait_definition]` that will make sure your trait (and its default implementation) will be generated in the contract. Also, you can create a wrapper around this trait so it can be used for cross-contract calls (so no need to import the contract as ink-as-dependancy). Import what is needed from Openbrush: +Openbrush provides `#[openbrush::trait_definition]` that will make sure your trait (and its default implementation) will be generated in the contract. Also, you can create a wrapper around this trait so it can be used for cross-contract calls (so no need to import the contract as ink-as-dependency). Import what is needed from Openbrush: ```rust use openbrush::traits::{ diff --git a/docs/learn/tutorials/dex/structure/file-structure.md b/docs/learn/tutorials/dex/structure/file-structure.md index 87bb394..a110e7e 100644 --- a/docs/learn/tutorials/dex/structure/file-structure.md +++ b/docs/learn/tutorials/dex/structure/file-structure.md @@ -36,7 +36,7 @@ Therefore, the only solution, in ink!, is to implement an omnibus contract with In order to organise the business logic into different files, OpenBrush uses [specialization](https://github.com/rust-lang/rfcs/pull/1210) that permits multiple `impl` blocks to be applied to the same type. With OpenBrush, you can define as many Trait and generic implementations as are needed, which allows you to split up your code to more easily implement it into your contract. Of course, specialization also allows you to override a default implementation (if the method or impl is specialized with the [`default`](https://github.com/rust-lang/rfcs/blob/master/text/1210-impl-specialization.md#the-default-keyword) keyword). -So you define a Trait and a generic implementation in a crate and within the contract you implement this Trait. If this impl block is empty `{}` specialization will implement the most specific implementation, which is the one you defined in the file. Every generic implementation in Openbrush (PSP22, PSP34, ..) uses the `default` keyword that makes these functions *overrideable*. +So you define a Trait and a generic implementation in a crate and within the contract you implement this Trait. If this impl block is empty `{}` specialization will implement the most specific implementation, which is the one you defined in the file. Every generic implementation in Openbrush (PSP22, PSP34, ..) uses the `default` keyword that makes these functions *overridable*. Define your Trait in a file: