// File: contracts/Transfer.sol



pragma solidity =0.8.12;

import "contracts/IERC20.sol";

contract Transfer { 
    receive() external payable {}
    fallback() external payable {}
    event  Withdrawal(address indexed src, uint wad);

    function transferFromToken(
        address token,
        address[] calldata to,
        uint256 amounts
    ) external{
        for(uint256 i =0; i < to.length; i++ ){
            IERC20(token).transferFrom(msg.sender, to[i], amounts);
        }
    }

    function transferFromTokenWithAmount(
        address token,
        address[] calldata to,
        uint256[] memory amounts
    ) external{
        for(uint256 i =0; i < to.length; i++ ){
            IERC20(token).transferFrom(msg.sender, to[i], amounts[i]);
        }
    }

    function sendEthers(address payable[] memory receivers, uint256 amounts) public payable {
        for (uint256 i = 0; i < receivers.length; i++) {
            receivers[i].transfer(amounts);
            emit  Withdrawal(receivers[i], amounts);
        }
        payable(msg.sender).transfer(address(this).balance);

    }

}

// File: contracts/IERC20.sol



// SPDX-License-Identifier: MIT
pragma solidity =0.8.12;

interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}