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

#697 - Automatically claim payouts for previous epochs #698

Conversation

trizin
Copy link
Contributor

@trizin trizin commented Feb 29, 2024

Fixes #697

Changes proposed in this PR:

  • Claim payout if seconds left is < s_start_payouts
  • Runs once per epoch.

@trizin trizin linked an issue Feb 29, 2024 that may be closed by this pull request
@trizin trizin requested a review from trentmc February 29, 2024 20:11
@trizin trizin requested a review from trentmc March 1, 2024 11:01
pdr_backend/predictoor/predictoor_agent.py Outdated Show resolved Hide resolved
pdr_backend/predictoor/predictoor_agent.py Outdated Show resolved Hide resolved
pdr_backend/predictoor/predictoor_agent.py Show resolved Hide resolved
@trizin trizin requested a review from trentmc March 2, 2024 15:11
@@ -63,6 +63,21 @@ def test_predictoor_ss_test_dict():
assert d["aimodel_ss"]["input_feeds"] == ["binance ETH/USDT c 1h"]


Copy link
Member

Choose a reason for hiding this comment

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

You don't need a dedicated test for this. It adds more complexity than needed.

Rather, incorporate this into the existing tests surgically.

@@ -336,6 +336,9 @@ def get_current_epoch(self) -> int:
def set_token(self, web3_pp):
pass

def s_start_payouts(self) -> int:
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it's an addition to a mock predictoor_contract object. Not the correct place. If it were to be added, it should be an addition to a mock predictoor_ss object

@trizin trizin requested a review from trentmc March 3, 2024 18:16
@trizin trizin merged commit 22a20fd into main Mar 3, 2024
5 checks passed
@trizin trizin deleted the issue697-predictoor-automatically-claim-payouts-for-previous-epochs branch March 3, 2024 18:50
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.

[predictoor] Automatically claim payouts for previous epochs
2 participants