Attribute Macro frame_support::pallet_macros::storage_prefix

source ·
#[storage_prefix]
Expand description

Defines what storage prefix to use for a storage item when building the trie.

This is helpful if you wish to rename the storage field but don’t want to perform a migration.

§Example

#[frame_support::pallet]
mod pallet {
	#[pallet::pallet]
	pub struct Pallet<T>(_);

	#[pallet::storage]
	#[pallet::storage_prefix = "foo"]
	pub type MyStorage<T> = StorageValue<_, u32>;
}

Documentation for this macro can be found at frame_support::pallet_macros::storage_prefix.