Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds complete runtime configuration to startup logs. Adds logging to … #94

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,41 @@ def main(
# Format the exchanges
exchanges = handle_exchanges(cfg, exchanges)

# Log the run configuration
cfg.logger.info(
f"""
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Starting fastlane bot with the following configuration:
cache_latest_only: {cache_latest_only}
backdate_pools: {backdate_pools}
arb_mode: {arb_mode}
flashloan_tokens: {flashloan_tokens}
config: {config}
n_jobs: {n_jobs}
exchanges: {exchanges}
polling_interval: {polling_interval}
alchemy_max_block_fetch: {alchemy_max_block_fetch}
static_pool_data_filename: {static_pool_data_filename}
reorg_delay: {reorg_delay}
logging_path: {logging_path}
loglevel: {loglevel}
static_pool_data_sample_sz: {static_pool_data_sample_sz}
use_cached_events: {use_cached_events}
run_data_validator: {run_data_validator}
randomizer: {randomizer}
limit_bancor3_flashloan_tokens: {limit_bancor3_flashloan_tokens}
default_min_profit_bnt: {default_min_profit_bnt}
timeout: {timeout}
target_tokens: {target_tokens}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"""
)

# Get the static pool data, tokens and uniswap v2 event mappings
static_pool_data, tokens, uniswap_v2_event_mappings = get_static_data(
cfg, exchanges, static_pool_data_filename, static_pool_data_sample_sz
Expand Down Expand Up @@ -403,6 +438,19 @@ def run(
mgr.cfg.logger.info("Timeout hit... stopping bot")
break

if loop_idx == 1:
mgr.cfg.logger.info(
"""
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Finished first iteration of data sync. Now starting main loop arbitrage search.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"""
)

except Exception as e:
mgr.cfg.logger.error(f"Error in main loop: {e}")
time.sleep(polling_interval)
Expand Down
Loading