Attribute Macros§

  • The macro implements ink::storage_item macro for the struct, which means that it prepares your struct to be a part of contract’s storage. Also, inside of struct marked by this macro you can use #[lazy] attribute to mark fields, that should be lazily loaded and wrapped in ::ink::storage::Lazy. The macro also generates constant storage keys for every mapping or lazy field and inserts them into type definition following recomendation from https://use.ink/datastructures/storage-layout

Derive Macros§

  • The macro implements pendzl::traits::StorageFieldGetter trait for each field marked by #[storage_field] attribute, so it will be possible to access them via self.data::<Type>() method. It is mostly used for pendzl to understand which fields should be accessed by traits.