Skip to main content

Declaring Storage

On this page, you will learn how to define storage in your smart contract.

To learn more about how storage works in Aztec, read the concepts.

See the storage reference.

#[storage]
struct Storage {
// public state variables
// private state variables
}

If you have defined a struct and annotated it as #[storage], then it will be made available to you through the reserved storage keyword within your contract functions.