Contract Overview
Balance: 0.02 Ether
Ether Value: $2.49 (@ $124.54/ETH)
Transactions: 11202 txns
 Latest 25 transactions from a total of 11202 transactions

TxHash Age From To Value [TxFee]
0xd9cf70fb48cdc5bc5c8da4c0e5179c6f6b4547609cb264aec895d8daac83b9d03 mins ago0x45bab32444fc610bce82749c50c903247ee2183c  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000257262
0x2d4762733ad1b295a2da397ad36638a72c353789b02804fa713aead513bbbbfa2 hrs 1 min ago0xf87ba8a3dc3620159f555766b4ecf0a183e5ff4a  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000140607
0xa3284fa70fad351d05cff5155b52ed50de57388ecf6b63efc471d8f4ac90cb702 hrs 1 min ago0xf87ba8a3dc3620159f555766b4ecf0a183e5ff4a  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.0004373454
0x8874c155c85bf8ae9e6e62fdb11c91ac167062e0560d522d97cc8b80cdd6b35f6 hrs 25 mins ago0x1ae74e64e4657e98e9472027ec8cdea69a79819a  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
0xba354e7a6a5a3835f37bcb47ab3e60b82f206d06f71b689d0e3d176db7436cf96 hrs 28 mins ago0x1fb92da8e059baf601e4ed24df9ac3a6d411391f  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
0x5b0e19074a7b399b6a4a9b877bea44c0a6a58b253d7fb917d6cf1bcc153ed04e6 hrs 41 mins ago0x458f49abfd2d7baa976c36260e680f418cfb21bb  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
0x2cbfef8727237495891e3a31ab570facdac4827f1650a3f9f5663db8573a98036 hrs 50 mins ago0x5381579f57d6cb85cc43af2b5e5afaeecaaa6e6c  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000257262
0x72e75079fae1b42364a1afbbfa736cdc97980e4861c7b8c349eaab1c25d7896b6 hrs 52 mins ago0x0c8f904694c9017270e5915a399f96185b6dc47f  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
0x9168c3852ea498b3a898b9a83e8ff24492b2c41469d18034a198ee245ed0286812 hrs 12 mins ago0xe055a1a03c830d75b8ac478a7e8c810c34aee947  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000257262
0xbdd57f1e13cc35e3436365babb27628f6df255a1d08200046ae69e7e9e70243012 hrs 17 mins ago0xa8ffd1288830e699bfbb67c79bbc38b374170d50  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000141508
0xa9a60c626914b746e8e8f96e3752ee9774da3cbc3e71f86eda77f441acc4cbc412 hrs 22 mins ago0x709f275835e9378e1995ca7b2a83994ca4fff0b6  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
0x28eb16927ddbe4aee6787388926b2dd2763564636fb11c0e2b9428879ef7a72f12 hrs 34 mins ago0x1e2200830dc5765cceae4a393410f4b75df60c6b  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
0x8a3641fc35df2031e1202b6a5ee87b9f5e723270660b6c5616ed6d03a741232a12 hrs 55 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00008271
0xb143667c24afcc17536cf6b22626e75d49debf8f8ccd5c4a87fec973d5d3832712 hrs 57 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00008271
0x6e102373419c60dcb6ecbe4875d7514b99e6cad8360769dcb9f092aa289ece4d12 hrs 57 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00008271
0x028901f9d65479fb260b1d4ba0d326dda25ec2cc1f491b2db8b7f9a36853119b12 hrs 57 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00008271
0xe1a24dc5b018229eab64db82d646abf51ba7213577a441958fe859788c779ade12 hrs 57 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00008271
0xc8f412fff99d6456678359b56724f596f72372bfce326909214d2934f2d196aa12 hrs 58 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00008271
0xf29f59e82d9cdee85be85a49725872ec39d0126dbd4611f0ec6a714b2956994812 hrs 59 mins ago0xb02c0a0f6a5b0dd8844c3cbb787fff28714bebb1  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000257262
0xffb5aa4b9a4c66c1aa32e8a2c80054ed47b95a1fe99f4154e06832264e7c8ebf14 hrs 52 mins ago0x267827ba6846df1adb841e585b703765182bb9f0  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000514524
0xf62f4e48729361376964da67c93d32690dc74061c444f5c01d7d939d1408bf9614 hrs 59 mins ago0xe24282ce91853c9eef03dfd4c028dc550aaf68fe  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000514524
0x0f4dbbc2f94ba0a29aae75301add173182513d0f8f687954e31520ff53df6cd715 hrs 45 mins ago0x35d415bf0e6bbf8e10eba814e10325c46a2cf009  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.00005788
0xab0ee7e32cff9ac4527cb7eda939626380899a9365d0a314f85fcab8574859ce16 hrs 13 mins ago0x9bcac204b1b7faf3c3137ebc289528a8597a3b58  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000141508
0xf5bb965c0b1cdcb1b763edd072d0b4ad997dd0567b365496566d13b7deb1a9e716 hrs 34 mins ago0x9824d239f4695c070127d5526fee0eb475f68686  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.0001886588
0x04db73a499dce1d7e1fcd6de64232dd46e30c0473f4012ec03a9fcebbfbd1bfc18 hrs 1 min ago0x75c95987dd2c0d1e240744c746d7f2f3739ca6f3  IN   0x35223bc965dbd91b41ddf1f540e8c7e4758535510 Ether0.000171508
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Airdrop
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

