Macros
- Computes and expands into the BLAKE2b 256-bit hash of the string input.
- Computes the ink! selector of the string and expands into its byte representation.
- Computes the ink! selector of the string and expands into its
u32representation.
Attribute Macros
- Defines the interface for a chain extension.
- Entry point for writing ink! smart contracts.
- Prepares the type to be fully compatible and usable with the storage. It implements all necessary traits and calculates the storage key for types.
Packedtypes don’t have a storage key, but non-packed types (likeMapping,Lazyetc.) require calculating the storage key during compilation. - Defines a unit test that makes use of ink!’s off-chain testing capabilities.
- Marks trait definitions to ink! as special ink! trait definitions.
Derive Macros
- Derives
ink::storage’sStorabletrait for the givenstruct,enumorunion. - Derives
ink::storage’sStorableHinttrait for the givenstructorenum. - Derives
ink::storage’sStorageKeytrait for the givenstructorenum. - Derives
ink::storage’sStorageLayouttrait for the givenstructorenum.