@@ -44,7 +44,7 @@ mod registration;
4444mod root;
4545mod serving;
4646mod staking;
47- mod swap ;
47+ mod swap_coldkey ;
4848mod swap_hotkey;
4949mod uids;
5050mod utils;
@@ -726,7 +726,7 @@ pub mod pallet {
726726 #[ pallet:: storage] // --- MAP ( netuid ) --> last_mechanism_step_block
727727 pub type LastMechansimStepBlock < T > =
728728 StorageMap < _ , Identity , u16 , u64 , ValueQuery , DefaultLastMechanismStepBlock < T > > ;
729- #[ pallet:: storage] // --- MAP ( netuid ) --> subnet_owner
729+ #[ pallet:: storage] // --- MAP ( netuid ) --> (cold) subnet_owner
730730 pub type SubnetOwner < T : Config > =
731731 StorageMap < _ , Identity , u16 , T :: AccountId , ValueQuery , DefaultSubnetOwner < T > > ;
732732 #[ pallet:: storage] // --- MAP ( netuid ) --> subnet_locked
@@ -801,10 +801,10 @@ pub mod pallet {
801801 #[ pallet:: storage] // --- ITEM ( tx_rate_limit )
802802 pub type TxDelegateTakeRateLimit < T > =
803803 StorageValue < _ , u64 , ValueQuery , DefaultTxDelegateTakeRateLimit < T > > ;
804- #[ pallet:: storage] // --- MAP ( key ) --> last_block
804+ #[ pallet:: storage] // --- MAP ( hotkey ) --> last_block
805805 pub type LastTxBlock < T : Config > =
806806 StorageMap < _ , Identity , T :: AccountId , u64 , ValueQuery , DefaultLastTxBlock < T > > ;
807- #[ pallet:: storage] // --- MAP ( key ) --> last_block
807+ #[ pallet:: storage] // --- MAP ( hotkey ) --> last_block
808808 pub type LastTxBlockDelegateTake < T : Config > =
809809 StorageMap < _ , Identity , T :: AccountId , u64 , ValueQuery , DefaultLastTxBlock < T > > ;
810810
@@ -2065,17 +2065,17 @@ pub mod pallet {
20652065 }
20662066
20672067 /// The extrinsic for user to change its hotkey
2068- /// #[pallet::call_index(70)]
2069- /// #[pallet::weight((Weight::from_parts(1_940_000_000, 0)
2070- /// .saturating_add(T::DbWeight::get().reads(272))
2071- /// .saturating_add(T::DbWeight::get().writes(527)), DispatchClass::Operational, Pays::No))]
2072- /// pub fn swap_hotkey(
2073- /// origin: OriginFor<T>,
2074- /// hotkey: T::AccountId,
2075- /// new_hotkey: T::AccountId,
2076- /// ) -> DispatchResultWithPostInfo {
2077- /// Self::do_swap_hotkey(origin, &hotkey, &new_hotkey)
2078- /// }
2068+ #[ pallet:: call_index( 70 ) ]
2069+ #[ pallet:: weight( ( Weight :: from_parts( 1_940_000_000 , 0 )
2070+ . saturating_add( T :: DbWeight :: get( ) . reads( 272 ) )
2071+ . saturating_add( T :: DbWeight :: get( ) . writes( 527 ) ) , DispatchClass :: Operational , Pays :: No ) ) ]
2072+ pub fn swap_hotkey (
2073+ origin : OriginFor < T > ,
2074+ hotkey : T :: AccountId ,
2075+ new_hotkey : T :: AccountId ,
2076+ ) -> DispatchResultWithPostInfo {
2077+ Self :: do_swap_hotkey ( origin, & hotkey, & new_hotkey)
2078+ }
20792079
20802080 /// The extrinsic for user to change the coldkey associated with their account.
20812081 ///
0 commit comments