/**
 * @title -Airdrop
 * every erc20 token can doAirdrop here 
 * Contact us for further cooperation [email protected]
 *
 *  █████╗  ██╗ ██████╗  ██████╗  ██████╗   ██████╗  ██████╗
 * ██╔══██╗ ██║ ██╔══██╗ ██╔══██╗ ██╔══██╗ ██╔═══██╗ ██╔══██╗
 * ███████║ ██║ ██████╔╝ ██║  ██║ ██████╔╝ ██║   ██║ ██████╔╝
 * ██╔══██║ ██║ ██╔══██╗ ██║  ██║ ██╔══██╗ ██║   ██║ ██╔═══╝
 * ██║  ██║ ██║ ██║  ██║ ██████╔╝ ██║  ██║ ╚██████╔╝ ██║
 * ╚═╝  ╚═╝ ╚═╝ ╚═╝  ╚═╝ ╚═════╝  ╚═╝  ╚═╝  ╚═════╝  ╚═╝
 *
 * ---
 * POWERED BY
 * ╦   ╔═╗ ╦═╗ ╔╦╗ ╦   ╔═╗ ╔═╗ ╔═╗      ╔╦╗ ╔═╗ ╔═╗ ╔╦╗
 * ║   ║ ║ ╠╦╝  ║║ ║   ║╣  ╚═╗ ╚═╗       ║  ║╣  ╠═╣ ║║║
 * ╩═╝ ╚═╝ ╩╚═ ═╩╝ ╩═╝ ╚═╝ ╚═╝ ╚═╝       ╩  ╚═╝ ╩ ╩ ╩ ╩
 * game at http://lordless.games
 * code at https://github.com/lordlessio
 */


/**
 * @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 OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() 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 relinquish control of the contract.
   * @notice Renouncing to ownership will leave the contract without an owner.
   * It will not be possible to call the functions with the `onlyOwner`
   * modifier anymore.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

  /**
   * @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 {
    _transferOwnership(_newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}


/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() public onlyOwner whenNotPaused {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() public onlyOwner whenPaused {
    paused = false;
    emit Unpause();
  }
}


/**
 * @title Roles
 * @author Francisco Giordano (@frangio)
 * @dev Library for managing addresses assigned to a Role.
 * See RBAC.sol for example usage.
 */
library Roles {
  struct Role {
    mapping (address => bool) bearer;
  }

  /**
   * @dev give an address access to this role
   */
  function add(Role storage _role, address _addr)
    internal
  {
    _role.bearer[_addr] = true;
  }

  /**
   * @dev remove an address' access to this role
   */
  function remove(Role storage _role, address _addr)
    internal
  {
    _role.bearer[_addr] = false;
  }

  /**
   * @dev check if an address has this role
   * // reverts
   */
  function check(Role storage _role, address _addr)
    internal
    view
  {
    require(has(_role, _addr));
  }

  /**
   * @dev check if an address has this role
   * @return bool
   */
  function has(Role storage _role, address _addr)
    internal
    view
    returns (bool)
  {
    return _role.bearer[_addr];
  }
}


/**
 * @title RBAC (Role-Based Access Control)
 * @author Matt Condon (@Shrugs)
 * @dev Stores and provides setters and getters for roles and addresses.
 * Supports unlimited numbers of roles and addresses.
 * See //contracts/mocks/RBACMock.sol for an example of usage.
 * This RBAC method uses strings to key roles. It may be beneficial
 * for you to write your own implementation of this interface using Enums or similar.
 */
