aztec-nr - noir_aztec::state_vars

Module state_vars

Storage for contract state.

Contracts store their state in state variables. In Solidity, a state variable is simply any value declared inside a contract, e.g. contract Token { uint256 totalSupply; }, and they can be one of many kinds (primitive values, mappings, arrays, immutable, etc.).

Due to Aztec contracts being able to store both public and private state, there are many more different types of state variables, each with their nuance and use cases. Understanding these is key to understanding how a contract works.

Structs

Traits