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

Fix in documentation description - details about number of decimals in returned value. #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/CToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorRepor

/**
* @notice Accrue interest then return the up-to-date exchange rate
* @return Calculated exchange rate scaled by 1e18
* @return Calculated exchange rate scaled by 10**(Underlying Token Decimals + 18 - CToken Decimals)
*/
function exchangeRateCurrent() override public nonReentrant returns (uint) {
accrueInterest();
Expand All @@ -279,7 +279,7 @@ abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorRepor
/**
* @notice Calculates the exchange rate from the underlying to the CToken
* @dev This function does not accrue interest before calculating the exchange rate
* @return Calculated exchange rate scaled by 1e18
* @return Calculated exchange rate scaled by 10**(Underlying Token Decimals + 18 - CToken Decimals)
*/
function exchangeRateStored() override public view returns (uint) {
return exchangeRateStoredInternal();
Expand All @@ -288,7 +288,7 @@ abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorRepor
/**
* @notice Calculates the exchange rate from the underlying to the CToken
* @dev This function does not accrue interest before calculating the exchange rate
* @return calculated exchange rate scaled by 1e18
* @return calculated exchange rate scaled by 10**(Underlying Token Decimals + 18 - CToken Decimals)
*/
function exchangeRateStoredInternal() virtual internal view returns (uint) {
uint _totalSupply = totalSupply;
Expand Down