@@ -2795,7 +2795,7 @@ async def add_stake(
27952795 wallet : "Wallet" ,
27962796 hotkey_ss58 : Optional [str ] = None ,
27972797 netuid : Optional [int ] = None ,
2798- amount : Optional [Union [ " Balance" , float ] ] = None ,
2798+ amount : Optional [Balance ] = None ,
27992799 wait_for_inclusion : bool = True ,
28002800 wait_for_finalization : bool = False ,
28012801 ) -> bool :
@@ -2807,7 +2807,7 @@ async def add_stake(
28072807 Args:
28082808 wallet (bittensor_wallet.Wallet): The wallet to be used for staking.
28092809 hotkey_ss58 (Optional[str]): The ``SS58`` address of the hotkey associated with the neuron.
2810- amount (Union[ Balance, float] ): The amount of TAO to stake.
2810+ amount (Balance): The amount of TAO to stake.
28112811 wait_for_inclusion (bool): Waits for the transaction to be included in a block.
28122812 wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain.
28132813
@@ -2832,7 +2832,7 @@ async def add_stake_multiple(
28322832 wallet : "Wallet" ,
28332833 hotkey_ss58s : list [str ],
28342834 netuids : list [int ],
2835- amounts : Optional [list [Union [ " Balance" , float ] ]] = None ,
2835+ amounts : Optional [list [Balance ]] = None ,
28362836 wait_for_inclusion : bool = True ,
28372837 wait_for_finalization : bool = False ,
28382838 ) -> bool :
@@ -2843,7 +2843,7 @@ async def add_stake_multiple(
28432843 Args:
28442844 wallet (bittensor_wallet.Wallet): The wallet used for staking.
28452845 hotkey_ss58s (list[str]): List of ``SS58`` addresses of hotkeys to stake to.
2846- amounts (list[Union[ Balance, float] ]): Corresponding amounts of TAO to stake for each hotkey.
2846+ amounts (list[Balance]): Corresponding amounts of TAO to stake for each hotkey.
28472847 wait_for_inclusion (bool): Waits for the transaction to be included in a block.
28482848 wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain.
28492849
@@ -2975,7 +2975,7 @@ async def move_stake(
29752975 origin_netuid : int ,
29762976 destination_hotkey : str ,
29772977 destination_netuid : int ,
2978- amount : Union [ " Balance" , float ] ,
2978+ amount : Balance ,
29792979 wait_for_inclusion : bool = True ,
29802980 wait_for_finalization : bool = False ,
29812981 ) -> bool :
@@ -2988,15 +2988,13 @@ async def move_stake(
29882988 origin_netuid (int): The netuid of the source subnet.
29892989 destination_hotkey (str): The SS58 address of the destination hotkey.
29902990 destination_netuid (int): The netuid of the destination subnet.
2991- amount (Union[ Balance, float] ): Amount of stake to move.
2991+ amount (Balance): Amount of stake to move.
29922992 wait_for_inclusion (bool): Waits for the transaction to be included in a block.
29932993 wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain.
29942994
29952995 Returns:
29962996 success (bool): True if the stake movement was successful.
29972997 """
2998- if isinstance (amount , float ):
2999- amount = Balance .from_tao (amount )
30002998
30012999 return await move_stake_extrinsic (
30023000 subtensor = self ,
@@ -3420,7 +3418,7 @@ async def transfer_stake(
34203418 hotkey_ss58 : str ,
34213419 origin_netuid : int ,
34223420 destination_netuid : int ,
3423- amount : Union [ " Balance" , float ] ,
3421+ amount : Balance ,
34243422 wait_for_inclusion : bool = True ,
34253423 wait_for_finalization : bool = False ,
34263424 ) -> bool :
@@ -3433,15 +3431,13 @@ async def transfer_stake(
34333431 hotkey_ss58 (str): The hotkey SS58 address associated with the stake.
34343432 origin_netuid (int): The source subnet UID.
34353433 destination_netuid (int): The destination subnet UID.
3436- amount (Union[ Balance, float, int] ): Amount to transfer.
3434+ amount (Balance): Amount to transfer.
34373435 wait_for_inclusion (bool): If true, waits for inclusion before returning.
34383436 wait_for_finalization (bool): If true, waits for finalization before returning.
34393437
34403438 Returns:
34413439 success (bool): True if the transfer was successful.
34423440 """
3443- if isinstance (amount , float ):
3444- amount = Balance .from_tao (amount )
34453441
34463442 return await transfer_stake_extrinsic (
34473443 subtensor = self ,
@@ -3481,8 +3477,6 @@ async def transfer(
34813477 Returns:
34823478 `True` if the transferring was successful, otherwise `False`.
34833479 """
3484- if isinstance (amount , float ):
3485- amount = Balance .from_tao (amount )
34863480
34873481 return await transfer_extrinsic (
34883482 subtensor = self ,
@@ -3500,7 +3494,7 @@ async def unstake(
35003494 wallet : "Wallet" ,
35013495 hotkey_ss58 : Optional [str ] = None ,
35023496 netuid : Optional [int ] = None ,
3503- amount : Optional [Union [ " Balance" , float ] ] = None ,
3497+ amount : Optional [Balance ] = None ,
35043498 wait_for_inclusion : bool = True ,
35053499 wait_for_finalization : bool = False ,
35063500 ) -> bool :
@@ -3512,7 +3506,7 @@ async def unstake(
35123506 wallet (bittensor_wallet.wallet): The wallet associated with the neuron from which the stake is being
35133507 removed.
35143508 hotkey_ss58 (Optional[str]): The ``SS58`` address of the hotkey account to unstake from.
3515- amount (Union[ Balance, float] ): The amount of TAO to unstake. If not specified, unstakes all.
3509+ amount (Balance): The amount of TAO to unstake. If not specified, unstakes all.
35163510 wait_for_inclusion (bool): Waits for the transaction to be included in a block.
35173511 wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain.
35183512
@@ -3537,7 +3531,7 @@ async def unstake_multiple(
35373531 wallet : "Wallet" ,
35383532 hotkey_ss58s : list [str ],
35393533 netuids : list [int ],
3540- amounts : Optional [list [Union [ " Balance" , float ] ]] = None ,
3534+ amounts : Optional [list [Balance ]] = None ,
35413535 wait_for_inclusion : bool = True ,
35423536 wait_for_finalization : bool = False ,
35433537 ) -> bool :
0 commit comments