git.delta.rocks / unique-network / refs/commits / 2c040b3e73e9

difftreelog

fix unused `on_runtime_upgrade()` was removed

PraetorP2023-04-19parent: #6e3cf5e.patch.diff
in: master
- AppPromo
- Common
- NonFungible

10 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5996,7 +5996,7 @@
 
 [[package]]
 name = "pallet-app-promotion"
-version = "0.1.5"
+version = "0.1.6"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6262,7 +6262,7 @@
 
 [[package]]
 name = "pallet-common"
-version = "0.1.13"
+version = "0.1.14"
 dependencies = [
  "ethereum",
  "evm-coder",
@@ -6814,7 +6814,7 @@
 
 [[package]]
 name = "pallet-nonfungible"
-version = "0.1.13"
+version = "0.1.14"
 dependencies = [
  "evm-coder",
  "frame-benchmarking",
modifiedpallets/app-promotion/CHANGELOG.mddiffbeforeafterboth
--- a/pallets/app-promotion/CHANGELOG.md
+++ b/pallets/app-promotion/CHANGELOG.md
@@ -3,6 +3,11 @@
 All notable changes to this project will be documented in this file.
 
 <!-- bureaucrate goes here -->
+## [0.1.6] - 2023-04-19
+
+- ### Fixed
+
+- Useless `on_runtime_upgrade()` has been removed
 
 ## [0.1.5] - 2023-02-14
 
modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -9,7 +9,7 @@
 license = 'GPLv3'
 name = 'pallet-app-promotion'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.5'
+version = '0.1.6'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedpallets/app-promotion/src/lib.rsdiffbeforeafterboth
--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -263,10 +263,6 @@
 	pub type PreviousCalculatedRecord<T: Config> =
 		StorageValue<Value = (T::AccountId, T::BlockNumber), QueryKind = OptionQuery>;
 
-	#[pallet::storage]
-	pub(crate) type UpgradedToReserves<T: Config> =
-		StorageValue<Value = bool, QueryKind = ValueQuery>;
-
 	#[pallet::hooks]
 	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
 		/// Block overflow is impossible due to the fact that the unstake algorithm in on_initialize
@@ -289,12 +285,6 @@
 			}
 
 			<T as Config>::WeightInfo::on_initialize(counter)
-		}
-
-		fn on_runtime_upgrade() -> Weight {
-			<UpgradedToReserves<T>>::kill();
-
-			T::DbWeight::get().reads_writes(0, 1)
 		}
 	}
 
modifiedpallets/common/CHANGELOG.mddiffbeforeafterboth
--- a/pallets/common/CHANGELOG.md
+++ b/pallets/common/CHANGELOG.md
@@ -3,7 +3,12 @@
 All notable changes to this project will be documented in this file.
 
 <!-- bureaucrate goes here -->
+## [0.1.14] - 2023-04-19
+
+- ### Fixed
 
+- Useless `on_runtime_upgrade()` has been removed
+
 ## [0.1.13] - 2023-01-20
 
 ### Changed
@@ -76,7 +81,7 @@
 However, we don't use prefix removal limits, so upgrade is
 straightforward
 
-Upstream-Change: https://github.com/paritytech/substrate/pull/11490
+Upstream-Change: <https://github.com/paritytech/substrate/pull/11490>
 
 - build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b
 
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -2,7 +2,7 @@
 edition = "2021"
 license = "GPLv3"
 name = "pallet-common"
-version = "0.1.13"
+version = "0.1.14"
 
 [dependencies]
 # Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -869,15 +869,6 @@
 		),
 		QueryKind = OptionQuery,
 	>;
