dego.finance
ERC20
This contract is an ERC20 token.
                Name
                
                        dego.finance
                
            
            
                Symbol
                DEGO
            
            
                Decimals
                18
            
            
                Total Supply
                9,847,095 DEGO
            
            
            
        
                About
                    
                        link
                    
                     
            
            
                Dego Finance (DEGO) is a cryptocurrency and operates on the Ethereum platform. Dego Finance has a current supply of 8,607,383. The last known price of Dego Finance is 6.29185665 USD and is down -14.25 over the last 24 hours. It is currently trading on 25 active market(s) with $33,701,629.06 traded over the last 24 hours. More information can be found at https://dego.finance/.
            
        Stats
                Public Functions
                17
            
            
                Event Types
                6
            
            
                Code Size
                19,837 bytes
            
        Library Use
Uses SafeMath for uint256.
        Events (6) keyboard_arrow_up
State Variables (16) keyboard_arrow_up
Functions
name keyboard_arrow_up
symbol keyboard_arrow_up
decimals keyboard_arrow_up
setGovernance keyboard_arrow_up
Modifiers help
onlyGovernance checks for the following:
Requirements help
Source Code
function setGovernance(address _governance) public onlyGovernance {
  require(_governance != address(0), "new governance the zero address");
  emit GovernanceTransferred(governance, _governance);
  governance = _governance;
}
enableOpenTransfer keyboard_arrow_up
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address spender, uint256 amount) external returns (bool) {
  require(msg.sender != address(0), "ERC20: approve from the zero address");
  require(spender != address(0), "ERC20: approve to the zero address");
  _allowances[msg.sender][spender] = amount;
  emit Approval(msg.sender, spender, amount);
  return true;
}
allowance keyboard_arrow_up
balanceOf keyboard_arrow_up
totalSupply keyboard_arrow_up
mint keyboard_arrow_up
Requirements help
Source Code
function mint(address account, uint256 amount) external {
  require(account != address(0), "ERC20: mint to the zero address");
  require(_minters[msg.sender], "!minter");
  uint256 curMintSupply = _totalSupply.add(_totalBurnToken);
  uint256 newMintSupply = curMintSupply.add(amount);
  require(newMintSupply <= _maxSupply, "supply is max!");
  _totalSupply = _totalSupply.add(amount);
  _balances[account] = _balances[account].add(amount);
  emit Mint(address(0), account, amount);
  emit Transfer(address(0), account, amount);
}
addMinter keyboard_arrow_up
Modifiers help
onlyGovernance checks for the following:
Source Code
function addMinter(address _minter) public onlyGovernance {
  _minters[_minter] = true;
}
removeMinter keyboard_arrow_up
Modifiers help
onlyGovernance checks for the following:
Source Code
function removeMinter(address _minter) public onlyGovernance {
  _minters[_minter] = false;
}
constructor keyboard_arrow_up
setRate keyboard_arrow_up
Modifiers help
onlyGovernance checks for the following:
Requirements help
Source Code
function setRate(uint256 burn_rate, uint256 reward_rate) public onlyGovernance {
  require(
    _maxGovernValueRate >= burn_rate && burn_rate >= _minGovernValueRate,
    "invalid burn rate"
  );
  require(
    _maxGovernValueRate >= reward_rate && reward_rate >= _minGovernValueRate,
    "invalid reward rate"
  );
  _burnRate = burn_rate;
  _rewardRate = reward_rate;
  emit eveSetRate(burn_rate, reward_rate);
}
setRewardPool keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
One or more of the following:
 -
                    governance
                 must be equal to 
                    the sender's address
                 - OR_openTransfer must be true
                            
                            
                    Source Code
function transfer(address to, uint256 value) external returns (bool) {
  return _transfer(msg.sender, to, value);
}
transferFrom keyboard_arrow_up
Requirements help
One or more of the following:
 -
                    governance
                 must be equal to 
                    the sender's address
                 - OR_openTransfer must be true
                            
                            
                    Source Code
function transferFrom(
  address from,
  address to,
  uint256 value
) external returns (bool) {
  uint256 allow = _allowances[from][msg.sender];
  _allowances[from][msg.sender] = allow.sub(value);
  return _transfer(from, to, value);
}
Internal Functions
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.
internal DegoToken._transfer keyboard_arrow_up
Requirements help
One or more of the following:
 -
                    governance
                 must be equal to 
                    the sender's address
                 - OR_openTransfer must be true
                            
                            
                    Source Code
function _transfer(
  address from,
  address to,
  uint256 value
) internal returns (bool) {
  // :)
  require(_openTransfer || from == governance, "transfer closed");
  require(from != address(0), "ERC20: transfer from the zero address");
  require(to != address(0), "ERC20: transfer to the zero address");
  uint256 sendAmount = value;
  uint256 burnFee = (value.mul(_burnRate)).div(_rateBase);
  if (burnFee > 0) {
    //to burn
    _balances[_burnPool] = _balances[_burnPool].add(burnFee);
    _totalSupply = _totalSupply.sub(burnFee);
    sendAmount = sendAmount.sub(burnFee);
    _totalBurnToken = _totalBurnToken.add(burnFee);
    emit Transfer(from, _burnPool, burnFee);
  }
  uint256 rewardFee = (value.mul(_rewardRate)).div(_rateBase);
  if (rewardFee > 0) {
    //to reward
    _balances[_rewardPool] = _balances[_rewardPool].add(rewardFee);
    sendAmount = sendAmount.sub(rewardFee);
    _totalRewardToken = _totalRewardToken.add(rewardFee);
    emit Transfer(from, _rewardPool, rewardFee);
  }
  _balances[from] = _balances[from].sub(value);
  _balances[to] = _balances[to].add(sendAmount);
  emit Transfer(from, to, sendAmount);
  return true;
}
 
         
    



