ETH Price: $3,289.85 (-2.73%)

Contract

0x805156717A5B5bc4326833589b7f8D619347dA01
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer98810922020-04-16 3:31:191681 days ago1587007879IN
0x80515671...19347dA01
0.156 ETH0.0001477
0x6060604098810492020-04-16 3:20:471681 days ago1587007247IN
 Create: MultiSend
0 ETH0.002699677

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MultiSend

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-04-16
*/

pragma solidity ^0.4.21;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  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;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return a / b;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


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


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}


/// @dev Beware that "send" may fail if the receiver is a contract.
contract MultiSend is Ownable {
  using SafeMath for uint;

  event Send(address _addr, uint _amount);
  event Fail(address _addr, uint _amount);

  // send _amount to each address
  function multiSend(address[] _addrs, uint _amount) external payable {
    require(_amount > 0);

    uint _totalToSend = _amount.mul(_addrs.length);
    require(msg.value >= _totalToSend);

    // try sending to multiple addresses
    uint _totalSent = 0;
    for (uint256 i = 0; i < _addrs.length; i++) {
      require(_addrs[i] != address(0));
      if (_addrs[i].send(_amount)) {
        _totalSent = _totalSent.add(_amount);
        // emit Send(_addrs[i], _amount);
      } else {
        emit Fail(_addrs[i], _amount);
      }
    }

    // refund unsent ether
    if (msg.value > _totalSent) {
      msg.sender.transfer(msg.value.sub(_totalSent));
      // emit Send(msg.sender, msg.value.sub(_totalSent));
    }
  }

  // split paid ether to addresses
  function splitSend(address[] _addrs) external payable {
    require(msg.value > 0);

    // try sending to multiple addresses
    uint _amount = msg.value.div(_addrs.length);
    uint _totalSent = 0;
    for (uint256 i = 0; i < _addrs.length; i++) {
      require(_addrs[i] != address(0));
      if (_addrs[i].send(_amount)) {
        _totalSent = _totalSent.add(_amount);
        // emit Send(_addrs[i], _amount);
      } else {
        emit Fail(_addrs[i], _amount);
      }
    }

    // refund unsent ether
    if (_totalSent != _amount.mul(_addrs.length)) {
      msg.sender.transfer(msg.value.sub(_totalSent));
      // emit Send(msg.sender, msg.value.sub(_totalSent));
    }
  }

  function ownerWithdraw() public onlyOwner {
    owner.transfer(address(this).balance);
  }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_addrs","type":"address[]"}],"name":"splitSend","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"ownerWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_addrs","type":"address[]"},{"name":"_amount","type":"uint256"}],"name":"multiSend","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_addr","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Send","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_addr","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Fail","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

606060405260008054600160a060020a033316600160a060020a03199091161790556105a3806100306000396000f30060606040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663280267af81146100715780634311de8f146100865780638da5cb5b14610099578063de8d3262146100c8578063f2fde38b146100df575b600080fd5b61008460048035602481019101356100fe565b005b341561009157600080fd5b61008461028c565b34156100a457600080fd5b6100ac6102e2565b604051600160a060020a03909116815260200160405180910390f35b6100846024600480358281019291013590356102f1565b34156100ea57600080fd5b610084600160a060020a036004351661047d565b600080803481901161010f57600080fd5b61011f348563ffffffff61051816565b925060009150600090505b8381101561022d57600085858381811061014057fe5b90506020020135600160a060020a0316600160a060020a03161415151561016657600080fd5b84848281811061017257fe5b90506020020135600160a060020a0316600160a060020a03166108fc849081150290604051600060405180830381858888f19350505050156101c5576101be828463ffffffff61052f16565b9150610225565b7f9a32b11edd890aab1099a146becacebd87f83efde8c1749aeb65e9ac70a05c368585838181106101f257fe5b90506020020135600160a060020a031684604051600160a060020a03909216825260208201526040908101905180910390a15b60010161012a565b61023d838563ffffffff61053c16565b821461028557600160a060020a0333166108fc610260348563ffffffff61056516565b9081150290604051600060405180830381858888f19350505050151561028557600080fd5b5050505050565b60005433600160a060020a039081169116146102a757600080fd5b600054600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156102e057600080fd5b565b600054600160a060020a031681565b6000808080841161030157600080fd5b610311848663ffffffff61053c16565b9250348390101561032157600080fd5b5060009050805b8481101561042b57600086868381811061033e57fe5b90506020020135600160a060020a0316600160a060020a03161415151561036457600080fd5b85858281811061037057fe5b90506020020135600160a060020a0316600160a060020a03166108fc859081150290604051600060405180830381858888f19350505050156103c3576103bc828563ffffffff61052f16565b9150610423565b7f9a32b11edd890aab1099a146becacebd87f83efde8c1749aeb65e9ac70a05c368686838181106103f057fe5b90506020020135600160a060020a031685604051600160a060020a03909216825260208201526040908101905180910390a15b600101610328565b8134111561047557600160a060020a0333166108fc610450348563ffffffff61056516565b9081150290604051600060405180830381858888f19350505050151561047557600080fd5b505050505050565b60005433600160a060020a0390811691161461049857600080fd5b600160a060020a03811615156104ad57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000818381151561052557fe5b0490505b92915050565b8181018281101561052957fe5b600082151561054d57506000610529565b5081810281838281151561055d57fe5b041461052957fe5b60008282111561057157fe5b509003905600a165627a7a7230582045b78e35377499162f5d0ca2d1d603554a871d143cf1e37f2bdfe94baf5994f10029

