contract BatchSend is Ownable {
    ERC20 token_address;

    event BatchSent(uint256 total);


    constructor(address _token_address) public{
        token_address = ERC20(_token_address);
    }

    function() external payable{}

    //  mapping (address => uint256) balances;
    // mapping (address => mapping (address => uint256)) allowed;
    // uint256 public totalSupply;

    function multisendToken(address[] memory _receivers, uint256[] memory _amounts) public {
        uint256 total = 0;

        uint256 i = 0;
        for (i; i < _receivers.length; i++) {
            token_address.transferFrom(msg.sender, _receivers[i], _amounts[i]);
            total += _amounts[i];
        }
        emit BatchSent(total);
    }

    function withdrawTokens(ERC20 _token, address _to, uint256 _amount) public onlyOwner {
        assert(_token.transfer(_to, _amount));
    }

}
function multisendToken(address[] memory _receivers, uint256[] memory _amounts) public {
        uint256 total = 0;

        uint256 i = 0;
        for (i; i < _receivers.length; i++) {
            token_address.transferFrom(msg.sender, _receivers[i], _amounts[i]);
            total += _amounts[i];
        }
        emit BatchSent(total);
    }
//  mapping (address => uint256) balances;
// mapping (address => mapping (address => uint256)) allowed;
// uint256 public totalSupply;