ETH Price: $3,359.42 (-8.66%)

Contract

0xB547CC51CE58293E6945bA08d664ce051563d9Ac
 
Transaction Hash
Method
Block
From
To
Transfer49489292018-01-21 23:03:192524 days ago1516575799IN
Bloom: Token Sale
0.76 ETH0.0011487550
Transfer Ownersh...48881952018-01-11 1:34:262535 days ago1515634466IN
Bloom: Token Sale
0 ETH0.0007140323
Transfer48743772018-01-08 12:02:592537 days ago1515412979IN
Bloom: Token Sale
5.544711 ETH0.0017369175.6
Transfer48569502018-01-05 7:19:262540 days ago1515136766IN
Bloom: Token Sale
0.00105113 ETH0.001793485.40039062
Transfer48458262018-01-03 6:14:542542 days ago1514960094IN
Bloom: Token Sale
0.13 ETH0.0006892530
Transfer48453602018-01-03 4:09:542543 days ago1514952594IN
Bloom: Token Sale
0.145 ETH0.000551424
Transfer48443262018-01-02 23:51:252543 days ago1514937085IN
Bloom: Token Sale
4 ETH0.0010798247
Transfer48389062018-01-02 1:08:142544 days ago1514855294IN
Bloom: Token Sale
0.9 ETH0.000459520
Change Token Con...48388502018-01-02 0:54:572544 days ago1514854497IN
Bloom: Token Sale
0 ETH0.0003209210
Finalize48388402018-01-02 0:52:502544 days ago1514854370IN
Bloom: Token Sale
0 ETH0.0010810310
Transfer48385352018-01-01 23:43:252544 days ago1514850205IN
Bloom: Token Sale
0.00256187 ETH0.0004220
Transfer48384772018-01-01 23:27:302544 days ago1514849250IN
Bloom: Token Sale
0.25420049 ETH0.000459520
Transfer48380262018-01-01 21:39:272544 days ago1514842767IN
Bloom: Token Sale
0.2 ETH0.0010798247
Transfer48379702018-01-01 21:24:392544 days ago1514841879IN
Bloom: Token Sale
2 ETH0.000459520
Transfer48378542018-01-01 20:56:052544 days ago1514840165IN
Bloom: Token Sale
0.25 ETH0.00091940
Transfer48377842018-01-01 20:36:082544 days ago1514838968IN
Bloom: Token Sale
0.0486192 ETH0.0000221
Transfer48377762018-01-01 20:35:072544 days ago1514838907IN
Bloom: Token Sale
0.75 ETH0.000459520
Transfer48377642018-01-01 20:32:252544 days ago1514838745IN
Bloom: Token Sale
1 ETH0.000459520
Transfer48377322018-01-01 20:22:142544 days ago1514838134IN
Bloom: Token Sale
0.00440502 ETH0.00044121
Transfer48377122018-01-01 20:17:412544 days ago1514837861IN
Bloom: Token Sale
0.20617 ETH0.000459520
Transfer48377112018-01-01 20:17:342544 days ago1514837854IN
Bloom: Token Sale
1 ETH0.000459520
Transfer48377102018-01-01 20:17:162544 days ago1514837836IN
Bloom: Token Sale
0.3089525 ETH0.001378560
Transfer48377002018-01-01 20:14:402544 days ago1514837680IN
Bloom: Token Sale
0.75 ETH0.000459520
Transfer48376992018-01-01 20:14:352544 days ago1514837675IN
Bloom: Token Sale
0.5 ETH0.0004824721
Transfer48376992018-01-01 20:14:352544 days ago1514837675IN
Bloom: Token Sale
0.09 ETH0.001378560
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
48376352018-01-01 19:59:562544 days ago1514836796
Bloom: Token Sale
1 ETH
48376352018-01-01 19:59:562544 days ago1514836796
Bloom: Token Sale
0.1 ETH
48376352018-01-01 19:59:562544 days ago1514836796
Bloom: Token Sale
2 ETH
48376342018-01-01 19:59:432544 days ago1514836783
Bloom: Token Sale
0.125 ETH
48376332018-01-01 19:59:392544 days ago1514836779
Bloom: Token Sale
2.645 ETH
48376332018-01-01 19:59:392544 days ago1514836779
Bloom: Token Sale
0.165 ETH
48376332018-01-01 19:59:392544 days ago1514836779
Bloom: Token Sale
3 ETH
48376322018-01-01 19:59:332544 days ago1514836773
Bloom: Token Sale
1.9 ETH
48376322018-01-01 19:59:332544 days ago1514836773
Bloom: Token Sale
0.3 ETH
48376322018-01-01 19:59:332544 days ago1514836773
Bloom: Token Sale
0.54 ETH
48376322018-01-01 19:59:332544 days ago1514836773
Bloom: Token Sale
0.25 ETH
48376312018-01-01 19:58:482544 days ago1514836728
Bloom: Token Sale
0.43 ETH
48376312018-01-01 19:58:482544 days ago1514836728
Bloom: Token Sale
0.195 ETH
48376302018-01-01 19:58:242544 days ago1514836704
Bloom: Token Sale
0.15 ETH
48376302018-01-01 19:58:242544 days ago1514836704
Bloom: Token Sale
50 ETH
48376302018-01-01 19:58:242544 days ago1514836704
Bloom: Token Sale
1 ETH
48376262018-01-01 19:57:502544 days ago1514836670
Bloom: Token Sale
1 ETH
48376262018-01-01 19:57:502544 days ago1514836670
Bloom: Token Sale
2 ETH
48376252018-01-01 19:57:382544 days ago1514836658
Bloom: Token Sale
1 ETH
48376252018-01-01 19:57:382544 days ago1514836658
Bloom: Token Sale
0.7 ETH
48376242018-01-01 19:57:332544 days ago1514836653
Bloom: Token Sale
1.33249346 ETH
48376242018-01-01 19:57:332544 days ago1514836653
Bloom: Token Sale
0.162 ETH
48376242018-01-01 19:57:332544 days ago1514836653
Bloom: Token Sale
16 ETH
48376242018-01-01 19:57:332544 days ago1514836653
Bloom: Token Sale
0.11 ETH
48376242018-01-01 19:57:332544 days ago1514836653
Bloom: Token Sale
0.01311 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BloomTokenSale

Compiler Version
v0.4.15+commit.bbb8e64f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-11-29
*/

pragma solidity ^0.4.13;

library Math {
  function max64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a >= b ? a : b;
  }

  function min64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a < b ? a : b;
  }

  function max256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a >= b ? a : b;
  }

  function min256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a < b ? a : b;
  }
}

library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant 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 c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract Ownable {
  address public owner;


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


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


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


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

}

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;
    Pause();
  }

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

contract Configurable is Ownable {
  // Event triggered when the contract has been configured by the owner
  event Configured();

  bool public configured = false;

  // @dev Finalize configuration, prohibiting further configuration
  function finishConfiguration() public configuration returns (bool) {
    configured = true;
    Configured();
    return true;
  }

  // @dev Enforce that a function is an owner-only configuration method.
  //   Intentionally duplicates the `onlyOwner` check so that we can't
  //   accidentally create a configuration option that without the owner modifier.
  //   This modifier will not let a function be called if the `finalizeConfiguration`
  //   has been called.
  modifier configuration() {
    require(msg.sender == owner);
    require(!configured);
    _;
  }

  modifier onlyAfterConfiguration() {
    require(configured);
    _;
  }
}

