contract MintableTokenBounty is StandardToken, Ownable {

    event Mint(address indexed to, uint256 amount);

    event MintFinished();

    string public name = "LHBountyCoin";

    string public symbol = "LHBC";

    uint256 public decimals = 8;

    uint256 public decimalMultiplier = 100000000;

    bool public mintingFinished = false;

    MintableToken coin;


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

    function MintableTokenBounty() {
        mint(msg.sender, 30000000 * decimalMultiplier);
    }

    /**
     * @dev Function to mint tokens
     * @param _to The address that will recieve the minted tokens.
     * @param _amount The amount of tokens to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function mint(address _to, uint256 _amount) onlyAdmin canMint returns (bool) {
        totalSupply = totalSupply.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        Mint(_to, _amount);
        return true;
    }

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

    function setCoin(MintableToken _coin) onlyAdmin {
        coin = _coin;
    }

    function exchangeToken() {
        coin.exchangeBounty(msg.sender, balances[msg.sender]);
        totalSupply -= balances[msg.sender];
        balances[msg.sender] = 0;
    }
}
function finishMinting() onlyAdmin returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
}

/**
 * @dev Function to stop minting new tokens.
 * @return True if the operation was successful.
 */