--- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -500,8 +500,16 @@ } } + impl Pallet { + /// Helper function that handles deposit events + pub fn deposit_event(event: Event) { + let event = ::RuntimeEvent::from(event); + let event = event.into(); + >::deposit_event(event) + } + } + #[pallet::event] - #[pallet::generate_deposit(pub fn deposit_event)] pub enum Event { /// New collection was created CollectionCreated( --- 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(_); /// Store owner for contract. @@ -80,9 +80,9 @@ pub(super) type Owner = StorageMap; + /// Deprecated: this storage is deprecated #[pallet::storage] - #[deprecated] - pub(super) type SelfSponsoring = + type SelfSponsoring = StorageMap; /// 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 { >::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 { >::remove(contract); --- 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 = >::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>, collection_description: BoundedVec>,