contract Crowdsale {
  using SafeMath for uint256;

  // start and end timestamps where investments are allowed (both inclusive)
  uint256 public startTime;
  uint256 public endTime;

  // address where funds are collected
  address public wallet;

  // how many token units a buyer gets per wei
  uint256 public rate;

  // amount of raised money in wei
  uint256 public weiRaised;

  /**
   * 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);

  function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) public {
    require(_startTime >= now); // solhint-disable not-rely-on-time
    require(_endTime >= _startTime);
    require(_rate > 0);
    require(_wallet != 0x0);

    startTime = _startTime;
    endTime = _endTime;
    rate = _rate;
    wallet = _wallet;
  }

  // fallback function can be used to buy tokens
  function () public payable {
    proxyPayment(msg.sender);
  }

  // Make a payment for the provided address
  //
  // @param _owner address that will own the purchased tokens
  function proxyPayment(address _owner) public payable returns(bool);

  // @return true if crowdsale event has ended
  function hasEnded() public constant returns (bool) {
    return now > endTime;
  }

  // send ether to the fund collection wallet
  // override to create custom fund forwarding mechanisms
  function forwardFunds() internal {
    wallet.transfer(msg.value);
  }

  // @return true if the transaction can buy tokens
  function validPurchase() internal constant returns (bool) {
    bool withinPeriod = now >= startTime && now <= endTime;
    bool nonZeroPurchase = msg.value != 0;
    return withinPeriod && nonZeroPurchase;
  }
}

contract CappedCrowdsale is Crowdsale {
  using SafeMath for uint256;

  uint256 public cap;

  function CappedCrowdsale(uint256 _cap) public {
    require(_cap > 0);
    cap = _cap;
  }

  // overriding Crowdsale#hasEnded to add cap logic
  // @return true if crowdsale event has ended
  function hasEnded() public constant returns (bool) {
    bool capReached = weiRaised >= cap;
    return super.hasEnded() || capReached;
  }

  // overriding Crowdsale#validPurchase to add extra cap logic
  // @return true if investors can buy at the moment
  function validPurchase() internal constant returns (bool) {
    bool withinCap = weiRaised.add(msg.value) <= cap;
    return super.validPurchase() && withinCap;
  }

}

contract FinalizableCrowdsale is Crowdsale, Ownable {
  using SafeMath for uint256;

  bool public isFinalized = false;

  event Finalized();

  /**
   * @dev Must be called after crowdsale ends, to do some extra finalization
   * work. Calls the contract's finalization function.
   */
  function finalize() public onlyOwner {
    require(!isFinalized);
    require(hasEnded());

    finalization();
    Finalized();

    isFinalized = true;
  }

  /**
   * @dev Can be overridden to add finalization logic. The overriding function
   * should call super.finalization() to ensure the chain of finalization is
   * executed entirely.
   */
  function finalization() internal { } // solhint-disable no-empty-blocks
}

contract TokenController {
    /// @notice Called when `_owner` sends ether to the MiniMe Token contract
    /// @param _owner The address that sent the ether to create tokens
    /// @return True if the ether is accepted, false if it throws
    function proxyPayment(address _owner) payable returns(bool);

    /// @notice Notifies the controller about a token transfer allowing the
    ///  controller to react if desired
    /// @param _from The origin of the transfer
    /// @param _to The destination of the transfer
    /// @param _amount The amount of the transfer
    /// @return False if the controller does not authorize the transfer
    function onTransfer(address _from, address _to, uint _amount) returns(bool);

    /// @notice Notifies the controller about an approval allowing the
    ///  controller to react if desired
    /// @param _owner The address that calls `approve()`
    /// @param _spender The spender in the `approve()` call
    /// @param _amount The amount in the `approve()` call
    /// @return False if the controller does not authorize the approval
    function onApprove(address _owner, address _spender, uint _amount)
        returns(bool);
}

contract BloomTokenSale is CappedCrowdsale, Ownable, TokenController, Pausable, Configurable, FinalizableCrowdsale {
  using SafeMath for uint256;

  BLT public token;

  // Solhint breaks on combination of scientific notation and `ether` keyword so disable next line
  // solhint-disable-next-line
  uint256 public constant TOTAL_SUPPLY = 1.5e8 ether; // 150 million BLT with 18 decimals
  uint256 internal constant FOUNDATION_SUPPLY = (TOTAL_SUPPLY * 4) / 10; // 40% supply
  uint256 internal constant ADVISOR_SUPPLY = TOTAL_SUPPLY / 20; // 5% supply
  uint256 internal constant PARTNERSHIP_SUPPLY = TOTAL_SUPPLY / 20; // 5% supply
  uint256 internal constant CONTROLLER_ALLOCATION =
    TOTAL_SUPPLY - FOUNDATION_SUPPLY - PARTNERSHIP_SUPPLY; // 55%
  uint256 internal constant WALLET_ALLOCATION = TOTAL_SUPPLY - CONTROLLER_ALLOCATION; // 45%
  uint256 internal constant MAX_RAISE_IN_USD = 5e7; // Maximum raise of $50M

  // Wei ether with two extra decimal places. Useful for conversion when we set the ether price
  uint256 internal constant WEI_PER_ETHER_TWO_DECIMALS = 1e20;
  uint256 internal constant TOKEN_UNITS_PER_TOKEN = 1e18; // Decimal units per BLT

  uint256 public advisorPool = ADVISOR_SUPPLY;

  uint256 internal constant DUST = 1 finney; // Minimum payment

  event NewPresaleAllocation(address indexed holder, uint256 bltAmount);

  function BloomTokenSale(
    uint256 _startTime,
    uint256 _endTime,
    uint256 _rate,
    address _wallet,
    uint256 _cap
  ) public
    Crowdsale(_startTime, _endTime, _rate, _wallet)
    CappedCrowdsale(_cap) { } // solhint-disable-line no-empty-blocks

  // @dev Link the token to the Crowdsale
  // @param _token address of the deployed token
  function setToken(address _token) public presaleOnly {
    token = BLT(_token);
  }

  // @dev Allocate our initial token supply
  function allocateSupply() public presaleOnly {
    require(token.totalSupply() == 0);
    token.generateTokens(address(this), CONTROLLER_ALLOCATION);
    token.generateTokens(wallet, WALLET_ALLOCATION);
  }

  // @dev Explicitly allocate tokens from the advisor pool, updating how much is left in the pool.
  //
  // @param _receiver Recipient of grant
  // @param _amount Total BLT units allocated
  // @param _cliffDate Vesting cliff
  // @param _vestingDate Date that the vesting finishes
  function allocateAdvisorTokens(address _receiver, uint256 _amount, uint64 _cliffDate, uint64 _vestingDate)
           public
           presaleOnly {
    require(_amount <= advisorPool);
    advisorPool = advisorPool.sub(_amount);
    allocatePresaleTokens(_receiver, _amount, _cliffDate, _vestingDate);
  }

  // @dev Allocate a normal presale grant. Does not necessarily come from a limited pool like the advisor tokens.
  //
  // @param _receiver Recipient of grant
  // @param _amount Total BLT units allocated
  // @param _cliffDate Vesting cliff
  // @param _vestingDate Date that the vesting finishes
  function allocatePresaleTokens(address _receiver, uint256 _amount, uint64 cliffDate, uint64 vestingDate)
           public
           presaleOnly {

    require(_amount <= 10 ** 25); // 10 million BLT. No presale partner will have more than this allocated. Prevent overflows.

    // solhint-disable-next-line not-rely-on-time
    token.grantVestedTokens(_receiver, _amount, uint64(now), cliffDate, vestingDate, true, false);

    NewPresaleAllocation(_receiver, _amount);
  }

  // @dev Set the stage for the sale:
  //   1. Sets the `cap` controller variable based on the USD/ETH price
  //   2. Updates the `weiRaised` to the balance of our wallet
  //   3. Takes the unallocated portion of the advisor pool and transfers to the wallet
  //   4. Sets the `rate` for the sale now based on the remaining tokens and cap
  //
  // @param _cents The number of cents in USD to purchase 1 ETH
  // @param _weiRaisedOffChain Total amount of wei raised (at specified conversion rate) outside of wallet
  function finishPresale(uint256 _cents, uint256 _weiRaisedOffChain) public presaleOnly returns (bool) {
    setCapFromEtherPrice(_cents);
    syncPresaleWeiRaised(_weiRaisedOffChain);
    transferUnallocatedAdvisorTokens();
    updateRateBasedOnFundsAndSupply();
    finishConfiguration();
  }

  // @dev Revoke a token grant, transfering the unvested tokens to our sale wallet
  //
  // @param _holder Owner of the vesting grant that is being revoked
  // @param _grantId ID of the grant being revoked
  function revokeGrant(address _holder, uint256 _grantId) public onlyOwner {
    token.revokeTokenGrant(_holder, wallet, _grantId);
  }

  // @dev low level token purchase function
  // @param _beneficiary address the tokens will be credited to
  function proxyPayment(address _beneficiary)
    public
    payable
    whenNotPaused
    onlyAfterConfiguration
    returns (bool) {
    require(_beneficiary != 0x0);
    require(validPurchase());

    uint256 weiAmount = msg.value;

    // Update the total wei raised
    weiRaised = weiRaised.add(weiAmount);

    // Transfer tokens from the controller to the _beneficiary
    allocateTokens(_beneficiary, weiAmount);

    // Send the transfered wei to our wallet
    forwardFunds();

    return true;
  }

  // @dev controller callback for approving token transfers. Only supports
  //   transfers from the controller for now.
  //
  // @param _from address that wants to transfer their tokens
  function onTransfer(address _from, address _to, uint) public returns (bool) {
    return _from == address(this) || _to == address(wallet);
  }

  // @dev controller callback for approving token transfers. This feature
  //   is disabled during the crowdsale for the sake of simplicity
  function onApprove(address, address, uint) public returns (bool) {
    return false;
  }

  // @dev Change the token controller once the sale is over
  //
  // @param _newController Address of new token controller
  function changeTokenController(address _newController) public onlyOwner whenFinalized {
    token.changeController(_newController);
  }

  // @dev Set the crowdsale cap based on the ether price
  // @param _cents The number of cents in USD to purchase 1 ETH
  function setCapFromEtherPrice(uint256 _cents) internal {
    require(_cents > 10000 && _cents < 100000);
    uint256 weiPerDollar = WEI_PER_ETHER_TWO_DECIMALS.div(_cents);
    cap = MAX_RAISE_IN_USD.mul(weiPerDollar);
  }

  // @dev Set the `weiRaised` for this contract to the balance of the sale wallet
  function syncPresaleWeiRaised(uint256 _weiRaisedOffChain) internal {
    require(weiRaised == 0);
    weiRaised = wallet.balance.add(_weiRaisedOffChain);
  }

  // @dev Transfer unallocated advisor tokens to our wallet. Lets us sell any leftovers
  function transferUnallocatedAdvisorTokens() internal {
    uint256 _unallocatedTokens = advisorPool;
    // Advisor pool will not be used again but we zero it out anyways for the sake of book keeping
    advisorPool = 0;
    token.transferFrom(address(this), wallet, _unallocatedTokens);
  }

  // @dev Set the `rate` based on our remaining token supply and how much we still need to raise
  function updateRateBasedOnFundsAndSupply() internal {
    uint256 _unraisedWei = cap - weiRaised;
    uint256 _tokensForSale = token.balanceOf(address(this));
    rate = _tokensForSale.mul(1e18).div(_unraisedWei);
  }

  // @dev Transfer funds from the controller's address to the _beneficiary. Uses
  //   _weiAmount to compute the number of tokens purchased.
  // @param _beneficiary recipient of tokens
  // @param _weiAmount wei transfered to crowdsale
  function allocateTokens(address _beneficiary, uint256 _weiAmount) internal {
    token.transferFrom(address(this), _beneficiary, tokensFor(_weiAmount));
  }

  // @dev Compute number of token units a given amount of wei gets
  //
  // @param _weiAmount Amount of wei to convert
  function tokensFor(uint256 _weiAmount) internal constant returns (uint256) {
    return _weiAmount.mul(rate).div(1e18);
  }

  // @dev validate purchases. Delegates to super method and also requires that
  //   the initial configuration phase is finished.
  function validPurchase() internal constant returns (bool) {
    return super.validPurchase() && msg.value >= DUST && configured;
  }

  // @dev transfer leftover tokens to our wallet
  function finalization() internal {
    token.transferFrom(address(this), wallet, token.balanceOf(address(this)));
  }

  function inPresalePhase() internal constant beforeSale configuration returns (bool) {
    return true;
  }

  modifier presaleOnly() {
    require(inPresalePhase());
    _;
  }

  modifier beforeSale {
    require(now < startTime); // solhint-disable-line not-rely-on-time
    _;
  }

  modifier whenFinalized {
    require(isFinalized);
    _;
  }
}

