contract FlogmallAirdropper is Ownable {
    using SafeMath for uint;

    ERC20 public token;
    uint public multiplier;

    /**
     * @dev Constructor.
     * @param tokenAddress Address of the token contract.
     * @param decimals Decimals as specified by the token.
     */
    function FlogmallAirdropper(address tokenAddress, uint decimals) public {
        require(decimals <= 77);  // 10**77 < 2**256-1 < 10**78

        token = ERC20(tokenAddress);
        multiplier = 10**decimals;
    }

    /**
     * @dev Airdrops some tokens to some accounts.
     * @param source The address of the current token holder.
     * @param dests List of account addresses.
     * @param values List of token amounts. Note that these are in whole
     *   tokens. Fractions of tokens are not supported.
     */
    function airdrop(address source, address[] dests, uint[] values) public onlyOwner {
        // This simple validation will catch most mistakes without consuming
        // too much gas.
        require(dests.length == values.length);

        for (uint256 i = 0; i < dests.length; i++) {
            require(token.transferFrom(source, dests[i], values[i].mul(multiplier)));
        }
    }

    /**
     * @dev Return all tokens back to owner, in case any were accidentally
     *   transferred to this contract.
     */
    function returnTokens() public onlyOwner {
        token.transfer(owner, token.balanceOf(this));
    }

    /**
     * @dev Destroy this contract and recover any ether to the owner.
     */
    function destroy() public onlyOwner {
        selfdestruct(owner);
    }
}
/**
 * @title Airdropper
 * @dev An "airdropper" or "bounty" contract for distributing an ERC20 token
 *   en masse.
 * @dev This contract does not hold any tokens. Instead, it transfers directly
 *   from a given source address to the recipients. Ensure that the source
 *   address has set a sufficient allowance for the address of this contract.
 */
function returnTokens() public onlyOwner {
    token.transfer(owner, token.balanceOf(this));
}

/**
 * @dev Return all tokens back to owner, in case any were accidentally
 *   transferred to this contract.
 */