2020-11-20 10:45:20 +00:00
|
|
|
pragma solidity 0.6.12;
|
2020-10-14 21:59:12 +00:00
|
|
|
|
2020-11-24 13:46:09 +00:00
|
|
|
import {StableDebtToken} from '../../contracts/protocol/tokenization/StableDebtToken.sol';
|
|
|
|
import {IncentivizedERC20} from '../../contracts/protocol/tokenization/IncentivizedERC20.sol';
|
2020-10-14 21:59:12 +00:00
|
|
|
|
|
|
|
contract StableDebtTokenHarness is StableDebtToken {
|
2020-10-30 15:04:31 +00:00
|
|
|
constructor(
|
|
|
|
address pool,
|
|
|
|
address underlyingAsset,
|
|
|
|
string memory name,
|
|
|
|
string memory symbol,
|
|
|
|
address incentivesController
|
|
|
|
) public StableDebtToken(pool, underlyingAsset, name, symbol, incentivesController) {}
|
2020-10-14 21:59:12 +00:00
|
|
|
|
2021-01-12 11:11:03 +00:00
|
|
|
/**
|
2020-11-23 17:25:47 +00:00
|
|
|
Simplification: The user accumulates no interest (the balance increase is always 0).
|
|
|
|
**/
|
2021-01-12 11:11:03 +00:00
|
|
|
function balanceOf(address account) public view override returns (uint256) {
|
2020-10-30 15:04:31 +00:00
|
|
|
return IncentivizedERC20.balanceOf(account);
|
|
|
|
}
|
2020-10-14 21:59:12 +00:00
|
|
|
|
2021-01-12 11:11:03 +00:00
|
|
|
function _calcTotalSupply(uint256 avgRate) internal view override returns (uint256) {
|
2020-10-30 15:04:31 +00:00
|
|
|
return IncentivizedERC20.totalSupply();
|
|
|
|
}
|
2020-10-14 21:59:12 +00:00
|
|
|
|
2020-10-30 15:04:31 +00:00
|
|
|
function getIncentivesController() public view returns (address) {
|
|
|
|
return address(_incentivesController);
|
|
|
|
}
|
2021-01-12 11:11:03 +00:00
|
|
|
|
|
|
|
function rayWadMul(uint256 aRay, uint256 bWad) external view returns (uint256) {
|
|
|
|
return aRay.rayMul(bWad.wadToRay());
|
2020-11-23 17:25:47 +00:00
|
|
|
}
|
2020-10-30 15:04:31 +00:00
|
|
|
}
|