diff --git a/fastlane_bot/helpers/poolandtokens.py b/fastlane_bot/helpers/poolandtokens.py index b4c0dfa53..610a3e114 100644 --- a/fastlane_bot/helpers/poolandtokens.py +++ b/fastlane_bot/helpers/poolandtokens.py @@ -19,7 +19,7 @@ # from fastlane_bot.config import SUPPORTED_EXCHANGES, CARBON_V1_NAME, UNISWAP_V3_NAME from fastlane_bot.helpers.univ3calc import Univ3Calculator from fastlane_bot.tools.cpc import ConstantProductCurve -from fastlane_bot.utils import decodeOrder, safe_int +from fastlane_bot.utils import decodeOrder class SolidlyV2StablePoolsNotSupported(Exception): @@ -421,16 +421,16 @@ def _carbon_to_cpc_dict(self) -> Tuple[Dict, bool]: encoded_orders = [ { - "y": safe_int(self.y_1), - "z": safe_int(self.z_1), - "A": safe_int(self.A_1), - "B": safe_int(self.B_1), + "y": int(self.y_1), + "z": int(self.z_1), + "A": int(self.A_1), + "B": int(self.B_1), }, { - "y": safe_int(self.y_0), - "z": safe_int(self.z_0), - "A": safe_int(self.A_0), - "B": safe_int(self.B_0), + "y": int(self.y_0), + "z": int(self.z_0), + "A": int(self.A_0), + "B": int(self.B_0), }, ] diff --git a/fastlane_bot/helpers/routehandler.py b/fastlane_bot/helpers/routehandler.py index d00519d36..2ceaa4899 100644 --- a/fastlane_bot/helpers/routehandler.py +++ b/fastlane_bot/helpers/routehandler.py @@ -26,7 +26,7 @@ from fastlane_bot.helpers.tradeinstruction import TradeInstruction from fastlane_bot.events.interface import Pool -from fastlane_bot.utils import tradeBySourceAmount, tradeByTargetAmount, safe_int +from fastlane_bot.utils import tradeBySourceAmount, tradeByTargetAmount from fastlane_bot.config.constants import AGNI_V3_NAME, BUTTER_V3_NAME, CLEOPATRA_V3_NAME, PANCAKESWAP_V3_NAME, \ ETHEREUM, METAVAULT_V3_NAME @@ -748,16 +748,16 @@ def _calc_carbon_output( encoded_order = { both_tokens[0]: { - 'y': safe_int(curve.y_1), - 'z': safe_int(curve.z_1), - 'A': safe_int(curve.A_1), - 'B': safe_int(curve.B_1), + 'y': int(curve.y_1), + 'z': int(curve.z_1), + 'A': int(curve.A_1), + 'B': int(curve.B_1), }, both_tokens[1]: { - 'y': safe_int(curve.y_0), - 'z': safe_int(curve.z_0), - 'A': safe_int(curve.A_0), - 'B': safe_int(curve.B_0), + 'y': int(curve.y_0), + 'z': int(curve.z_0), + 'A': int(curve.A_0), + 'B': int(curve.B_0), }, }[key_token]