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

343 remove test stubs #344

Merged
merged 26 commits into from
Feb 12, 2024
Merged

343 remove test stubs #344

merged 26 commits into from
Feb 12, 2024

Conversation

barakman
Copy link
Collaborator

@barakman barakman commented Feb 1, 2024

Handles issue #343

@barakman barakman mentioned this pull request Feb 1, 2024
Copy link
Contributor

@mikewcasale mikewcasale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why keep AM_SINGLE at all at this point? In bot.py I'd suggest removing the only usage as follows, and then delete the AM_SINGLE attribute definition at class level:

def _find_arbitrage(
        self,
        flashloan_tokens: List[str],
        CCm: CPCContainer,
        arb_mode: str = 'single',
        randomizer=int
    ) -> dict:
        random_mode = self.AO_CANDIDATES if randomizer else None
        arb_finder = self._get_arb_finder(arb_mode)
        finder = arb_finder(
            flashloan_tokens=flashloan_tokens,
            CCm=CCm,
            mode="bothin",
            result=random_mode,
            ConfigObj=self.ConfigObj,
        )
        return {"finder": finder, "r": finder.find_arbitrage()}

@barakman
Copy link
Collaborator Author

barakman commented Feb 2, 2024

Why keep AM_SINGLE at all at this point? In bot.py I'd suggest removing the only usage as follows, and then delete the AM_SINGLE attribute definition at class level:

def _find_arbitrage(
        self,
        flashloan_tokens: List[str],
        CCm: CPCContainer,
        arb_mode: str = 'single',
        randomizer=int
    ) -> dict:
        random_mode = self.AO_CANDIDATES if randomizer else None
        arb_finder = self._get_arb_finder(arb_mode)
        finder = arb_finder(
            flashloan_tokens=flashloan_tokens,
            CCm=CCm,
            mode="bothin",
            result=random_mode,
            ConfigObj=self.ConfigObj,
        )
        return {"finder": finder, "r": finder.find_arbitrage()}

Thanks, that was my thought as well, but I noticed that AM_SINGLE was still used in various other places (primarily in test files), so I thought I'd keep the amount of changes in this PR to a minimum.
But now that you mention it, I'll have another look to see if I can clear that up as well.

Copy link
Contributor

@mikewcasale mikewcasale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - except there are some unresolved conflicts with current main. Can you please resolve the conflicts so that the PR has no conflicts with main... then I'll approve.

mikewcasale
mikewcasale previously approved these changes Feb 5, 2024
@zavelevsky zavelevsky changed the base branch from main to develop February 7, 2024 18:04
Copy link
Contributor

@mikewcasale mikewcasale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced the pro's outweigh the con's with all these changes. Convince me otherwise - and also address the specific comments concerning rawTransaction usage in multiple places.

fastlane_bot/helpers/txhelpers.py Show resolved Hide resolved
fastlane_bot/helpers/txhelpers.py Outdated Show resolved Hide resolved
fastlane_bot/helpers/txhelpers.py Show resolved Hide resolved
fastlane_bot/tests/nbtest/test_038_TestBancorV3Mode.py Outdated Show resolved Hide resolved
fastlane_bot/tests/nbtest/test_039_TestMultiMode.py Outdated Show resolved Hide resolved
fastlane_bot/tests/nbtest/test_040_TestSingleMode.py Outdated Show resolved Hide resolved
fastlane_bot/tests/nbtest/test_050_TestBancorV2.py Outdated Show resolved Hide resolved
@barakman barakman merged commit 59557ac into develop Feb 12, 2024
3 checks passed
@barakman barakman deleted the 343-remove-test-stubs branch February 12, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants