@@ -1667,31 +1667,27 @@ pub mod pallet {
16671667 Ok ( ( ) )
16681668 }
16691669
1670- // /// Change the SubnetOwnerHotkey for a given subnet.
1671- // ///
1672- // /// # Arguments
1673- // /// * `origin` - The origin of the call, which must be the subnet owner.
1674- // /// * `netuid` - The unique identifier for the subnet.
1675- // /// * `hotkey` - The new hotkey for the subnet owner.
1676- // ///
1677- // /// # Errors
1678- // /// * `BadOrigin` - If the caller is not the subnet owner or root account.
1679- // ///
1680- // /// # Weight
1681- // /// Weight is handled by the `#[pallet::weight]` attribute.
1682- // #[pallet::call_index(64)]
1683- // #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1684- // pub fn sudo_set_subnet_owner_hotkey(
1685- // origin: OriginFor<T>,
1686- // netuid: NetUid,
1687- // hotkey: <T as frame_system::Config>::AccountId,
1688- // ) -> DispatchResult {
1689- // pallet_subtensor::Pallet::<T>::ensure_subnet_owner(origin.clone(), netuid)?;
1690- // pallet_subtensor::Pallet::<T>::set_subnet_owner_hotkey(netuid, &hotkey);
1691-
1692- // log::debug!("SubnetOwnerHotkeySet( netuid: {netuid:?}, hotkey: {hotkey:?} )");
1693- // Ok(())
1694- // }
1670+ /// Change the SubnetOwnerHotkey for a given subnet.
1671+ ///
1672+ /// # Arguments
1673+ /// * `origin` - The origin of the call, which must be the subnet owner.
1674+ /// * `netuid` - The unique identifier for the subnet.
1675+ /// * `hotkey` - The new hotkey for the subnet owner.
1676+ ///
1677+ /// # Errors
1678+ /// * `BadOrigin` - If the caller is not the subnet owner or root account.
1679+ ///
1680+ /// # Weight
1681+ /// Weight is handled by the `#[pallet::weight]` attribute.
1682+ #[ pallet:: call_index( 64 ) ]
1683+ #[ pallet:: weight( ( 0 , DispatchClass :: Operational , Pays :: No ) ) ]
1684+ pub fn sudo_set_subnet_owner_hotkey (
1685+ origin : OriginFor < T > ,
1686+ netuid : NetUid ,
1687+ hotkey : <T as frame_system:: Config >:: AccountId ,
1688+ ) -> DispatchResult {
1689+ pallet_subtensor:: Pallet :: < T > :: do_set_sn_owner_hotkey ( origin, netuid, & hotkey)
1690+ }
16951691
16961692 ///
16971693 ///
0 commit comments