upload test case
This commit is contained in:
@@ -13,9 +13,11 @@ contract Governance is InitializableOwnable {
|
||||
|
||||
// ============ Storage ============
|
||||
|
||||
address immutable _DODO_TOKEN_;
|
||||
address _DODO_TOKEN_;
|
||||
|
||||
constructor(address dodoToken) public {
|
||||
constructor() public {
|
||||
}
|
||||
function setVDODOAddress(address dodoToken) public onlyOwner{
|
||||
_DODO_TOKEN_ = dodoToken;
|
||||
}
|
||||
function getLockedvDODO(address account) external pure returns (uint256 lockedvDODO) {
|
||||
|
||||
@@ -159,7 +159,9 @@ contract vDODOToken is InitializableOwnable, ReentrancyGuard {
|
||||
superiorVDODO = DecimalMath.mulFloor(newVdodoAmount, _SUPERIOR_RATIO_);
|
||||
}
|
||||
|
||||
_mintToSuperior(user, superiorVDODO);
|
||||
if (user.superior != address(0)) {
|
||||
_mintToSuperior(user, superiorVDODO);
|
||||
}
|
||||
|
||||
_updateAlpha(newAlpha);
|
||||
|
||||
@@ -209,7 +211,7 @@ contract vDODOToken is InitializableOwnable, ReentrancyGuard {
|
||||
balance = user.VDODOAmount.sub(DecimalMath.divFloor(user.credit, getLatestAlpha()));
|
||||
}
|
||||
|
||||
function availableBalanceOf(address account) public returns (uint256 balance) {
|
||||
function availableBalanceOf(address account) public view returns (uint256 balance) {
|
||||
uint256 lockedBalance = IGovernance(_DOOD_GOV_).getLockedvDODO(account);
|
||||
balance = balanceOf(account).sub(lockedBalance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user