Skip to content

Refactor rebase function parameters to separate positive and negative growth #297

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

Merged
merged 8 commits into from
Apr 1, 2025

Conversation

ahnaguib
Copy link
Contributor

No description provided.

Copy link

openzeppelin-code bot commented Mar 25, 2025

Refactor rebase function parameters to separate positive and negative growth

Generated at commit: 0e7f9d176f0983664e7eabf89d37e578a832eaeb

🚨 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

int256 public rebaseFunctionLowerPercentage;
int256 public rebaseFunctionUpperPercentage;
int256 public rebaseFunctionGrowth;
int256 public rebaseFunctionNegativePercentageLimit;
Copy link
Member

Choose a reason for hiding this comment

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

Here we are basically renaming 3 storage variables and adding one more. Changes look upgrade safe. 👍

We can use the /// @custom:oz-renamed-from operator natspec comment to keep track of pervious names. It helps the oz upgrade tooling keep track of the storage state ..

https://github.com/ampleforth/ampleforth-contracts/blob/master/.openzeppelin/mainnet.json#L155

https://forum.openzeppelin.com/t/rename-struct-property/38519/4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@ahnaguib ahnaguib merged commit 1d13ed3 into master Apr 1, 2025
3 checks passed
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