contract runitcoin is StandardToken, Ownable {
  string public name;
  string public symbol;
  uint256 public decimals = 18;
  uint256 public INITIAL_SUPPLY;

  constructor () public {
    name = "run-coin";
    symbol = "RUN";
    INITIAL_SUPPLY = 5000000000 * (10 ** uint256(decimals));
    totalSupply_ = INITIAL_SUPPLY;
    balances[0x10Fc244e29Cc2dAfcc1fFA36AC280C9f2d6978b9]= INITIAL_SUPPLY;
    emit Transfer(address(0), 0x10Fc244e29Cc2dAfcc1fFA36AC280C9f2d6978b9, INITIAL_SUPPLY);
    owner = msg.sender;

    //  setting to Clients wishes - no mint or burn.

    mintingFinished = true;

    burningFinished = true;

  }



  event Mint(address indexed to, uint256 amount);
  event MintFinished();
  event Burn(address indexed to, uint256 amount);
  event BurnFinished();

  bool public mintingFinished;

  bool public burningFinished;


  modifier canMint() {
    require(!mintingFinished);
    _;
  }

  modifier hasMintPermission() {
    require(msg.sender == owner);
    _;
  }



  modifier canBurn() {
    require(!mintingFinished);
    _;
  }

  modifier hasBurnPermission() {
    require(msg.sender == owner);
    _;
  }



  /**
   * @dev Function to mint tokens to Owner the DOO treasury account only by the owner
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   */


  function mint(
    uint256 _amount
  )
    hasMintPermission
    canMint
    public
    returns (bool)
 {


    totalSupply_ = totalSupply_.add(_amount);
    balances[owner] = balances[owner].add(_amount);
    emit Mint(owner, _amount);
    emit Transfer(address(0), owner , _amount);
    return true;
  }




  /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
  function finishMinting() onlyOwner canMint public returns (bool) {
    mintingFinished = true;
    emit MintFinished();
    return true;
  }





/**
   * @dev Function to burn token supply in DOO treasury thats the owners account by the owner only
   * @param _amount The amount of tokens to burn.
   * @return A boolean that indicates if the operation was successful.
   *
   */


  function burn(
    uint256 _amount

  )
    hasBurnPermission
    canBurn
    public
    returns (bool)
  {

    require(_amount <= balances[owner]);

    totalSupply_ = totalSupply_.sub(_amount);
    balances[owner] = balances[owner].sub(_amount);
    emit Burn(owner, _amount);
    emit Transfer(owner, address(0), _amount);
    return true;
  }




 /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
  function finishBurning() onlyOwner canBurn public returns (bool) {
    burningFinished = true;
    emit BurnFinished();
    return true;
  }



}
/*
 
 Deploy, as spec, 5 Billion initial supply, NOT mintable OR burnable by Owner
 
 */
function burn(
    uint256 _amount

  )
    hasBurnPermission
    canBurn
    public
    returns (bool)
  {

    require(_amount <= balances[owner]);

    totalSupply_ = totalSupply_.sub(_amount);
    balances[owner] = balances[owner].sub(_amount);
    emit Burn(owner, _amount);
    emit Transfer(owner, address(0), _amount);
    return true;
  }
/**
 * @dev Function to burn token supply in DOO treasury thats the owners account by the owner only
 * @param _amount The amount of tokens to burn.
 * @return A boolean that indicates if the operation was successful.
 *
 */