ETH Price: $3,540.01 (-0.98%)
Gas: 22 Gwei

Contract

0x87d9EF8951DE64b7246fdb7c7D5a52760677f361
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Get Tokens With ...83774952019-08-18 23:52:561684 days ago1566172376IN
0x87d9EF89...60677f361
0 ETH0.00004481
Recover ERC2082069062019-07-23 12:27:051710 days ago1563884825IN
0x87d9EF89...60677f361
0 ETH0.000025931
Get Tokens With ...82068382019-07-23 12:09:251710 days ago1563883765IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82068142019-07-23 12:02:471710 days ago1563883367IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82060362019-07-23 9:06:171710 days ago1563872777IN
0x87d9EF89...60677f361
0 ETH0.000171273
Get Tokens With ...82057762019-07-23 8:11:171711 days ago1563869477IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82056902019-07-23 7:52:311711 days ago1563868351IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82045112019-07-23 3:26:531711 days ago1563852413IN
0x87d9EF89...60677f361
0 ETH0.000057091
Get Tokens With ...82041602019-07-23 2:11:051711 days ago1563847865IN
0x87d9EF89...60677f361
0 ETH0.000087061
Get Tokens With ...82024152019-07-22 19:41:301711 days ago1563824490IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82024122019-07-22 19:40:411711 days ago1563824441IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82023772019-07-22 19:30:371711 days ago1563823837IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82009902019-07-22 14:28:091711 days ago1563805689IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82004602019-07-22 12:28:311711 days ago1563798511IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...82003372019-07-22 12:02:461711 days ago1563796966IN
0x87d9EF89...60677f361
0 ETH0.000057091
Get Tokens With ...82002552019-07-22 11:49:241711 days ago1563796164IN
0x87d9EF89...60677f361
0 ETH0.000057091
Get Tokens With ...82000672019-07-22 11:04:371711 days ago1563793477IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...81993512019-07-22 8:19:271712 days ago1563783567IN
0x87d9EF89...60677f361
0 ETH0.000058371
Get Tokens With ...81993122019-07-22 8:08:501712 days ago1563782930IN
0x87d9EF89...60677f361
0 ETH0.000058371
Get Tokens With ...81972752019-07-22 0:40:041712 days ago1563756004IN
0x87d9EF89...60677f361
0 ETH0.000057091
Get Tokens With ...81957302019-07-21 18:53:321712 days ago1563735212IN
0x87d9EF89...60677f361
0 ETH0.000057091
Get Tokens With ...81947432019-07-21 15:06:541712 days ago1563721614IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...81944102019-07-21 13:59:331712 days ago1563717573IN
0x87d9EF89...60677f361
0 ETH0.000085781
Get Tokens With ...81936202019-07-21 10:54:121712 days ago1563706452IN
0x87d9EF89...60677f361
0 ETH0.000057091
Get Tokens With ...81913812019-07-21 2:44:311713 days ago1563677071IN
0x87d9EF89...60677f361
0 ETH0.000057091
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenFaucet

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-01-26
*/

pragma solidity ^0.4.25;

// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
  function totalSupply() external view returns (uint256);

  function balanceOf(address who) external view returns (uint256);

  function allowance(address owner, address spender)
    external view returns (uint256);

  function transfer(address to, uint256 value) external returns (bool);

  function approve(address spender, uint256 value)
    external returns (bool);

  function transferFrom(address from, address to, uint256 value)
    external returns (bool);

  event Transfer(
    address indexed from,
    address indexed to,
    uint256 value
  );

  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

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

  /**
  * @dev Multiplies two numbers, reverts on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }

  /**
  * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0); // Solidity only automatically asserts 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 c;
  }

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

    return c;
  }

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

    return c;
  }

  /**
  * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
  * reverts when dividing by zero.
  */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
 * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract ERC20 is IERC20 {
  using SafeMath for uint256;

  mapping (address => uint256) private _balances;

  mapping (address => mapping (address => uint256)) private _allowed;

  uint256 private _totalSupply;

  /**
  * @dev Total number of tokens in existence
  */
  function totalSupply() public view returns (uint256) {
    return _totalSupply;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param owner The address to query the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address owner) public view returns (uint256) {
    return _balances[owner];
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param owner address The address which owns the funds.
   * @param spender address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(
    address owner,
    address spender
   )
    public
    view
    returns (uint256)
  {
    return _allowed[owner][spender];
  }

  /**
  * @dev Transfer token for a specified address
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  */
  function transfer(address to, uint256 value) public returns (bool) {
    _transfer(msg.sender, to, value);
    return true;
  }

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param spender The address which will spend the funds.
   * @param value The amount of tokens to be spent.
   */
  function approve(address spender, uint256 value) public returns (bool) {
    require(spender != address(0));

    _allowed[msg.sender][spender] = value;
    emit Approval(msg.sender, spender, value);
    return true;
  }

  /**
   * @dev Transfer tokens from one address to another
   * @param from address The address which you want to send tokens from
   * @param to address The address which you want to transfer to
   * @param value uint256 the amount of tokens to be transferred
   */
  function transferFrom(
    address from,
    address to,
    uint256 value
  )
    public
    returns (bool)
  {
    require(value <= _allowed[from][msg.sender]);

    _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
    _transfer(from, to, value);
    return true;
  }

  /**
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed_[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param spender The address which will spend the funds.
   * @param addedValue The amount of tokens to increase the allowance by.
   */
  function increaseAllowance(
    address spender,
    uint256 addedValue
  )
    public
    returns (bool)
  {
    require(spender != address(0));

    _allowed[msg.sender][spender] = (
      _allowed[msg.sender][spender].add(addedValue));
    emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
    return true;
  }

  /**
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed_[_spender] == 0. To decrement
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param spender The address which will spend the funds.
   * @param subtractedValue The amount of tokens to decrease the allowance by.
   */
  function decreaseAllowance(
    address spender,
    uint256 subtractedValue
  )
    public
    returns (bool)
  {
    require(spender != address(0));

    _allowed[msg.sender][spender] = (
      _allowed[msg.sender][spender].sub(subtractedValue));
    emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
    return true;
  }

  /**
  * @dev Transfer token for a specified addresses
  * @param from The address to transfer from.
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  */
  function _transfer(address from, address to, uint256 value) internal {
    require(value <= _balances[from]);
    require(to != address(0));

    _balances[from] = _balances[from].sub(value);
    _balances[to] = _balances[to].add(value);
    emit Transfer(from, to, value);
  }

  /**
   * @dev Internal function that mints an amount of the token and assigns it to
   * an account. This encapsulates the modification of balances such that the
   * proper events are emitted.
   * @param account The account that will receive the created tokens.
   * @param value The amount that will be created.
   */
  function _mint(address account, uint256 value) internal {
    require(account != 0);
    _totalSupply = _totalSupply.add(value);
    _balances[account] = _balances[account].add(value);
    emit Transfer(address(0), account, value);
  }

  /**
   * @dev Internal function that burns an amount of the token of a given
   * account.
   * @param account The account whose tokens will be burnt.
   * @param value The amount that will be burnt.
   */
  function _burn(address account, uint256 value) internal {
    require(account != 0);
    require(value <= _balances[account]);

    _totalSupply = _totalSupply.sub(value);
    _balances[account] = _balances[account].sub(value);
    emit Transfer(account, address(0), value);
  }

  /**
   * @dev Internal function that burns an amount of the token of a given
   * account, deducting from the sender's allowance for said account. Uses the
   * internal burn function.
   * @param account The account whose tokens will be burnt.
   * @param value The amount that will be burnt.
   */
  function _burnFrom(address account, uint256 value) internal {
    require(value <= _allowed[account][msg.sender]);

    // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
    // this function needs to emit an event with the updated approval.
    _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(
      value);
    _burn(account, value);
  }
}

// File: openzeppelin-solidity/contracts/ownership/Ownable.sol

/**
 * @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 private _owner;

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

  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() internal {
    _owner = msg.sender;
    emit OwnershipTransferred(address(0), _owner);
  }

  /**
   * @return the address of the owner.
   */
  function owner() public view returns(address) {
    return _owner;
  }

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

  /**
   * @return true if `msg.sender` is the owner of the contract.
   */
  function isOwner() public view returns(bool) {
    return 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 OwnershipTransferred(_owner, address(0));
    _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;
  }
}

