Skip to content
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

Remove emit ReportTimestampOutOfRange so getData is read only #281

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ahnaguib
Copy link
Contributor

Remove emit ReportTimestampOutOfRange so getData is read only

Remove emit ReportTimestampOutOfRange so getData is read only
Copy link

openzeppelin-code bot commented Aug 21, 2024

Remove emit ReportTimestampOutOfRange so getData is read only

Generated at commit: 27bee4425481554ed859981639f1612a8384d0d7

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
5
23
30
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@aalavandhan
Copy link
Member

aalavandhan commented Aug 21, 2024

Yea. Good call. Was meaning to do this too.

@@ -186,10 +186,10 @@ contract MedianOracle is OwnableUpgradeable, IOracle {
.timestamp;
if (reportTimestampPast < minValidTimestamp) {
// Past report is too old.
emit ReportTimestampOutOfRange(providerAddress);
// Deprecated: emit ReportTimestampOutOfRange(providerAddress);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just remove it, rather than commenting it out. Dont think any of our off-chain services rely on this log.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good idea to leave so that previous logs are still understandable

Copy link
Member

@brandoniles brandoniles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good... can we also add the view modifier to the getData() signature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants