@@ -78,42 +78,6 @@ def activate_pool(self, args):
7878 self .do_activate_pool (pool )
7979 color_print ("ActivatePool - {green}OK{endc}" )
8080
81- def do_deposit_to_pool (self , pool_addr , amount ):
82- wallet = self .ton .GetValidatorWallet ()
83- bocPath = self .ton .local .buffer .my_temp_dir + wallet .name + "validator-deposit-query.boc"
84- fiftScript = self .ton .contractsDir + "nominator-pool/func/validator-deposit.fif"
85- args = [fiftScript , bocPath ]
86- result = self .ton .fift .Run (args )
87- resultFilePath = self .ton .SignBocWithWallet (wallet , bocPath , pool_addr , amount )
88- self .ton .SendFile (resultFilePath , wallet )
89-
90- def deposit_to_pool (self , args ):
91- try :
92- poll_addr = args [0 ]
93- amount = float (args [1 ])
94- except :
95- color_print ("{red}Bad args. Usage:{endc} deposit_to_pool <pool-addr> <amount>" )
96- return
97- self .do_deposit_to_pool (poll_addr , amount )
98- color_print ("DepositToPool - {green}OK{endc}" )
99-
100- def do_withdraw_from_pool (self , pool_addr , amount ):
101- pool_data = self .ton .GetPoolData (pool_addr )
102- if pool_data ["state" ] == 0 :
103- self .ton .WithdrawFromPoolProcess (pool_addr , amount )
104- else :
105- self .ton .PendWithdrawFromPool (pool_addr , amount )
106-
107- def withdraw_from_pool (self , args ):
108- try :
109- pool_addr = args [0 ]
110- amount = float (args [1 ])
111- except :
112- color_print ("{red}Bad args. Usage:{endc} withdraw_from_pool <pool-addr> <amount>" )
113- return
114- self .do_withdraw_from_pool (pool_addr , amount )
115- color_print ("WithdrawFromPool - {green}OK{endc}" )
116-
11781 def update_validator_set (self , args ):
11882 try :
11983 pool_addr = args [0 ]
@@ -127,8 +91,4 @@ def update_validator_set(self, args):
12791 def add_console_commands (self , console ):
12892 console .AddItem ("new_pool" , self .new_pool , self .local .translate ("new_pool_cmd" ))
12993 console .AddItem ("activate_pool" , self .activate_pool , self .local .translate ("activate_pool_cmd" ))
130- console .AddItem ("deposit_to_pool" , self .deposit_to_pool , self .local .translate ("deposit_to_pool_cmd" ))
131- console .AddItem ("withdraw_from_pool" , self .withdraw_from_pool , self .local .translate ("withdraw_from_pool_cmd" ))
13294 console .AddItem ("update_validator_set" , self .update_validator_set , self .local .translate ("update_validator_set_cmd" ))
133-
134-
0 commit comments