diff --git a/pallets/admin-utils/src/lib.rs b/pallets/admin-utils/src/lib.rs index 2b41539816..ec71e2faa4 100644 --- a/pallets/admin-utils/src/lib.rs +++ b/pallets/admin-utils/src/lib.rs @@ -1415,7 +1415,7 @@ pub mod pallet { T::Grandpa::schedule_change(next_authorities, in_blocks, forced) } - /// Enables or disables Liquid Alpha for a given subnet. + /// Enable or disable atomic alpha transfers for a given subnet. /// /// # Parameters /// - `origin`: The origin of the call, which must be the root account or subnet owner. diff --git a/pallets/subtensor/src/staking/move_stake.rs b/pallets/subtensor/src/staking/move_stake.rs index ef576f3607..d743fb7a18 100644 --- a/pallets/subtensor/src/staking/move_stake.rs +++ b/pallets/subtensor/src/staking/move_stake.rs @@ -72,6 +72,28 @@ impl Pallet { Ok(()) } + /// Toggles the atomic alpha transfers for a specific subnet. + /// + /// # Arguments + /// * `netuid` - The network ID (subnet) for which the transfer functionality is being toggled. + /// * `toggle` - A boolean value indicating whether to enable (true) or disable (false) transfers. + /// + /// # Returns + /// * `DispatchResult` - Indicates success or failure of the operation. + /// + /// # Events + /// Emits a `TransferToggle` event upon successful completion. + pub fn toggle_transfer(netuid: u16, toggle: bool) -> dispatch::DispatchResult { + TransferToggle::::insert(netuid, toggle); + log::debug!( + "TransferToggle( netuid: {:?}, toggle: {:?} ) ", + netuid, + toggle + ); + Self::deposit_event(Event::TransferToggle(netuid, toggle)); + Ok(()) + } + /// Transfers stake from one coldkey to another, optionally moving from one subnet to another, /// while keeping the same hotkey. /// @@ -97,16 +119,6 @@ impl Pallet { /// /// # Events /// Emits a `StakeTransferred` event upon successful completion of the transfer. - pub fn toggle_transfer(netuid: u16, toggle: bool) -> dispatch::DispatchResult { - TransferToggle::::insert(netuid, toggle); - log::debug!( - "TransferToggle( netuid: {:?}, toggle: {:?} ) ", - netuid, - toggle - ); - Self::deposit_event(Event::TransferToggle(netuid, toggle)); - Ok(()) - } pub fn do_transfer_stake( origin: T::RuntimeOrigin, destination_coldkey: T::AccountId,