contract PerkscoinToken is AbstractToken {
  /**
   * Total number of tokens in circulation.
   */
  uint256 tokenCount;

  /**
   * Create new CannaSOS token smart contract, with given number of tokens issued
   * and given to msg.sender.
   *
   * @param _tokenCount number of tokens to issue and give to msg.sender
   */
  function PerkscoinToken (uint256 _tokenCount) public {
    tokenCount = _tokenCount;
    accounts [msg.sender] = _tokenCount;
  }

  /**
   * Get total number of tokens in circulation.
   *
   * @return total number of tokens in circulation
   */
  function totalSupply () public view returns (uint256 supply) {
    return tokenCount;
  }

  /**
   * Get name of this token.
   *
   * @return name of this token
   */
  function name () public pure returns (string result) {
    return "Perkscoin";
  }

  /**
   * Get symbol of this token.
   *
   * @return symbol of this token
   */
  function symbol () public pure returns (string result) {
    return "PCT";
  }

  /**
   * Get number of decimals for this token.
   *
   * @return number of decimals for this token
   */
  function decimals () public pure returns (uint8 result) {
    return 8;
  }

  /**
   * Change how many tokens given spender is allowed to transfer from message
   * spender.  In order to prevent double spending of allowance, this method
   * receives assumed current allowance value as an argument.  If actual
   * allowance differs from an assumed one, this method just returns false.
   *
   * @param _spender address to allow the owner of to transfer tokens from
   *        message sender
   * @param _currentValue assumed number of tokens currently allowed to be
   *        transferred
   * @param _newValue number of tokens to allow to transfer
   * @return true if token transfer was successfully approved, false otherwise
   */
  function approve (address _spender, uint256 _currentValue, uint256 _newValue)
    public returns (bool success) {
    if (allowance (msg.sender, _spender) == _currentValue)
      return approve (_spender, _newValue);
    else return false;
  }
}
/**
 * CannaSOS token smart contract.
 */
function name () public pure returns (string result) {
    return "Perkscoin";
  }
/**
 * Get name of this token.
 *
 * @return name of this token
 */