@@ -524,9 +524,11 @@ async def get_neuron_for_pubkey_and_subnet():
524524 if prompt :
525525 if not Confirm .ask (
526526 f"Continue Registration?\n "
527- f" hotkey [{ COLOR_PALETTE ['GENERAL' ]['HOTKEY' ]} ]({ wallet .hotkey_str } )[/{ COLOR_PALETTE ['GENERAL' ]['HOTKEY' ]} ]:\t [{ COLOR_PALETTE ['GENERAL' ]['HOTKEY' ]} ]{ wallet .hotkey .ss58_address } [/{ COLOR_PALETTE ['GENERAL' ]['HOTKEY' ]} ]\n "
528- f" coldkey [{ COLOR_PALETTE ['GENERAL' ]['COLDKEY' ]} ]({ wallet .name } )[/{ COLOR_PALETTE ['GENERAL' ]['COLDKEY' ]} ]:\t [{ COLOR_PALETTE ['GENERAL' ]['COLDKEY' ]} ]{ wallet .coldkeypub .ss58_address } [/{ COLOR_PALETTE ['GENERAL' ]['COLDKEY' ]} ]\n "
529- f" network:\t \t [{ COLOR_PALETTE ['GENERAL' ]['LINKS' ]} ]{ subtensor .network } [/{ COLOR_PALETTE ['GENERAL' ]['LINKS' ]} ]\n "
527+ f" hotkey [{ COLOR_PALETTE .G .HK } ]({ wallet .hotkey_str } )[/{ COLOR_PALETTE .G .HK } ]:"
528+ f"\t [{ COLOR_PALETTE .G .HK } ]{ wallet .hotkey .ss58_address } [/{ COLOR_PALETTE .G .HK } ]\n "
529+ f" coldkey [{ COLOR_PALETTE .G .CK } ]({ wallet .name } )[/{ COLOR_PALETTE .G .CK } ]:"
530+ f"\t [{ COLOR_PALETTE .G .CK } ]{ wallet .coldkeypub .ss58_address } [/{ COLOR_PALETTE .G .CK } ]\n "
531+ f" network:\t \t [{ COLOR_PALETTE .G .LINKS } ]{ subtensor .network } [/{ COLOR_PALETTE .G .LINKS } ]\n "
530532 ):
531533 return False
532534
@@ -611,7 +613,6 @@ async def get_neuron_for_pubkey_and_subnet():
611613 if not wait_for_finalization and not wait_for_inclusion :
612614 success , err_msg = True , ""
613615 else :
614- await response .process_events ()
615616 success = await response .is_success
616617 if not success :
617618 success , err_msg = (
@@ -678,7 +679,7 @@ async def burned_register_extrinsic(
678679 wait_for_finalization : bool = True ,
679680 era : Optional [int ] = None ,
680681 prompt : bool = False ,
681- ) -> bool :
682+ ) -> tuple [ bool , str ] :
682683 """Registers the wallet to chain by recycling TAO.
683684
684685 :param subtensor: The SubtensorInterface object to use for the call, initialized
@@ -689,10 +690,11 @@ async def burned_register_extrinsic(
689690 `False` if the extrinsic fails to enter the block within the timeout.
690691 :param wait_for_finalization: If set, waits for the extrinsic to be finalized on the chain before returning `True`,
691692 or returns `False` if the extrinsic fails to be finalized within the timeout.
693+ :param era: the period (in blocks) for which the transaction should remain valid.
692694 :param prompt: If `True`, the call waits for confirmation from the user before proceeding.
693695
694- :return: Flag is `True` if extrinsic was finalized or included in the block. If we did not wait for
695- finalization/inclusion, the response is `True`.
696+ :return: (success, msg), where success is `True` if extrinsic was finalized or included in the block. If we did not
697+ wait for finalization/inclusion, the response is `True`.
696698 """
697699
698700 if not (unlock_status := unlock_key (wallet , print_out = False )).success :
@@ -735,12 +737,12 @@ async def burned_register_extrinsic(
735737 if not neuron .is_null :
736738 console .print (
737739 ":white_heavy_check_mark: [dark_sea_green3]Already Registered[/dark_sea_green3]:\n "
738- f"uid: [{ COLOR_PALETTE [ 'GENERAL' ][ ' NETUID_EXTRA' ] } ]{ neuron .uid } [/{ COLOR_PALETTE [ 'GENERAL' ][ ' NETUID_EXTRA' ] } ]\n "
739- f"netuid: [{ COLOR_PALETTE [ 'GENERAL' ][ ' NETUID' ] } ]{ neuron .netuid } [/{ COLOR_PALETTE [ 'GENERAL' ][ ' NETUID' ] } ]\n "
740- f"hotkey: [{ COLOR_PALETTE [ 'GENERAL' ][ 'HOTKEY' ] } ]{ neuron .hotkey } [/{ COLOR_PALETTE [ 'GENERAL' ][ 'HOTKEY' ] } ]\n "
741- f"coldkey: [{ COLOR_PALETTE [ 'GENERAL' ][ 'COLDKEY' ] } ]{ neuron .coldkey } [/{ COLOR_PALETTE [ 'GENERAL' ][ 'COLDKEY' ] } ]"
740+ f"uid: [{ COLOR_PALETTE . G . NETUID_EXTRA } ]{ neuron .uid } [/{ COLOR_PALETTE . G . NETUID_EXTRA } ]\n "
741+ f"netuid: [{ COLOR_PALETTE . G . NETUID } ]{ neuron .netuid } [/{ COLOR_PALETTE . G . NETUID } ]\n "
742+ f"hotkey: [{ COLOR_PALETTE . G . HK } ]{ neuron .hotkey } [/{ COLOR_PALETTE . G . HK } ]\n "
743+ f"coldkey: [{ COLOR_PALETTE . G . CK } ]{ neuron .coldkey } [/{ COLOR_PALETTE . G . CK } ]"
742744 )
743- return True
745+ return True , "Already registered"
744746
745747 with console .status (
746748 ":satellite: Recycling TAO for Registration..." , spinner = "aesthetic"
@@ -760,7 +762,7 @@ async def burned_register_extrinsic(
760762 if not success :
761763 err_console .print (f":cross_mark: [red]Failed[/red]: { err_msg } " )
762764 await asyncio .sleep (0.5 )
763- return False
765+ return False , err_msg
764766 # Successful registration, final check for neuron and pubkey
765767 else :
766768 with console .status (":satellite: Checking Balance..." , spinner = "aesthetic" ):
@@ -781,20 +783,21 @@ async def burned_register_extrinsic(
781783
782784 console .print (
783785 "Balance:\n "
784- f" [blue]{ old_balance } [/blue] :arrow_right: [{ COLOR_PALETTE ['STAKE' ]['STAKE_AMOUNT' ]} ]{ new_balance } [/{ COLOR_PALETTE ['STAKE' ]['STAKE_AMOUNT' ]} ]"
786+ f" [blue]{ old_balance } [/blue] :arrow_right: "
787+ f"[{ COLOR_PALETTE .S .STAKE_AMOUNT } ]{ new_balance } [/{ COLOR_PALETTE .S .STAKE_AMOUNT } ]"
785788 )
786789
787790 if len (netuids_for_hotkey ) > 0 :
788791 console .print (
789792 f":white_heavy_check_mark: [green]Registered on netuid { netuid } with UID { my_uid } [/green]"
790793 )
791- return True
794+ return True , f"Registered on { netuid } with UID { my_uid } "
792795 else :
793796 # neuron not found, try again
794797 err_console .print (
795798 ":cross_mark: [red]Unknown error. Neuron not found.[/red]"
796799 )
797- return False
800+ return False , "Unknown error. Neuron not found."
798801
799802
800803async def run_faucet_extrinsic (
@@ -914,7 +917,6 @@ async def run_faucet_extrinsic(
914917 )
915918
916919 # process if registration successful, try again if pow is still valid
917- await response .process_events ()
918920 if not await response .is_success :
919921 err_console .print (
920922 f":cross_mark: [red]Failed[/red]: "
@@ -1757,7 +1759,8 @@ async def swap_hotkey_extrinsic(
17571759 )
17581760 if not len (netuids_registered ) > 0 :
17591761 err_console .print (
1760- f"Destination hotkey [dark_orange]{ new_wallet .hotkey .ss58_address } [/dark_orange] is not registered. Please register and try again"
1762+ f"Destination hotkey [dark_orange]{ new_wallet .hotkey .ss58_address } [/dark_orange] is not registered. "
1763+ f"Please register and try again"
17611764 )
17621765 return False
17631766
@@ -1774,7 +1777,8 @@ async def swap_hotkey_extrinsic(
17741777 ):
17751778 return False
17761779 print_verbose (
1777- f"Swapping { wallet .name } 's hotkey ({ wallet .hotkey .ss58_address } ) with { new_wallet .name } s hotkey ({ new_wallet .hotkey .ss58_address } )"
1780+ f"Swapping { wallet .name } 's hotkey ({ wallet .hotkey .ss58_address } ) with "
1781+ f"{ new_wallet .name } s hotkey ({ new_wallet .hotkey .ss58_address } )"
17781782 )
17791783 with console .status (":satellite: Swapping hotkeys..." , spinner = "aesthetic" ):
17801784 call = await subtensor .substrate .compose_call (
0 commit comments