web3-wizzard-lib 1.9.2__py3-none-any.whl → 1.9.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- web3_wizzard_lib/core/modules/cex_sender.py +7 -2
- {web3_wizzard_lib-1.9.2.dist-info → web3_wizzard_lib-1.9.3.dist-info}/METADATA +1 -1
- {web3_wizzard_lib-1.9.2.dist-info → web3_wizzard_lib-1.9.3.dist-info}/RECORD +5 -5
- {web3_wizzard_lib-1.9.2.dist-info → web3_wizzard_lib-1.9.3.dist-info}/WHEEL +0 -0
- {web3_wizzard_lib-1.9.2.dist-info → web3_wizzard_lib-1.9.3.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
from loguru import logger
|
2
2
|
from sybil_engine.contract.send import Send
|
3
3
|
from sybil_engine.data.networks import get_chain_instance
|
4
|
+
from sybil_engine.domain.balance.balance import NotEnoughNativeBalance
|
4
5
|
from sybil_engine.domain.balance.balance_utils import interval_to_native_balance, interval_to_erc20_balance
|
5
6
|
from sybil_engine.domain.balance.tokens import Erc20Token
|
6
7
|
from sybil_engine.module.module import Module
|
@@ -24,7 +25,11 @@ class SendToCex(Module):
|
|
24
25
|
amount = interval_to_native_balance(send_to_cex_amount_interval, account, chain_instance['chain'], web3)
|
25
26
|
|
26
27
|
if send_to_cex_amount_interval == 'all_balance':
|
27
|
-
|
28
|
+
try:
|
29
|
+
amount = amount.minus(self.min_native_balance)
|
30
|
+
except NotEnoughNativeBalance as e:
|
31
|
+
logger.info("Wallet balance is empty or almost empty, skip")
|
32
|
+
return
|
28
33
|
elif token in self.supported_chains:
|
29
34
|
amount = interval_to_erc20_balance(send_to_cex_amount_interval, account, token, chain, web3)
|
30
35
|
else:
|
@@ -38,7 +43,7 @@ class SendToCex(Module):
|
|
38
43
|
|
39
44
|
add_accumulator_native_balance("Total sent to cex", amount.wei)
|
40
45
|
|
41
|
-
@retry(max_attempts=5, retry_interval={'from': 60 *
|
46
|
+
@retry(max_attempts=5, retry_interval={'from': 60 * 1, 'to': 60 * 2})
|
42
47
|
def send_funds(self, account, amount, cex_address, chain, chain_instance, token, web3):
|
43
48
|
logger.info(f"Send {amount} to {cex_address} ({chain_instance['chain']})")
|
44
49
|
if token == 'NATIVE':
|
@@ -95,7 +95,7 @@ web3_wizzard_lib/core/modules/airdrop_printer.py,sha256=k1w1m8WAS9MnQ7LkKaYlx5xg
|
|
95
95
|
web3_wizzard_lib/core/modules/bank_module.py,sha256=UFwHoN1ncsWywzoxTiBnFDi9_mmjwPGST2VtD02L6dk,4229
|
96
96
|
web3_wizzard_lib/core/modules/bridge_module.py,sha256=ZoO80ody9cP_ezhah680ezTAEdM2VyxRqmmUH7b2xHE,2011
|
97
97
|
web3_wizzard_lib/core/modules/bungee.py,sha256=CVjZH5_nmBWO5Vg5Xx-_dDzfaJ7oCDgFp0gG8VHd76E,4881
|
98
|
-
web3_wizzard_lib/core/modules/cex_sender.py,sha256=
|
98
|
+
web3_wizzard_lib/core/modules/cex_sender.py,sha256=JnMOWag9bC9Py2HdU5N2aYeWYwCzBbt2cKLtgl4qZlM,2979
|
99
99
|
web3_wizzard_lib/core/modules/cex_subaccount_transfer.py,sha256=wgD96jLBmmql9HlPOvx1M22JfXnvxGh78qDEtXNcZu0,1164
|
100
100
|
web3_wizzard_lib/core/modules/cex_withdraw.py,sha256=fCuiO4DTuWp2OTeRlsMqbvXh7poYO-QCU2Syco7OV3M,3846
|
101
101
|
web3_wizzard_lib/core/modules/claimer.py,sha256=zjlbckMB6YWOZ3NFZrYWIhZ0wMqV4RdbdbqKrx99gC8,1346
|
@@ -371,7 +371,7 @@ web3_wizzard_lib/resources/main/pairs.json,sha256=uvIFvY46Ctiw8hjGd9e-1WE0qLf_du
|
|
371
371
|
web3_wizzard_lib/resources/main/tokens.json,sha256=AoZz_I6AVoZuecNdyX5L-SnGm6TREuPrsYd2i9PJr7U,5707
|
372
372
|
web3_wizzard_lib/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
373
373
|
web3_wizzard_lib/utils/debank_utils.py,sha256=CE2SUN9RpFK_j9KjJgxf7a__VRJ75tLIw9tLrVNrn3c,484
|
374
|
-
web3_wizzard_lib-1.9.
|
375
|
-
web3_wizzard_lib-1.9.
|
376
|
-
web3_wizzard_lib-1.9.
|
377
|
-
web3_wizzard_lib-1.9.
|
374
|
+
web3_wizzard_lib-1.9.3.dist-info/METADATA,sha256=KQIhv0Hb5DFQ7isKS9d8swTQyH7RN4BefxoJ7Pa4btY,339
|
375
|
+
web3_wizzard_lib-1.9.3.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
376
|
+
web3_wizzard_lib-1.9.3.dist-info/top_level.txt,sha256=31sEPHxuJ1p5fpc75vHQJ8eJdSs80aCZeeT3L8YAHNg,17
|
377
|
+
web3_wizzard_lib-1.9.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|