Sponsored:   Ubex.com - Additional 17% of tokens are available for purchase! Trading on exchanges already started.
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3457 txns
Misc
Address Watch: Add To Watch List
Contract Creator: 0x68b78f0374f4421050839e980dfb65e9772fb1f7at txn 0xd92e61b7d676d5272696f7836c68fa13d8516679613da58be5b4bbf767899f5a
Token Balances:
 Latest 25 txns from a total Of 3457 transactions

TxHash Age From To Value [TxFee]
0x8b8708b2024118df6d7dd067c0feca15cdfbc8fa42d0b9ffe9581baea61a0e8b2 days 59 mins ago0x68b78f0374f4421050839e980dfb65e9772fb1f7  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0 Ether0.000120528
0x7b79b996f132b0d5d00e2d8db06182bfad9f9ee8cf5901e271f16a8874d7b9824 days 8 hrs ago0xce8b6c1b18f99f67e0679fd7da1a2a1accd65649  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c5 Ether0.000063903
0x372cc29c3ecf922f86e1bdfe13ca6b937245aa8f16026294cfbea2714190f8c94 days 20 hrs ago0x035b3f54d1940fa818b6760f20cf980cdabed459  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0.017 Ether0.00084
0xf19bddcc0221a27caff5efd4275d3e3151f016920eef0140067c8d962aaf5a584 days 20 hrs ago0x035b3f54d1940fa818b6760f20cf980cdabed459  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0.017 Ether0.00084
0x5d193e06127f0d970de2ceb9e664a6e2449f56fcaf60d8bd0da6c580d1a679135 days 3 hrs ago0x5a9cc695d5415eb61f839a2b72d4a7de969ad07a  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.00170408
0xad761525d1c6e792a854bdb937e8275c1c0505d60fe30318371ee33595754a6c5 days 5 hrs ago0x68b78f0374f4421050839e980dfb65e9772fb1f7  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0 Ether0.000054232
0x3b763b43366b501dc66781edfb0588f21c32ad851ba060a2d0468c0ba1d491c95 days 5 hrs ago0x9467ddae925d7b00b6ba7bd6f93192c121441a68  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.00090244
0xcc7662f13727c3e527a8024e4c62235ae96dcd52104c800cb2dd27e4dfec031d5 days 5 hrs ago0x2e7bd20b6dcc2c12111b705b0bb416c25c2267a0  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c1.5 Ether0.000576675
0x545e2d0c2d56c9bec7846f726a7ed66eb34045118426b501efa5a5f69bfe964c5 days 5 hrs ago0x2e7bd20b6dcc2c12111b705b0bb416c25c2267a0  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c1.5 Ether0.002283633
0xb7116384caff1ff4a0a6a1543d3b82d454b718c55771d66ecb3451b46a6aa9d45 days 5 hrs ago0x2e7bd20b6dcc2c12111b705b0bb416c25c2267a0  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c1.5 Ether0.00115335
0x544e0fc9214c0d95181e471319c2642d734af8d1979a3ce071d2e15e45d9bb695 days 5 hrs ago0x68b78f0374f4421050839e980dfb65e9772fb1f7  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0 Ether0.00022668
0xa228392c5cc9452453231e633b2d10d8836dd3f3ad63d2212cba7feeecb6afed5 days 5 hrs ago0x72f88a95fec6b8d477d0ed01b671e9a273bd8004  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.499 Ether0.001113
0x2527f7fa120f03efc77f8d949d95614c41949d99c928ed0835ea2d7fbcb93d975 days 5 hrs ago0x2e7bd20b6dcc2c12111b705b0bb416c25c2267a0  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c1.5 Ether0.004467078
0x903b6f3ba342554b36a144e8095e5e5c208ada2a7c7b2bebc059960d7542b1d55 days 5 hrs ago0x7ae63b6457c1fb0deab171485639a1b71a8ff210  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.00022561
0x4153078b4bc0e83668cc3ff628a7d1f295d01d894d5d33b136cbe211f988cd6a5 days 5 hrs ago0x545bb13c95c976855b0f7583777cec01c9cc9bdf  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.00180488
0xdeab24f2c08350c78adc496f706c85749df2e7afa9830d7e0e7600f8802cc6365 days 5 hrs ago0xb965d68052b849b29fe25497c51659bf9678bc9b  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0.5 Ether0.00030122
0xb575250e1bee52c8ade7fdca09775da911c1d97650a0df90c3a7bc3922a2abcd5 days 5 hrs ago0x28c8fc68dd22a27c1351a1f31657ca0aaa85b613  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.4 Ether0.000157927
0xbd6ed7d8f2112d8294bef5eb19694d0377cf6488fa59745d0bc363712c444c5f5 days 5 hrs ago0x4f09c1c70bc65d0bbc501b71b4aa3d8a78f2e34a  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c0.58 Ether0.000331342
0x7b03c3d4a56c55fd265df5ff3b30cf68c0cd306d690199c8e75f58a23fade0f45 days 5 hrs ago0x72f88a95fec6b8d477d0ed01b671e9a273bd8004  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.001037806
0x7b17c58870b9dae6f9934f9d7cd2ce3f4293ece7ddbd0bc4291fbbd189f7d7445 days 5 hrs ago0x1a66d285fa5b2ab93716b9bf06b27c8f83dd130a  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.000496342
0x8d0960aa106e97840ced26a699dfcd46c75968a3d3a40fec2e7ec877d05338cf5 days 5 hrs ago0x61c48bf734d0589274f43ff4445a3f0dfd12ebb1  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.001037806
0xfa711b9f4efe2ab4dd9c928e578fb4621531f90c456435ec9683717d53bceab45 days 5 hrs ago0xd2d046ca7228b444e68c08c22202143a434f843e  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.00090244
0x8d5760034bed2c449e263915d1e120fbf9721efaa004fa80494cfe271a93c2ee5 days 5 hrs ago0x32c649cd8dca87fa9e42ae64b924a1ef51069bbc  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.001037806
0xafef3ee0599c7399a6606be3f75f5880ae05d430420429459461725202bf3b4c5 days 5 hrs ago0x28c8fc68dd22a27c1351a1f31657ca0aaa85b613  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.4 Ether0.0000714
0x13b64236a9b49626ebb6059702ebd29dc8b5e8827b3a28f2ee6e60c7842b53805 days 5 hrs ago0xb1294d20e940c1779525e031e64421965209f6b0  IN   0x94cbf65a33496da05915f0ec2db07a7785eacb9c2.5 Ether0.00090244
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x8b8708b2024118df6d7dd067c0feca15cdfbc8fa42d0b9ffe9581baea61a0e8b61442362 days 59 mins ago0x94cbf65a33496da05915f0ec2db07a7785eacb9c0x68b78f0374f4421050839e980dfb65e9772fb1f77,531.749555816969664751 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Similar match)
Note: Displaying similar matching verified source code at contract 0xc04002876ac1572ab35bbb20620ec9bf291b4f44(excluding Constructor Arguments if any)
Contract Name: OrigoTokenSale
Compiler Version: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

