Skip to content

Commit

Permalink
docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 29, 2024
1 parent d9f5983 commit 215bafb
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ We have a `write` method on the `PublicMutable` struct that takes the value to w

`PublicImmutable` is a type that can be written once during a contract deployment and read later on from public only.

This makes the immutable public variables useful for stuff that you would usually have in `immutable` values in solidity. For example this can be the name of a token or its number of decimals.

Just like the `PublicMutable` it is generic over the variable type `T`. The type `MUST` implement Serialize and Deserialize traits.

You can find the details of `PublicImmutable` in the implementation [here](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/state_vars/public_immutable.nr).
Expand All @@ -111,12 +109,6 @@ Is done exactly like the `PublicMutable` struct, but with the `PublicImmutable`

#include_code initialize_public_immutable /noir-projects/noir-contracts/contracts/docs_example_contract/src/main.nr rust

:::warning Should only be called as part of the deployment.
If this is called outside the deployment transaction multiple values could be used down the line, potentially breaking the contract.

Currently this is not constrained as we are in the middle of changing deployments.
:::

### `read`

Reading the value is just like `PublicMutable`.
Expand Down

0 comments on commit 215bafb

Please sign in to comment.