Skip to content

Commit

Permalink
fixed minor typo (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Utilitycoder authored Sep 28, 2023
1 parent f17fe80 commit a08c32e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch00-08-visibility-mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ These functions are also typically divided into two different implementations bl
## State Mutability

Regardless of whether a function is internal or external, it can either modify the contract's state or not. When we declare functions that interact with storage variables inside a smart contract,
we need to explicitly state that we are accessing the `ContractState` by adding it as the first parameter of the function. This is can be done in two different ways:
we need to explicitly state that we are accessing the `ContractState` by adding it as the first parameter of the function. This can be done in two different ways:

- If we want our function to be able to mutate the state of the contract, we pass it by reference like this: `ref self: ContractState`.
- If we want our function to be read-only and not mutate the state of the contract, we pass it by snapshot like this: `self: @ContractState`.
Expand Down

0 comments on commit a08c32e

Please sign in to comment.