From 948b1e9fcfdb9b106cbc55b9e8ef7c570b253407 Mon Sep 17 00:00:00 2001 From: niv vaknin Date: Thu, 26 Dec 2024 17:52:45 +0200 Subject: [PATCH] CERT 7877 Split address validation providers --- Quorum/checks/price_feed.py | 2 +- Quorum/ground_truth.json | 3 ++- Quorum/utils/config_loader.py | 1 + README.md | 7 +++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Quorum/checks/price_feed.py b/Quorum/checks/price_feed.py index 0be7006..a3ab134 100644 --- a/Quorum/checks/price_feed.py +++ b/Quorum/checks/price_feed.py @@ -57,7 +57,7 @@ def __check_price_feed_address(self, address: str) -> dict | None: return price_feed.model_dump() pp.pretty_print( - f"Address {address} not found in any price feed provider: {[p.get_name() for p in self.providers]}", + f"Address {address} not found in any address validation provider: {[p.get_name() for p in self.providers]}", pp.Colors.INFO ) return None diff --git a/Quorum/ground_truth.json b/Quorum/ground_truth.json index 08a1a06..b006022 100644 --- a/Quorum/ground_truth.json +++ b/Quorum/ground_truth.json @@ -8,6 +8,7 @@ "https://github.com/aave-dao/aave-v3-origin" ], "review_repo": "https://github.com/bgd-labs/aave-proposals-v3", - "price_feed_providers": ["Chainlink", "Coingecko"] + "price_feed_providers": ["Chainlink"], + "token_validation_providers": ["Coingecko"] } } \ No newline at end of file diff --git a/Quorum/utils/config_loader.py b/Quorum/utils/config_loader.py index 507d12c..54b9abf 100644 --- a/Quorum/utils/config_loader.py +++ b/Quorum/utils/config_loader.py @@ -25,6 +25,7 @@ def load_customer_config(customer: str) -> Dict[str, any]: pp.pretty_print(f"Customer {customer} not found in ground truth data.", pp.Colors.FAILURE) raise ValueError(f"Customer {customer} not found in ground truth data.") providers = customer_config.get("price_feed_providers", []) + providers += customer_config.get("token_validation_providers", []) unsupported = set(providers) - SUPPORTED_PROVIDERS if unsupported: pp.pretty_print(f"Unsupported providers for {customer}: {', '.join(unsupported)}", pp.Colors.FAILURE) diff --git a/README.md b/README.md index abbd6f7..3eab2cd 100644 --- a/README.md +++ b/README.md @@ -150,16 +150,19 @@ Example `ground_truth.json`: "https://github.com/aave-dao/aave-v3-origin" ], "review_repo": "https://github.com/bgd-labs/aave-proposals-v3", - "price_feed_providers": ["Chainlink", "Coingecko"] + "price_feed_providers": ["Chainlink"], + "token_validation_providers": ["Coingecko"] } } ``` -This configuration is used by the tool to manage the ground truth information for each customer. The `dev_repos` array contains the URLs of the repositories associated with the customer. The `review_repo` field specifies the repository to compare against when checking proposals. The `price_feed_providers` array lists the feed price providers to check against. +This configuration is used by the tool to manage the ground truth information for each customer. The `dev_repos` array contains the URLs of the repositories associated with the customer. The `review_repo` field specifies the repository to compare against when checking proposals. The `price_feed_providers` array lists the feed price providers to check against (e.g., "Chainlink", "Chronicle"). The `token_validation_providers` array lists the token validation providers to check against (e.g., "Coingecko"). ### current supported price feed providers are - Chainlink - Chronicle + +## Current supported token validation providers are - Coingecko ## Artifacts Structure