contract TomoCoin is StandardToken, Pausable {
  string public constant name = 'Tomocoin';
  string public constant symbol = 'TOMO';
  uint256 public constant decimals = 18;
  address public tokenSaleAddress;
  address public tomoDepositAddress; // multisig wallet

  uint256 public constant tomoDeposit = 100000000 * 10**decimals;

  function TomoCoin(address _tomoDepositAddress) public { 
    tomoDepositAddress = _tomoDepositAddress;

    balances[tomoDepositAddress] = tomoDeposit;
    Transfer(0x0, tomoDepositAddress, tomoDeposit);
    totalSupply_ = tomoDeposit;
  }

  function transfer(address _to, uint256 _value) public whenNotPaused returns (bool success) {
    return super.transfer(_to,_value);
  }

  function approve(address _spender, uint256 _value) public whenNotPaused returns (bool success) {
    return super.approve(_spender, _value);
  }

  function balanceOf(address _owner) public view returns (uint256 balance) {
    return super.balanceOf(_owner);
  }

  // Setup Token Sale Smart Contract
  function setTokenSaleAddress(address _tokenSaleAddress) public onlyOwner {
    if (_tokenSaleAddress != address(0)) {
      tokenSaleAddress = _tokenSaleAddress;
    }
  }

  function mint(address _recipient, uint256 _value) public whenNotPaused returns (bool success) {
      require(_value > 0);
      // This function is only called by Token Sale Smart Contract
      require(msg.sender == tokenSaleAddress);

      balances[tomoDepositAddress] = balances[tomoDepositAddress].sub(_value);
      balances[ _recipient ] = balances[_recipient].add(_value);

      Transfer(tomoDepositAddress, _recipient, _value);
      return true;
  }
}
// ================= Pausable Token Contract end ========================
// ================= Tomocoin  start =======================
function setTokenSaleAddress(address _tokenSaleAddress) public onlyOwner {
  if (_tokenSaleAddress != address(0)) {
    tokenSaleAddress = _tokenSaleAddress;
  }
}

// Setup Token Sale Smart Contract