Skip to content

Commit

Permalink
remove WIP note on storage attributes (#2016)
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna authored Jun 16, 2022
1 parent c37135d commit 3ce5945
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions docs/src/blockchain-development/purity.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Purity

**_The attributes `#[storage(read)]` and `#[storage(read, write]` introduced below are still in active development. There is no need to apply them at the moment._**

A function is _pure_ if it does not access any [persistent storage](./storage.md). Conversely, the function is _impure_ if it does access any storage. Naturally, as storage is only available in smart contracts, impure functions cannot be used in predicates, scripts, or libraries. A pure function cannot call an impure function.

In Sway, functions are pure by default but can be opted into impurity via the `storage` function attribute. The `storage` attribute may take `read` and/or `write` arguments indicating which type of access the function requires.
Expand Down

0 comments on commit 3ce5945

Please sign in to comment.