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

use the gonsForBalance function in transfer function of sOlympusE… #131

Merged
merged 1 commit into from
Dec 24, 2021

Commits on Dec 14, 2021

  1. use the gonsForBalance function in transfer function of sOlympusE…

    …RC20.sol, instead of writing the code again
    
    The first line of transfer function in the sOlympusERC20.sol contract
    calculates the gonValue of the given fragments representated by the
    value parameter.
    
    The contract has a function `gonsForBalance` for this purpose and using
    this can help maintain consistency in the codebase and can help avoid
    any bugs in future if `gonsForBalance` goes through some change!
    
    old code =>
    
    ```
    uint256 gonValue = value.mul( _gonsPerFragment );
    ```
    
    new change =>
    
    ```
    uint256 gonValue = gonsForBalance(value);
    ```
    bajpai244 committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    c720444 View commit details
    Browse the repository at this point in the history