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
500 }500 }
501 }501 }
502
503 impl<T: Config> Pallet<T> {
504 /// Helper function that handles deposit events
505 pub fn deposit_event(event: Event<T>) {
506 let event = <T as Config>::RuntimeEvent::from(event);
507 let event = event.into();
508 <frame_system::Pallet<T>>::deposit_event(event)
509 }
510 }
502511
503 #[pallet::event]512 #[pallet::event]
504 #[pallet::generate_deposit(pub fn deposit_event)]
505 pub enum Event<T: Config> {513 pub enum Event<T: Config> {
506 /// New collection was created514 /// New collection was created
507 CollectionCreated(515 CollectionCreated(
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
69 }69 }
7070
71 #[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>(_);
7474
75 /// 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>;
8282
83 /// Deprecated: this storage is deprecated
83 #[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>;
8787
88 /// Store for contract sponsorship state.88 /// Store for contract sponsorship state.
349 }349 }
350350
351 /// Get current sponsoring mode, performing lazy migration from legacy storage351 /// Get current sponsoring mode, performing lazy migration from legacy storage
352 /// Deprecated: this method is for deprecated storage
352 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 }
360361
361 /// Reconfigure contract sponsoring mode362 /// Reconfigure contract sponsoring mode
363 /// Deprecated: this method is for deprecated storage
362 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);
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>>,