From fd790373e1a8f687c2d8ae0224382800829f90d6 Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Fri, 12 Nov 2021 13:08:55 +0000 Subject: [PATCH] Merge branch 'feature/internal-audit' of github.com:UniqueNetwork/unique-chain into feature/internal-audit --- --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -162,7 +162,7 @@ 0 } - /// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner and admin of the collection are set to the address that signed the transaction. Both addresses can be changed later. + /// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner of the collection is set to the address that signed the transaction and can be changed later. /// /// # Permissions /// --- a/pallets/scheduler/src/lib.rs +++ b/pallets/scheduler/src/lib.rs @@ -62,7 +62,7 @@ traits::{Zero, One, BadOrigin, Saturating}, }; use frame_support::{ - decl_module, decl_storage, decl_event, decl_error, IterableStorageMap, + decl_module, decl_storage, decl_event, decl_error, dispatch::{Dispatchable, DispatchError, DispatchResult, Parameter}, traits::{ Get, @@ -456,63 +456,6 @@ } impl Module { - /// Migrate storage format from V1 to V2. - /// Return true if migration is performed. - pub fn migrate_v1_to_t2() -> bool { - if StorageVersion::get() == Releases::V1 { - StorageVersion::put(Releases::V2); - - Agenda::::translate::< - Vec::Call, T::BlockNumber>>>, - _, - >(|_, agenda| { - Some( - agenda - .into_iter() - .map(|schedule| { - schedule.map(|schedule| ScheduledV2 { - maybe_id: schedule.maybe_id, - priority: schedule.priority, - call: schedule.call, - maybe_periodic: schedule.maybe_periodic, - origin: system::RawOrigin::Root.into(), - _phantom: Default::default(), - }) - }) - .collect::>(), - ) - }); - - true - } else { - false - } - } - - /// Helper to migrate scheduler when the pallet origin type has changed. - pub fn migrate_origin + codec::Decode>() { - Agenda::::translate::< - Vec::Call, T::BlockNumber, OldOrigin, T::AccountId>>>, - _, - >(|_, agenda| { - Some( - agenda - .into_iter() - .map(|schedule| { - schedule.map(|schedule| Scheduled { - maybe_id: schedule.maybe_id, - priority: schedule.priority, - call: schedule.call, - maybe_periodic: schedule.maybe_periodic, - origin: schedule.origin.into(), - _phantom: Default::default(), - }) - }) - .collect::>(), - ) - }); - } - fn resolve_time(when: DispatchTime) -> Result { let now = frame_system::Pallet::::block_number(); -- gitstuff