contract Controlled {
    /// @notice The address of the controller is the only address that can call
    ///  a function with this modifier
    modifier onlyController { require(msg.sender == controller); _; }

    address public controller;

    function Controlled() { controller = msg.sender;}

    /// @notice Changes the controller of the contract
    /// @param _newController The new controller of the contract
    function changeController(address _newController) onlyController {
        controller = _newController;
    }
}

contract ApproveAndCallFallBack {
    function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}

contract MiniMeToken is Controlled {

    string public name;                //The Token's name: e.g. DigixDAO Tokens
    uint8 public decimals;             //Number of decimals of the smallest unit
    string public symbol;              //An identifier: e.g. REP
    string public version = 'MMT_0.1'; //An arbitrary versioning scheme


    /// @dev `Checkpoint` is the structure that attaches a block number to a
    ///  given value, the block number attached is the one that last changed the
    ///  value
    struct  Checkpoint {

        // `fromBlock` is the block number that the value was generated from
        uint128 fromBlock;

        // `value` is the amount of tokens at a specific block number
        uint128 value;
    }

    // `parentToken` is the Token address that was cloned to produce this token;
    //  it will be 0x0 for a token that was not cloned
    MiniMeToken public parentToken;

    // `parentSnapShotBlock` is the block number from the Parent Token that was
    //  used to determine the initial distribution of the Clone Token
    uint public parentSnapShotBlock;

    // `creationBlock` is the block number that the Clone Token was created
    uint public creationBlock;

    // `balances` is the map that tracks the balance of each address, in this
    //  contract when the balance changes the block number that the change
    //  occurred is also included in the map
    mapping (address => Checkpoint[]) balances;

    // `allowed` tracks any extra transfer rights as in all ERC20 tokens
    mapping (address => mapping (address => uint256)) allowed;

    // Tracks the history of the `totalSupply` of the token
    Checkpoint[] totalSupplyHistory;

    // Flag that determines if the token is transferable or not.
    bool public transfersEnabled;

    // The factory used to create new clone tokens
    MiniMeTokenFactory public tokenFactory;

////////////////
// Constructor
////////////////

    /// @notice Constructor to create a MiniMeToken
    /// @param _tokenFactory The address of the MiniMeTokenFactory contract that
    ///  will create the Clone token contracts, the token factory needs to be
    ///  deployed first
    /// @param _parentToken Address of the parent token, set to 0x0 if it is a
    ///  new token
    /// @param _parentSnapShotBlock Block of the parent token that will
    ///  determine the initial distribution of the clone token, set to 0 if it
    ///  is a new token
    /// @param _tokenName Name of the new token
    /// @param _decimalUnits Number of decimals of the new token
    /// @param _tokenSymbol Token Symbol for the new token
    /// @param _transfersEnabled If true, tokens will be able to be transferred
    function MiniMeToken(
        address _tokenFactory,
        address _parentToken,
        uint _parentSnapShotBlock,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol,
        bool _transfersEnabled
    ) {
        tokenFactory = MiniMeTokenFactory(_tokenFactory);
        name = _tokenName;                                 // Set the name
        decimals = _decimalUnits;                          // Set the decimals
        symbol = _tokenSymbol;                             // Set the symbol
        parentToken = MiniMeToken(_parentToken);
        parentSnapShotBlock = _parentSnapShotBlock;
        transfersEnabled = _transfersEnabled;
        creationBlock = block.number;
    }


///////////////////
// ERC20 Methods
///////////////////

    /// @notice Send `_amount` tokens to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _amount The amount of tokens to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint256 _amount) returns (bool success) {
        require(transfersEnabled);
        return doTransfer(msg.sender, _to, _amount);
    }

    /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
    ///  is approved by `_from`
    /// @param _from The address holding the tokens being transferred
    /// @param _to The address of the recipient
    /// @param _amount The amount of tokens to be transferred
    /// @return True if the transfer was successful
    function transferFrom(address _from, address _to, uint256 _amount
    ) returns (bool success) {

        // The controller of this contract can move tokens around at will,
        //  this is important to recognize! Confirm that you trust the
        //  controller of this contract, which in most situations should be
        //  another open source smart contract or 0x0
        if (msg.sender != controller) {
            require(transfersEnabled);

            // The standard ERC 20 transferFrom functionality
            if (allowed[_from][msg.sender] < _amount) return false;
            allowed[_from][msg.sender] -= _amount;
        }
        return doTransfer(_from, _to, _amount);
    }

    /// @dev This is the actual transfer function in the token contract, it can
    ///  only be called by other functions in this contract.
    /// @param _from The address holding the tokens being transferred
    /// @param _to The address of the recipient
    /// @param _amount The amount of tokens to be transferred
    /// @return True if the transfer was successful
    function doTransfer(address _from, address _to, uint _amount
    ) internal returns(bool) {

           if (_amount == 0) {
               return true;
           }

           require(parentSnapShotBlock < block.number);

           // Do not allow transfer to 0x0 or the token contract itself
           require((_to != 0) && (_to != address(this)));

           // If the amount being transfered is more than the balance of the
           //  account the transfer returns false
           var previousBalanceFrom = balanceOfAt(_from, block.number);
           if (previousBalanceFrom < _amount) {
               return false;
           }

           // Alerts the token controller of the transfer
           if (isContract(controller)) {
               require(TokenController(controller).onTransfer(_from, _to, _amount));
           }

           // First update the balance array with the new value for the address
           //  sending the tokens
           updateValueAtNow(balances[_from], previousBalanceFrom - _amount);

           // Then update the balance array with the new value for the address
           //  receiving the tokens
           var previousBalanceTo = balanceOfAt(_to, block.number);
           require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow
           updateValueAtNow(balances[_to], previousBalanceTo + _amount);

           // An event to make the transfer easy to find on the blockchain
           Transfer(_from, _to, _amount);

           return true;
    }

    /// @param _owner The address that's balance is being requested
    /// @return The balance of `_owner` at the current block
    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balanceOfAt(_owner, block.number);
    }

    /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
    ///  its behalf. This is a modified version of the ERC20 approve function
    ///  to be a little bit safer
    /// @param _spender The address of the account able to transfer the tokens
    /// @param _amount The amount of tokens to be approved for transfer
    /// @return True if the approval was successful
    function approve(address _spender, uint256 _amount) returns (bool success) {
        require(transfersEnabled);

        // To change the approve amount you first have to reduce the addresses`
        //  allowance to zero by calling `approve(_spender,0)` if it is not
        //  already 0 to mitigate the race condition described here:
        //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
        require((_amount == 0) || (allowed[msg.sender][_spender] == 0));

        // Alerts the token controller of the approve function call
        if (isContract(controller)) {
            require(TokenController(controller).onApprove(msg.sender, _spender, _amount));
        }

        allowed[msg.sender][_spender] = _amount;
        Approval(msg.sender, _spender, _amount);
        return true;
    }

    /// @dev This function makes it easy to read the `allowed[]` map
    /// @param _owner The address of the account that owns the token
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens of _owner that _spender is allowed
    ///  to spend
    function allowance(address _owner, address _spender
    ) constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    /// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
    ///  its behalf, and then a function is triggered in the contract that is
    ///  being approved, `_spender`. This allows users to use their tokens to
    ///  interact with contracts in one function call instead of two
    /// @param _spender The address of the contract able to transfer the tokens
    /// @param _amount The amount of tokens to be approved for transfer
    /// @return True if the function call was successful
    function approveAndCall(address _spender, uint256 _amount, bytes _extraData
    ) returns (bool success) {
        require(approve(_spender, _amount));

        ApproveAndCallFallBack(_spender).receiveApproval(
            msg.sender,
            _amount,
            this,
            _extraData
        );

        return true;
    }

    /// @dev This function makes it easy to get the total number of tokens
    /// @return The total number of tokens
    function totalSupply() constant returns (uint) {
        return totalSupplyAt(block.number);
    }


