git.delta.rocks / unique-network / refs/commits / 2489f62d5707

difftreelog

Merge pull request #833 from UniqueNetwork/fix/fix-warnings

Yaroslav Bolyukin2023-01-18parents: #916ae42 #06c44dd.patch.diff
in: master

3 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -500,8 +500,16 @@
 		}
 	}
 
+	impl<T: Config> Pallet<T> {
+		/// Helper function that handles deposit events
+		pub fn deposit_event(event: Event<T>) {
+			let event = <T as Config>::RuntimeEvent::from(event);
+			let event = event.into();
+			<frame_system::Pallet<T>>::deposit_event(event)
+		}
+	}
+
 	#[pallet::event]
-	#[pallet::generate_deposit(pub fn deposit_event)]
 	pub enum Event<T: Config> {
 		/// New collection was created
 		CollectionCreated(
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -69,7 +69,7 @@
 	}
 
 	#[pallet::pallet]
-	#[pallet::generate_store(pub(super) trait Store)]
+	#[pallet::generate_store(trait Store)]
 	pub struct Pallet<T>(_);
 
 	/// Store owner for contract.
@@ -80,9 +80,9 @@
 	pub(super) type Owner<T: Config> =
 		StorageMap<Hasher = Twox128, Key = H160, Value = H160, QueryKind = ValueQuery>;
 
+	/// Deprecated: this storage is deprecated
 	#[pallet::storage]
-	#[deprecated]
-	pub(super) type SelfSponsoring<T: Config> =
+	type SelfSponsoring<T: Config> =
 		StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;
 
 	/// Store for contract sponsorship state.
@@ -349,6 +349,7 @@
 		}
 
 		/// Get current sponsoring mode, performing lazy migration from legacy storage
+		/// Deprecated: this method is for deprecated storage
 		pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {
 			<SponsoringMode<T>>::get(contract)
 				.or_else(|| {
@@ -359,6 +360,7 @@
 		}
 
 		/// Reconfigure contract sponsoring mode
+		/// Deprecated: this method is for deprecated storage
 		pub fn set_sponsoring_mode(contract: H160, mode: SponsoringModeT) {
 			if mode == SponsoringModeT::Disabled {
 				<SponsoringMode<T>>::remove(contract);
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
266 /// * `token_prefix`: Byte string containing the token prefix to mark a collection266 /// * `token_prefix`: Byte string containing the token prefix to mark a collection
267 /// to which a token belongs (limit [`MAX_TOKEN_PREFIX_LENGTH`]).267 /// to which a token belongs (limit [`MAX_TOKEN_PREFIX_LENGTH`]).
268 /// * `mode`: Type of items stored in the collection and type dependent data.268 /// * `mode`: Type of items stored in the collection and type dependent data.
269 ///
269 // returns collection ID270 /// returns collection ID
271 ///
272 /// Deprecated: `create_collection_ex` is more up-to-date and advanced, prefer it instead.
270 #[weight = <SelfWeightOf<T>>::create_collection()]273 #[weight = <SelfWeightOf<T>>::create_collection()]
271 #[deprecated(note = "`create_collection_ex` is more up-to-date and advanced, prefer it instead")]
272 pub fn create_collection(274 fn create_collection(
273 origin,275 origin,
274 collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,276 collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
275 collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,277 collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,