// File: eth-token-recover/contracts/TokenRecover.sol

/**
 * @title TokenRecover
 * @author Vittorio Minacori (https://github.com/vittominacori)
 * @dev Allow to recover any ERC20 sent into the contract for error
 */
contract TokenRecover is Ownable {

  /**
   * @dev Remember that only owner can call so be careful when use on contracts generated from other contracts.
   * @param tokenAddress The token contract address
   * @param tokenAmount Number of tokens to be sent
   */
  function recoverERC20(
    address tokenAddress,
    uint256 tokenAmount
  )
    public
    onlyOwner
  {
    IERC20(tokenAddress).transfer(owner(), tokenAmount);
  }
}

// File: contracts/faucet/TokenFaucet.sol

/**
 * @title TokenFaucet
 * @author Vittorio Minacori (https://github.com/vittominacori)
 * @dev Implementation of a TokenFaucet
 */
contract TokenFaucet is TokenRecover {
  using SafeMath for uint256;

  // struct representing the faucet status for an account
  struct RecipientDetail {
    bool exists;
    uint256 tokens;
    uint256 lastUpdate;
    address referral;
  }

  // struct representing the referral status
  struct ReferralDetail {
    uint256 tokens;
    address[] recipients;
  }

  // the time between two tokens claim
  uint256 private _pauseTime = 1 days;

  // the token to distribute
  ERC20 private _token;

  // the daily rate of tokens distributed
  uint256 private _dailyRate;

  // the value earned by referral per mille
  uint256 private _referralPerMille;

  // the sum of distributed tokens
  uint256 private _totalDistributedTokens;

  // map of address and received token amount
  mapping (address => RecipientDetail) private _recipientList;

  // list of addresses who received tokens
  address[] private _recipients;

  // map of address and referred addresses
  mapping (address => ReferralDetail) private _referralList;

  /**
   * @param token Address of the token being distributed
   * @param dailyRate Daily rate of tokens distributed
   * @param referralPerMille The value earned by referral per mille
   */
  constructor(
    address token,
    uint256 dailyRate,
    uint256 referralPerMille
  )
    public
  {
    require(token != address(0));
    require(dailyRate > 0);
    require(referralPerMille > 0);

    _token = ERC20(token);
    _dailyRate = dailyRate;
    _referralPerMille = referralPerMille;
  }

  /**
   * @dev fallback
   */
  function () external payable {
    require(msg.value == 0);

    getTokens();
  }

  /**
   * @dev function to be called to receive tokens
   */
  function getTokens() public {
    // distribute tokens
    _distributeTokens(msg.sender, address(0));
  }

  /**
   * @dev function to be called to receive tokens
   * @param referral Address to an account that is referring
   */
  function getTokensWithReferral(address referral) public {
    require(referral != msg.sender);

    // distribute tokens
    _distributeTokens(msg.sender, referral);
  }

  /**
   * @return the token to distribute
   */
  function token() public view returns (ERC20) {
    return _token;
  }

  /**
   * @return the daily rate of tokens distributed
   */
  function dailyRate() public view returns (uint256) {
    return _dailyRate;
  }

  /**
   * @return the value earned by referral for each recipient
   */
  function referralTokens() public view returns (uint256) {
    return _dailyRate.mul(_referralPerMille).div(1000);
  }

  /**
   * @return the sum of distributed tokens
   */
  function totalDistributedTokens() public view returns (uint256) {
    return _totalDistributedTokens;
  }

  /**
   * @param account The address to check
   * @return received token amount for the given address
   */
  function receivedTokens(address account) public view returns (uint256) {
    return _recipientList[account].tokens;
  }

  /**
   * @param account The address to check
   * @return last tokens received timestamp
   */
  function lastUpdate(address account) public view returns (uint256) {
    return _recipientList[account].lastUpdate;
  }

  /**
   * @param account The address to check
   * @return time of next available claim or zero
   */
  function nextClaimTime(address account) public view returns (uint256) {
    return !_recipientList[account].exists ? 0 : _recipientList[account].lastUpdate + _pauseTime;
  }

  /**
   * @param account The address to check
   * @return referral for given address
   */
  function getReferral(address account) public view returns (address) {
    return _recipientList[account].referral;
  }

  /**
   * @param account The address to check
   * @return earned tokens by referrals
   */
  function earnedByReferral(address account) public view returns (uint256) {
    return _referralList[account].tokens;
  }

  /**
   * @param account The address to check
   * @return referred addresses for given address
   */
  function getReferredAddresses(address account) public view returns (address[]) {
    return _referralList[account].recipients;
  }

  /**
   * @param account The address to check
   * @return referred addresses for given address
   */
  function getReferredAddressesLength(address account) public view returns (uint) {
    return _referralList[account].recipients.length;
  }

  /**
   * @dev return the number of remaining tokens to distribute
   * @return uint256
   */
  function remainingTokens() public view returns (uint256) {
    return _token.balanceOf(this);
  }

  /**
   * @return address of a recipient by list index
   */
  function getRecipientAddress(uint256 index) public view returns (address) {
    return _recipients[index];
  }

  /**
   * @dev return the recipients length
   * @return uint
   */
  function getRecipientsLength() public view returns (uint) {
    return _recipients.length;
  }

  /**
   * @dev change daily rate and referral per mille
   * @param newDailyRate Daily rate of tokens distributed
   * @param newReferralPerMille The value earned by referral per mille
   */
  function setRates(uint256 newDailyRate, uint256 newReferralPerMille) public onlyOwner {
    require(newDailyRate > 0);
    require(newReferralPerMille > 0);

    _dailyRate = newDailyRate;
    _referralPerMille = newReferralPerMille;
  }

  /**
   * @dev distribute tokens
   * @param account Address being distributing
   * @param referral Address to an account that is referring
   */
  function _distributeTokens(address account, address referral) internal {
    require(nextClaimTime(account) <= block.timestamp); // solium-disable-line security/no-block-members

    // check if recipient exists
    if (!_recipientList[account].exists) {
      _recipients.push(account);
      _recipientList[account].exists = true;

      // check if valid referral
      if (referral != address(0)) {
        _recipientList[account].referral = referral;
        _referralList[referral].recipients.push(account);
      }
    }

    // update recipient status
    _recipientList[account].lastUpdate = block.timestamp; // solium-disable-line security/no-block-members
    _recipientList[account].tokens = _recipientList[account].tokens.add(_dailyRate);

    // update faucet status
    _totalDistributedTokens = _totalDistributedTokens.add(_dailyRate);

    // transfer tokens to recipient
    _token.transfer(account, _dailyRate);

    // check referral
    if (_recipientList[account].referral != address(0)) {
      // referral is only the first one referring
      address firstReferral = _recipientList[account].referral;

      uint256 referralEarnedTokens = referralTokens();

      // update referral status
      _referralList[firstReferral].tokens = _referralList[firstReferral].tokens.add(referralEarnedTokens);

      // update faucet status
      _totalDistributedTokens = _totalDistributedTokens.add(referralEarnedTokens);

      // transfer tokens to referral
      _token.transfer(firstReferral, referralEarnedTokens);
    }
  }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"getRecipientAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"getReferral","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"getReferredAddresses","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"getReferredAddressesLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"nextClaimTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dailyRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"referralTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newDailyRate","type":"uint256"},{"name":"newReferralPerMille","type":"uint256"}],"name":"setRates","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"remainingTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"lastUpdate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"referral","type":"address"}],"name":"getTokensWithReferral","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalDistributedTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRecipientsLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"receivedTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"earnedByReferral","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"token","type":"address"},{"name":"dailyRate","type":"uint256"},{"name":"referralPerMille","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

