From 34b951d6d7e93c4df7fb53ccd423bf7beacba8a4 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:50:43 +0200 Subject: [PATCH 1/4] Fix: typo --- src/ch00-03-calling_other_contracts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch00-03-calling_other_contracts.md b/src/ch00-03-calling_other_contracts.md index 801652c7..95d83904 100644 --- a/src/ch00-03-calling_other_contracts.md +++ b/src/ch00-03-calling_other_contracts.md @@ -5,7 +5,7 @@ There are two different ways to call other contracts in Cairo. The easiest way to call other contracts is by using the dispatcher of the contract you want to call. You can read more about Dispatchers in the [Cairo Book](https://cairo-book.github.io/ch99-02-02-contract-dispatcher-library-dispatcher-and-system-calls.html#contract-dispatcher) -The other way is to use the `starknet::call_contract_syscall` syscall yourself. However, this method is not recommanded. +The other way is to use the `starknet::call_contract_syscall` syscall yourself. However, this method is not recommended. In order to call other contracts using dispatchers, you will need to define the called contract's interface as a trait annotated with the `#[abi]` attribute, and then import the `IContractDispatcher` and `IContractDispatcherTrait` items in your contract. From f2bd379fc0e8baad6e554920f1ed909ab78f8e83 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:52:30 +0200 Subject: [PATCH 2/4] Fix: typo --- src/ch01-01-upgradeable_contract.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch01-01-upgradeable_contract.md b/src/ch01-01-upgradeable_contract.md index a38b6a6d..d8bf30b3 100644 --- a/src/ch01-01-upgradeable_contract.md +++ b/src/ch01-01-upgradeable_contract.md @@ -5,7 +5,7 @@ instances. This division follows a similar concept used in object-oriented programming languages, where we distinguish between the definition and implementation of objects. -A contract class is the definition of a contract: it specify how the contract +A contract class is the definition of a contract: it specifies how the contract behaves. It contains essential information like the Cairo byte code, hint information, entry point names, and everything that defines its semantics unambiguously. From 3d439c32f5303771c5b14cdc144a09741ec59777 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:53:21 +0200 Subject: [PATCH 3/4] Fix: typo --- src/ch00-06-mappings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch00-06-mappings.md b/src/ch00-06-mappings.md index 4c05104a..530ca449 100644 --- a/src/ch00-06-mappings.md +++ b/src/ch00-06-mappings.md @@ -6,7 +6,7 @@ Here we demonstrate how to use the `LegacyMap` type within a Cairo contract, to Some additional notes: -- More complex key-value mapppings are possible, for example we could use `LegacyMap::<(ContractAddress, ContractAddress), felt252>` to create an allowance on an ERC20 token contract. +- More complex key-value mappings are possible, for example we could use `LegacyMap::<(ContractAddress, ContractAddress), felt252>` to create an allowance on an ERC20 token contract. - In mappings, the address of the value at key `k_1,...,k_n` is `h(...h(h(sn_keccak(variable_name),k_1),k_2),...,k_n)` where `ℎ` is the Pedersen hash and the final value is taken `mod2251−256`. You can learn more about the contract storage layout in the [Starknet Documentation](https://docs.starknet.io/documentation/architecture_and_concepts/Contracts/contract-storage/#storage_variables) From bad6c0fe82bdafce180a2115e6826b8da13c57c9 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:54:32 +0200 Subject: [PATCH 4/4] Fix: typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 22ebe2ea..1dbc5a6f 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,9 @@ All the Markdown files **MUST** be edited in english. To work locally in english The current book has script that verifies the compilation of all Cairo programs in the book. Instead of directly writing Cairo programs in the markdown files, we use code blocks that import the Cairo programs from the `listing` directory. -These programs are bundled into scarb packages, which makes it easier to test and build entier packages. +These programs are bundled into scarb packages, which makes it easier to test and build entire packages. -To run the script locally, ensure that you are at the root of the repository (same directoy of this `README.md` file), +To run the script locally, ensure that you are at the root of the repository (same directory as this `README.md` file), and run: `bash scripts/cairo_programs_verifier.sh`