Deployed Bytecode

0x60606040526004361061006c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663280267af81146100715780634311de8f146100865780638da5cb5b14610099578063de8d3262146100c8578063f2fde38b146100df575b600080fd5b61008460048035602481019101356100fe565b005b341561009157600080fd5b61008461028c565b34156100a457600080fd5b6100ac6102e2565b604051600160a060020a03909116815260200160405180910390f35b6100846024600480358281019291013590356102f1565b34156100ea57600080fd5b610084600160a060020a036004351661047d565b600080803481901161010f57600080fd5b61011f348563ffffffff61051816565b925060009150600090505b8381101561022d57600085858381811061014057fe5b90506020020135600160a060020a0316600160a060020a03161415151561016657600080fd5b84848281811061017257fe5b90506020020135600160a060020a0316600160a060020a03166108fc849081150290604051600060405180830381858888f19350505050156101c5576101be828463ffffffff61052f16565b9150610225565b7f9a32b11edd890aab1099a146becacebd87f83efde8c1749aeb65e9ac70a05c368585838181106101f257fe5b90506020020135600160a060020a031684604051600160a060020a03909216825260208201526040908101905180910390a15b60010161012a565b61023d838563ffffffff61053c16565b821461028557600160a060020a0333166108fc610260348563ffffffff61056516565b9081150290604051600060405180830381858888f19350505050151561028557600080fd5b5050505050565b60005433600160a060020a039081169116146102a757600080fd5b600054600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156102e057600080fd5b565b600054600160a060020a031681565b6000808080841161030157600080fd5b610311848663ffffffff61053c16565b9250348390101561032157600080fd5b5060009050805b8481101561042b57600086868381811061033e57fe5b90506020020135600160a060020a0316600160a060020a03161415151561036457600080fd5b85858281811061037057fe5b90506020020135600160a060020a0316600160a060020a03166108fc859081150290604051600060405180830381858888f19350505050156103c3576103bc828563ffffffff61052f16565b9150610423565b7f9a32b11edd890aab1099a146becacebd87f83efde8c1749aeb65e9ac70a05c368686838181106103f057fe5b90506020020135600160a060020a031685604051600160a060020a03909216825260208201526040908101905180910390a15b600101610328565b8134111561047557600160a060020a0333166108fc610450348563ffffffff61056516565b9081150290604051600060405180830381858888f19350505050151561047557600080fd5b505050505050565b60005433600160a060020a0390811691161461049857600080fd5b600160a060020a03811615156104ad57600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000818381151561052557fe5b0490505b92915050565b8181018281101561052957fe5b600082151561054d57506000610529565b5081810281838281151561055d57fe5b041461052957fe5b60008282111561057157fe5b509003905600a165627a7a7230582045b78e35377499162f5d0ca2d1d603554a871d143cf1e37f2bdfe94baf5994f10029

Deployed Bytecode Sourcemap

