Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kgarbacinski committed Dec 23, 2024
1 parent fb463a9 commit 36d9d35
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions backend/v2/project_rewards/services.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
from dataclasses import dataclass

from sqlalchemy.ext.asyncio import AsyncSession
Expand All @@ -23,11 +22,15 @@ class ProjectRewardsEstimator:

async def get(self) -> CappedQuadriaticFunding:
# Gather all the necessary data for the calculation
all_projects, matched_rewards, allocations = await asyncio.gather(
self.projects_contracts.get_project_addresses(self.epoch_number),
self.matched_rewards_estimator.get(),
get_allocations_with_user_uqs(self.session, self.epoch_number),
)
# all_projects, matched_rewards, allocations = await asyncio.gather(
# self.projects_contracts.get_project_addresses(self.epoch_number),
# self.matched_rewards_estimator.get(),
# get_allocations_with_user_uqs(self.session, self.epoch_number),
# )

all_projects = await self.projects_contracts.get_project_addresses(self.epoch_number)
matched_rewards = await self.matched_rewards_estimator.get()
allocations = await get_allocations_with_user_uqs(self.session, self.epoch_number)

# Calculate using the Capped Quadriatic Funding formula
return capped_quadriatic_funding(
Expand Down

0 comments on commit 36d9d35

Please sign in to comment.