Accounts
0x73...5b29
0x73...5B29

0x73...5B29

$500
This contract's source code is verified!
Contract Metadata
Compiler
0.4.26+commit.4563c3fc
Language
Solidity
Contract Source Code
File 1 of 1: BatchSerder.sol
pragma solidity ^0.4.15;

contract ERC20 {
    function balanceOf(address who) public view returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
    function transferFrom( address from, address to, uint value) returns (bool ok);
}

contract BatchSerder {

	function sendErc20(address _tokenAddress, address[] _to, uint256[] _value) payable returns (bool _success) {
		// input validation
		require(_to.length == _value.length,"to is not equal to value");
		require(_to.length <= 255,"to is more than 255");

		// use the erc20 abi
		ERC20 token = ERC20(_tokenAddress);
		// loop through to addresses and send value
		for (uint8 i = 0; i < _to.length; i++) {
			require(token.transferFrom(msg.sender, _to[i], _value[i]) == true,"batch sending error");
		}
		return true;
	}
}
Settings
{
  "compilationTarget": {
    "contracts/BatchSerder.sol": "BatchSerder"
  },
  "evmVersion": "byzantium",
  "libraries": {},
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"constant":false,"inputs":[{"name":"_tokenAddress","type":"address"},{"name":"_to","type":"address[]"},{"name":"_value","type":"uint256[]"}],"name":"sendErc20","outputs":[{"name":"_success","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"}]