////////////////
// Query balance and totalSupply in History
////////////////

    /// @dev Queries the balance of `_owner` at a specific `_blockNumber`
    /// @param _owner The address from which the balance will be retrieved
    /// @param _blockNumber The block number when the balance is queried
    /// @return The balance at `_blockNumber`
    function balanceOfAt(address _owner, uint _blockNumber) constant
        returns (uint) {

        // These next few lines are used when the balance of the token is
        //  requested before a check point was ever created for this token, it
        //  requires that the `parentToken.balanceOfAt` be queried at the
        //  genesis block for that token as this contains initial balance of
        //  this token
        if ((balances[_owner].length == 0)
            || (balances[_owner][0].fromBlock > _blockNumber)) {
            if (address(parentToken) != 0) {
                return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock));
            } else {
                // Has no parent
                return 0;
            }

        // This will return the expected balance during normal situations
        } else {
            return getValueAt(balances[_owner], _blockNumber);
        }
    }

    /// @notice Total amount of tokens at a specific `_blockNumber`.
    /// @param _blockNumber The block number when the totalSupply is queried
    /// @return The total amount of tokens at `_blockNumber`
    function totalSupplyAt(uint _blockNumber) constant returns(uint) {

        // These next few lines are used when the totalSupply of the token is
        //  requested before a check point was ever created for this token, it
        //  requires that the `parentToken.totalSupplyAt` be queried at the
        //  genesis block for this token as that contains totalSupply of this
        //  token at this block number.
        if ((totalSupplyHistory.length == 0)
            || (totalSupplyHistory[0].fromBlock > _blockNumber)) {
            if (address(parentToken) != 0) {
                return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock));
            } else {
                return 0;
            }

        // This will return the expected totalSupply during normal situations
        } else {
            return getValueAt(totalSupplyHistory, _blockNumber);
        }
    }

////////////////
// Clone Token Method
////////////////

    /// @notice Creates a new clone token with the initial distribution being
    ///  this token at `_snapshotBlock`
    /// @param _cloneTokenName Name of the clone token
    /// @param _cloneDecimalUnits Number of decimals of the smallest unit
    /// @param _cloneTokenSymbol Symbol of the clone token
    /// @param _snapshotBlock Block when the distribution of the parent token is
    ///  copied to set the initial distribution of the new clone token;
    ///  if the block is zero than the actual block, the current block is used
    /// @param _transfersEnabled True if transfers are allowed in the clone
    /// @return The address of the new MiniMeToken Contract
    function createCloneToken(
        string _cloneTokenName,
        uint8 _cloneDecimalUnits,
        string _cloneTokenSymbol,
        uint _snapshotBlock,
        bool _transfersEnabled
        ) returns(address) {
        if (_snapshotBlock == 0) _snapshotBlock = block.number;
        MiniMeToken cloneToken = tokenFactory.createCloneToken(
            this,
            _snapshotBlock,
            _cloneTokenName,
            _cloneDecimalUnits,
            _cloneTokenSymbol,
            _transfersEnabled
            );

        cloneToken.changeController(msg.sender);

        // An event to make the token easy to find on the blockchain
        NewCloneToken(address(cloneToken), _snapshotBlock);
        return address(cloneToken);
    }

////////////////
// Generate and destroy tokens
////////////////

    /// @notice Generates `_amount` tokens that are assigned to `_owner`
    /// @param _owner The address that will be assigned the new tokens
    /// @param _amount The quantity of tokens generated
    /// @return True if the tokens are generated correctly
    function generateTokens(address _owner, uint _amount
    ) onlyController returns (bool) {
        uint curTotalSupply = totalSupply();
        require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow
        uint previousBalanceTo = balanceOf(_owner);
        require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow
        updateValueAtNow(totalSupplyHistory, curTotalSupply + _amount);
        updateValueAtNow(balances[_owner], previousBalanceTo + _amount);
        Transfer(0, _owner, _amount);
        return true;
    }


    /// @notice Burns `_amount` tokens from `_owner`
    /// @param _owner The address that will lose the tokens
    /// @param _amount The quantity of tokens to burn
    /// @return True if the tokens are burned correctly
    function destroyTokens(address _owner, uint _amount
    ) onlyController returns (bool) {
        uint curTotalSupply = totalSupply();
        require(curTotalSupply >= _amount);
        uint previousBalanceFrom = balanceOf(_owner);
        require(previousBalanceFrom >= _amount);
        updateValueAtNow(totalSupplyHistory, curTotalSupply - _amount);
        updateValueAtNow(balances[_owner], previousBalanceFrom - _amount);
        Transfer(_owner, 0, _amount);
        return true;
    }

////////////////
// Enable tokens transfers
////////////////


    /// @notice Enables token holders to transfer their tokens freely if true
    /// @param _transfersEnabled True if transfers are allowed in the clone
    function enableTransfers(bool _transfersEnabled) onlyController {
        transfersEnabled = _transfersEnabled;
    }

////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////

    /// @dev `getValueAt` retrieves the number of tokens at a given block number
    /// @param checkpoints The history of values being queried
    /// @param _block The block number to retrieve the value at
    /// @return The number of tokens being queried
    function getValueAt(Checkpoint[] storage checkpoints, uint _block
    ) constant internal returns (uint) {
        if (checkpoints.length == 0) return 0;

        // Shortcut for the actual value
        if (_block >= checkpoints[checkpoints.length-1].fromBlock)
            return checkpoints[checkpoints.length-1].value;
        if (_block < checkpoints[0].fromBlock) return 0;

        // Binary search of the value in the array
        uint min = 0;
        uint max = checkpoints.length-1;
        while (max > min) {
            uint mid = (max + min + 1)/ 2;
            if (checkpoints[mid].fromBlock<=_block) {
                min = mid;
            } else {
                max = mid-1;
            }
        }
        return checkpoints[min].value;
    }

    /// @dev `updateValueAtNow` used to update the `balances` map and the
    ///  `totalSupplyHistory`
    /// @param checkpoints The history of data being updated
    /// @param _value The new number of tokens
    function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
    ) internal  {
        if ((checkpoints.length == 0)
        || (checkpoints[checkpoints.length -1].fromBlock < block.number)) {
               Checkpoint storage newCheckPoint = checkpoints[ checkpoints.length++ ];
               newCheckPoint.fromBlock =  uint128(block.number);
               newCheckPoint.value = uint128(_value);
           } else {
               Checkpoint storage oldCheckPoint = checkpoints[checkpoints.length-1];
               oldCheckPoint.value = uint128(_value);
           }
    }

    /// @dev Internal function to determine if an address is a contract
    /// @param _addr The address being queried
    /// @return True if `_addr` is a contract
    function isContract(address _addr) constant internal returns(bool) {
        uint size;
        if (_addr == 0) return false;
        assembly {
            size := extcodesize(_addr)
        }
        return size>0;
    }

    /// @dev Helper function to return a min betwen the two uints
    function min(uint a, uint b) internal returns (uint) {
        return a < b ? a : b;
    }

    /// @notice The fallback function: If the contract's controller has not been
    ///  set to 0, then the `proxyPayment` method is called which relays the
    ///  ether and creates tokens as described in the token controller contract
    function ()  payable {
        require(isContract(controller));
        require(TokenController(controller).proxyPayment.value(msg.value)(msg.sender));
    }

