@@ -74,8 +74,12 @@ def inject_globals(func):
7474 console .AddItem ("status_modes" , inject_globals (mode_status ), local .translate ("status_modes_cmd" ))
7575 console .AddItem ("enable_mode" , inject_globals (enable_mode ), local .translate ("enable_mode_cmd" ))
7676 console .AddItem ("disable_mode" , inject_globals (disable_mode ), local .translate ("disable_mode_cmd" ))
77+ console .AddItem ("get" , inject_globals (GetSettings ), local .translate ("get_cmd" ))
78+ console .AddItem ("set" , inject_globals (SetSettings ), local .translate ("set_cmd" ))
79+
7780 console .AddItem ("seqno" , inject_globals (Seqno ), local .translate ("seqno_cmd" ))
7881 console .AddItem ("getconfig" , inject_globals (GetConfig ), local .translate ("getconfig_cmd" ))
82+ console .AddItem ("get_pool_data" , inject_globals (GetPoolData ), local .translate ("get_pool_data_cmd" ))
7983
8084 console .AddItem ("nw" , inject_globals (CreatNewWallet ), local .translate ("nw_cmd" ))
8185 console .AddItem ("aw" , inject_globals (ActivateWallet ), local .translate ("aw_cmd" ))
@@ -105,44 +109,42 @@ def inject_globals(func):
105109 # console.AddItem("gdfa", inject_globals(GetDomainFromAuction), local.translate("gdfa_cmd"))
106110
107111 console .AddItem ("ol" , inject_globals (PrintOffersList ), local .translate ("ol_cmd" ))
108- console .AddItem ("vo" , inject_globals (VoteOffer ), local .translate ("vo_cmd" ))
109112 console .AddItem ("od" , inject_globals (OfferDiff ), local .translate ("od_cmd" ))
110113
111114 console .AddItem ("el" , inject_globals (PrintElectionEntriesList ), local .translate ("el_cmd" ))
112- console .AddItem ("ve" , inject_globals (VoteElectionEntry ), local .translate ("ve_cmd" ))
113115 console .AddItem ("vl" , inject_globals (PrintValidatorList ), local .translate ("vl_cmd" ))
114116 console .AddItem ("cl" , inject_globals (PrintComplaintsList ), local .translate ("cl_cmd" ))
115- console .AddItem ("vc" , inject_globals (VoteComplaint ), local .translate ("vc_cmd" ))
116117
117- console .AddItem ("get" , inject_globals (GetSettings ), local .translate ("get_cmd" ))
118- console .AddItem ("set" , inject_globals (SetSettings ), local .translate ("set_cmd" ))
119118 #console.AddItem("xrestart", inject_globals(Xrestart), local.translate("xrestart_cmd"))
120119 #console.AddItem("xlist", inject_globals(Xlist), local.translate("xlist_cmd"))
121120 #console.AddItem("gpk", inject_globals(GetPubKey), local.translate("gpk_cmd"))
122121 #console.AddItem("ssoc", inject_globals(SignShardOverlayCert), local.translate("ssoc_cmd"))
123122 #console.AddItem("isoc", inject_globals(ImportShardOverlayCert), local.translate("isoc_cmd"))
124123
125- console .AddItem ("get_pool_data" , inject_globals (GetPoolData ), local .translate ("get_pool_data_cmd" ))
126-
127- if ton .using_pool ():
128- from mytonctrl .modules .pool import PoolModule
129- module = PoolModule (ton , local )
124+ if ton .get_mode_value ('validator' ):
125+ from mytonctrl .modules .validator import ValidatorModule
126+ module = ValidatorModule (ton , local )
130127 module .add_console_commands (console )
131128
132- if ton .using_nominator_pool ():
133- from mytonctrl .modules .nominator_pool import NominatorPoolModule
134- module = NominatorPoolModule (ton , local )
135- module .add_console_commands (console )
129+ if ton .using_pool (): # add basic pool functions (pools_list, delete_pool, import_pool)
130+ from mytonctrl .modules .pool import PoolModule
131+ module = PoolModule (ton , local )
132+ module .add_console_commands (console )
136133
137- if ton .get_mode_value ( 'single-nominator' ):
138- from mytonctrl .modules .single_pool import SingleNominatorModule
139- module = SingleNominatorModule (ton , local )
140- module .add_console_commands (console )
134+ if ton .using_nominator_pool ( ):
135+ from mytonctrl .modules .nominator_pool import NominatorPoolModule
136+ module = NominatorPoolModule (ton , local )
137+ module .add_console_commands (console )
141138
142- if ton .get_mode_value ('liquid-staking' ):
143- from mytonctrl .modules .controller import ControllerModule
144- module = ControllerModule (ton , local )
145- module .add_console_commands (console )
139+ if ton .get_mode_value ('single-nominator' ):
140+ from mytonctrl .modules .single_pool import SingleNominatorModule
141+ module = SingleNominatorModule (ton , local )
142+ module .add_console_commands (console )
143+
144+ if ton .using_liquid_staking ():
145+ from mytonctrl .modules .controller import ControllerModule
146+ module = ControllerModule (ton , local )
147+ module .add_console_commands (console )
146148
147149 console .AddItem ("cleanup" , inject_globals (cleanup_validator_db ), local .translate ("cleanup_cmd" ))
148150 console .AddItem ("benchmark" , inject_globals (run_benchmark ), local .translate ("benchmark_cmd" ))
@@ -1000,15 +1002,6 @@ def PrintOffersList(ton, args):
10001002 print_table (table )
10011003#end define
10021004
1003- def VoteOffer (ton , args ):
1004- if len (args ) == 0 :
1005- color_print ("{red}Bad args. Usage:{endc} vo <offer-hash>" )
1006- return
1007- for offerHash in args :
1008- ton .VoteOffer (offerHash )
1009- color_print ("VoteOffer - {green}OK{endc}" )
1010- #end define
1011-
10121005def OfferDiff (ton , args ):
10131006 try :
10141007 offerHash = args [0 ]
@@ -1063,17 +1056,6 @@ def PrintComplaintsList(ton, args):
10631056 print_table (table )
10641057#end define
10651058
1066- def VoteComplaint (ton , args ):
1067- try :
1068- electionId = args [0 ]
1069- complaintHash = args [1 ]
1070- except :
1071- color_print ("{red}Bad args. Usage:{endc} vc <election-id> <complaint-hash>" )
1072- return
1073- ton .VoteComplaint (electionId , complaintHash )
1074- color_print ("VoteComplaint - {green}OK{endc}" )
1075- #end define
1076-
10771059def NewDomain (ton , args ):
10781060 try :
10791061 domainName = args [0 ]
@@ -1172,11 +1154,6 @@ def PrintElectionEntriesList(ton, args):
11721154 print_table (table )
11731155#end define
11741156
1175- def VoteElectionEntry (ton , args ):
1176- Elections (ton .local , ton )
1177- color_print ("VoteElectionEntry - {green}OK{endc}" )
1178- #end define
1179-
11801157def PrintValidatorList (ton , args ):
11811158 past = "past" in args
11821159 data = ton .GetValidatorsList (past = past )
0 commit comments