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.rsdiffbeforeafterboth69 }69 }707071 #[pallet::pallet]71 #[pallet::pallet]72 #[pallet::generate_store(pub(super) trait Store)]72 #[pallet::generate_store(trait Store)]73 pub struct Pallet<T>(_);73 pub struct Pallet<T>(_);747475 /// Store owner for contract.75 /// Store owner for contract.80 pub(super) type Owner<T: Config> =80 pub(super) type Owner<T: Config> =81 StorageMap<Hasher = Twox128, Key = H160, Value = H160, QueryKind = ValueQuery>;81 StorageMap<Hasher = Twox128, Key = H160, Value = H160, QueryKind = ValueQuery>;828283 /// Deprecated: this storage is deprecated83 #[pallet::storage]84 #[pallet::storage]84 #[deprecated]85 pub(super) type SelfSponsoring<T: Config> =85 type SelfSponsoring<T: Config> =86 StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;86 StorageMap<Hasher = Twox128, Key = H160, Value = bool, QueryKind = ValueQuery>;878788 /// Store for contract sponsorship state.88 /// Store for contract sponsorship state.349 }349 }350350351 /// Get current sponsoring mode, performing lazy migration from legacy storage351 /// Get current sponsoring mode, performing lazy migration from legacy storage352 /// Deprecated: this method is for deprecated storage352 pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {353 pub fn sponsoring_mode(contract: H160) -> SponsoringModeT {353 <SponsoringMode<T>>::get(contract)354 <SponsoringMode<T>>::get(contract)354 .or_else(|| {355 .or_else(|| {359 }360 }360361361 /// Reconfigure contract sponsoring mode362 /// Reconfigure contract sponsoring mode363 /// Deprecated: this method is for deprecated storage362 pub fn set_sponsoring_mode(contract: H160, mode: SponsoringModeT) {364 pub fn set_sponsoring_mode(contract: H160, mode: SponsoringModeT) {363 if mode == SponsoringModeT::Disabled {365 if mode == SponsoringModeT::Disabled {364 <SponsoringMode<T>>::remove(contract);366 <SponsoringMode<T>>::remove(contract);pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -266,10 +266,12 @@
/// * `token_prefix`: Byte string containing the token prefix to mark a collection
/// to which a token belongs (limit [`MAX_TOKEN_PREFIX_LENGTH`]).
/// * `mode`: Type of items stored in the collection and type dependent data.
- // returns collection ID
+ ///
+ /// returns collection ID
+ ///
+ /// Deprecated: `create_collection_ex` is more up-to-date and advanced, prefer it instead.
#[weight = <SelfWeightOf<T>>::create_collection()]
- #[deprecated(note = "`create_collection_ex` is more up-to-date and advanced, prefer it instead")]
- pub fn create_collection(
+ fn create_collection(
origin,
collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,