forked from czbag/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
136 lines (114 loc) · 5.34 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import random
import sys
import questionary
from loguru import logger
from questionary import Choice
from config import ACCOUNTS, PROXIES
from utils.get_proxy import check_proxy
from utils.sleeping import sleep
from settings import USE_PROXY, RANDOM_WALLET, IS_SLEEP, SLEEP_FROM, SLEEP_TO
from modules_settings import *
def get_module():
result = questionary.select(
"Select a method to get started",
choices=[
Choice("1) Make bridge ZkSync", bridge_zksync),
Choice("2) Make withdraw from ZkSync", withdraw_zksync),
Choice("3) Make bridge on Orbiter", bridge_orbiter),
Choice("4) Wrap ETH", wrap_eth),
Choice("5) Unwrap ETH", unwrap_eth),
Choice("6) Make swap on SyncSwap", swap_syncswap),
Choice("7) Add liquidity on SyncSwap", liquidity_syncswap),
Choice("8) Make swap on Mute", swap_mute),
Choice("9) Make swap on Space.fi", swap_spacefi),
Choice("10) Add liquidity on Space.fi", liquidity_spacefi),
Choice("11) Make swap on PancakeSwap", swap_pancake),
Choice("12) Make swap on WooFi", swap_woofi),
Choice("13) Make swap on Velocore", swap_velocore),
Choice("14) Make swap on Odos", swap_odos),
Choice("15) Make swap on ZkSwap", swap_zkswap),
Choice("16) Make swap on XYSwap", swap_xyswap),
Choice("17) Make swap on OpenOcean", swap_openocean),
Choice("18) Make swap on 1inch", swap_inch),
Choice("19) Make bungee refuel", bungee_refuel),
Choice("20) Stargate bridge MAV", stargate_bridge),
Choice("21) Deposit Eralend", deposit_eralend),
Choice("22) Withdraw Eralend", withdraw_erlaned),
Choice("23) Enable collateral on Eralend", enable_collateral_eralend),
Choice("24) Disable collateral on Eralend", disable_collateral_eralend),
Choice("25) Deposit Basilisk", deposit_basilisk),
Choice("26) Withdraw Basilisk", withdraw_basilisk),
Choice("27) Enable collateral on Basilisk", enable_collateral_basilisk),
Choice("28) Disable collateral on Basilisk", disable_collateral_basilisk),
Choice("29) Deposit ReactorFusion", deposit_reactorfusion),
Choice("30) Withdraw ReactorFusion", withdraw_reactorfusion),
Choice("31) Enable collateral on ReactorFusion", enable_collateral_reactorfusion),
Choice("32) Disable collateral on ReactorFusion", disable_collateral_reactorfusion),
Choice("33) Create NFT collection on Omnisea", create_omnisea),
Choice("34) Mint and bridge NFT L2Telegraph", bridge_nft),
Choice("35) Mint Tavaera ID + NFT", mint_tavaera),
Choice("36) Mint NFT", mint_nft),
Choice("37) Mint ZKS Domain", mint_zks_domain),
Choice("38) Mint Era Domain", mint_era_domain),
Choice("39) Send message L2Telegraph", send_message),
Choice("40) Dmail sending mail", send_mail),
Choice("41) MultiSwap", swap_multiswap),
Choice("42) Use custom routes", custom_routes),
Choice("43) MultiApprove", multi_approve),
Choice("44) Deploy contract and mint token", deploy_contract_zksync),
Choice("45) Check transaction count", "tx_checker"),
Choice("46) Exit", "exit"),
],
qmark="⚙️ ",
pointer="✅ "
).ask()
if result == "exit":
print("\n❤️ Subscribe to me – https://t.me/sybilwave\n")
print("🤑 Donate me: 0x00000b0ddce0bfda4531542ad1f2f5fad7b9cde9")
sys.exit()
return result
def get_wallets():
if USE_PROXY:
account_with_proxy = dict(zip(ACCOUNTS, PROXIES))
wallets = [
{
"id": _id,
"key": key,
"proxy": account_with_proxy[key]
} for _id, key in enumerate(account_with_proxy, start=1)
]
else:
wallets = [
{
"id": _id,
"key": key,
"proxy": None
} for _id, key in enumerate(ACCOUNTS, start=1)
]
return wallets
def run_module(module, account_id, key, proxy):
module(account_id, key, proxy)
def main(module):
wallets = get_wallets()
if RANDOM_WALLET:
random.shuffle(wallets)
for account in wallets:
if account["proxy"]:
logger.info(f"Trying to connect to the proxy [{account['proxy']}]")
result = check_proxy(account["proxy"])
if result is False:
logger.error(f"Proxy error - {account['proxy']}")
continue
logger.success(f"Proxy [{account['proxy']}] is available")
run_module(module, account["id"], account["key"], account["proxy"])
if account != wallets[-1] and IS_SLEEP:
sleep(SLEEP_FROM, SLEEP_TO)
if __name__ == '__main__':
print("❤️ Subscribe to me – https://t.me/sybilwave\n")
module = get_module()
if module == "tx_checker":
get_tx_count()
else:
main(module)
print("\n❤️ Subscribe to me – https://t.me/sybilwave\n")
print("🤑 Donate me: 0x00000b0ddce0bfda4531542ad1f2f5fad7b9cde9")