-
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
Conversation
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.
The output is not as required by ticket.
For price feed checks we expect:
Found <address> on <price feed provider>
Name: <price feed name>
Decimals: <decimals>
<if this is an implementation address> <in red> this is an implementation contract with a proxy address <proxy address> </in red>
For coin gecko we expect:
Found <address> on <token validator provider>
Name: <token name>
Symbol: <token symbol>
Decimals: <decimals>
The output is literally the same, you can check the output image. |
Same output, no need to change
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 comment
The 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 comment
The 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 comment
The 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 comment
The 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.
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" |
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.
https://certora.atlassian.net/browse/CERT-7874
https://certora.atlassian.net/browse/CERT-7875
PR Summary
Refactor PriceFeedData and Enhance PriceFeedCheck Messaging
Remove Address Fields:
address
andproxy_address
from the__str__
method inPriceFeedData
to streamline its string representation.Enhance Messaging in PriceFeedCheck:
PriceFeedCheck
to includeproxy_address
andorigin_address
in success messages when they are available and differ from the primary address.