difftreelog
fix(foreign-assets) put storage version in genesis config
in: master
1 file changed
pallets/foreign-assets/src/lib.rsdiffbeforeafterboth898990#[frame_support::pallet]90#[frame_support::pallet]91pub mod module {91pub mod module {92 use frame_support::traits::BuildGenesisConfig;92 use pallet_common::CollectionIssuer;93 use pallet_common::CollectionIssuer;93 use up_data_structs::CollectionDescription;94 use up_data_structs::CollectionDescription;9495244 }245 }245 }246 }247248 #[pallet::genesis_config]249 #[derive(Default)]250 pub struct GenesisConfig<T: Config>(PhantomData<T>);251252 #[pallet::genesis_build]253 impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {254 fn build(&self) {255 <Pallet<T>>::in_code_storage_version().put::<Pallet<T>>();256 }257 }246258247 #[pallet::hooks]259 #[pallet::hooks]248 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {260 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {252 let fix_foreign_flag_weight = Self::fix_foreign_flag();264 let fix_foreign_flag_weight = Self::fix_foreign_flag();253 let weight_v3_to_v4 = Self::migrate_v3_to_v4();265 let weight_v3_to_v4 = Self::migrate_v3_to_v4();254266255 StorageVersion::new(staging_xcm::v4::VERSION as u16).put::<Self>();267 Self::in_code_storage_version().put::<Self>();256268257 put_version_weight269 put_version_weight258 .saturating_add(fix_foreign_flag_weight)270 .saturating_add(fix_foreign_flag_weight)