// 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 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;
  }
}

// File: openzeppelin-solidity/contracts/lifecycle/Pausable.sol

/**
 * @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() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

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

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

/**
 * @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) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    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;
  }
}

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

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * See https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

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

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  uint256 totalSupply_;

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

  /**
  * @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) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param _owner The address to query the 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];
  }

}

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

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender)
    public view returns (uint256);

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

  function approve(address spender, uint256 value) public returns (bool);
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

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

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://github.com/ethereum/EIPs/issues/20
 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) internal allowed;


  /**
   * @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(_to != address(0));
    require(_value <= balances[_from]);
    require(_value <= allowed[_from][msg.sender]);

    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
    emit Transfer(_from, _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) {
    allowed[msg.sender][_spender] = _value;
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @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 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 increaseApproval(
    address _spender,
    uint256 _addedValue
  )
    public
    returns (bool)
  {
    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 decreaseApproval(
    address _spender,
    uint256 _subtractedValue
  )
    public
    returns (bool)
  {
    uint256 oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

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

/**
 * @title Pausable token
 * @dev StandardToken modified with pausable transfers.
 **/
contract PausableToken is StandardToken, Pausable {

  function transfer(
    address _to,
    uint256 _value
  )
    public
    whenNotPaused
    returns (bool)
  {
    return super.transfer(_to, _value);
  }

  function transferFrom(
    address _from,
    address _to,
    uint256 _value
  )
    public
    whenNotPaused
    returns (bool)
  {
    return super.transferFrom(_from, _to, _value);
  }

  function approve(
    address _spender,
    uint256 _value
  )
    public
    whenNotPaused
    returns (bool)
  {
    return super.approve(_spender, _value);
  }

  function increaseApproval(
    address _spender,
    uint _addedValue
  )
    public
    whenNotPaused
    returns (bool success)
  {
    return super.increaseApproval(_spender, _addedValue);
  }

  function decreaseApproval(
    address _spender,
    uint _subtractedValue
  )
    public
    whenNotPaused
    returns (bool success)
  {
    return super.decreaseApproval(_spender, _subtractedValue);
  }
}