-
-	#[pallet::hooks]
-	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
-		fn on_runtime_upgrade() -> Weight {
-			StorageVersion::new(1).put::<Pallet<T>>();
-
-			Weight::zero()
-		}
-	}
 }
 
 impl<T: Config> Pallet<T> {
modifiedpallets/nonfungible/CHANGELOG.mddiffbeforeafterboth
before · pallets/nonfungible/CHANGELOG.md
1# Change Log23All notable changes to this project will be documented in this file.45<!-- bureaucrate goes here -->67## [0.1.13] - 2023-01-2089### Fixed1011- The weight of properties when creating an item.1213## [0.1.12] - 2022-12-161415### Added1617- The function `tokenPropertyPermissions` and `setTokenPropertyPermissions` to `TokenProperties` interface.1819### Changed2021- Hide `setTokenPropertyPermission` function in `TokenProperties` interface.2223## [0.1.11] - 2022-12-012425### Added2627- The functions `mintCross` to `ERC721UniqueExtensions` interface.2829## [0.1.10] - 2022-11-183031### Added3233- The functions `description`, `crossOwnerOf`, `tokenProperties` to `ERC721UniqueExtensions` interface.3435## [0.1.9] - 2022-11-143637### Changed3839- Added `transfer_cross` in eth functions.4041## [v0.1.8] - 2022-11-114243### Changed4445- Added `delete_properties` in eth functions. The `delete_property` function is now deprecated.4647## [v0.1.7] - 2022-11-024849### Changed5051- Use named structure `EthCrossAccount` in eth functions.5253## [v0.1.6] - 2022-20-105455### Change5657- Added `set_properties` method for `TokenProperties` interface.5859## [v0.1.5] - 2022-08-246061### Change6263- Add bound `AsRef<[u8; 32]>` to `T::CrossAccountId`.6465## [v0.1.4] 2022-08-166667### Other changes6869- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a7071- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf87273- refactor: Switch to new prefix removal methods 26734e9567589d75cdd99e404eabf11d5a97d9757475New methods allows to call `remove_prefix` with limit multiple times76in the same block77However, we don't use prefix removal limits, so upgrade is78straightforward7980Upstream-Change: https://github.com/paritytech/substrate/pull/114908182- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b8384## [0.1.2] - 2022-07-258586### Changed8788- New `token_uri` retrieval logic:8990      If the collection has a `url` property and it is not empty, it is returned.91      Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.9293      If the property `baseURI` is empty or absent, return "" (empty string)94      otherwise, if property `suffix` present and is non-empty, return concatenation of baseURI and suffix95      otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).9697## [0.1.1] - 2022-07-149899### Added100101- Implementation of RPC method `token_owners`.102  For reasons of compatibility with this pallet, returns only one owner if token exists.103  This was an internal request to improve the web interface and support fractionalization event.
after · pallets/nonfungible/CHANGELOG.md
1# Change Log23All notable changes to this project will be documented in this file.45<!-- bureaucrate goes here -->6## [0.1.14] - 2023-04-1978- ### Fixed910- Useless `on_runtime_upgrade()` has been removed1112## [0.1.13] - 2023-01-201314### Fixed1516- The weight of properties when creating an item.1718## [0.1.12] - 2022-12-161920### Added2122- The function `tokenPropertyPermissions` and `setTokenPropertyPermissions` to `TokenProperties` interface.2324### Changed2526- Hide `setTokenPropertyPermission` function in `TokenProperties` interface.2728## [0.1.11] - 2022-12-012930### Added3132- The functions `mintCross` to `ERC721UniqueExtensions` interface.3334## [0.1.10] - 2022-11-183536### Added3738- The functions `description`, `crossOwnerOf`, `tokenProperties` to `ERC721UniqueExtensions` interface.3940## [0.1.9] - 2022-11-144142### Changed4344- Added `transfer_cross` in eth functions.4546## [v0.1.8] - 2022-11-114748### Changed4950- Added `delete_properties` in eth functions. The `delete_property` function is now deprecated.5152## [v0.1.7] - 2022-11-025354### Changed5556- Use named structure `EthCrossAccount` in eth functions.5758## [v0.1.6] - 2022-20-105960### Change6162- Added `set_properties` method for `TokenProperties` interface.6364## [v0.1.5] - 2022-08-246566### Change6768- Add bound `AsRef<[u8; 32]>` to `T::CrossAccountId`.6970## [v0.1.4] 2022-08-167172### Other changes7374- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a7576- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf87778- refactor: Switch to new prefix removal methods 26734e9567589d75cdd99e404eabf11d5a97d9757980New methods allows to call `remove_prefix` with limit multiple times81in the same block82However, we don't use prefix removal limits, so upgrade is83straightforward8485Upstream-Change: <https://github.com/paritytech/substrate/pull/11490>8687- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b8889## [0.1.2] - 2022-07-259091### Changed9293- New `token_uri` retrieval logic:9495      If the collection has a `url` property and it is not empty, it is returned.96      Else If the collection does not have a property with key `schemaName` or its value is not equal to `ERC721Metadata`, it return an error `tokenURI not set`.9798      If the property `baseURI` is empty or absent, return "" (empty string)99      otherwise, if property `suffix` present and is non-empty, return concatenation of baseURI and suffix100      otherwise, return concatenation of `baseURI` and stringified token id (decimal stringifying, without paddings).101102## [0.1.1] - 2022-07-14103104### Added105106- Implementation of RPC method `token_owners`.107  For reasons of compatibility with this pallet, returns only one owner if token exists.108  This was an internal request to improve the web interface and support fractionalization event.
modifiedpallets/nonfungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -2,7 +2,7 @@
 edition = "2021"
 license = "GPLv3"
 name = "pallet-nonfungible"
-version = "0.1.13"
+version = "0.1.14"
 
 [dependencies]
 # Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -281,16 +281,6 @@
 		Value = bool,
 		QueryKind = ValueQuery,
 	>;
-
-	/// Upgrade from the old schema to properties.
-	#[pallet::hooks]
-	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
-		fn on_runtime_upgrade() -> Weight {
-			StorageVersion::new(1).put::<Pallet<T>>();
-
-			Weight::zero()
-		}
-	}
 }
 
 pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);