23
23
NODEAPI = "/sentinel/nodes/%s"
24
24
GRPC = scrtxxs .GRPC
25
25
SSL = True
26
- VERSION = 20240817.0234
26
+ VERSION = 20240817.1914
27
27
SATOSHI = 1000000
28
28
29
29
class MultiPay ():
@@ -66,7 +66,7 @@ def __keyring(self, keyring_passphrase: str):
66
66
kr .keyring_key = keyring_passphrase
67
67
return kr
68
68
69
- def __get_balance (self , address ):
69
+ def get_balance (self , address ):
70
70
CoinDict = {'dvpn' : 0 , 'scrt' : 0 , 'dec' : 0 , 'atom' : 0 , 'osmo' : 0 }
71
71
#CoinDict = {'tsent' : 0, 'scrt' : 0, 'dec' : 0, 'atom' : 0, 'osmo' : 0}
72
72
endpoint = "/bank/balances/" + address
@@ -76,7 +76,7 @@ def __get_balance(self, address):
76
76
except :
77
77
return None
78
78
79
- print (coinJSON )
79
+ # print(coinJSON)
80
80
try :
81
81
for coin in coinJSON ['result' ]:
82
82
if "udvpn" in coin ['denom' ]:
@@ -86,10 +86,7 @@ def __get_balance(self, address):
86
86
return None
87
87
return CoinDict
88
88
89
- def SendDVPNs (self , addr_amts ):
90
- balance = self .__get_balance (self .sdk ._account .address )
91
- wallet_balance = int (balance .get ("dvpn" , 0 ))
92
-
89
+ def SendDVPNs (self , addr_amts , wallet_balance : int ):
93
90
amt = 0
94
91
95
92
# Sum total amount
@@ -120,7 +117,7 @@ def SendDVPNs(self, addr_amts):
120
117
tx .add_msg (
121
118
tx_type = 'transfer' ,
122
119
sender = self .sdk ._account ,
123
- receipient = addr ,
120
+ recipient = addr ,
124
121
amount = udvpn ,
125
122
denom = "udvpn" ,
126
123
)
@@ -154,12 +151,17 @@ def SendDVPNs(self, addr_amts):
154
151
155
152
156
153
if __name__ == "__main__" :
154
+ print (f"Leeloo Dallas Multipay - A DVPN multipay transactor - by freQniK - version: 5th Element { VERSION } \n \n " )
155
+ print ("You will be presented with a loop to enter Sentinel wallet addresses and amt. When finished, enter 'done'" )
157
156
mp = MultiPay (scrtxxs .HotWalletPW , scrtxxs .WalletName , scrtxxs .WalletSeed )
158
157
158
+ balance = mp .get_balance (mp .sdk ._account .address )
159
+ wallet_balance = float (int (balance .get ("dvpn" , 0 )) / SATOSHI )
160
+
161
+ print (f"Balance: { wallet_balance } dvpn" )
162
+
159
163
SendDict = {}
160
164
161
- print (f"Leeloo Dallas Multipay - A DVPN multipay transactor - by freQniK - version: 5th Element { VERSION } \n \n " )
162
- print ("You will be presented with a loop to enter Sentinel wallet addresses and amt. When finished, enter 'done'" )
163
165
while True :
164
166
addr = input ("Enter wallet address: " )
165
167
if addr .upper () == "DONE" :
@@ -172,7 +174,7 @@ def SendDVPNs(self, addr_amts):
172
174
print (SendDict )
173
175
answer = input ("Would you iike to continue (Y/n): " )
174
176
if answer .upper () == "Y" :
175
- if mp .SendDVPNs (SendDict ):
177
+ if mp .SendDVPNs (SendDict , int ( wallet_balance * SATOSHI ) ):
176
178
print ("Transaction completed successfully. Please check the log file" )
177
179
print (f"{ scrtxxs .KeyringDIR } /multipay.log" )
178
180
else :
0 commit comments