aztec-nr - noir_aztec::macros::storage

Function storage_no_init

pub comptime fn storage_no_init(s: TypeDefinition)

Same as storage, except the user is in charge of providing an implementation of the init constructor function with signature fn init<Context>(context: Context) -> Self, which allows for manual control of storage slot allocation. Similarly, no StorageLayout struct will be created.

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 can have this macro (or storage_no_init) applied to it, and the struct has to be called 'Storage'.