-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change output format for price feed check #52
Changes from all commits
0f7bca6
51e9b73
fdb39fc
221631c
8570213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was not requested There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is an implementation contract with a proxy address </in red> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line - message += f"Origin Address: {price_feed.address}\n" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was but they made a mistake, they don't need the proxy address in the sentence as it is already printed. they want the original. |
||
|
||
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() | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only this sentence should be printed in red
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible to do. and better to put the entire message to not miss it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But everything in red makes you think this is a failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a failure according to the ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the contract uses the proxy address instead of the original they want it in red
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From ticket description, they want only the last line.
Please check this with Michael.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ill merge it and if have a issue ill talk to him.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check with @MichaelMorami before merge.