contract RBAC {
  using Roles for Roles.Role;

  mapping (string => Roles.Role) private roles;

  event RoleAdded(address indexed operator, string role);
  event RoleRemoved(address indexed operator, string role);

  /**
   * @dev reverts if addr does not have role
   * @param _operator address
   * @param _role the name of the role
   * // reverts
   */
  function checkRole(address _operator, string _role)
    public
    view
  {
    roles[_role].check(_operator);
  }

  /**
   * @dev determine if addr has role
   * @param _operator address
   * @param _role the name of the role
   * @return bool
   */
  function hasRole(address _operator, string _role)
    public
    view
    returns (bool)
  {
    return roles[_role].has(_operator);
  }

  /**
   * @dev add a role to an address
   * @param _operator address
   * @param _role the name of the role
   */
  function addRole(address _operator, string _role)
    internal
  {
    roles[_role].add(_operator);
    emit RoleAdded(_operator, _role);
  }

  /**
   * @dev remove a role from an address
   * @param _operator address
   * @param _role the name of the role
   */
  function removeRole(address _operator, string _role)
    internal
  {
    roles[_role].remove(_operator);
    emit RoleRemoved(_operator, _role);
  }

  /**
   * @dev modifier to scope access to a single role (uses msg.sender as addr)
   * @param _role the name of the role
   * // reverts
   */
  modifier onlyRole(string _role)
  {
    checkRole(msg.sender, _role);
    _;
  }

  /**
   * @dev modifier to scope access to a set of roles (uses msg.sender as addr)
   * @param _roles the names of the roles to scope access to
   * // reverts
   *
   * @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
   *  see: https://github.com/ethereum/solidity/issues/2467
   */
  // modifier onlyRoles(string[] _roles) {
  //     bool hasAnyRole = false;
  //     for (uint8 i = 0; i < _roles.length; i++) {
  //         if (hasRole(msg.sender, _roles[i])) {
  //             hasAnyRole = true;
  //             break;
  //         }
  //     }

  //     require(hasAnyRole);

  //     _;
  // }
}


/**
 * @title Superuser
 * @dev The Superuser contract defines a single superuser who can transfer the ownership
 * of a contract to a new address, even if he is not the owner.
 * A superuser can transfer his role to a new address.
 */
