diff --git a/Quorum/apis/price_feeds/price_feed_utils.py b/Quorum/apis/price_feeds/price_feed_utils.py index 5156ae7..7069c70 100644 --- a/Quorum/apis/price_feeds/price_feed_utils.py +++ b/Quorum/apis/price_feeds/price_feed_utils.py @@ -29,7 +29,6 @@ class Config: def __str__(self) -> str: s = "" - s += f"Address: {self.address}\n" if self.name: s += f"Name: {self.name}\n" if self.pair: @@ -38,9 +37,7 @@ def __str__(self) -> str: if pair_str != ",": s += f"Pairs: {pair_str}\n" else: - s += f"Pair: {self.pair}\n" - if self.proxy_address: - s += f"Proxy Address: {self.proxy_address}\n" + s += f"Symbol: {self.pair}\n" if self.decimals: s += f"Decimals: {self.decimals}\n" return s diff --git a/Quorum/checks/price_feed.py b/Quorum/checks/price_feed.py index 3419f77..f9a79a8 100644 --- a/Quorum/checks/price_feed.py +++ b/Quorum/checks/price_feed.py @@ -75,10 +75,20 @@ def __check_price_feed_address(self, address: str, file_name: str) -> dict | Non """ for provider in self.providers: if (price_feed := provider.get_price_feed(self.chain, address)): + + color = pp.Colors.SUCCESS + message = f"Found {address} on {provider.get_name()}\n" + message += str(price_feed) + if price_feed.proxy_address and price_feed.proxy_address.lower() != address.lower(): + message += f"Proxy address: {price_feed.proxy_address}\n" + if address.lower() != price_feed.address.lower(): + color = pp.Colors.FAILURE + message += f"This is an implementation contract with a proxy address\n" + message += f"Origin Address: {price_feed.address}\n" + pp.pretty_print( - f"Found {address} on {provider.get_name()}\n" - f"info: {price_feed}", - pp.Colors.SUCCESS + message, + color ) return price_feed.model_dump()