Skip to content

Commit

Permalink
v1.6 - report only with report.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberomanov committed Jul 20, 2023
1 parent 598d7c7 commit a27b982
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
6 changes: 0 additions & 6 deletions 8192.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions coinflip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions journey.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 8 additions & 7 deletions utils/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,41 +184,42 @@ 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}.')
else:
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}.')
else:
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.')
17 changes: 10 additions & 7 deletions utils/sui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a27b982

Please sign in to comment.