2281:1785:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3259:706;;;;;;;;;;;;;;;3971:92;;;;;;;;;;;;1403:20;;;;;;;;;;;;;;;-1:-1:-1;;;;;1403:20:0;;;;;;;;;;;;;;2471:746;;;;;;;;;;;;;;;;;2023:178;;;;;;;;;;-1:-1:-1;;;;;2023:178:0;;;;;3259:706;3393:12;;;3328:9;:13;;;3320:22;;;;;;3408:28;:9;3422:6;3408:28;:13;:28;:::i;:::-;3393:43;;3461:1;3443:19;;3486:1;3474:13;;3469:286;3489:17;;;3469:286;;;3551:1;3530:6;;3537:1;3530:9;;;;;;;;;;;;;-1:-1:-1;;;;;3530:9:0;-1:-1:-1;;;;;3530:23:0;;;3522:32;;;;;;;;3567:6;;3574:1;3567:9;;;;;;;;;;;;;-1:-1:-1;;;;;3567:9:0;-1:-1:-1;;;;;3567:14:0;:23;3582:7;3567:23;;;;;;;;;;;;;;;;;;;;;;;3563:185;;;3616:23;:10;3631:7;3616:23;:14;:23;:::i;:::-;3603:36;;3563:185;;;3714:24;3719:6;;3726:1;3719:9;;;;;;;;;;;;;-1:-1:-1;;;;;3719:9:0;3730:7;3714:24;;-1:-1:-1;;;;;3714:24:0;;;;;;;;;;;;;;;;;;;;3563:185;3508:3;;3469:286;;;3809:26;:7;3821:6;3809:26;:11;:26;:::i;:::-;3795:40;;3791:169;;-1:-1:-1;;;;;3846:10:0;:19;:46;3866:25;:9;3880:10;3866:25;:13;:25;:::i;:::-;3846:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3259:706;;;;;:::o;3971:92::-;1836:5;;1822:10;-1:-1:-1;;;;;1822:19:0;;;1836:5;;1822:19;1814:28;;;;;;4020:5;;-1:-1:-1;;;;;4020:5:0;;;;4043:4;4035:21;;4020:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3971:92::o;1403:20::-;;;-1:-1:-1;;;;;1403:20:0;;:::o;2471:746::-;2575:17;;;2554:11;;;2546:20;;;;;;2595:26;:7;2607:6;2595:26;:11;:26;:::i;:::-;2575:46;-1:-1:-1;2636:9:0;:25;;;;2628:34;;;;;;-1:-1:-1;2731:1:0;;-1:-1:-1;2731:1:0;2739:286;2759:17;;;2739:286;;;2821:1;2800:6;;2807:1;2800:9;;;;;;;;;;;;;-1:-1:-1;;;;;2800:9:0;-1:-1:-1;;;;;2800:23:0;;;2792:32;;;;;;;;2837:6;;2844:1;2837:9;;;;;;;;;;;;;-1:-1:-1;;;;;2837:9:0;-1:-1:-1;;;;;2837:14:0;:23;2852:7;2837:23;;;;;;;;;;;;;;;;;;;;;;;2833:185;;;2886:23;:10;2901:7;2886:23;:14;:23;:::i;:::-;2873:36;;2833:185;;;2984:24;2989:6;;2996:1;2989:9;;;;;;;;;;;;;-1:-1:-1;;;;;2989:9:0;3000:7;2984:24;;-1:-1:-1;;;;;2984:24:0;;;;;;;;;;;;;;;;;;;;2833:185;2778:3;;2739:286;;;3077:10;3065:9;:22;3061:151;;;-1:-1:-1;;;;;3098:10:0;:19;:46;3118:25;:9;3132:10;3118:25;:13;:25;:::i;:::-;3098:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2471:746;;;;;;:::o;2023:178::-;1836:5;;1822:10;-1:-1:-1;;;;;1822:19:0;;;1836:5;;1822:19;1814:28;;;;;;-1:-1:-1;;;;;2100:22:0;;;;2092:31;;;;;;2156:5;;-1:-1:-1;;;;;2135:37:0;;;;2156:5;2135:37;;;;;;;;;;2179:5;:16;;-1:-1:-1;;2179:16:0;-1:-1:-1;;;;;2179:16:0;;;;;;;;;;2023:178::o;476:277::-;534:7;746:1;742;:5;;;;;;;;735:12;;476:277;;;;;:::o;1050:127::-;1130:5;;;1149:6;;;;1142:14;;;215:174;273:9;295:6;;291:37;;;-1:-1:-1;319:1:0;312:8;;291:37;-1:-1:-1;338:5:0;;;342:1;338;:5;357;;;;;;;;:10;350:18;;;870:113;928:7;951:6;;;;944:14;;;;-1:-1:-1;972:5:0;;;870:113::o

Swarm Source

bzzr://45b78e35377499162f5d0ca2d1d603554a871d143cf1e37f2bdfe94baf5994f1

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.