#[storage_version]
Expand description

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:

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.