Skip to content

Commit

Permalink
OCT-1804: incorporate guest list logic into backend (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek authored Jul 22, 2024
2 parents 34a6f2a + c8a13e5 commit e6d8112
Show file tree
Hide file tree
Showing 6 changed files with 1,039 additions and 8 deletions.
480 changes: 480 additions & 0 deletions backend/app/constants.py

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions backend/app/modules/user/antisybil/controller.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import datetime
from datetime import datetime
from typing import Tuple

from app.context.epoch_state import EpochState
from app.context.manager import state_context
from app.modules.registry import get_services


def get_user_antisybil_status(user_address: str) -> (int, datetime):
def get_user_antisybil_status(user_address: str) -> Tuple[int, datetime]:
context = state_context(EpochState.CURRENT)
service = get_services(context.epoch_state).user_antisybil_service
return service.get_antisybil_status(context, user_address)


def update_user_antisybil_status(user_address: str) -> (int, datetime):
def update_user_antisybil_status(user_address: str) -> Tuple[int, datetime]:
context = state_context(EpochState.CURRENT)
service = get_services(context.epoch_state).user_antisybil_service

Expand All @@ -21,4 +22,4 @@ def update_user_antisybil_status(user_address: str) -> (int, datetime):
service.update_antisybil_status(
context, user_address, score, expires_at, all_stamps
)
return score, expires_at
return service.get_antisybil_status(context, user_address)
Loading

0 comments on commit e6d8112

Please sign in to comment.