Skip to content

Commit

Permalink
Remove the GAS_TKN_IN_FLASHLOAN_TOKENS flag
Browse files Browse the repository at this point in the history
  • Loading branch information
barak manos committed May 9, 2024
1 parent 93ed201 commit 5f16b68
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion fastlane_bot/config/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ class ConfigNetwork(ConfigBase):

# FLAGS
#######################################################################################
GAS_TKN_IN_FLASHLOAN_TOKENS = None
IS_NO_FLASHLOAN_AVAILABLE = False

# HOOKS
Expand Down
5 changes: 2 additions & 3 deletions fastlane_bot/events/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,8 @@ def get_tokens(self) -> List[Token]:
token_set.add(self.create_token(record, f"tkn{str(idx)}_"))
except AttributeError:
pass
if self.ConfigObj.GAS_TKN_IN_FLASHLOAN_TOKENS:
token_set.add(Token(symbol=self.ConfigObj.NATIVE_GAS_TOKEN_SYMBOL, address=self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS, decimals=18))
token_set.add(Token(symbol=self.ConfigObj.WRAPPED_GAS_TOKEN_SYMBOL, address=self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, decimals=18))
token_set.add(Token(symbol=self.ConfigObj.NATIVE_GAS_TOKEN_SYMBOL, address=self.ConfigObj.NATIVE_GAS_TOKEN_ADDRESS, decimals=18))
token_set.add(Token(symbol=self.ConfigObj.WRAPPED_GAS_TOKEN_SYMBOL, address=self.ConfigObj.WRAPPED_GAS_TOKEN_ADDRESS, decimals=18))
return list(token_set)

def populate_tokens(self):
Expand Down
4 changes: 0 additions & 4 deletions fastlane_bot/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,6 @@ def get_config(

cfg.LIMIT_BANCOR3_FLASHLOAN_TOKENS = limit_bancor3_flashloan_tokens
cfg.DEFAULT_MIN_PROFIT_GAS_TOKEN = Decimal(default_min_profit_gas_token)
cfg.GAS_TKN_IN_FLASHLOAN_TOKENS = (
cfg.NATIVE_GAS_TOKEN_ADDRESS in flashloan_tokens
or cfg.WRAPPED_GAS_TOKEN_ADDRESS in flashloan_tokens
)
return cfg


Expand Down
1 change: 0 additions & 1 deletion fastlane_bot/tests/test_034_Interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

cfg_mock = Mock()
cfg_mock.logger = MagicMock()
cfg_mock.GAS_TKN_IN_FLASHLOAN_TOKENS = False
qi = QueryInterface(mgr=None, ConfigObj=cfg_mock)
qi.state = [{'exchange_name': 'uniswap_v2', 'address': '0x123', 'tkn0_key': 'TKN-0x123', 'tkn1_key': 'TKN-0x456', 'pair_name': 'Pair-0x789', 'liquidity': 10}, {'exchange_name': 'sushiswap_v2', 'address': '0xabc', 'tkn0_key': 'TKN-0xabc', 'tkn1_key': 'TKN-0xdef', 'pair_name': 'Pair-0xghi', 'liquidity': 0}]

Expand Down

0 comments on commit 5f16b68

Please sign in to comment.