contract Superuser is Ownable, RBAC {
  string public constant ROLE_SUPERUSER = "superuser";

  constructor () public {
    addRole(msg.sender, ROLE_SUPERUSER);
  }

  /**
   * @dev Throws if called by any account that's not a superuser.
   */
  modifier onlySuperuser() {
    checkRole(msg.sender, ROLE_SUPERUSER);
    _;
  }

  modifier onlyOwnerOrSuperuser() {
    require(msg.sender == owner || isSuperuser(msg.sender));
    _;
  }

  /**
   * @dev getter to determine if address has superuser role
   */
  function isSuperuser(address _addr)
    public
    view
    returns (bool)
  {
    return hasRole(_addr, ROLE_SUPERUSER);
  }

  /**
   * @dev Allows the current superuser to transfer his role to a newSuperuser.
   * @param _newSuperuser The address to transfer ownership to.
   */
  function transferSuperuser(address _newSuperuser) public onlySuperuser {
    require(_newSuperuser != address(0));
    removeRole(msg.sender, ROLE_SUPERUSER);
    addRole(_newSuperuser, ROLE_SUPERUSER);
  }

  /**
   * @dev Allows the current superuser or owner to transfer control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function transferOwnership(address _newOwner) public onlyOwnerOrSuperuser {
    _transferOwnership(_newOwner);
  }
}


/**
 * @title SafeMath
 */
library SafeMath {
  /**
  * @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 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;
    require(c / a == b, "SafeMath mul failed");
    return c;
  }

  /**
  * @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) 
  {
    require(b <= a, "SafeMath sub failed");
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b)
      internal
      pure
      returns (uint256 c) 
  {
    c = a + b;
    require(c >= a, "SafeMath add failed");
    return c;
  }
  
  /**
    * @dev gives square root of given x.
    */
  function sqrt(uint256 x)
      internal
      pure
      returns (uint256 y) 
  {
    uint256 z = ((add(x,1)) / 2);
    y = x;
    while (z < y) 
    {
      y = z;
      z = ((add((x / z),z)) / 2);
    }
  }
  
  /**
    * @dev gives square. batchplies x by x
    */
  function sq(uint256 x)
      internal
      pure
      returns (uint256)
  {
    return (mul(x,x));
  }
  
  /**
    * @dev x to the power of y 
    */
  function pwr(uint256 x, uint256 y)
      internal 
      pure 
      returns (uint256)
  {
    if (x==0)
        return (0);
    else if (y==0)
        return (1);
    else 
    {
      uint256 z = x;
      for (uint256 i=1; i < y; i++)
        z = mul(z,x);
      return (z);
    }
  }
}


/**
 * @title -airdrop Interface
 */

interface IAirdrop {

  function isVerifiedUser(address user) external view returns (bool);
  function isCollected(address user, bytes32 airdropId) external view returns (bool);
  function getAirdropIds()external view returns(bytes32[]);
  function getAirdropIdsByContractAddress(address contractAddress)external view returns(bytes32[]);
  function getUser(address userAddress) external view returns (
    address,
    string,
    uint256,
    uint256
  );
  function getAirdrop(
    bytes32 airdropId
    ) external view returns (address, uint256, bool);
  function updateVeifyFee(uint256 fee) external;
  function verifyUser(string name) external payable;
  function addAirdrop (address contractAddress, uint256 countPerUser, bool needVerifiedUser) external;
  function claim(bytes32 airdropId) external;
  function withdrawToken(address contractAddress, address to) external;
  function withdrawEth(address to) external;

  
  

  /* Events */

  event UpdateVeifyFee (
    uint256 indexed fee
  );

  event VerifyUser (
    address indexed user
  );

  event AddAirdrop (
    address indexed contractAddress,
    uint256 countPerUser,
    bool needVerifiedUser
  );

  event Claim (
    bytes32 airdropId,
    address user
  );

  event WithdrawToken (
    address indexed contractAddress,
    address to,
    uint256 count
  );

  event WithdrawEth (
    address to,
    uint256 count
  );
}







contract ERC20Interface {
  function transfer(address to, uint tokens) public returns (bool success);
  function transferFrom(address from, address to, uint tokens) public returns (bool success);
  function balanceOf(address tokenOwner) public view returns (uint balance);
}
contract Airdrop is Superuser, Pausable, IAirdrop {

  using SafeMath for *;

  struct User {
    address user;
    string name;
    uint256 verifytime;
    uint256 verifyFee;
  }

  struct Airdrop {
    address contractAddress;
    uint256 countPerUser; // wei
    bool needVerifiedUser;
  }

  uint256 public verifyFee = 2e16; // 0.02 eth
  bytes32[] public airdropIds; //

  mapping (address => User) public userAddressToUser;
  mapping (address => bytes32[]) contractAddressToAirdropId;
  mapping (bytes32 => Airdrop) airdropIdToAirdrop;
  mapping (bytes32 => mapping (address => bool)) airdropIdToUserAddress;
  mapping (address => uint256) contractAddressToAirdropCount;


  function isVerifiedUser(address user) external view returns (bool){
    return userAddressToUser[user].user == user;
  }

  function isCollected(address user, bytes32 airdropId) external view returns (bool) {
    return airdropIdToUserAddress[airdropId][user];
  }

  function getAirdropIdsByContractAddress(address contractAddress)external view returns(bytes32[]){
    return contractAddressToAirdropId[contractAddress];
  }
  function getAirdropIds()external view returns(bytes32[]){
    return airdropIds;
  }

  function tokenTotalClaim(address contractAddress)external view returns(uint256){
    return contractAddressToAirdropCount[contractAddress];
  }

  function getUser(
    address userAddress
    ) external view returns (address, string, uint256 ,uint256){
    User storage user = userAddressToUser[userAddress];
    return (user.user, user.name, user.verifytime, user.verifyFee);
  }

  function getAirdrop(
    bytes32 airdropId
    ) external view returns (address, uint256, bool){
    Airdrop storage airdrop = airdropIdToAirdrop[airdropId];
    return (airdrop.contractAddress, airdrop.countPerUser, airdrop.needVerifiedUser);
  }
  
  function updateVeifyFee(uint256 fee) external onlyOwnerOrSuperuser{
    verifyFee = fee;
    emit UpdateVeifyFee(fee);
  }

  function verifyUser(string name) external payable whenNotPaused {
    address sender = msg.sender;
    require(!this.isVerifiedUser(sender), "Is Verified User");
    uint256 _ethAmount = msg.value;
    require(_ethAmount >= verifyFee, "LESS FEE");
    uint256 payExcess = _ethAmount.sub(verifyFee);
    if(payExcess > 0) {
      sender.transfer(payExcess);
    }
    
    User memory _user = User(
      sender,
      name,
      block.timestamp,
      verifyFee
    );

    userAddressToUser[sender] = _user;
    emit VerifyUser(msg.sender);
  }

  function addAirdrop(address contractAddress, uint256 countPerUser, bool needVerifiedUser) external onlyOwnerOrSuperuser{
    bytes32 airdropId = keccak256(
      abi.encodePacked(block.timestamp, contractAddress, countPerUser, needVerifiedUser)
    );

    Airdrop memory _airdrop = Airdrop(
      contractAddress,
      countPerUser,
      needVerifiedUser
    );
    airdropIdToAirdrop[airdropId] = _airdrop;
    airdropIds.push(airdropId);
    contractAddressToAirdropId[contractAddress].push(airdropId);
    emit AddAirdrop(contractAddress, countPerUser, needVerifiedUser);
  }

  function claim(bytes32 airdropId) external whenNotPaused {

    Airdrop storage _airdrop = airdropIdToAirdrop[airdropId];
    if (_airdrop.needVerifiedUser) {
      require(this.isVerifiedUser(msg.sender));
    }
    
    require(!this.isCollected(msg.sender, airdropId), "The same Airdrop can only be collected once per address.");
    ERC20Interface erc20 = ERC20Interface(_airdrop.contractAddress);
    erc20.transfer(msg.sender, _airdrop.countPerUser);
    airdropIdToUserAddress[airdropId][msg.sender] = true;
    // update to
    contractAddressToAirdropCount[_airdrop.contractAddress] = 
      contractAddressToAirdropCount[_airdrop.contractAddress].add(_airdrop.countPerUser);
    emit Claim(airdropId, msg.sender);
  }

  function withdrawToken(address contractAddress, address to) external onlyOwnerOrSuperuser {
    ERC20Interface erc20 = ERC20Interface(contractAddress);
    uint256 balance = erc20.balanceOf(address(this));
    erc20.transfer(to, balance);
    emit WithdrawToken(contractAddress, to, balance);
  }

  function withdrawEth(address to) external onlySuperuser {
    uint256 balance = address(this).balance;
    to.transfer(balance);
    emit WithdrawEth(to, balance);
  }

}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"_operator","type":"address"},{"name":"_role","type":"string"}],"name":"checkRole","outputs":[],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_operator","type":"address"},{"name":"_role","type":"string"}],"name":"hasRole","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"withdrawEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"contractAddress","type":"address"},{"name":"to","type":"address"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"isVerifiedUser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"contractAddress","type":"address"}],"name":"getAirdropIdsByContractAddress","outputs":[{"name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newSuperuser","type":"address"}],"name":"transferSuperuser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"airdropId","type":"bytes32"}],"name":"getAirdrop","outputs":[{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"airdropIds","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAirdropIds","outputs":[{"name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"verifyFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"userAddress","type":"address"}],"name":"getUser","outputs":[{"name":"","type":"address"},{"name":"","type":"string"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"fee","type":"uint256"}],"name":"updateVeifyFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"contractAddress","type":"address"}],"name":"tokenTotalClaim","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"contractAddress","type":"address"},{"name":"countPerUser","type":"uint256"},{"name":"needVerifiedUser","type":"bool"}],"name":"addAirdrop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"user","type":"address"},{"name":"airdropId","type":"bytes32"}],"name":"isCollected","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"isSuperuser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"airdropId","type":"bytes32"}],"name":"claim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"userAddressToUser","outputs":[{"name":"user","type":"address"},{"name":"name","type":"string"},{"name":"verifytime","type":"uint256"},{"name":"verifyFee","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"}],"name":"verifyUser","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"ROLE_SUPERUSER","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"fee","type":"uint256"}],"name":"UpdateVeifyFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"}],"name":"VerifyUser","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractAddress","type":"address"},{"indexed":false,"name":"countPerUser","type":"uint256"},{"indexed":false,"name":"needVerifiedUser","type":"bool"}],"name":"AddAirdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"airdropId","type":"bytes32"},{"indexed":false,"name":"user","type":"address"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"contractAddress","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"count","type":"uint256"}],"name":"WithdrawToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"count","type":"uint256"}],"name":"WithdrawEth","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"role","type":"string"}],"name":"RoleAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"role","type":"string"}],"name":"RoleRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6002805460ff1916905566470de4df82000060035560008054600160a060020a0319163390811790915560c0604052600960809081527f737570657275736572000000000000000000000000000000000000000000000060a0526200006e919064010000000062000074810204565b620001bf565b620000f0826001836040518082805190602001908083835b60208310620000ad5780518252601f1990920191602091820191016200008c565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506401000000006200019a810262001b031704565b81600160a060020a03167fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b700489826040518080602001828103825283818151815260200191508051906020019080838360005b838110156200015b57818101518382015260200162000141565b50505050905090810190601f168015620001895780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b611c5e80620001cf6000396000f30060806040526004361061015e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630988ca8c8114610163578063217fe6c6146101cc57806325e16063146102475780633aeac4e1146102685780633da1c0c31461028f5780633f4ba83a146102b0578063559ac092146102c557806357c393fa146103365780635c975abb146103575780635ce32aca1461036c5780635e5fda85146103ae57806362f5aa4c146103d8578063669d43d4146103ed5780636f77926b14610402578063715018a6146104c25780638456cb59146104d757806389b61a85146104ec5780638ad8998c146105045780638da5cb5b1461052557806397eb0eab146105565780639977a1081461057f578063bceee05e146105a3578063bd66528a146105c4578063c1324de1146105dc578063e600c817146105fd578063ebb4f48414610610578063f2fde38b1461069a575b600080fd5b34801561016f57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101ca958335600160a060020a03169536956044949193909101919081908401838280828437509497506106bb9650505050505050565b005b3480156101d857600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610233958335600160a060020a03169536956044949193909101919081908401838280828437509497506107299650505050505050565b604080519115158252519081900360200190f35b34801561025357600080fd5b506101ca600160a060020a036004351661079c565b34801561027457600080fd5b506101ca600160a060020a036004358116906024351661084e565b34801561029b57600080fd5b50610233600160a060020a03600435166109f0565b3480156102bc57600080fd5b506101ca610a11565b3480156102d157600080fd5b506102e6600160a060020a0360043516610a6e565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561032257818101518382015260200161030a565b505050509050019250505060405180910390f35b34801561034257600080fd5b506101ca600160a060020a0360043516610adb565b34801561036357600080fd5b50610233610b7a565b34801561037857600080fd5b50610384600435610b83565b60408051600160a060020a0390941684526020840192909252151582820152519081900360600190f35b3480156103ba57600080fd5b506103c6600435610bb2565b60408051918252519081900360200190f35b3480156103e457600080fd5b506102e6610bd1565b3480156103f957600080fd5b506103c6610c2b565b34801561040e57600080fd5b50610423600160a060020a0360043516610c31565b6040518085600160a060020a0316600160a060020a0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561048457818101518382015260200161046c565b50505050905090810190601f1680156104b15780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3480156104ce57600080fd5b506101ca610d05565b3480156104e357600080fd5b506101ca610d71565b3480156104f857600080fd5b506101ca600435610dd0565b34801561051057600080fd5b506103c6600160a060020a0360043516610e2b565b34801561053157600080fd5b5061053a610e46565b60408051600160a060020a039092168252519081900360200190f35b34801561056257600080fd5b506101ca600160a060020a03600435166024356044351515610e55565b34801561058b57600080fd5b50610233600160a060020a0360043516602435611055565b3480156105af57600080fd5b50610233600160a060020a036004351661107f565b3480156105d057600080fd5b506101ca6004356110b4565b3480156105e857600080fd5b50610423600160a060020a03600435166113c9565b6101ca6004803560248101910135611489565b34801561061c57600080fd5b5061062561173c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561065f578181015183820152602001610647565b50505050905090810190601f16801561068c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106a657600080fd5b506101ca600160a060020a0360043516611761565b610725826001836040518082805190602001908083835b602083106106f15780518252601f1990920191602091820191016106d2565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611792565b5050565b6000610795836001846040518082805190602001908083835b602083106107615780518252601f199092019160209182019101610742565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220929150506117a7565b9392505050565b60006107cb33604080519081016040528060098152602001600080516020611c138339815191528152506106bb565b50604051303190600160a060020a0383169082156108fc029083906000818181858888f19350505050158015610805573d6000803e3d6000fd5b5060408051600160a060020a03841681526020810183905281517fccbd99ba6da8f29b2a4f65e474e3c3973564d356c162c08d45f3dc7f0cb5b3aa929181900390910190a15050565b600080548190600160a060020a031633148061086e575061086e3361107f565b151561087957600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051859350600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156108dd57600080fd5b505af11580156108f1573d6000803e3d6000fd5b505050506040513d602081101561090757600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0386811660048301526024820184905291519293509084169163a9059cbb916044808201926020929091908290030181600087803b15801561097857600080fd5b505af115801561098c573d6000803e3d6000fd5b505050506040513d60208110156109a257600080fd5b505060408051600160a060020a038581168252602082018490528251908716927f037238854fe57fbf51f09946f854fc3916fe83938d6521f09bd05463839f1304928290030190a250505050565b600160a060020a039081166000818152600560205260409020549091161490565b600054600160a060020a03163314610a2857600080fd5b60025460ff161515610a3957600080fd5b6002805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600160a060020a038116600090815260066020908152604091829020805483518184028101840190945280845260609392830182828015610acf57602002820191906000526020600020905b81548152600190910190602001808311610aba575b50505050509050919050565b610b0833604080519081016040528060098152602001600080516020611c138339815191528152506106bb565b600160a060020a0381161515610b1d57600080fd5b610b4a33604080519081016040528060098152602001600080516020611c138339815191528152506117c6565b610b7781604080519081016040528060098152602001600080516020611c138339815191528152506118d7565b50565b60025460ff1681565b600090815260076020526040902080546001820154600290920154600160a060020a039091169260ff90911690565b6004805482908110610bc057fe5b600091825260209091200154905081565b60606004805480602002602001604051908101604052809291908181526020018280548015610c2057602002820191906000526020600020905b81548152600190910190602001808311610c0b575b505050505090505b90565b60035481565b600160a060020a038181166000908152600560209081526040808320805460028083015460038401546001808601805488516101009382161593909302600019011694909404601f810189900489028201890190975286815297986060988a98899896909216959091859190830182828015610cee5780601f10610cc357610100808354040283529160200191610cee565b820191906000526020600020905b815481529060010190602001808311610cd157829003601f168201915b505050505092509450945094509450509193509193565b600054600160a060020a03163314610d1c57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a03163314610d8857600080fd5b60025460ff1615610d9857600080fd5b6002805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600054600160a060020a0316331480610ded5750610ded3361107f565b1515610df857600080fd5b600381905560405181907f4c513053049823dd95156d0dbe75c250a1afe04b62dcaa8a8d2d099f2836029a90600090a250565b600160a060020a031660009081526009602052604090205490565b600054600160a060020a031681565b6000610e5f611b28565b600054600160a060020a0316331480610e7c5750610e7c3361107f565b1515610e8757600080fd5b60408051426020808301919091526c01000000000000000000000000600160a060020a0389160282840152605482018790527f010000000000000000000000000000000000000000000000000000000000000086151502607483015282516055818403018152607590920192839052815191929182918401908083835b60208310610f235780518252601f199092019160209182019101610f04565b51815160209384036101000a600019018019909216911617905260408051929094018290038220606083018552600160a060020a038c81168085528484018d81528c15158689018181526000868152600788528a81208951815473ffffffffffffffffffffffffffffffffffffffff19169716969096178655925160018087019190915590516002909501805460ff191695151595909517909455600480548086019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01859055828252600686528882208054948501815582529085902090920183905586518d81529384019190915285519199509297509195507faef626be1e9e10a1e186cebefba6f6f988afb2a7f04b3b489a38a01a74d7ab219450819003909201919050a25050505050565b6000908152600860209081526040808320600160a060020a03949094168352929052205460ff1690565b60006110ae82604080519081016040528060098152602001600080516020611c13833981519152815250610729565b92915050565b600254600090819060ff16156110c957600080fd5b6000838152600760205260409020600281015490925060ff161561117657604080517f3da1c0c300000000000000000000000000000000000000000000000000000000815233600482015290513091633da1c0c39160248083019260209291908290030181600087803b15801561113f57600080fd5b505af1158015611153573d6000803e3d6000fd5b505050506040513d602081101561116957600080fd5b5051151561117657600080fd5b604080517f9977a1080000000000000000000000000000000000000000000000000000000081523360048201526024810185905290513091639977a1089160448083019260209291908290030181600087803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50511561127c576040805160e560020a62461bcd02815260206004820152603860248201527f5468652073616d652041697264726f702063616e206f6e6c7920626520636f6c60448201527f6c6563746564206f6e63652070657220616464726573732e0000000000000000606482015290519081900360840190fd5b5080546001820154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481019290925251600160a060020a0390921691829163a9059cbb9160448083019260209291908290030181600087803b1580156112ef57600080fd5b505af1158015611303573d6000803e3d6000fd5b505050506040513d602081101561131957600080fd5b505060008381526008602090815260408083203384528252808320805460ff191660019081179091558501548554600160a060020a0316845260099092529091205461136a9163ffffffff6119a916565b8254600160a060020a0316600090815260096020908152604091829020929092558051858152339281019290925280517f15d625b4b35864ffb5bdbb3fc4b62ceb07b3c588af6945a1934ccb822a2397559281900390910190a1505050565b6005602090815260009182526040918290208054600180830180548651600261010094831615949094026000190190911692909204601f8101869004860283018601909652858252600160a060020a039092169492939092908301828280156114735780601f1061144857610100808354040283529160200191611473565b820191906000526020600020905b81548152906001019060200180831161145657829003601f168201915b5050505050908060020154908060030154905084565b6000806000611496611b48565b60025460ff16156114a657600080fd5b604080517f3da1c0c3000000000000000000000000000000000000000000000000000000008152336004820181905291519195503091633da1c0c3916024808201926020929091908290030181600087803b15801561150457600080fd5b505af1158015611518573d6000803e3d6000fd5b505050506040513d602081101561152e57600080fd5b505115611585576040805160e560020a62461bcd02815260206004820152601060248201527f4973205665726966696564205573657200000000000000000000000000000000604482015290519081900360640190fd5b6003543493508310156115e2576040805160e560020a62461bcd02815260206004820152600860248201527f4c45535320464545000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6003546115f690849063ffffffff611a0416565b9150600082111561163957604051600160a060020a0385169083156108fc029084906000818181858888f19350505050158015611637573d6000803e3d6000fd5b505b60806040519081016040528085600160a060020a0316815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437505050928452505042602080840191909152600354604093840152600160a060020a03888116600090815260058352939093208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835583810151805194955085946116f3935060018501929190910190611b7a565b5060408281015160028301556060909201516003909101555133907f2a5effbcc0d15a981fe0f4b1e4d0c5a8cd604a70619f51f91898b3aa0344885790600090a2505050505050565b6040805180820190915260098152600080516020611c13833981519152602082015281565b600054600160a060020a031633148061177e575061177e3361107f565b151561178957600080fd5b610b7781611a64565b61179c82826117a7565b151561072557600080fd5b600160a060020a03166000908152602091909152604090205460ff1690565b611830826001836040518082805190602001908083835b602083106117fc5780518252601f1990920191602091820191016117dd565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611ae1565b81600160a060020a03167fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611899578181015183820152602001611881565b50505050905090810190601f1680156118c65780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b611941826001836040518082805190602001908083835b6020831061190d5780518252601f1990920191602091820191016118ee565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611b03565b81600160a060020a03167fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b7004898260405180806020018281038252838181518152602001915080519060200190808383600083811015611899578181015183820152602001611881565b818101828110156110ae576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b600082821115611a5e576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b600160a060020a0381161515611a7957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b604080516060810182526000808252602082018190529181019190915290565b6080604051908101604052806000600160a060020a031681526020016060815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611bbb57805160ff1916838001178555611be8565b82800160010185558215611be8579182015b82811115611be8578251825591602001919060010190611bcd565b50611bf4929150611bf8565b5090565b610c2891905b80821115611bf45760008155600101611bfe56007375706572757365720000000000000000000000000000000000000000000000a165627a7a7230582012db2134f69419dd28d602cad89d600d28ddd3c19d261f35f66768e9c983d39c0029

   Swarm Source:
bzzr://12db2134f69419dd28d602cad89d600d28ddd3c19d261f35f66768e9c983d39c

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.