// File: contracts/OrigoToken.sol

contract OrigoToken is PausableToken {

    string public constant name = "OrigoToken";
    string public constant symbol = "Origo";
    uint8 public constant decimals = 18;

    uint256 public constant INITIAL_SUPPLY = (10 ** 9) * (10 ** uint256(decimals));

    /**
    * @dev Constructor that gives msg.sender all of existing tokens.
    */
    constructor() public {
        totalSupply_ = INITIAL_SUPPLY;
        balances[msg.sender] = INITIAL_SUPPLY;
        emit Transfer(0x0, msg.sender, INITIAL_SUPPLY);
    }

}

// File: contracts/Whitelist.sol

/**
 * @title Whitelist
 * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.
 * @dev This simplifies the implementation of "user permissions".
 */
contract Whitelist is Ownable {
    mapping(address => bool) public whitelist;
    
    event WhitelistedAddressAdded(address addr);
    event WhitelistedAddressRemoved(address addr);

    /**
    * @dev Throws if called by any account that's not whitelisted.
    */
    modifier onlyWhitelisted() {
        require(whitelist[msg.sender]);
        _;
    }

    /**
    * @dev add an address to the whitelist
    * @param addr address
    * @return true if the address was added to the whitelist, false if the address was already in the whitelist 
    */
    function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) {
        if (!whitelist[addr]) {
            whitelist[addr] = true;
            emit WhitelistedAddressAdded(addr);
            success = true; 
        }
    }

    /**
    * @dev add addresses to the whitelist
    * @param addrs addresses
    * @return true if at least one address was added to the whitelist, 
    * false if all addresses were already in the whitelist  
    */
    function addAddressesToWhitelist(address[] addrs) onlyOwner public returns(bool success) {
        for (uint256 i = 0; i < addrs.length; i++) {
            if (addAddressToWhitelist(addrs[i])) {
                success = true;
            }
        }
    }

    /**
    * @dev remove an address from the whitelist
    * @param addr address
    * @return true if the address was removed from the whitelist, 
    * false if the address wasn't in the whitelist in the first place 
    */
    function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) {
        if (whitelist[addr]) {
            whitelist[addr] = false;
            emit WhitelistedAddressRemoved(addr);
            success = true;
        }
    }

    /**
    * @dev remove addresses from the whitelist
    * @param addrs addresses
    * @return true if at least one address was removed from the whitelist, 
    * false if all addresses weren't in the whitelist in the first place
    */
    function removeAddressesFromWhitelist(address[] addrs) onlyOwner public returns(bool success) {
        for (uint256 i = 0; i < addrs.length; i++) {
            if (removeAddressFromWhitelist(addrs[i])) {
                success = true;
            }
        }
    }

}

// File: contracts/OrigoTokenSale.sol

