-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
73 lines (64 loc) · 2.64 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
import asyncio
from loguru import logger
import questionary
import sys
from utils.launch import run_check_balance, start_tasks
from utils.utils import parse_wallets
from utils.modules import *
submenus = {
'start_menu': [
questionary.Choice('🚀 Custom Module Routes', 'custom-routes'),
questionary.Choice('✨ One Selected Module', 'one_selected_module'),
questionary.Choice('📥 OKX Balance Modules', 'okx_modules'),
questionary.Choice('💼 zkSync Balance Checker', 'balance-checker'),
questionary.Choice('❌ Exit', 'exit'),
],
'one_selected_module': [
questionary.Choice('● Swap on SyncSwap', swap_syncswap),
questionary.Choice('● Swap on 1inch', swap_inch),
questionary.Choice('● Swap on Maverick', swap_maverick),
questionary.Choice('● Swap on Mute', swap_mute),
questionary.Choice('● Swap on Odos', swap_odos),
questionary.Choice('● Deposit on EraLend', deposit_eraland),
questionary.Choice('● Wrap ETH', wrap_eth),
questionary.Choice('● Sending mail via DMail', send_mail),
questionary.Choice('● Mint NFT', mint_nft),
questionary.Choice('● Vote on RubyScore', rubyscore_vote),
questionary.Choice('● Daily check in on OwlTo', owlto_checkin),
questionary.Choice('● Increase allowance token', increase_allowance),
questionary.Choice('● Approve token', approve),
questionary.Choice('● Transfer token', transfer),
questionary.Choice('● OKX Withdraw', okx_withdraw),
questionary.Choice('● OKX Top Up', okx_top_up),
],
'okx_modules': [
questionary.Choice('● OKX Withdraw', okx_withdraw),
questionary.Choice('● OKX Top Up', okx_top_up),
]
}
def show_submenu(selected_mode):
submenu = submenus[selected_mode]
module = questionary.select(
message='Choose the desired module.',
choices=submenu,
qmark='📌 ',
pointer='➡️ '
).ask()
return module
def main():
selected_mode = questionary.select(
message='Select a mode to start the software.',
choices=submenus['start_menu'],
qmark='📌 ',
pointer='➡️ '
).ask()
wallets_data = parse_wallets()
if selected_mode in submenus:
selected_mode = show_submenu(selected_mode)
asyncio.run(start_tasks(wallets_data, selected_mode))
elif selected_mode == 'balance-checker': asyncio.run(run_check_balance(wallets_data))
elif selected_mode == 'exit': sys.exit()
else: asyncio.run(start_tasks(wallets_data, None))
if __name__ == '__main__':
logger.add('logs.log')
main()