Skip to content

Updated function access modifiers #186

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 1 commit into from
Jan 12, 2021
Merged

Updated function access modifiers #186

merged 1 commit into from
Jan 12, 2021

Conversation

aalavandhan
Copy link
Member

fixes #185 #183

@@ -249,7 +249,7 @@ contract UFragmentsPolicy is Ownable {
* @return Computes the total supply adjustment in response to the exchange rate
* and the targetRate.
*/
function computeSupplyDelta(uint256 rate, uint256 targetRate) private view returns (int256) {
function computeSupplyDelta(uint256 rate, uint256 targetRate) internal view returns (int256) {
Copy link
Member

Choose a reason for hiding this comment

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

Confusingly, I think private -> internal has both a gas change (jump w/ no memory clear) and a functional change (visibility within derived contracts). Just pointing out the change to visibility, but I think that's ok.

https://docs.soliditylang.org/en/v0.8.0/control-structures.html?highlight=internal#internal-function-calls
https://docs.soliditylang.org/en/v0.8.0/contracts.html?highlight=private#visibility-and-getters

Copy link
Member Author

Choose a reason for hiding this comment

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

Noted. Yea. That's weird

@aalavandhan aalavandhan merged commit 09be39b into master Jan 12, 2021
@aalavandhan aalavandhan deleted the function-modifiers branch January 12, 2021 20:48
@aalavandhan aalavandhan linked an issue Jan 13, 2021 that may be closed by this pull request
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.

scaledTotalSupply can be pure ERC-20 use external instead of public
3 participants