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

Mellow fallback release #252

Merged
merged 22 commits into from
Aug 13, 2024
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
8 changes: 7 additions & 1 deletion src/bots/depositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ def _deposit_to_module(self, module_id: int) -> bool:

strategy, is_mellow = self._select_strategy(module_id)
is_deposit_amount_ok = self._gas_price_calculator.calculate_deposit_recommendation(strategy, module_id)
logger.info({'msg': 'Calculations deposit recommendations.', 'value': is_deposit_amount_ok})
logger.info({'msg': 'Calculations deposit recommendations.', 'value': is_deposit_amount_ok, 'is_mellow': is_mellow})

if is_mellow and not is_deposit_amount_ok:
strategy = self._general_strategy
is_mellow = False
is_deposit_amount_ok = self._gas_price_calculator.calculate_deposit_recommendation(strategy, module_id)
logger.info({'msg': 'Calculations deposit recommendations.', 'value': is_deposit_amount_ok, 'is_mellow': is_mellow})

if is_depositable and quorum and can_deposit and gas_is_ok and is_deposit_amount_ok:
logger.info({'msg': 'Checks passed. Prepare deposit tx.', 'is_mellow': is_mellow})
Expand Down
Loading