//////////
// Safety Methods
//////////

    /// @notice This method can be used by the controller to extract mistakenly
    ///  sent tokens to this contract.
    /// @param _token The address of the token contract that you want to recover
    ///  set to 0 in case you want to extract ether.
    function claimTokens(address _token) onlyController {
        if (_token == 0x0) {
            controller.transfer(this.balance);
            return;
        }

        MiniMeToken token = MiniMeToken(_token);
        uint balance = token.balanceOf(this);
        token.transfer(controller, balance);
        ClaimedTokens(_token, controller, balance);
    }

////////////////
// Events
////////////////
    event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
    event Transfer(address indexed _from, address indexed _to, uint256 _amount);
    event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock);
    event Approval(
        address indexed _owner,
        address indexed _spender,
        uint256 _amount
        );

}

contract MiniMeTokenFactory {

    /// @notice Update the DApp by creating a new token with new functionalities
    ///  the msg.sender becomes the controller of this clone token
    /// @param _parentToken Address of the token being cloned
    /// @param _snapshotBlock Block of the parent token that will
    ///  determine the initial distribution of the clone token
    /// @param _tokenName Name of the new token
    /// @param _decimalUnits Number of decimals of the new token
    /// @param _tokenSymbol Token Symbol for the new token
    /// @param _transfersEnabled If true, tokens will be able to be transferred
    /// @return The address of the new token contract
    function createCloneToken(
        address _parentToken,
        uint _snapshotBlock,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol,
        bool _transfersEnabled
    ) returns (MiniMeToken) {
        MiniMeToken newToken = new MiniMeToken(
            this,
            _parentToken,
            _snapshotBlock,
            _tokenName,
            _decimalUnits,
            _tokenSymbol,
            _transfersEnabled
            );

        newToken.changeController(msg.sender);
        return newToken;
    }
}

contract MiniMeVestedToken is MiniMeToken {
  using SafeMath for uint256;
  using Math for uint64;

  struct TokenGrant {
    address granter;     // 20 bytes
    uint256 value;       // 32 bytes
    uint64 cliff;
    uint64 vesting;
    uint64 start;        // 3 * 8 = 24 bytes
    bool revokable;
    bool burnsOnRevoke;  // 2 * 1 = 2 bits? or 2 bytes?
  } // total 78 bytes = 3 sstore per operation (32 per sstore)

  event NewTokenGrant(address indexed from, address indexed to, uint256 value, uint256 grantId);

  mapping (address => TokenGrant[]) public grants;

  mapping (address => bool) public canCreateGrants;
  address public vestingWhitelister;

  modifier canTransfer(address _sender, uint _value) {
    require(spendableBalanceOf(_sender) >= _value);
    _;
  }

  modifier onlyVestingWhitelister {
    require(msg.sender == vestingWhitelister);
    _;
  }

  function MiniMeVestedToken (
      address _tokenFactory,
      address _parentToken,
      uint _parentSnapShotBlock,
      string _tokenName,
      uint8 _decimalUnits,
      string _tokenSymbol,
      bool _transfersEnabled
  ) public
    MiniMeToken(_tokenFactory, _parentToken, _parentSnapShotBlock, _tokenName, _decimalUnits, _tokenSymbol, _transfersEnabled) {
    vestingWhitelister = msg.sender;
    doSetCanCreateGrants(vestingWhitelister, true);
  }

  // @dev Add canTransfer modifier before allowing transfer and transferFrom to go through
  function transfer(address _to, uint _value)
           public
           canTransfer(msg.sender, _value)
           returns (bool success) {
    return super.transfer(_to, _value);
  }

  function transferFrom(address _from, address _to, uint _value)
           public
           canTransfer(_from, _value)
           returns (bool success) {
    return super.transferFrom(_from, _to, _value);
  }

  function spendableBalanceOf(address _holder) public constant returns (uint) {
    return transferableTokens(_holder, uint64(now)); // solhint-disable not-rely-on-time
  }

  /**
   * @dev Grant tokens to a specified address
   * @param _to address The address which the tokens will be granted to.
   * @param _value uint256 The amount of tokens to be granted.
   * @param _start uint64 Time of the beginning of the grant.
   * @param _cliff uint64 Time of the cliff period.
   * @param _vesting uint64 The vesting period.
   */
  function grantVestedTokens(
    address _to,
    uint256 _value,
    uint64 _start,
    uint64 _cliff,
    uint64 _vesting,
    bool _revokable,
    bool _burnsOnRevoke
  ) public {
    // Check start, cliff and vesting are properly order to ensure correct functionality of the formula.
    require(_cliff >= _start);
    require(_vesting >= _cliff);

    require(canCreateGrants[msg.sender]);
    require(tokenGrantsCount(_to) < 20);   // To prevent a user being spammed and have his balance locked (out of gas attack when calculating vesting).

    TokenGrant memory grant = TokenGrant(
      _revokable ? msg.sender : 0,
      _value,
      _cliff,
      _vesting,
      _start,
      _revokable,
      _burnsOnRevoke
    );

    uint256 count = grants[_to].push(grant);

    assert(transfer(_to, _value));

    NewTokenGrant(msg.sender, _to, _value, count - 1);
  }

  function setCanCreateGrants(address _addr, bool _allowed)
           public onlyVestingWhitelister {
    doSetCanCreateGrants(_addr, _allowed);
  }

  function changeVestingWhitelister(address _newWhitelister) public onlyVestingWhitelister {
    require(_newWhitelister != 0);
    doSetCanCreateGrants(vestingWhitelister, false);
    vestingWhitelister = _newWhitelister;
    doSetCanCreateGrants(vestingWhitelister, true);
  }

  /**
   * @dev Revoke the grant of tokens of a specifed address.
   * @param _holder The address which will have its tokens revoked.
   * @param _receiver Recipient of revoked tokens.
   * @param _grantId The id of the token grant.
   */
  function revokeTokenGrant(address _holder, address _receiver, uint256 _grantId) public onlyVestingWhitelister {
    require(_receiver != 0);

    TokenGrant storage grant = grants[_holder][_grantId];

    require(grant.revokable);
    require(grant.granter == msg.sender); // Only granter can revoke it

    address receiver = grant.burnsOnRevoke ? 0xdead : _receiver;

    uint256 nonVested = nonVestedTokens(grant, uint64(now));

    // remove grant from array
    delete grants[_holder][_grantId];
    grants[_holder][_grantId] = grants[_holder][grants[_holder].length.sub(1)];
    grants[_holder].length -= 1;

    doTransfer(_holder, receiver, nonVested);
  }

  /**
   * @dev Check the amount of grants that an address has.
   * @param _holder The holder of the grants.
   * @return A uint256 representing the total amount of grants.
   */
  function tokenGrantsCount(address _holder) public constant returns (uint index) {
    return grants[_holder].length;
  }

  /**
   * @dev Get all information about a specific grant.
   * @param _holder The address which will have its tokens revoked.
   * @param _grantId The id of the token grant.
   * @return Returns all the values that represent a TokenGrant(address, value, start, cliff,
   * revokability, burnsOnRevoke, and vesting) plus the vested value at the current time.
   */
  function tokenGrant(address _holder, uint256 _grantId) public constant returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) {
    TokenGrant storage grant = grants[_holder][_grantId];

    granter = grant.granter;
    value = grant.value;
    start = grant.start;
    cliff = grant.cliff;
    vesting = grant.vesting;
    revokable = grant.revokable;
    burnsOnRevoke = grant.burnsOnRevoke;

    vested = vestedTokens(grant, uint64(now));
  }

  // @dev The date in which all tokens are transferable for the holder
  // Useful for displaying purposes (not used in any logic calculations)
  function lastTokenIsTransferableDate(address holder) public constant returns (uint64 date) {
    date = uint64(now);
    uint256 grantIndex = tokenGrantsCount(holder);
    for (uint256 i = 0; i < grantIndex; i++) {
      date = grants[holder][i].vesting.max64(date);
    }
    return date;
  }

  // @dev How many tokens can a holder transfer at a point in time
  function transferableTokens(address holder, uint64 time) public constant returns (uint256) {
    uint256 grantIndex = tokenGrantsCount(holder);

    if (grantIndex == 0) return balanceOf(holder); // shortcut for holder without grants

    // Iterate through all the grants the holder has, and add all non-vested tokens
    uint256 nonVested = 0;
    for (uint256 i = 0; i < grantIndex; i++) {
      nonVested = nonVested.add(nonVestedTokens(grants[holder][i], time));
    }

    // Balance - totalNonVested is the amount of tokens a holder can transfer at any given time
    return balanceOf(holder).sub(nonVested);
  }

  function doSetCanCreateGrants(address _addr, bool _allowed)
           internal {
    canCreateGrants[_addr] = _allowed;
  }

  /**
   * @dev Calculate amount of vested tokens at a specific time
   * @param tokens uint256 The amount of tokens granted
   * @param time uint64 The time to be checked
   * @param start uint64 The time representing the beginning of the grant
   * @param cliff uint64  The cliff period, the period before nothing can be paid out
   * @param vesting uint64 The vesting period
   * @return An uint256 representing the amount of vested tokens of a specific grant
   *  transferableTokens
   *   |                         _/--------   vestedTokens rect
   *   |                       _/
   *   |                     _/
   *   |                   _/
   *   |                 _/
   *   |                /
   *   |              .|
   *   |            .  |
   *   |          .    |
   *   |        .      |
   *   |      .        |
   *   |    .          |
   *   +===+===========+---------+----------> time
   *      Start       Cliff    Vesting
   */
  function calculateVestedTokens(
    uint256 tokens,
    uint256 time,
    uint256 start,
    uint256 cliff,
    uint256 vesting) internal constant returns (uint256)
    {

    // Shortcuts for before cliff and after vesting cases.
    if (time < cliff) return 0;
    if (time >= vesting) return tokens;

    // Interpolate all vested tokens.
    // As before cliff the shortcut returns 0, we can use just this function to
    // calculate it.

    // vested = tokens * (time - start) / (vesting - start)
    uint256 vested = tokens.mul(
                             time.sub(start)
                           ).div(vesting.sub(start));

    return vested;
  }

  /**
   * @dev Calculate the amount of non vested tokens at a specific time.
   * @param grant TokenGrant The grant to be checked.
   * @param time uint64 The time to be checked
   * @return An uint256 representing the amount of non vested tokens of a specific grant on the
   * passed time frame.
   */
  function nonVestedTokens(TokenGrant storage grant, uint64 time) internal constant returns (uint256) {
    // Of all the tokens of the grant, how many of them are not vested?
    // grantValue - vestedTokens
    return grant.value.sub(vestedTokens(grant, time));
  }

  /**
   * @dev Get the amount of vested tokens at a specific time.
   * @param grant TokenGrant The grant to be checked.
   * @param time The time to be checked
   * @return An uint256 representing the amount of vested tokens of a specific grant at a specific time.
   */
  function vestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) {
    return calculateVestedTokens(
      grant.value,
      uint256(time),
      uint256(grant.start),
      uint256(grant.cliff),
      uint256(grant.vesting)
    );
  }
}

