File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,21 @@ def print_validator_list(self, args):
335335 print_table (table )
336336 # end define
337337
338+ def get_pool_data (self , args ):
339+ try :
340+ pool_name = args [0 ]
341+ except :
342+ color_print ("{red}Bad args. Usage:{endc} get_pool_data <pool-name | pool-addr>" )
343+ return
344+ if self .ton .IsAddr (pool_name ):
345+ pool_addr = pool_name
346+ else :
347+ pool = self .ton .GetLocalPool (pool_name )
348+ pool_addr = pool .addrB64
349+ pool_data = self .ton .GetPoolData (pool_addr )
350+ print (json .dumps (pool_data , indent = 4 ))
351+ # end define
352+
338353 def add_console_commands (self , console ):
339354 console .AddItem ("vas" , self .view_account_status , self .local .translate ("vas_cmd" ))
340355 console .AddItem ("vah" , self .view_account_history , self .local .translate ("vah_cmd" ))
@@ -350,3 +365,4 @@ def add_console_commands(self, console):
350365 console .AddItem ("vl" , self .print_validator_list , self .local .translate ("vl_cmd" ))
351366 console .AddItem ("cl" , self .print_complaints_list , self .local .translate ("cl_cmd" ))
352367
368+ console .AddItem ("get_pool_data" , self .get_pool_data , self .local .translate ("get_pool_data_cmd" ))
You can’t perform that action at this time.
0 commit comments