60806040526201518060015534801561001757600080fd5b50604051606080610dc483398101604081815282516020840151919093015160008054600160a060020a031916331780825592939192600160a060020a0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600160a060020a038316151561009157600080fd5b6000821161009e57600080fd5b600081116100ab57600080fd5b60028054600160a060020a031916600160a060020a039490941693909317909255600355600455610ce3806100e16000396000f3006080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318337012811461013c5780633b0f0f2f14610170578063661f905b146101915780636f1bfbb61461020257806370f23da714610235578063715018a61461025657806374df19c31461026b5780638980f11f146102805780638da5cb5b146102a45780638f32d59b146102b95780639303b0b8146102e2578063aa6ca808146102f7578063ac6af2801461030c578063bf58390314610327578063cb03fb1e1461033c578063d19c08ef1461035d578063db5084ab1461037e578063dbc3e35b14610393578063e2fdc845146103a8578063f2fde38b146103c9578063fc0c546a146103ea578063fea5ed16146103ff575b341561013257600080fd5b61013a610420565b005b34801561014857600080fd5b5061015460043561042d565b60408051600160a060020a039092168252519081900360200190f35b34801561017c57600080fd5b50610154600160a060020a0360043516610459565b34801561019d57600080fd5b506101b2600160a060020a036004351661047a565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101ee5781810151838201526020016101d6565b505050509050019250505060405180910390f35b34801561020e57600080fd5b50610223600160a060020a03600435166104f3565b60408051918252519081900360200190f35b34801561024157600080fd5b50610223600160a060020a0360043516610511565b34801561026257600080fd5b5061013a610560565b34801561027757600080fd5b506102236105ca565b34801561028c57600080fd5b5061013a600160a060020a03600435166024356105d0565b3480156102b057600080fd5b50610154610696565b3480156102c557600080fd5b506102ce6106a5565b604080519115158252519081900360200190f35b3480156102ee57600080fd5b506102236106b6565b34801561030357600080fd5b5061013a610420565b34801561031857600080fd5b5061013a6004356024356106e6565b34801561033357600080fd5b5061022361071e565b34801561034857600080fd5b50610223600160a060020a03600435166107b4565b34801561036957600080fd5b5061013a600160a060020a03600435166107d2565b34801561038a57600080fd5b506102236107f5565b34801561039f57600080fd5b506102236107fb565b3480156103b457600080fd5b50610223600160a060020a0360043516610801565b3480156103d557600080fd5b5061013a600160a060020a036004351661081f565b3480156103f657600080fd5b5061015461083b565b34801561040b57600080fd5b50610223600160a060020a036004351661084a565b61042b336000610865565b565b600060078281548110151561043e57fe5b600091825260209091200154600160a060020a031692915050565b600160a060020a039081166000908152600660205260409020600301541690565b600160a060020a0381166000908152600860209081526040918290206001018054835181840281018401909452808452606093928301828280156104e757602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116104c9575b50505050509050919050565b600160a060020a031660009081526008602052604090206001015490565b600160a060020a03811660009081526006602052604081205460ff161561055757600154600160a060020a0383166000908152600660205260409020600201540161055a565b60005b92915050565b6105686106a5565b151561057357600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60035490565b6105d86106a5565b15156105e357600080fd5b81600160a060020a031663a9059cbb6105fa610696565b836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050506040513d602081101561069057600080fd5b50505050565b600054600160a060020a031690565b600054600160a060020a0316331490565b60006106e16103e86106d5600454600354610bcc90919063ffffffff16565b9063ffffffff610c0516565b905090565b6106ee6106a5565b15156106f957600080fd5b6000821161070657600080fd5b6000811161071357600080fd5b600391909155600455565b600254604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561078357600080fd5b505af1158015610797573d6000803e3d6000fd5b505050506040513d60208110156107ad57600080fd5b5051905090565b600160a060020a031660009081526006602052604090206002015490565b600160a060020a0381163314156107e857600080fd5b6107f23382610865565b50565b60055490565b60075490565b600160a060020a031660009081526006602052604090206001015490565b6108276106a5565b151561083257600080fd5b6107f281610c28565b600254600160a060020a031690565b600160a060020a031660009081526008602052604090205490565b6000804261087285610511565b111561087d57600080fd5b600160a060020a03841660009081526006602052604090205460ff16151561097c576007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038781169182179092556000908152600660205260409020805460ff191690921790915583161561097c57600160a060020a038085166000818152600660209081526040808320600301805495891673ffffffffffffffffffffffffffffffffffffffff1996871681179091558352600882528220600190810180549182018155835291200180549092161790555b600160a060020a03841660009081526006602052604090204260028201556003546001909101546109b29163ffffffff610ca516565b600160a060020a0385166000908152600660205260409020600101556003546005546109e39163ffffffff610ca516565b600555600254600354604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03888116600483015260248201939093529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610a5957600080fd5b505af1158015610a6d573d6000803e3d6000fd5b505050506040513d6020811015610a8357600080fd5b5050600160a060020a03848116600090815260066020526040902060030154161561069057600160a060020a03808516600090815260066020526040902060030154169150610ad06106b6565b600160a060020a038316600090815260086020526040902054909150610afc908263ffffffff610ca516565b600160a060020a038316600090815260086020526040902055600554610b28908263ffffffff610ca516565b600555600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610b9a57600080fd5b505af1158015610bae573d6000803e3d6000fd5b505050506040513d6020811015610bc457600080fd5b505050505050565b600080831515610bdf5760009150610bfe565b50828202828482811515610bef57fe5b0414610bfa57600080fd5b8091505b5092915050565b600080808311610c1457600080fd5b8284811515610c1f57fe5b04949350505050565b600160a060020a0381161515610c3d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610bfa57600080fd00a165627a7a723058202098e72278c4dff3ef9274de7eae036b9f29d50c999ebd224accc4f466deed88002900000000000000000000000093a7174dafd31d13400cd9fa01f4e5b5baa00d390000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318337012811461013c5780633b0f0f2f14610170578063661f905b146101915780636f1bfbb61461020257806370f23da714610235578063715018a61461025657806374df19c31461026b5780638980f11f146102805780638da5cb5b146102a45780638f32d59b146102b95780639303b0b8146102e2578063aa6ca808146102f7578063ac6af2801461030c578063bf58390314610327578063cb03fb1e1461033c578063d19c08ef1461035d578063db5084ab1461037e578063dbc3e35b14610393578063e2fdc845146103a8578063f2fde38b146103c9578063fc0c546a146103ea578063fea5ed16146103ff575b341561013257600080fd5b61013a610420565b005b34801561014857600080fd5b5061015460043561042d565b60408051600160a060020a039092168252519081900360200190f35b34801561017c57600080fd5b50610154600160a060020a0360043516610459565b34801561019d57600080fd5b506101b2600160a060020a036004351661047a565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101ee5781810151838201526020016101d6565b505050509050019250505060405180910390f35b34801561020e57600080fd5b50610223600160a060020a03600435166104f3565b60408051918252519081900360200190f35b34801561024157600080fd5b50610223600160a060020a0360043516610511565b34801561026257600080fd5b5061013a610560565b34801561027757600080fd5b506102236105ca565b34801561028c57600080fd5b5061013a600160a060020a03600435166024356105d0565b3480156102b057600080fd5b50610154610696565b3480156102c557600080fd5b506102ce6106a5565b604080519115158252519081900360200190f35b3480156102ee57600080fd5b506102236106b6565b34801561030357600080fd5b5061013a610420565b34801561031857600080fd5b5061013a6004356024356106e6565b34801561033357600080fd5b5061022361071e565b34801561034857600080fd5b50610223600160a060020a03600435166107b4565b34801561036957600080fd5b5061013a600160a060020a03600435166107d2565b34801561038a57600080fd5b506102236107f5565b34801561039f57600080fd5b506102236107fb565b3480156103b457600080fd5b50610223600160a060020a0360043516610801565b3480156103d557600080fd5b5061013a600160a060020a036004351661081f565b3480156103f657600080fd5b5061015461083b565b34801561040b57600080fd5b50610223600160a060020a036004351661084a565b61042b336000610865565b565b600060078281548110151561043e57fe5b600091825260209091200154600160a060020a031692915050565b600160a060020a039081166000908152600660205260409020600301541690565b600160a060020a0381166000908152600860209081526040918290206001018054835181840281018401909452808452606093928301828280156104e757602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116104c9575b50505050509050919050565b600160a060020a031660009081526008602052604090206001015490565b600160a060020a03811660009081526006602052604081205460ff161561055757600154600160a060020a0383166000908152600660205260409020600201540161055a565b60005b92915050565b6105686106a5565b151561057357600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60035490565b6105d86106a5565b15156105e357600080fd5b81600160a060020a031663a9059cbb6105fa610696565b836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050506040513d602081101561069057600080fd5b50505050565b600054600160a060020a031690565b600054600160a060020a0316331490565b60006106e16103e86106d5600454600354610bcc90919063ffffffff16565b9063ffffffff610c0516565b905090565b6106ee6106a5565b15156106f957600080fd5b6000821161070657600080fd5b6000811161071357600080fd5b600391909155600455565b600254604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561078357600080fd5b505af1158015610797573d6000803e3d6000fd5b505050506040513d60208110156107ad57600080fd5b5051905090565b600160a060020a031660009081526006602052604090206002015490565b600160a060020a0381163314156107e857600080fd5b6107f23382610865565b50565b60055490565b60075490565b600160a060020a031660009081526006602052604090206001015490565b6108276106a5565b151561083257600080fd5b6107f281610c28565b600254600160a060020a031690565b600160a060020a031660009081526008602052604090205490565b6000804261087285610511565b111561087d57600080fd5b600160a060020a03841660009081526006602052604090205460ff16151561097c576007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038781169182179092556000908152600660205260409020805460ff191690921790915583161561097c57600160a060020a038085166000818152600660209081526040808320600301805495891673ffffffffffffffffffffffffffffffffffffffff1996871681179091558352600882528220600190810180549182018155835291200180549092161790555b600160a060020a03841660009081526006602052604090204260028201556003546001909101546109b29163ffffffff610ca516565b600160a060020a0385166000908152600660205260409020600101556003546005546109e39163ffffffff610ca516565b600555600254600354604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03888116600483015260248201939093529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610a5957600080fd5b505af1158015610a6d573d6000803e3d6000fd5b505050506040513d6020811015610a8357600080fd5b5050600160a060020a03848116600090815260066020526040902060030154161561069057600160a060020a03808516600090815260066020526040902060030154169150610ad06106b6565b600160a060020a038316600090815260086020526040902054909150610afc908263ffffffff610ca516565b600160a060020a038316600090815260086020526040902055600554610b28908263ffffffff610ca516565b600555600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610b9a57600080fd5b505af1158015610bae573d6000803e3d6000fd5b505050506040513d6020811015610bc457600080fd5b505050505050565b600080831515610bdf5760009150610bfe565b50828202828482811515610bef57fe5b0414610bfa57600080fd5b8091505b5092915050565b600080808311610c1457600080fd5b8284811515610c1f57fe5b04949350505050565b600160a060020a0381161515610c3d57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082820183811015610bfa57600080fd00a165627a7a723058202098e72278c4dff3ef9274de7eae036b9f29d50c999ebd224accc4f466deed880029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000093a7174dafd31d13400cd9fa01f4e5b5baa00d390000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : token (address): 0x93a7174dafd31d13400cD9fa01f4e5B5BAa00D39
Arg [1] : dailyRate (uint256): 5000000000000000000
Arg [2] : referralPerMille (uint256): 100

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000093a7174dafd31d13400cd9fa01f4e5b5baa00d39
Arg [1] : 0000000000000000000000000000000000000000000000004563918244f40000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000064


Swarm Source

bzzr://2098e72278c4dff3ef9274de7eae036b9f29d50c999ebd224accc4f466deed88

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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.