difftreelog
Merge pull request #920 from UniqueNetwork/fix/on-runtime-upgrade
in: master
9 files changed
Cargo.lockdiffbeforeafterboth599659965997[[package]]5997[[package]]5998name = "pallet-app-promotion"5998name = "pallet-app-promotion"5999version = "0.1.5"5999version = "0.1.6"6000dependencies = [6000dependencies = [6001 "frame-benchmarking",6001 "frame-benchmarking",6002 "frame-support",6002 "frame-support",node/cli/src/chain_spec.rsdiffbeforeafterboth167 .map(|k| (k, 1 << 100))167 .map(|k| (k, 1 << 100))168 .collect(),168 .collect(),169 },169 },170 common: Default::default(),171 nonfungible: Default::default(),170 treasury: Default::default(),172 treasury: Default::default(),171 tokens: TokensConfig { balances: vec![] },173 tokens: TokensConfig { balances: vec![] },172 sudo: SudoConfig {174 sudo: SudoConfig {225 .expect("WASM binary was not build, please build it!")227 .expect("WASM binary was not build, please build it!")226 .to_vec(),228 .to_vec(),227 },229 },230 common: Default::default(),231 nonfungible: Default::default(),228 balances: BalancesConfig {232 balances: BalancesConfig {229 balances: $endowed_accounts233 balances: $endowed_accounts230 .iter()234 .iter()pallets/app-promotion/CHANGELOG.mddiffbeforeafterboth3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.445<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->6## [0.1.6] - 2023-04-19678- ### Fixed910- Useless `on_runtime_upgrade()` has been removed117## [0.1.5] - 2023-02-1412## [0.1.5] - 2023-02-148139### Added14### Addedpallets/app-promotion/Cargo.tomldiffbeforeafterboth9license = 'GPLv3'9license = 'GPLv3'10name = 'pallet-app-promotion'10name = 'pallet-app-promotion'11repository = 'https://github.com/UniqueNetwork/unique-chain'11repository = 'https://github.com/UniqueNetwork/unique-chain'12version = '0.1.5'12version = '0.1.6'131314[package.metadata.docs.rs]14[package.metadata.docs.rs]15targets = ['x86_64-unknown-linux-gnu']15targets = ['x86_64-unknown-linux-gnu']pallets/app-promotion/src/lib.rsdiffbeforeafterboth263 pub type PreviousCalculatedRecord<T: Config> =263 pub type PreviousCalculatedRecord<T: Config> =264 StorageValue<Value = (T::AccountId, T::BlockNumber), QueryKind = OptionQuery>;264 StorageValue<Value = (T::AccountId, T::BlockNumber), QueryKind = OptionQuery>;265266 #[pallet::storage]267 pub(crate) type UpgradedToReserves<T: Config> =268 StorageValue<Value = bool, QueryKind = ValueQuery>;269265270 #[pallet::hooks]266 #[pallet::hooks]271 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {267 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {291 <T as Config>::WeightInfo::on_initialize(counter)287 <T as Config>::WeightInfo::on_initialize(counter)292 }288 }293294 fn on_runtime_upgrade() -> Weight {295 <UpgradedToReserves<T>>::kill();296297 T::DbWeight::get().reads_writes(0, 1)298 }299 }289 }300290301 #[pallet::call]291 #[pallet::call]pallets/common/CHANGELOG.mddiffbeforeafterboth3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.445<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->6## [0.1.14] - 2023-04-19678- ### Fixed910- Useless `on_runtime_upgrade()` has been removed117## [0.1.14] - 2023-03-2812## [0.1.14] - 2023-03-288139### Added14### Added82However, we don't use prefix removal limits, so upgrade is87However, we don't use prefix removal limits, so upgrade is83straightforward88straightforward848985Upstream-Change: https://github.com/paritytech/substrate/pull/1149090Upstream-Change: <https://github.com/paritytech/substrate/pull/11490>869187- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b92- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b8893pallets/common/src/lib.rsdiffbeforeafterboth420420421#[frame_support::pallet]421#[frame_support::pallet]422pub mod pallet {422pub mod pallet {423 use core::marker::PhantomData;424423 use super::*;425 use super::*;424 use dispatch::CollectionDispatch;426 use dispatch::CollectionDispatch;425 use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};427 use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};426 use frame_system::pallet_prelude::*;427 use frame_support::traits::Currency;428 use frame_support::traits::Currency;428 use up_data_structs::{TokenId, mapping::TokenAddressMapping};429 use up_data_structs::{TokenId, mapping::TokenAddressMapping};429 use scale_info::TypeInfo;430 use scale_info::TypeInfo;479 }480 }480 }481 }482483 #[pallet::genesis_config]484 pub struct GenesisConfig<T>(PhantomData<T>);485486 #[cfg(feature = "std")]487 impl<T: Config> Default for GenesisConfig<T> {488 fn default() -> Self {489 Self(Default::default())490 }491 }492493 #[pallet::genesis_build]494 impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {495 fn build(&self) {496 StorageVersion::new(1).put::<Pallet<T>>();497 }498 }481499482 impl<T: Config> Pallet<T> {500 impl<T: Config> Pallet<T> {483 /// Helper function that handles deposit events501 /// Helper function that handles deposit events870 QueryKind = OptionQuery,888 QueryKind = OptionQuery,871 >;889 >;872873 #[pallet::hooks]874 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {875 fn on_runtime_upgrade() -> Weight {876 StorageVersion::new(1).put::<Pallet<T>>();877878 Weight::zero()879 }880 }881}890}882891883impl<T: Config> Pallet<T> {892impl<T: Config> Pallet<T> {pallets/nonfungible/CHANGELOG.mddiffbeforeafterboth3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.445<!-- bureaucrate goes here -->5<!-- bureaucrate goes here -->6## [0.1.14] - 2023-04-19678- ### Fixed910- Useless `on_runtime_upgrade()` has been removed117## [0.1.14] - 2023-03-2812## [0.1.14] - 2023-03-288139### Fixed14### Fixed83However, we don't use prefix removal limits, so upgrade is88However, we don't use prefix removal limits, so upgrade is84straightforward89straightforward859086Upstream-Change: https://github.com/paritytech/substrate/pull/1149091Upstream-Change: <https://github.com/paritytech/substrate/pull/11490>879288- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b93- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b8994pallets/nonfungible/src/lib.rsdiffbeforeafterboth283 QueryKind = ValueQuery,283 QueryKind = ValueQuery,284 >;284 >;285285286 /// Upgrade from the old schema to properties.286 #[pallet::genesis_config]287 pub struct GenesisConfig<T>(PhantomData<T>);288289 #[cfg(feature = "std")]290 impl<T: Config> Default for GenesisConfig<T> {291 fn default() -> Self {292 Self(Default::default())293 }294 }295287 #[pallet::hooks]296 #[pallet::genesis_build]288 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {297 impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {289 fn on_runtime_upgrade() -> Weight {298 fn build(&self) {290 StorageVersion::new(1).put::<Pallet<T>>();299 StorageVersion::new(1).put::<Pallet<T>>();291292 Weight::zero()293 }300 }294 }301 }295}302}