|
31 | 31 | FEE_CONSTANTS_URL, |
32 | 32 | ALLIANCE_CONFIG_URL, |
33 | 33 | PARTNER_CONFIG_URL, |
| 34 | + EZKL_POOLS_URL, |
34 | 35 | POOL_OVERRIDES_URL |
35 | 36 | ) |
36 | 37 | from fee_allocator.accounting.decorators import round, require_pool_fee_data |
@@ -69,6 +70,7 @@ def __init__( |
69 | 70 | self.fee_config = GlobalFeeConfig(**requests.get(FEE_CONSTANTS_URL).json()) |
70 | 71 | self.alliance_config = AllianceConfig(**requests.get(ALLIANCE_CONFIG_URL).json()) |
71 | 72 | self.partner_config = PartnerConfig(**requests.get(PARTNER_CONFIG_URL).json()) |
| 73 | + self.ezkl_pools = requests.get(EZKL_POOLS_URL).json() |
72 | 74 |
|
73 | 75 | pool_overrides_raw = requests.get(POOL_OVERRIDES_URL).json() |
74 | 76 |
|
@@ -288,8 +290,13 @@ def _fetch_partner_pools(self) -> Dict[str, Partner]: |
288 | 290 |
|
289 | 291 | if partner.pool_types: |
290 | 292 | for pool_type in partner.pool_types: |
291 | | - pool_ids = self.subgraph.fetch_pools_by_type(pool_type) |
292 | | - logger.info(f"Found {len(pool_ids)} {pool_type} pools for {partner.name} on {self.name}") |
| 293 | + if pool_type == "EZKL": |
| 294 | + chain_ezkl_data = self.chains.ezkl_pools.get(self.name, {}) |
| 295 | + pool_ids = chain_ezkl_data.get(self.chains.protocol_version, []) |
| 296 | + logger.info(f"Found {len(pool_ids)} EZKL {self.chains.protocol_version} pools for {partner.name} on {self.name}") |
| 297 | + else: |
| 298 | + pool_ids = self.subgraph.fetch_pools_by_type(pool_type) |
| 299 | + logger.info(f"Found {len(pool_ids)} {pool_type} pools for {partner.name} on {self.name}") |
293 | 300 |
|
294 | 301 | for pool_id in pool_ids: |
295 | 302 | # Skip if already added from explicit list |
@@ -319,7 +326,6 @@ def _get_pool_category(self, has_gauge: bool, is_core: bool) -> Optional[str]: |
319 | 326 | elif not is_core and not has_gauge: |
320 | 327 | return "non_core_without_gauge" |
321 | 328 | elif is_core and not has_gauge: |
322 | | - logger.error("Invalid state: Core pool must have gauge") |
323 | 329 | return None |
324 | 330 | return None |
325 | 331 |
|
|
0 commit comments