Attribute Macro frame_support::pallet_macros::storage_version
source · #[storage_version]
Expand description
Allows defining a storage version for the pallet.
Because the pallet::pallet
macro implements
GetStorageVersion
, the current storage
version needs to be communicated to the macro. This can be done by using the
pallet::storage_version
attribute:
#[frame_support::pallet]
mod pallet {
const STORAGE_VERSION: StorageVersion = StorageVersion::new(5);
#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
pub struct Pallet<T>(_);
}
If not present, the current storage version is set to the default value.
Documentation for this macro can be found at frame_support::pallet_macros::storage_version
.