contract OrigoTokenSale is Whitelist {
    using SafeMath for uint256;


    bool public depositOpen;
    uint256 public collectTokenPhaseStartTime;

    OrigoToken public token;
    address public wallet;
    uint256 public rate;
    uint256 public minDeposit;
    uint256 public maxDeposit;


    mapping(address => uint256) public depositAmount;

    /**
    * Event for deposit logging
    * @param _depositor who deposited the ETH
    * @param _amount amount of ETH deposited
    */
    event Deposit(address indexed _depositor, uint256 _amount);

    /**
    * Event for token purchase logging
    * @param purchaser who paid for the tokens
    * @param beneficiary who got the tokens
    * @param value weis paid for purchase
    * @param amount amount of tokens purchased
    */
    event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);

    constructor(
        uint256 _rate,
        address _wallet,
        uint256 _minDeposit,
        uint256 _maxDeposit) public {
        require(_rate > 0);
        require(_wallet != address(0));
        require(_minDeposit >= 0);
        require(_maxDeposit > 0);

        rate = _rate;
        wallet = _wallet;

        minDeposit = _minDeposit;
        maxDeposit = _maxDeposit;
        depositOpen = false;
    }
    function setRate(uint256 _rate) public onlyOwner {
      require(_rate > 0);
      rate = _rate;
    }
    function setToken(ERC20 _token) public onlyOwner  {
      require(_token != address(0));
      token = OrigoToken(_token);
    }
    function setWallet(address _wallet) public onlyOwner {
      require(_wallet != address(0));
      wallet = _wallet;
    }
    function openDeposit() public onlyOwner{
      depositOpen = true;
    }
    function closeDeposit() public onlyOwner{
      depositOpen = false;
    }

    function () external payable {
        deposit();
    }

    function deposit() public payable onlyWhileDepositPhaseOpen onlyWhitelisted {
        address beneficiary = msg.sender;
        uint256 weiAmount = msg.value;
        _preValidatePurchase(beneficiary, weiAmount);

        depositAmount[beneficiary] = depositAmount[beneficiary].add(weiAmount);
        emit Deposit(beneficiary, weiAmount);
    }

    function collectTokens() public onlyAfterCollectTokenPhaseStart {
        _distributeToken(msg.sender);
    }

    function distributeTokens(address _beneficiary) public onlyOwner onlyAfterCollectTokenPhaseStart {
        _distributeToken(_beneficiary);
    }

    function settleDeposit() public onlyOwner  {
        wallet.transfer(address(this).balance);
    }

    function settleExtraToken(address _addr) public onlyOwner  {
        require(token.transfer(_addr, token.balanceOf(this)));
    }

    function setCollectTokenTime(uint256 _collectTokenPhaseStartTime) public onlyOwner  {
        collectTokenPhaseStartTime = _collectTokenPhaseStartTime;
    }

    function getDepositAmount() public view returns (uint256) {
        return depositAmount[msg.sender];
    }

    // -----------------------------------------
    // Internal interface (extensible)
    // -----------------------------------------

    function _distributeToken(address _beneficiary) internal {
        require(_beneficiary != 0);
        uint256 weiAmount = depositAmount[_beneficiary];

        uint256 tokens = weiAmount.mul(rate);

        _processPurchase(_beneficiary, tokens);
        emit TokenPurchase(_beneficiary, _beneficiary, weiAmount, tokens);

        _updatePurchasingState(_beneficiary);
    }

    /**
    * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use `super` in contracts that inherit from Crowdsale to extend their validations.
    * Example from CappedCrowdsale.sol's _preValidatePurchase method:
    *   super._preValidatePurchase(_beneficiary, _weiAmount);
    *   require(weiRaised.add(_weiAmount) <= cap);
    * @param _beneficiary Address performing the token purchase
    */
    function _preValidatePurchase(
        address _beneficiary,
        uint256 _weiAmount
    )
        internal view
    {
        require(_beneficiary != address(0));
        require(_weiAmount != 0);
        require(
            depositAmount[_beneficiary].add(_weiAmount) >= minDeposit &&
            depositAmount[_beneficiary].add(_weiAmount) <= maxDeposit);
    }

    /**
    * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends its tokens.
    * @param _beneficiary Address performing the token purchase
    * @param _tokenAmount Number of tokens to be emitted
    */
    function _deliverTokens(
        address _beneficiary,
        uint256 _tokenAmount
    )
        internal
    {
        require(token.transfer(_beneficiary, _tokenAmount));
    }

    /**
    * @dev Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens.
    * @param _beneficiary Address receiving the tokens
    * @param _tokenAmount Number of tokens to be purchased
    */
    function _processPurchase(
        address _beneficiary,
        uint256 _tokenAmount
    )
        internal
    {
        _deliverTokens(_beneficiary, _tokenAmount);
    }

    /**
    * @dev Override for extensions that require an internal state to check for validity (current user contributions, etc.)
    * @param _beneficiary Address receiving the tokens
    */
    function _updatePurchasingState(address _beneficiary) internal {
        require(depositAmount[_beneficiary] > 0);
        depositAmount[_beneficiary] = 0;
    }

    modifier onlyWhileDepositPhaseOpen {
        require(depositOpen);
        _;
    }

    modifier onlyAfterCollectTokenPhaseStart {
        require(token != address(0));
        require(collectTokenPhaseStartTime > 0);
        require(block.timestamp >= collectTokenPhaseStartTime);
        _;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"openDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"setToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"collectTokenPhaseStartTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addrs","type":"address[]"}],"name":"removeAddressesFromWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"depositOpen","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"removeAddressFromWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"closeDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"depositAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"settleDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxDeposit","outputs":[{"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":"addr","type":"address"}],"name":"addAddressToWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getDepositAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"collectTokens","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":"_collectTokenPhaseStartTime","type":"uint256"}],"name":"setCollectTokenTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"distributeTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_wallet","type":"address"}],"name":"setWallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addrs","type":"address[]"}],"name":"addAddressesToWhitelist","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"settleExtraToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_rate","type":"uint256"},{"name":"_wallet","type":"address"},{"name":"_minDeposit","type":"uint256"},{"name":"_maxDeposit","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_depositor","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"WhitelistedAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"WhitelistedAddressRemoved","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
608060405234801561001057600080fd5b50604051608080610ffb833981016040908152815160208301519183015160609093015160008054600160a060020a03191633178155919391841161005457600080fd5b600160a060020a038316151561006957600080fd5b600082101561007757600080fd5b6000811161008457600080fd5b60069390935560058054600160a060020a031916600160a060020a0393909316929092179091556007556008556002805460ff19169055610f31806100ca6000396000f3006080604052600436106101695763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166312c55a9b8114610173578063144fa6d71461018857806322542fb6146101a957806324953eaa146101d0578063273cc2a514610239578063286dd3f51461024e5780632c4e722e1461026f57806334fcf4371461028457806341b3d1851461029c57806345c917ec146102b157806350f62da7146102c6578063521eb273146102e7578063559ec80d146103185780636083e59a1461032d578063715018a6146103425780637b9417c8146103575780637d96f693146103785780638433acd11461038d5780638da5cb5b146103a2578063959b6916146103b75780639b19251a146103cf578063b1d17c98146103f0578063d0e30db014610169578063deaa59df14610411578063e2ec6ec314610432578063f2fde38b14610487578063f8a5399a146104a8578063fc0c546a146104c9575b6101716104de565b005b34801561017f57600080fd5b506101716105a0565b34801561019457600080fd5b50610171600160a060020a03600435166105c6565b3480156101b557600080fd5b506101be610621565b60408051918252519081900360200190f35b3480156101dc57600080fd5b5060408051602060048035808201358381028086018501909652808552610225953695939460249493850192918291850190849080828437509497506106279650505050505050565b604080519115158252519081900360200190f35b34801561024557600080fd5b50610225610686565b34801561025a57600080fd5b50610225600160a060020a036004351661068f565b34801561027b57600080fd5b506101be610726565b34801561029057600080fd5b5061017160043561072c565b3480156102a857600080fd5b506101be610755565b3480156102bd57600080fd5b5061017161075b565b3480156102d257600080fd5b506101be600160a060020a036004351661077e565b3480156102f357600080fd5b506102fc610790565b60408051600160a060020a039092168252519081900360200190f35b34801561032457600080fd5b5061017161079f565b34801561033957600080fd5b506101be6107f3565b34801561034e57600080fd5b506101716107f9565b34801561036357600080fd5b50610225600160a060020a0360043516610865565b34801561038457600080fd5b506101be610900565b34801561039957600080fd5b50610171610913565b3480156103ae57600080fd5b506102fc610953565b3480156103c357600080fd5b50610171600435610962565b3480156103db57600080fd5b50610225600160a060020a036004351661097e565b3480156103fc57600080fd5b50610171600160a060020a0360043516610993565b34801561041d57600080fd5b50610171600160a060020a03600435166109e8565b34801561043e57600080fd5b506040805160206004803580820135838102808601850190965280855261022595369593946024949385019291829185019084908082843750949750610a439650505050505050565b34801561049357600080fd5b50610171600160a060020a0360043516610a9c565b3480156104b457600080fd5b50610171600160a060020a0360043516610abc565b3480156104d557600080fd5b506102fc610c0e565b600254600090819060ff1615156104f457600080fd5b3360009081526001602052604090205460ff16151561051257600080fd5b50339050346105218282610c1d565b600160a060020a03821660009081526009602052604090205461054a908263ffffffff610cb116565b600160a060020a038316600081815260096020908152604091829020939093558051848152905191927fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c92918290030190a25050565b600054600160a060020a031633146105b757600080fd5b6002805460ff19166001179055565b600054600160a060020a031633146105dd57600080fd5b600160a060020a03811615156105f257600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60035481565b600080548190600160a060020a0316331461064157600080fd5b5060005b82518110156106805761066e838281518110151561065f57fe5b9060200190602002015161068f565b1561067857600191505b600101610645565b50919050565b60025460ff1681565b60008054600160a060020a031633146106a757600080fd5b600160a060020a03821660009081526001602052604090205460ff161561072157600160a060020a038216600081815260016020908152604091829020805460ff19169055815192835290517ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a9281900390910190a15060015b919050565b60065481565b600054600160a060020a0316331461074357600080fd5b6000811161075057600080fd5b600655565b60075481565b600054600160a060020a0316331461077257600080fd5b6002805460ff19169055565b60096020526000908152604090205481565b600554600160a060020a031681565b600054600160a060020a031633146107b657600080fd5b600554604051600160a060020a0390911690303180156108fc02916000818181858888f193505050501580156107f0573d6000803e3d6000fd5b50565b60085481565b600054600160a060020a0316331461081057600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008054600160a060020a0316331461087d57600080fd5b600160a060020a03821660009081526001602052604090205460ff16151561072157600160a060020a038216600081815260016020818152604092839020805460ff1916909217909155815192835290517fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f9281900390910190a1506001919050565b3360009081526009602052604090205490565b600454600160a060020a0316151561092a57600080fd5b60035460001061093957600080fd5b60035442101561094857600080fd5b61095133610cc4565b565b600054600160a060020a031681565b600054600160a060020a0316331461097957600080fd5b600355565b60016020526000908152604090205460ff1681565b600054600160a060020a031633146109aa57600080fd5b600454600160a060020a031615156109c157600080fd5b6003546000106109d057600080fd5b6003544210156109df57600080fd5b6107f081610cc4565b600054600160a060020a031633146109ff57600080fd5b600160a060020a0381161515610a1457600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600080548190600160a060020a03163314610a5d57600080fd5b5060005b825181101561068057610a8a8382815181101515610a7b57fe5b90602001906020020151610865565b15610a9457600191505b600101610a61565b600054600160a060020a03163314610ab357600080fd5b6107f081610d6e565b600054600160a060020a03163314610ad357600080fd5b60048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251600160a060020a039091169163a9059cbb91849184916370a08231916024808201926020929091908290030181600087803b158015610b4557600080fd5b505af1158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610bd757600080fd5b505af1158015610beb573d6000803e3d6000fd5b505050506040513d6020811015610c0157600080fd5b505115156107f057600080fd5b600454600160a060020a031681565b600160a060020a0382161515610c3257600080fd5b801515610c3e57600080fd5b600754600160a060020a038316600090815260096020526040902054610c6a908363ffffffff610cb116565b10158015610ca25750600854600160a060020a038316600090815260096020526040902054610c9f908363ffffffff610cb116565b11155b1515610cad57600080fd5b5050565b81810182811015610cbe57fe5b92915050565b600080600160a060020a0383161515610cdc57600080fd5b600160a060020a038316600090815260096020526040902054600654909250610d0c90839063ffffffff610deb16565b9050610d188382610e14565b60408051838152602081018390528151600160a060020a0386169283927f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad18929081900390910190a3610d6983610e1e565b505050565b600160a060020a0381161515610d8357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000821515610dfc57506000610cbe565b50818102818382811515610e0c57fe5b0414610cbe57fe5b610cad8282610e5b565b600160a060020a03811660009081526009602052604081205411610e4157600080fd5b600160a060020a0316600090815260096020526040812055565b60048054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0386811694820194909452602481018590529051929091169163a9059cbb916044808201926020929091908290030181600087803b158015610ece57600080fd5b505af1158015610ee2573d6000803e3d6000fd5b505050506040513d6020811015610ef857600080fd5b50511515610cad57600080fd00a165627a7a72305820b0731b0066af9848a542e36258f7711ef57e82817abba8b7f7f5ab8174d6b3aa00290000000000000000000000000000000000000000000000000000000000000d5c0000000000000000000000009550fecf56a1e5d7ea7fef8beb06b05540902ea200000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000029a2241af62c0000

   Swarm Source:
bzzr://b0731b0066af9848a542e36258f7711ef57e82817abba8b7f7f5ab8174d6b3aa

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.