Skip to content

Commit

Permalink
fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
bchamagne committed Nov 29, 2023
1 parent 43c8076 commit 57dacfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/build/smart-contracts/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ sidebar_position: 3

A Smart Contract's state is persisted as an UTXO (unspent output) of the resulting transaction. Because of this, any state modification will result in a new transaction on the Smart Contract's transaction chain.

A state is a map with string as keys. You cannot access that map directly, instead, you have to use the module [State](build/smart-contracts/language/library/state) that provides the functions to read and write the state.
A state is a map with string as keys. You cannot access that map directly, instead, you have to use the module [State](/build/smart-contracts/language/library/state) that provides the functions to read and write the state.

When a contract is deployed, **it cannot have a state**. There is no initial state. So it's always good to deal with this case by using [State.get/2](build/smart-contracts/language/library/state/get2) where you provide a default value. Here's an example to give you an idea:
When a contract is deployed, **it cannot have a state**. There is no initial state. So it's always good to deal with this case by using [State.get/2](/build/smart-contracts/language/library/state#get2) where you provide a default value. Here's an example to give you an idea:

> Counter example
Expand Down

0 comments on commit 57dacfa

Please sign in to comment.