pragma solidity ^0.4.24;




library SafeMath {

  
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    
    
    
    if (_a == 0) {
      return 0;
    }

    c = _a * _b;
    assert(c / _a == _b);
    return c;
  }

  
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    
    
    
    return _a / _b;
  }

  
  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
    assert(_b <= _a);
    return _a - _b;
  }

  
  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    c = _a + _b;
    assert(c >= _a);
    return c;
  }
}




contract Ownable {
  address public owner;


  event OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );


  
  constructor() public {
    owner = msg.sender;
  }

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

  
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

  
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }

  
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}




contract Claimable is Ownable {
  address public pendingOwner;

  
  modifier onlyPendingOwner() {
    require(msg.sender == pendingOwner);
    _;
  }

  
  function transferOwnership(address newOwner) public onlyOwner {
    pendingOwner = newOwner;
  }

  
  function claimOwnership() public onlyPendingOwner {
    emit OwnershipTransferred(owner, pendingOwner);
    owner = pendingOwner;
    pendingOwner = address(0);
  }
}




contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address _who) public view returns (uint256);
  function transfer(address _to, uint256 _value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}




contract ZCDistribution is Claimable {

    
    uint256 public numDrops;
    
    uint256 public dropAmount;
    
    address public tokenAddress;

    
    constructor(address _tokenAddr) public {
        assert(_tokenAddr != address(0));
        tokenAddress = _tokenAddr;
    }

    
    event RewardDistributed(address receiver, uint amount);

    
    function multisend(address[] dests, uint256[] values) public onlyOwner returns (uint256) {
        assert(dests.length == values.length);
        uint256 i = 0;
        while (i < dests.length) {
            assert(ERC20Basic(tokenAddress).transfer(dests[i], values[i]));
            emit RewardDistributed(dests[i], values[i]);
            dropAmount += values[i];
            i += 1;
        }
        numDrops += dests.length;
        return i;
    }

    
    function getSentAmount() external view returns (uint256) {
        return dropAmount;
    }
}