aztec-nr - noir_aztec::macros::storage

Function storage

pub comptime fn storage(s: TypeDefinition) -> Quoted

Marks a struct as the one describing the storage layout of a contract.

The contract's storage is accessed via the storage variable, which will will automatically be made available in all functions as an instance of the struct this macro was applied to.

Only a single struct in the entire contract should have this macro (or storage_no_init) applied to it, and the struct has to be called 'Storage'.