contract BLT is MiniMeVestedToken {
  function BLT(address _tokenFactory) public MiniMeVestedToken(
    _tokenFactory,
    0x0,           // no parent token
    0,             // no snapshot block number from parent
    "Bloom Token", // Token name
    18,            // Decimals
    "BLT",         // Symbol
    true           // Enable transfers
  ) {} // solhint-disable-line no-empty-blocks
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"advisorPool","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"setToken","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_holder","type":"address"},{"name":"_grantId","type":"uint256"}],"name":"revokeGrant","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"cap","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"","type":"uint256"}],"name":"onTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finishConfiguration","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"configured","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_amount","type":"uint256"},{"name":"cliffDate","type":"uint64"},{"name":"vestingDate","type":"uint64"}],"name":"allocatePresaleTokens","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newController","type":"address"}],"name":"changeTokenController","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"onApprove","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"allocateSupply","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_cents","type":"uint256"},{"name":"_weiRaisedOffChain","type":"uint256"}],"name":"finishPresale","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_cliffDate","type":"uint64"},{"name":"_vestingDate","type":"uint64"}],"name":"allocateAdvisorTokens","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"hasEnded","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"proxyPayment","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_endTime","type":"uint256"},{"name":"_rate","type":"uint256"},{"name":"_wallet","type":"address"},{"name":"_cap","type":"uint256"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":false,"name":"bltAmount","type":"uint256"}],"name":"NewPresaleAllocation","type":"event"},{"anonymous":false,"inputs":[],"name":"Finalized","type":"event"},{"anonymous":false,"inputs":[],"name":"Configured","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"}]

60606040526006805460a060020a62ffffff021916905560146a7c13bc4b2c133c560000005b04600855341561003457600080fd5b60405160a0806115cb83398101604052808051919060200180519190602001805191906020018051919060200180519150505b5b805b858585855b4284101561007c57600080fd5b8383101561008957600080fd5b6000821161009657600080fd5b600160a060020a03811615156100ab57600080fd5b60008490556001839055600382905560028054600160a060020a031916600160a060020a0383161790555b505050506000811115156100e957600080fd5b60058190555b5060068054600160a060020a03191633600160a060020a03161790555b5b50505050505b6114a9806101226000396000f300606060405236156101595763ffffffff60e060020a60003504166311fdff0c8114610167578063144fa6d71461018c5780632c4e722e146101ad5780633197cbb6146101d2578063349b6486146101f7578063355274ea1461021b5780633f4ba83a146102405780634042b66f146102555780634a3931491461027a5780634bb278f3146102b6578063521eb273146102cb5780635c975abb146102fa5780635fb4f78c1461032157806378e97925146103485780638456cb591461036d5780638772a23a146103825780638d4e4083146103a95780638da5cb5b146103d0578063902d55a5146103ff578063b31a4e0d14610424578063d6c8976b1461045b578063da682aeb1461047c578063e335b5e9146104b8578063e3a79840146104cd578063eb5bdda0146104fa578063ecb70fb714610531578063f2fde38b14610558578063f48c305414610579578063fc0c546a146105a1575b5b610163336105d0565b505b005b341561017257600080fd5b61017a610664565b60405190815260200160405180910390f35b341561019757600080fd5b610165600160a060020a036004351661066a565b005b34156101b857600080fd5b61017a6106aa565b60405190815260200160405180910390f35b34156101dd57600080fd5b61017a6106b0565b60405190815260200160405180910390f35b341561020257600080fd5b610165600160a060020a03600435166024356106b6565b005b341561022657600080fd5b61017a610756565b60405190815260200160405180910390f35b341561024b57600080fd5b61016561075c565b005b341561026057600080fd5b61017a6107de565b60405190815260200160405180910390f35b341561028557600080fd5b6102a2600160a060020a03600435811690602435166044356107e4565b604051901515815260200160405180910390f35b34156102c157600080fd5b61016561081d565b005b34156102d657600080fd5b6102de6108c0565b604051600160a060020a03909116815260200160405180910390f35b341561030557600080fd5b6102a26108cf565b604051901515815260200160405180910390f35b341561032c57600080fd5b6102a26108df565b604051901515815260200160405180910390f35b341561035357600080fd5b61017a61096d565b60405190815260200160405180910390f35b341561037857600080fd5b610165610973565b005b341561038d57600080fd5b6102a26109fa565b604051901515815260200160405180910390f35b34156103b457600080fd5b6102a2610a0a565b604051901515815260200160405180910390f35b34156103db57600080fd5b6102de610a1a565b604051600160a060020a03909116815260200160405180910390f35b341561040a57600080fd5b61017a610a29565b60405190815260200160405180910390f35b341561042f57600080fd5b610165600160a060020a036004351660243567ffffffffffffffff60443581169060643516610a38565b005b341561046657600080fd5b610165600160a060020a0360043516610b4b565b005b341561048757600080fd5b6102a2600160a060020a0360043581169060243516604435610be8565b604051901515815260200160405180910390f35b34156104c357600080fd5b610165610bf2565b005b34156104d857600080fd5b6102a2600435602435610dda565b604051901515815260200160405180910390f35b341561050557600080fd5b610165600160a060020a036004351660243567ffffffffffffffff60443581169060643516610e22565b005b341561053c57600080fd5b6102a2610e6e565b604051901515815260200160405180910390f35b341561056357600080fd5b610165600160a060020a0360043516610e91565b005b6102a2600160a060020a03600435166105d0565b604051901515815260200160405180910390f35b34156105ac57600080fd5b6102de610f2a565b604051600160a060020a03909116815260200160405180910390f35b600654600090819060a060020a900460ff16156105ec57600080fd5b60065460a860020a900460ff16151561060457600080fd5b600160a060020a038316151561061957600080fd5b610621610f39565b151561062c57600080fd5b506004543490610642908263ffffffff610f7116565b60045561064f8382610f8b565b61065761101f565b600191505b5b5b50919050565b60085481565b610672611056565b151561067d57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60035481565b60015481565b60065433600160a060020a039081169116146106d157600080fd5b600754600254600160a060020a039182169163b0cf0dcb918591168460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561073c57600080fd5b6102c65a03f1151561074d57600080fd5b5050505b5b5050565b60055481565b60065433600160a060020a0390811691161461077757600080fd5b60065460a060020a900460ff16151561078f57600080fd5b6006805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a15b5b5b565b60045481565b600030600160a060020a031684600160a060020a031614806108135750600254600160a060020a038481169116145b90505b9392505050565b60065433600160a060020a0390811691161461083857600080fd5b60065460b060020a900460ff161561084f57600080fd5b610857610e6e565b151561086257600080fd5b61086a6110a0565b7f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768160405160405180910390a16006805476ff00000000000000000000000000000000000000000000191660b060020a1790555b5b565b600254600160a060020a031681565b60065460a060020a900460ff1681565b60065460009033600160a060020a039081169116146108fd57600080fd5b60065460a860020a900460ff161561091457600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a1790557f218e343c3bc47e5be3c3d7d3e49606346cf1fe1fcd187c42177b9d6f4cbfbff560405160405180910390a15060015b5b90565b60005481565b60065433600160a060020a0390811691161461098e57600080fd5b60065460a060020a900460ff16156109a557600080fd5b6006805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a15b5b5b565b60065460a860020a900460ff1681565b60065460b060020a900460ff1681565b600654600160a060020a031681565b6a7c13bc4b2c133c5600000081565b610a40611056565b1515610a4b57600080fd5b6a084595161401484a000000831115610a6357600080fd5b600754600160a060020a0316639754a4d985854286866001600060405160e060020a63ffffffff8a16028152600160a060020a039097166004880152602487019590955267ffffffffffffffff938416604487015291831660648601529091166084840152151560a4830152151560c482015260e401600060405180830381600087803b1515610af257600080fd5b6102c65a03f11515610b0357600080fd5b50505083600160a060020a03167fccb3449eedc1ae522e9c838d9d16e673c54f68d1d6fd020fe175e4a202197ef58460405190815260200160405180910390a25b5b50505050565b60065433600160a060020a03908116911614610b6657600080fd5b60065460b060020a900460ff161515610b7e57600080fd5b600754600160a060020a0316633cebb8238260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b1515610bce57600080fd5b6102c65a03f11515610b4457600080fd5b5050505b5b5b50565b60005b9392505050565b610bfa611056565b1515610c0557600080fd5b600754600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c4d57600080fd5b6102c65a03f11515610c5e57600080fd5b5050506040518051159050610c7257600080fd5b600754600160a060020a031663827f32c03060146a7c13bc4b2c133c560000005b04600a6b01f04ef12cb04cf1580000005b046a7c13bc4b2c133c56000000030360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610cff57600080fd5b6102c65a03f11515610d1057600080fd5b50505060405180515050600754600254600160a060020a039182169163827f32c0911660146a7c13bc4b2c133c560000005b04600a6b01f04ef12cb04cf1580000005b046a7c13bc4b2c133c5600000003036a7c13bc4b2c133c560000000360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610dbb57600080fd5b6102c65a03f11515610dcc57600080fd5b505050604051805150505b5b565b6000610de4611056565b1515610def57600080fd5b610df88361119a565b610e01826111f1565b610e09611222565b610e116112c2565b610e196108df565b505b5b92915050565b610e2a611056565b1515610e3557600080fd5b600854831115610e4457600080fd5b600854610e57908463ffffffff61137416565b600855610b4484848484610a38565b5b5b50505050565b600554600454600091901015610e8261138b565b80610e8a5750805b91505b5090565b60065433600160a060020a03908116911614610eac57600080fd5b600160a060020a0381161515610ec157600080fd5b600654600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600754600160a060020a031681565b6000610f43611394565b8015610f56575066038d7ea4c680003410155b8015610f6b575060065460a860020a900460ff165b90505b90565b600082820183811015610f8057fe5b8091505b5092915050565b600754600160a060020a03166323b872dd3084610fa7856113cb565b60006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610fff57600080fd5b6102c65a03f1151561101057600080fd5b505050604051805150505b5050565b600254600160a060020a03163480156108fc0290604051600060405180830381858888f1935050505015156107da57600080fd5b5b565b60008054421061106557600080fd5b60065433600160a060020a0390811691161461108057600080fd5b60065460a860020a900460ff161561109757600080fd5b5060015b5b5b90565b600754600254600160a060020a03918216916323b872dd91309116836370a082318360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561110957600080fd5b6102c65a03f1151561111a57600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610dbb57600080fd5b6102c65a03f11515610dcc57600080fd5b505050604051805150505b565b6000612710821180156111af5750620186a082105b15156111ba57600080fd5b6111d368056bc75e2d631000008363ffffffff61140216565b90506111e96302faf0808263ffffffff61141e16565b6005555b5050565b600454156111fe57600080fd5b60025461121b90600160a060020a0316318263ffffffff610f7116565b6004555b50565b600880546000918290556007546002549192600160a060020a03918216926323b872dd92309291169085906040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156112a357600080fd5b6102c65a03f115156112b457600080fd5b505050604051805150505b50565b60045460055460075491900390600090600160a060020a03166370a0823130836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561132757600080fd5b6102c65a03f1151561133857600080fd5b5050506040518051915061136c90508261136083670de0b6b3a764000063ffffffff61141e16565b9063ffffffff61140216565b6003555b5050565b60008282111561138057fe5b508082035b92915050565b60015442115b90565b6000806005546113af34600454610f7190919063ffffffff16565b111590506113bb61144d565b8015610e8a5750805b91505b5090565b60006113fa670de0b6b3a76400006113606003548561141e90919063ffffffff16565b9063ffffffff61140216565b90505b919050565b600080828481151561141057fe5b0490508091505b5092915050565b600082820283158061143a575082848281151561143757fe5b04145b1515610f8057fe5b8091505b5092915050565b60008060008054421015801561146557506001544211155b9150503415158180156114755750805b92505b5050905600a165627a7a723058201d524d9f2faf7602fd831bd801958dc3ed51dabc1efaa0b48853a3111379b0a60029000000000000000000000000000000000000000000000000000000005a1ee790000000000000000000000000000000000000000000000000000000005a4a934000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000009d217bcbd0bfae4d7f8f12c7702108d162e3ab790000000000000000000000000000000000000000000000000000000000002710

Deployed Bytecode

0x606060405236156101595763ffffffff60e060020a60003504166311fdff0c8114610167578063144fa6d71461018c5780632c4e722e146101ad5780633197cbb6146101d2578063349b6486146101f7578063355274ea1461021b5780633f4ba83a146102405780634042b66f146102555780634a3931491461027a5780634bb278f3146102b6578063521eb273146102cb5780635c975abb146102fa5780635fb4f78c1461032157806378e97925146103485780638456cb591461036d5780638772a23a146103825780638d4e4083146103a95780638da5cb5b146103d0578063902d55a5146103ff578063b31a4e0d14610424578063d6c8976b1461045b578063da682aeb1461047c578063e335b5e9146104b8578063e3a79840146104cd578063eb5bdda0146104fa578063ecb70fb714610531578063f2fde38b14610558578063f48c305414610579578063fc0c546a146105a1575b5b610163336105d0565b505b005b341561017257600080fd5b61017a610664565b60405190815260200160405180910390f35b341561019757600080fd5b610165600160a060020a036004351661066a565b005b34156101b857600080fd5b61017a6106aa565b60405190815260200160405180910390f35b34156101dd57600080fd5b61017a6106b0565b60405190815260200160405180910390f35b341561020257600080fd5b610165600160a060020a03600435166024356106b6565b005b341561022657600080fd5b61017a610756565b60405190815260200160405180910390f35b341561024b57600080fd5b61016561075c565b005b341561026057600080fd5b61017a6107de565b60405190815260200160405180910390f35b341561028557600080fd5b6102a2600160a060020a03600435811690602435166044356107e4565b604051901515815260200160405180910390f35b34156102c157600080fd5b61016561081d565b005b34156102d657600080fd5b6102de6108c0565b604051600160a060020a03909116815260200160405180910390f35b341561030557600080fd5b6102a26108cf565b604051901515815260200160405180910390f35b341561032c57600080fd5b6102a26108df565b604051901515815260200160405180910390f35b341561035357600080fd5b61017a61096d565b60405190815260200160405180910390f35b341561037857600080fd5b610165610973565b005b341561038d57600080fd5b6102a26109fa565b604051901515815260200160405180910390f35b34156103b457600080fd5b6102a2610a0a565b604051901515815260200160405180910390f35b34156103db57600080fd5b6102de610a1a565b604051600160a060020a03909116815260200160405180910390f35b341561040a57600080fd5b61017a610a29565b60405190815260200160405180910390f35b341561042f57600080fd5b610165600160a060020a036004351660243567ffffffffffffffff60443581169060643516610a38565b005b341561046657600080fd5b610165600160a060020a0360043516610b4b565b005b341561048757600080fd5b6102a2600160a060020a0360043581169060243516604435610be8565b604051901515815260200160405180910390f35b34156104c357600080fd5b610165610bf2565b005b34156104d857600080fd5b6102a2600435602435610dda565b604051901515815260200160405180910390f35b341561050557600080fd5b610165600160a060020a036004351660243567ffffffffffffffff60443581169060643516610e22565b005b341561053c57600080fd5b6102a2610e6e565b604051901515815260200160405180910390f35b341561056357600080fd5b610165600160a060020a0360043516610e91565b005b6102a2600160a060020a03600435166105d0565b604051901515815260200160405180910390f35b34156105ac57600080fd5b6102de610f2a565b604051600160a060020a03909116815260200160405180910390f35b600654600090819060a060020a900460ff16156105ec57600080fd5b60065460a860020a900460ff16151561060457600080fd5b600160a060020a038316151561061957600080fd5b610621610f39565b151561062c57600080fd5b506004543490610642908263ffffffff610f7116565b60045561064f8382610f8b565b61065761101f565b600191505b5b5b50919050565b60085481565b610672611056565b151561067d57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60035481565b60015481565b60065433600160a060020a039081169116146106d157600080fd5b600754600254600160a060020a039182169163b0cf0dcb918591168460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561073c57600080fd5b6102c65a03f1151561074d57600080fd5b5050505b5b5050565b60055481565b60065433600160a060020a0390811691161461077757600080fd5b60065460a060020a900460ff16151561078f57600080fd5b6006805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a15b5b5b565b60045481565b600030600160a060020a031684600160a060020a031614806108135750600254600160a060020a038481169116145b90505b9392505050565b60065433600160a060020a0390811691161461083857600080fd5b60065460b060020a900460ff161561084f57600080fd5b610857610e6e565b151561086257600080fd5b61086a6110a0565b7f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768160405160405180910390a16006805476ff00000000000000000000000000000000000000000000191660b060020a1790555b5b565b600254600160a060020a031681565b60065460a060020a900460ff1681565b60065460009033600160a060020a039081169116146108fd57600080fd5b60065460a860020a900460ff161561091457600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a1790557f218e343c3bc47e5be3c3d7d3e49606346cf1fe1fcd187c42177b9d6f4cbfbff560405160405180910390a15060015b5b90565b60005481565b60065433600160a060020a0390811691161461098e57600080fd5b60065460a060020a900460ff16156109a557600080fd5b6006805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a15b5b5b565b60065460a860020a900460ff1681565b60065460b060020a900460ff1681565b600654600160a060020a031681565b6a7c13bc4b2c133c5600000081565b610a40611056565b1515610a4b57600080fd5b6a084595161401484a000000831115610a6357600080fd5b600754600160a060020a0316639754a4d985854286866001600060405160e060020a63ffffffff8a16028152600160a060020a039097166004880152602487019590955267ffffffffffffffff938416604487015291831660648601529091166084840152151560a4830152151560c482015260e401600060405180830381600087803b1515610af257600080fd5b6102c65a03f11515610b0357600080fd5b50505083600160a060020a03167fccb3449eedc1ae522e9c838d9d16e673c54f68d1d6fd020fe175e4a202197ef58460405190815260200160405180910390a25b5b50505050565b60065433600160a060020a03908116911614610b6657600080fd5b60065460b060020a900460ff161515610b7e57600080fd5b600754600160a060020a0316633cebb8238260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b1515610bce57600080fd5b6102c65a03f11515610b4457600080fd5b5050505b5b5b50565b60005b9392505050565b610bfa611056565b1515610c0557600080fd5b600754600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c4d57600080fd5b6102c65a03f11515610c5e57600080fd5b5050506040518051159050610c7257600080fd5b600754600160a060020a031663827f32c03060146a7c13bc4b2c133c560000005b04600a6b01f04ef12cb04cf1580000005b046a7c13bc4b2c133c56000000030360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610cff57600080fd5b6102c65a03f11515610d1057600080fd5b50505060405180515050600754600254600160a060020a039182169163827f32c0911660146a7c13bc4b2c133c560000005b04600a6b01f04ef12cb04cf1580000005b046a7c13bc4b2c133c5600000003036a7c13bc4b2c133c560000000360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610dbb57600080fd5b6102c65a03f11515610dcc57600080fd5b505050604051805150505b5b565b6000610de4611056565b1515610def57600080fd5b610df88361119a565b610e01826111f1565b610e09611222565b610e116112c2565b610e196108df565b505b5b92915050565b610e2a611056565b1515610e3557600080fd5b600854831115610e4457600080fd5b600854610e57908463ffffffff61137416565b600855610b4484848484610a38565b5b5b50505050565b600554600454600091901015610e8261138b565b80610e8a5750805b91505b5090565b60065433600160a060020a03908116911614610eac57600080fd5b600160a060020a0381161515610ec157600080fd5b600654600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600754600160a060020a031681565b6000610f43611394565b8015610f56575066038d7ea4c680003410155b8015610f6b575060065460a860020a900460ff165b90505b90565b600082820183811015610f8057fe5b8091505b5092915050565b600754600160a060020a03166323b872dd3084610fa7856113cb565b60006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610fff57600080fd5b6102c65a03f1151561101057600080fd5b505050604051805150505b5050565b600254600160a060020a03163480156108fc0290604051600060405180830381858888f1935050505015156107da57600080fd5b5b565b60008054421061106557600080fd5b60065433600160a060020a0390811691161461108057600080fd5b60065460a860020a900460ff161561109757600080fd5b5060015b5b5b90565b600754600254600160a060020a03918216916323b872dd91309116836370a082318360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561110957600080fd5b6102c65a03f1151561111a57600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610dbb57600080fd5b6102c65a03f11515610dcc57600080fd5b505050604051805150505b565b6000612710821180156111af5750620186a082105b15156111ba57600080fd5b6111d368056bc75e2d631000008363ffffffff61140216565b90506111e96302faf0808263ffffffff61141e16565b6005555b5050565b600454156111fe57600080fd5b60025461121b90600160a060020a0316318263ffffffff610f7116565b6004555b50565b600880546000918290556007546002549192600160a060020a03918216926323b872dd92309291169085906040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156112a357600080fd5b6102c65a03f115156112b457600080fd5b505050604051805150505b50565b60045460055460075491900390600090600160a060020a03166370a0823130836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561132757600080fd5b6102c65a03f1151561133857600080fd5b5050506040518051915061136c90508261136083670de0b6b3a764000063ffffffff61141e16565b9063ffffffff61140216565b6003555b5050565b60008282111561138057fe5b508082035b92915050565b60015442115b90565b6000806005546113af34600454610f7190919063ffffffff16565b111590506113bb61144d565b8015610e8a5750805b91505b5090565b60006113fa670de0b6b3a76400006113606003548561141e90919063ffffffff16565b9063ffffffff61140216565b90505b919050565b600080828481151561141057fe5b0490508091505b5092915050565b600082820283158061143a575082848281151561143757fe5b04145b1515610f8057fe5b8091505b5092915050565b60008060008054421015801561146557506001544211155b9150503415158180156114755750805b92505b5050905600a165627a7a723058201d524d9f2faf7602fd831bd801958dc3ed51dabc1efaa0b48853a3111379b0a60029

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

000000000000000000000000000000000000000000000000000000005a1ee790000000000000000000000000000000000000000000000000000000005a4a934000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000009d217bcbd0bfae4d7f8f12c7702108d162e3ab790000000000000000000000000000000000000000000000000000000000002710

-----Decoded View---------------
Arg [0] : _startTime (uint256): 1511974800
Arg [1] : _endTime (uint256): 1514836800
Arg [2] : _rate (uint256): 1000
Arg [3] : _wallet (address): 0x9d217bcBD0Bfae4D7f8f12c7702108D162e3Ab79
Arg [4] : _cap (uint256): 10000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000005a1ee790
Arg [1] : 000000000000000000000000000000000000000000000000000000005a4a9340
Arg [2] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [3] : 0000000000000000000000009d217bcbd0bfae4d7f8f12c7702108d162e3ab79
Arg [4] : 0000000000000000000000000000000000000000000000000000000000002710


Swarm Source

bzzr://1d524d9f2faf7602fd831bd801958dc3ed51dabc1efaa0b48853a3111379b0a6

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.