Add test context
This commit is contained in:
@@ -40,6 +40,7 @@ contract DODOCirculationHelper is Ownable {
|
||||
|
||||
function getCirculation() public view returns (uint256 circulation) {
|
||||
circulation = 10**9;
|
||||
//TODO circulation 需要乘以decimals吗?
|
||||
for (uint256 i = 0; i < _LOCKED_CONTRACT_ADDRESS_.length; i++) {
|
||||
circulation -= IERC20(_DODO_TOKEN_).balanceOf(_LOCKED_CONTRACT_ADDRESS_[i]);
|
||||
}
|
||||
@@ -54,7 +55,7 @@ contract DODOCirculationHelper is Ownable {
|
||||
uint256 x =
|
||||
DecimalMath.divCeil(
|
||||
dodoCirculationAmout,
|
||||
IERC20(_DODO_TOKEN_).balanceOf(address(this))
|
||||
IERC20(_DODO_TOKEN_).balanceOf(address(this))// TODO 这里应该是vdodo的值吧?
|
||||
);
|
||||
|
||||
if (x <= 10**18) {
|
||||
|
||||
24
contracts/DODOToken/Governance.sol
Normal file
24
contracts/DODOToken/Governance.sol
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
|
||||
Copyright 2020 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
*/
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import {InitializableOwnable} from "../lib/InitializableOwnable.sol";
|
||||
|
||||
contract Governance is InitializableOwnable {
|
||||
|
||||
// ============ Storage ============
|
||||
|
||||
address immutable _DODO_TOKEN_;
|
||||
|
||||
constructor(address dodoToken) public {
|
||||
_DODO_TOKEN_ = dodoToken;
|
||||
}
|
||||
function getLockedvDODO(address account) external pure returns (uint256 lockedvDODO) {
|
||||
lockedvDODO = 0;//DOTO,0 for test
|
||||
}
|
||||
}
|
||||
@@ -90,18 +90,19 @@ contract vDODOToken is InitializableOwnable, ReentrancyGuard {
|
||||
// ============ Constructor ============
|
||||
|
||||
constructor(
|
||||
address _dodoGov,
|
||||
// address _dodoGov,
|
||||
address _dodoToken,
|
||||
address _dodoCirculationHelper,
|
||||
address _dodoApproveProxy,
|
||||
string memory _name,
|
||||
string memory _symbol
|
||||
) public {
|
||||
initOwner(msg.sender);
|
||||
name = _name;
|
||||
symbol = _symbol;
|
||||
decimals = 18;
|
||||
_DODO_APPROVE_PROXY_ = _dodoApproveProxy;
|
||||
_DOOD_GOV_ = _dodoGov;
|
||||
// _DOOD_GOV_ = _dodoGov;
|
||||
_DODO_CIRCULATION_HELPER_ = _dodoCirculationHelper;
|
||||
_DODO_TOKEN_ = _dodoToken;
|
||||
lastRewardBlock = block.number;
|
||||
@@ -128,6 +129,9 @@ contract vDODOToken is InitializableOwnable, ReentrancyGuard {
|
||||
function updateDODOCirculationHelper(address _helper) public onlyOwner {
|
||||
_DODO_CIRCULATION_HELPER_ = _helper;
|
||||
}
|
||||
function updateGovernance(address _governance) public onlyOwner {
|
||||
_DOOD_GOV_ = _governance;
|
||||
}
|
||||
|
||||
// ============ Functions ============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user