From a27b9828e48a54c0217eeb06f971e270bb541125 Mon Sep 17 00:00:00 2001 From: cyberomanov Date: Thu, 20 Jul 2023 14:15:16 +0300 Subject: [PATCH] v1.6 - report only with report.py --- 8192.py | 6 ------ coinflip.py | 6 ------ journey.py | 6 ------ report.py | 2 +- utils/explorer.py | 15 ++++++++------- utils/sui.py | 17 ++++++++++------- 6 files changed, 19 insertions(+), 33 deletions(-) diff --git a/8192.py b/8192.py index 2aab004..3224382 100644 --- a/8192.py +++ b/8192.py @@ -112,12 +112,6 @@ def pool_executor(sui_configs: list[SuiConfig]): try: mnemonics = read_mnemonics() sui_configs = get_list_of_sui_configs(mnemonics=mnemonics) - - logger.info('loaded addresses for 8192 game:') - for num, sui_config in enumerate(sui_configs): - print_rank_and_balance(num=num, sui_config=sui_config) - time.sleep(1) - pool_executor(sui_configs=sui_configs) except Exception as e: logger.exception(e) diff --git a/coinflip.py b/coinflip.py index 5e7332c..3035246 100644 --- a/coinflip.py +++ b/coinflip.py @@ -97,12 +97,6 @@ def pool_executor(sui_configs: list[SuiConfig]): try: mnemonics = read_mnemonics() sui_configs = get_list_of_sui_configs(mnemonics=mnemonics) - - logger.info('loaded addresses for coinflip game:') - for num, sui_config in enumerate(sui_configs): - print_rank_and_balance(num=num, sui_config=sui_config) - time.sleep(1) - pool_executor(sui_configs=sui_configs) except Exception as e: logger.exception(e) diff --git a/journey.py b/journey.py index 8aee7e3..35921f1 100644 --- a/journey.py +++ b/journey.py @@ -110,12 +110,6 @@ def pool_executor(sui_configs: list[SuiConfig]): try: mnemonics = read_mnemonics() sui_configs = get_list_of_sui_configs(mnemonics=mnemonics) - - logger.info('loaded addresses for journey:') - for num, sui_config in enumerate(sui_configs): - print_rank_and_balance(num=num, sui_config=sui_config) - time.sleep(1) - pool_executor(sui_configs=sui_configs) except Exception as e: logger.exception(e) diff --git a/report.py b/report.py index 6b0d626..3781e1c 100644 --- a/report.py +++ b/report.py @@ -16,8 +16,8 @@ for sui_config in sui_configs: print(sui_config.active_address) + print() - logger.info('report:') for num, sui_config in enumerate(sui_configs): print_rank_and_balance(num=num, sui_config=sui_config) time.sleep(1) diff --git a/utils/explorer.py b/utils/explorer.py index e7422bd..a204d44 100644 --- a/utils/explorer.py +++ b/utils/explorer.py @@ -184,13 +184,14 @@ def print_rank_and_balance(num: int, sui_config: SuiConfig): rank = get_points_and_rank(address=str(sui_config.active_address)) if rank.__root__[0].result.data: rank_data = rank.__root__[0].result.data + played_games = get_game_items_count(address=str(sui_config.active_address)) if not rank_data.entry.suspectedBot: if rank_data.position: if rank_data.position < 10_000: logger.success( f'#{num:>4} | {sui_config.active_address}: {get_sui_balance(sui_config=sui_config).float} $SUI | ' f'coinflip: {rank_data.entry.numCommandsDeSuiFlip}, ' - f'8192: {rank_data.entry.numCommandsEthos8192}, ' + f'8192: {played_games}x{rank_data.entry.numCommandsEthos8192}, ' f'miners: {rank_data.entry.numCommandsMiniMiners}, ' f'journey: {rank_data.entry.numCommandsJourneyToMountSogol} | ' f'#{rank_data.position}, score: {rank_data.entry.score}.') @@ -198,7 +199,7 @@ def print_rank_and_balance(num: int, sui_config: SuiConfig): logger.info( f'#{num:>4} | {sui_config.active_address}: {get_sui_balance(sui_config=sui_config).float} $SUI | ' f'coinflip: {rank_data.entry.numCommandsDeSuiFlip}, ' - f'8192: {rank_data.entry.numCommandsEthos8192}, ' + f'8192: {played_games}x{rank_data.entry.numCommandsEthos8192}, ' f'miners: {rank_data.entry.numCommandsMiniMiners}, ' f'journey: {rank_data.entry.numCommandsJourneyToMountSogol} | ' f'#{rank_data.position}, score: {rank_data.entry.score}.') @@ -206,19 +207,19 @@ def print_rank_and_balance(num: int, sui_config: SuiConfig): logger.warning( f'#{num:>4} | {sui_config.active_address}: {get_sui_balance(sui_config=sui_config).float} $SUI | ' f'coinflip: {rank_data.entry.numCommandsDeSuiFlip}, ' - f'8192: {rank_data.entry.numCommandsEthos8192}, ' + f'8192: {played_games}x{rank_data.entry.numCommandsEthos8192}, ' f'miners: {rank_data.entry.numCommandsMiniMiners}, ' f'journey: {rank_data.entry.numCommandsJourneyToMountSogol} | ' f'score: {rank_data.entry.score}.') else: - logger.warning( + logger.error( f'#{num:>4} | {sui_config.active_address}: {get_sui_balance(sui_config=sui_config).float} $SUI | ' f'coinflip: {rank_data.entry.numCommandsDeSuiFlip}, ' - f'8192: {rank_data.entry.numCommandsEthos8192}, ' + f'8192: {played_games}x{rank_data.entry.numCommandsEthos8192}, ' f'miners: {rank_data.entry.numCommandsMiniMiners}, ' f'journey: {rank_data.entry.numCommandsJourneyToMountSogol} | ' f'score: {rank_data.entry.score} | BOT.') else: - logger.warning( + logger.error( f'#{num:>4} | {sui_config.active_address}: {get_sui_balance(sui_config=sui_config).float} $SUI | ' - f'bad rank response.') + f'bad rank response, the address may not has a bullshark nft.') diff --git a/utils/sui.py b/utils/sui.py index 035b099..ec509c8 100644 --- a/utils/sui.py +++ b/utils/sui.py @@ -286,12 +286,15 @@ def merge_sui_coins_tx(sui_config: SuiConfig): def merge_sui_coins(sui_config: SuiConfig): try: results = merge_sui_coins_tx(sui_config=sui_config) - for result in results: - if result: - if result.reason: - logger.warning(f'{short_address(result.address)} | MERGE | digest: {result.digest} | ' - f'reason: {result.reason}.') - else: - logger.info(f'{short_address(result.address)} | MERGE | digest: {result.digest}.') + if results: + for result in results: + if result: + if result.reason: + logger.warning(f'{short_address(result.address)} | MERGE | digest: {result.digest} | ' + f'reason: {result.reason}.') + else: + logger.info(f'{short_address(result.address)} | MERGE | digest: {result.digest}.') + else: + logger.info(f'{short_address(str(sui_config.active_address))} | nothing to merge.') except: pass