difftreelog
Merge pull request #833 from UniqueNetwork/fix/fix-warnings
in: master
3 files changed
pallets/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(
pallets/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);
pallets/unique/src/lib.rsdiffbeforeafterboth266 /// * `token_prefix`: Byte string containing the token prefix to mark a collection266 /// * `token_prefix`: Byte string containing the token prefix to mark a collection267 /// 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 ID271 ///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>>,