-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaren
61 lines (48 loc) · 2.52 KB
/
daren
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
from src import Daren
from data import config
from src.utils import random_line, logger
import asyncio
async def StartDaren(thread):
logger.info(f"Поток {thread} | Начал работу")
while True:
act = await random_line('data/accounts.txt')
if not act: break
if '::' in act:
private_key, proxy = act.split('::')
else:
private_key = act
proxy = None
daren = Daren(key=private_key, thread=thread, proxy=proxy)
if await daren.login():
# daily check in
if not await daren.check_task(task_id="DAILY_CHECK_IN", claimed=True) and await daren.check_task(task_id="DAILY_CHECK_IN", claimed=False):
if await daren.daily_check_in():
logger.success(f"Поток {thread} | Выполнил check-in {daren.web3_utils.acct.address}")
else:
logger.error(f"Поток {thread} | Не выполнил check-in {daren.web3_utils.acct.address}")
else:
logger.warning(f"Поток {thread} | Уже выполнил check-in {daren.web3_utils.acct.address}")
# opBNB Check-in
if not await daren.check_task(task_id="OP_BNB_CHECK_IN", claimed=True) and not await daren.check_task(task_id="OP_BNB_CHECK_IN", claimed=False):
try:
status, tx_hash = await daren.complete_opbnb_check_in()
if status:
logger.success(f"Поток {thread} | Выполнил opBNB check-in {daren.web3_utils.acct.address}:{tx_hash}")
else:
logger.error(f"Поток {thread} | Не выполнил opBNB check-in {daren.web3_utils.acct.address}:{tx_hash}")
except Exception as e:
logger.error(f"Поток {thread} | Не выполнил opBNB check-in {daren.web3_utils.acct.address}: {e}")
else:
logger.warning(f"Поток {thread} | Уже выполнил opBNB check-in {daren.web3_utils.acct.address}")
await daren.logout()
async def main():
print("Автор софта: https://t.me/ApeCryptor")
thread_count = int(input("Введите кол-во потоков: "))
# thread_count = 1
tasks = []
for thread in range(1, thread_count+1):
tasks.append(asyncio.create_task(StartDaren(thread)))
await asyncio.gather(*tasks)
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())