ETH Price: $3,158.17 (+0.93%)
Gas: 7 Gwei

Token

Vice (VIT)
 

Overview

Max Total Supply

4,000,000,000 VIT

Holders

4,749 (0.00%)

Total Transfers

-

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

$1,648,520.00

Circulating Supply Market Cap

$0.00

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Adult Entertainment Platform

Market

Volume (24H):$0.02
Market Capitalization:$0.00
Circulating Supply:0.00 VIT
Market Data Source: Coinmarketcap

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
VITToken

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-03-15
*/

pragma solidity 0.4.18;

/**
 * @title Math
 * @dev Assorted math operations
 */

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

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

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

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


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

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

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

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


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


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


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


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


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

}


/**
 * @title Contracts that should be able to recover tokens
 * @author SylTi
 * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner.
 * This will prevent any accidental loss of tokens.
 */
contract CanReclaimToken is Ownable {
  using SafeERC20 for ERC20Basic;

  /**
   * @dev Reclaim all ERC20Basic compatible tokens
   * @param token ERC20Basic The address of the token contract
   */
  function reclaimToken(ERC20Basic token) external onlyOwner {
    uint256 balance = token.balanceOf(this);
    token.safeTransfer(owner, balance);
  }

}




/**
 * @title Claimable
 * @dev Extension for the Ownable contract, where the ownership needs to be claimed.
 * This allows the new owner to accept the transfer.
 */
contract Claimable is Ownable {
  address public pendingOwner;

  /**
   * @dev Modifier throws if called by any account other than the pendingOwner.
   */
  modifier onlyPendingOwner() {
    require(msg.sender == pendingOwner);
    _;
  }

  /**
   * @dev Allows the current owner to set the pendingOwner address.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    pendingOwner = newOwner;
  }

  /**
   * @dev Allows the pendingOwner address to finalize the transfer.
   */
  function claimOwnership() onlyPendingOwner public {
    OwnershipTransferred(owner, pendingOwner);
    owner = pendingOwner;
    pendingOwner = address(0);
  }
}


/**
 * @title Contracts that should not own Contracts
 * @author Remco Bloemen <remco@2π.com>
 * @dev Should contracts (anything Ownable) end up being owned by this contract, it allows the owner
 * of this contract to reclaim ownership of the contracts.
 */
contract HasNoContracts is Ownable {

  /**
   * @dev Reclaim ownership of Ownable contracts
   * @param contractAddr The address of the Ownable to be reclaimed.
   */
  function reclaimContract(address contractAddr) external onlyOwner {
    Ownable contractInst = Ownable(contractAddr);
    contractInst.transferOwnership(owner);
  }
}


/**
 * @title Contracts that should not own Tokens
 * @author Remco Bloemen <remco@2π.com>
 * @dev This blocks incoming ERC23 tokens to prevent accidental loss of tokens.
 * Should tokens (any ERC20Basic compatible) end up in the contract, it allows the
 * owner to reclaim the tokens.
 */
contract HasNoTokens is CanReclaimToken {

 /**
  * @dev Reject all ERC23 compatible tokens
  * @param from_ address The address that is transferring the tokens
  * @param value_ uint256 the amount of the specified token
  * @param data_ Bytes The data passed from the caller.
  */
  function tokenFallback(address from_, uint256 value_, bytes data_) external {
    from_;
    value_;
    data_;
    revert();
  }

}


/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  uint256 public totalSupply;
  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);
}




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




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

  mapping(address => uint256) balances;

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

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    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 balance) {
    return balances[_owner];
  }

}




/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * @dev https://github.com/ethereum/EIPs/issues/20
 * @dev 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);
    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;
    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, uint _addedValue) public returns (bool) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    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, uint _subtractedValue) public returns (bool) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}





/**
 * @title Mintable token
 * @dev Simple ERC20 Token example, with mintable token creation
 * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
 */

contract MintableToken is StandardToken, Ownable {
  event Mint(address indexed to, uint256 amount);
  event MintFinished();

  bool public mintingFinished = false;


  modifier canMint() {
    require(!mintingFinished);
    _;
  }

  /**
   * @dev Function to mint tokens
   * @param _to The address that will receive the minted tokens.
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   */
  function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
    totalSupply = totalSupply.add(_amount);
    balances[_to] = balances[_to].add(_amount);
    Mint(_to, _amount);
    Transfer(address(0), _to, _amount);
    return true;
  }

  /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
  function finishMinting() onlyOwner canMint public returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
  }
}


/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
  function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
    assert(token.transfer(to, value));
  }

  function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
    assert(token.transferFrom(from, to, value));
  }

  function safeApprove(ERC20 token, address spender, uint256 value) internal {
    assert(token.approve(spender, value));
  }
}



contract VITToken is Claimable, HasNoTokens, MintableToken {
    // solhint-disable const-name-snakecase
    string public constant name = "Vice";
    string public constant symbol = "VIT";
    uint8 public constant decimals = 18;
    // solhint-enable const-name-snakecase

    modifier cannotMint() {
        require(mintingFinished);
        _;
    }

    function VITToken() public {

    }

    /// @dev Same ERC20 behavior, but reverts if still minting.
    /// @param _to address The address to transfer to.
    /// @param _value uint256 The amount to be transferred.
    function transfer(address _to, uint256 _value) public cannotMint returns (bool) {
        return super.transfer(_to, _value);
    }

    /// @dev Same ERC20 behavior, but reverts if still minting.
    /// @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 cannotMint returns (bool) {
        return super.transferFrom(_from, _to, _value);
    }
}




/// @title VITToken sale contract.
contract VITTokenSale is Claimable {
    using Math for uint256;
    using SafeMath for uint256;

    // VIT token contract.
    VITToken public vitToken;

    // Received funds are forwarded to this address.
    address public fundingRecipient;

    // VIT token unit.
    uint256 public constant TOKEN_UNIT = 10 ** 18;

    // Maximum tokens offered in the sale: 2B.
    uint256 public constant MAX_TOKENS_SOLD = 2 * 10 ** 9 * TOKEN_UNIT;

    // VIT to 1 wei ratio.
    uint256 public vitPerWei;

    // Sale start and end timestamps.
    uint256 public constant RESTRICTED_PERIOD_DURATION = 1 days;
    uint256 public startTime;
    uint256 public endTime;

    // Refund data and state.
    uint256 public refundEndTime;
    mapping (address => uint256) public refundableEther;
    mapping (address => uint256) public claimableTokens;
    uint256 public totalClaimableTokens = 0;
    bool public finalizedRefund = false;

    // Amount of tokens sold until now in the sale.
    uint256 public tokensSold = 0;

    // Accumulated amount each participant has contributed so far.
    mapping (address => uint256) public participationHistory;

    // Maximum amount that each participant is allowed to contribute (in WEI), during the restricted period.
    mapping (address => uint256) public participationCaps;

    // Initial allocations.
    address[20] public strategicPartnersPools;
    uint256 public constant STRATEGIC_PARTNERS_POOL_ALLOCATION = 100 * 10 ** 6 * TOKEN_UNIT; // 100M

    event TokensIssued(address indexed to, uint256 tokens);
    event EtherRefunded(address indexed from, uint256 weiAmount);
    event TokensClaimed(address indexed from, uint256 tokens);
    event Finalized();
    event FinalizedRefunds();

    /// @dev Reverts if called when not during sale.
    modifier onlyDuringSale() {
        require(!saleEnded() && now >= startTime);

        _;
    }

    /// @dev Reverts if called before the sale ends.
    modifier onlyAfterSale() {
        require(saleEnded());

        _;
    }

    /// @dev Reverts if called not doing the refund period.
    modifier onlyDuringRefund() {
        require(saleDuringRefundPeriod());

        _;
    }

    modifier onlyAfterRefund() {
        require(saleAfterRefundPeriod());

        _;
    }

    /// @dev Constructor that initializes the sale conditions.
    /// @param _fundingRecipient address The address of the funding recipient.
    /// @param _startTime uint256 The start time of the token sale.
    /// @param _endTime uint256 The end time of the token sale.
    /// @param _refundEndTime uint256 The end time of the refunding period.
    /// @param _vitPerWei uint256 The exchange rate of VIT for one ETH.
    /// @param _strategicPartnersPools address[20] The addresses of the 20 strategic partners pools.
    function VITTokenSale(address _fundingRecipient, uint256 _startTime, uint256 _endTime, uint256 _refundEndTime,
        uint256 _vitPerWei, address[20] _strategicPartnersPools) public {
        require(_fundingRecipient != address(0));
        require(_startTime > now && _startTime < _endTime && _endTime < _refundEndTime);
        require(_startTime.add(RESTRICTED_PERIOD_DURATION) < _endTime);
        require(_vitPerWei > 0);

        for (uint i = 0; i < _strategicPartnersPools.length; ++i) {
            require(_strategicPartnersPools[i] != address(0));
        }

        fundingRecipient = _fundingRecipient;
        startTime = _startTime;
        endTime = _endTime;
        refundEndTime = _refundEndTime;
        vitPerWei = _vitPerWei;
        strategicPartnersPools = _strategicPartnersPools;

        // Deploy new VITToken contract.
        vitToken = new VITToken();

        // Grant initial token allocations.
        grantInitialAllocations();
    }

    /// @dev Fallback function that will delegate the request to create().
    function () external payable onlyDuringSale {
        address recipient = msg.sender;

        uint256 cappedWeiReceived = msg.value;
        uint256 weiAlreadyParticipated = participationHistory[recipient];

        // If we're during the restricted period, then only the white-listed participants are allowed to participate,
        if (saleDuringRestrictedPeriod()) {
            uint256 participationCap = participationCaps[recipient];
            cappedWeiReceived = Math.min256(cappedWeiReceived, participationCap.sub(weiAlreadyParticipated));
        }

        require(cappedWeiReceived > 0);

        // Calculate how much tokens can be sold to this participant.
        uint256 tokensLeftInSale = MAX_TOKENS_SOLD.sub(tokensSold);
        uint256 weiLeftInSale = tokensLeftInSale.div(vitPerWei);
        uint256 weiToParticipate = Math.min256(cappedWeiReceived, weiLeftInSale);
        participationHistory[recipient] = weiAlreadyParticipated.add(weiToParticipate);

        // Issue tokens and transfer to recipient.
        uint256 tokensToIssue = weiToParticipate.mul(vitPerWei);
        if (tokensLeftInSale.sub(tokensToIssue) < vitPerWei) {
            // If purchase would cause less than vitPerWei tokens left then nobody could ever buy them, so we'll gift
            // them to the last buyer.
            tokensToIssue = tokensLeftInSale;
        }

        // Record the both the participate ETH and tokens for future refunds.
        refundableEther[recipient] = refundableEther[recipient].add(weiToParticipate);
        claimableTokens[recipient] = claimableTokens[recipient].add(tokensToIssue);

        // Update token counters.
        totalClaimableTokens = totalClaimableTokens.add(tokensToIssue);
        tokensSold = tokensSold.add(tokensToIssue);

        // Issue the tokens to the token sale smart contract itself, which will hold them for future refunds.
        issueTokens(address(this), tokensToIssue);

        // Partial refund if full participation not possible, e.g. due to cap being reached.
        uint256 refund = msg.value.sub(weiToParticipate);
        if (refund > 0) {
            msg.sender.transfer(refund);
        }
    }

    /// @dev Set restricted period participation caps for a list of addresses.
    /// @param _participants address[] The list of participant addresses.
    /// @param _cap uint256 The cap amount (in ETH).
    function setRestrictedParticipationCap(address[] _participants, uint256 _cap) external onlyOwner {
        for (uint i = 0; i < _participants.length; ++i) {
            participationCaps[_participants[i]] = _cap;
        }
    }

    /// @dev Finalizes the token sale event, by stopping token minting.
    function finalize() external onlyAfterSale {
        // Issue any unsold tokens back to the company.
        if (tokensSold < MAX_TOKENS_SOLD) {
            issueTokens(fundingRecipient, MAX_TOKENS_SOLD.sub(tokensSold));
        }

        // Finish minting. Please note, that if minting was already finished - this call will revert().
        vitToken.finishMinting();

        Finalized();
    }

    function finalizeRefunds() external onlyAfterRefund {
        require(!finalizedRefund);

        finalizedRefund = true;

        // Transfer all the Ether to the beneficiary of the funding.
        fundingRecipient.transfer(this.balance);

        FinalizedRefunds();
    }

    /// @dev Reclaim all ERC20 compatible tokens, but not more than the VIT tokens which were reserved for refunds.
    /// @param token ERC20Basic The address of the token contract.
    function reclaimToken(ERC20Basic token) external onlyOwner {
        uint256 balance = token.balanceOf(this);
        if (token == vitToken) {
            balance = balance.sub(totalClaimableTokens);
        }

        assert(token.transfer(owner, balance));
    }

    /// @dev Allows participants to claim their tokens, which also transfers the Ether to the funding recipient.
    /// @param _tokensToClaim uint256 The amount of tokens to claim.
    function claimTokens(uint256 _tokensToClaim) public onlyAfterSale {
        require(_tokensToClaim != 0);

        address participant = msg.sender;
        require(claimableTokens[participant] > 0);

        uint256 claimableTokensAmount = claimableTokens[participant];
        require(_tokensToClaim <= claimableTokensAmount);

        uint256 refundableEtherAmount = refundableEther[participant];
        uint256 etherToClaim = _tokensToClaim.mul(refundableEtherAmount).div(claimableTokensAmount);
        assert(etherToClaim > 0);

        refundableEther[participant] = refundableEtherAmount.sub(etherToClaim);
        claimableTokens[participant] = claimableTokensAmount.sub(_tokensToClaim);
        totalClaimableTokens = totalClaimableTokens.sub(_tokensToClaim);

        // Transfer the tokens from the token sale smart contract to the participant.
        assert(vitToken.transfer(participant, _tokensToClaim));

        // Transfer the Ether to the beneficiary of the funding (as long as the refund hasn't finalized yet).
        if (!finalizedRefund) {
            fundingRecipient.transfer(etherToClaim);
        }

        TokensClaimed(participant, _tokensToClaim);
    }

    /// @dev Allows participants to claim all their tokens.
    function claimAllTokens() public onlyAfterSale {
        uint256 claimableTokensAmount = claimableTokens[msg.sender];
        claimTokens(claimableTokensAmount);
    }

    /// @dev Allows participants to claim refund for their purchased tokens.
    /// @param _etherToClaim uint256 The amount of Ether to claim.
    function refundEther(uint256 _etherToClaim) public onlyDuringRefund {
        require(_etherToClaim != 0);

        address participant = msg.sender;

        uint256 refundableEtherAmount = refundableEther[participant];
        require(_etherToClaim <= refundableEtherAmount);

        uint256 claimableTokensAmount = claimableTokens[participant];
        uint256 tokensToClaim = _etherToClaim.mul(claimableTokensAmount).div(refundableEtherAmount);
        assert(tokensToClaim > 0);

        refundableEther[participant] = refundableEtherAmount.sub(_etherToClaim);
        claimableTokens[participant] = claimableTokensAmount.sub(tokensToClaim);
        totalClaimableTokens = totalClaimableTokens.sub(tokensToClaim);

        // Transfer the tokens to the beneficiary of the funding.
        assert(vitToken.transfer(fundingRecipient, tokensToClaim));

        // Transfer the Ether to the participant.
        participant.transfer(_etherToClaim);

        EtherRefunded(participant, _etherToClaim);
    }

    /// @dev Allows participants to claim refund for all their purchased tokens.
    function refundAllEther() public onlyDuringRefund {
        uint256 refundableEtherAmount = refundableEther[msg.sender];
        refundEther(refundableEtherAmount);
    }

    /// @dev Initialize token grants.
    function grantInitialAllocations() private onlyOwner {
        for (uint i = 0; i < strategicPartnersPools.length; ++i) {
            issueTokens(strategicPartnersPools[i], STRATEGIC_PARTNERS_POOL_ALLOCATION);
        }
    }

    /// @dev Issues tokens for the recipient.
    /// @param _recipient address The address of the recipient.
    /// @param _tokens uint256 The amount of tokens to issue.
    function issueTokens(address _recipient, uint256 _tokens) private {
        // Request VIT token contract to mint the requested tokens for the buyer.
        assert(vitToken.mint(_recipient, _tokens));

        TokensIssued(_recipient, _tokens);
    }

    /// @dev Returns whether the sale has ended.
    /// @return bool Whether the sale has ended or not.
    function saleEnded() private view returns (bool) {
        return tokensSold >= MAX_TOKENS_SOLD || now >= endTime;
    }

    /// @dev Returns whether the sale is during its restricted period, where only white-listed participants are allowed
    /// to participate.
    /// @return bool Whether the sale is during its restricted period, where only white-listed participants are allowed
    /// to participate.
    function saleDuringRestrictedPeriod() private view returns (bool) {
        return now <= startTime.add(RESTRICTED_PERIOD_DURATION);
    }

    /// @dev Returns whether the sale is during its refund period.
    /// @return bool whether the sale is during its refund period.
    function saleDuringRefundPeriod() private view returns (bool) {
        return saleEnded() && now <= refundEndTime;
    }

    /// @dev Returns whether the sale is during its refund period.
    /// @return bool whether the sale is during its refund period.
    function saleAfterRefundPeriod() private view returns (bool) {
        return saleEnded() && now > refundEndTime;
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"reclaimToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from_","type":"address"},{"name":"value_","type":"uint256"},{"name":"data_","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","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":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

60606040526004805460a060020a60ff0219169055341561001f57600080fd5b60038054600160a060020a03191633600160a060020a0316179055610dc2806100496000396000f3006060604052600436106100f85763ffffffff60e060020a60003504166305d2035b81146100fd57806306fdde0314610124578063095ea7b3146101ae57806317ffc320146101d057806318160ddd146101f157806323b872dd14610216578063313ce5671461023e57806340c10f19146102675780634e71e0c814610289578063661884631461029c57806370a08231146102be5780637d64bcb4146102dd5780638da5cb5b146102f057806395d89b411461031f578063a9059cbb14610332578063c0ee0b8a14610354578063d73dd62314610383578063dd62ed3e146103a5578063e30c3978146103ca578063f2fde38b146103dd575b600080fd5b341561010857600080fd5b6101106103fc565b604051901515815260200160405180910390f35b341561012f57600080fd5b61013761040c565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017357808201518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b957600080fd5b610110600160a060020a0360043516602435610443565b34156101db57600080fd5b6101ef600160a060020a03600435166104af565b005b34156101fc57600080fd5b610204610565565b60405190815260200160405180910390f35b341561022157600080fd5b610110600160a060020a036004358116906024351660443561056b565b341561024957600080fd5b610251610599565b60405160ff909116815260200160405180910390f35b341561027257600080fd5b610110600160a060020a036004351660243561059e565b341561029457600080fd5b6101ef6106ab565b34156102a757600080fd5b610110600160a060020a0360043516602435610739565b34156102c957600080fd5b610204600160a060020a0360043516610833565b34156102e857600080fd5b61011061084e565b34156102fb57600080fd5b6103036108d9565b604051600160a060020a03909116815260200160405180910390f35b341561032a57600080fd5b6101376108e8565b341561033d57600080fd5b610110600160a060020a036004351660243561091f565b341561035f57600080fd5b6101ef60048035600160a060020a03169060248035916044359182019101356100f8565b341561038e57600080fd5b610110600160a060020a036004351660243561094b565b34156103b057600080fd5b610204600160a060020a03600435811690602435166109ef565b34156103d557600080fd5b610303610a1a565b34156103e857600080fd5b6101ef600160a060020a0360043516610a29565b60045460a060020a900460ff1681565b60408051908101604052600481527f5669636500000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035460009033600160a060020a039081169116146104cd57600080fd5b81600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561052457600080fd5b6102c65a03f1151561053557600080fd5b50505060405180516003549092506105619150600160a060020a0384811691168363ffffffff610a7316565b5050565b60005481565b60045460009060a060020a900460ff16151561058657600080fd5b610591848484610af8565b949350505050565b601281565b60035460009033600160a060020a039081169116146105bc57600080fd5b60045460a060020a900460ff16156105d357600080fd5b6000546105e6908363ffffffff610c7a16565b6000908155600160a060020a038416815260016020526040902054610611908363ffffffff610c7a16565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a03831660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b60045433600160a060020a039081169116146106c657600080fd5b600454600354600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600480546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561079657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556107cd565b6107a6818463ffffffff610c8916565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60035460009033600160a060020a0390811691161461086c57600080fd5b60045460a060020a900460ff161561088357600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a1790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600354600160a060020a031681565b60408051908101604052600381527f5649540000000000000000000000000000000000000000000000000000000000602082015281565b60045460009060a060020a900460ff16151561093a57600080fd5b6109448383610c9b565b9392505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610983908363ffffffff610c7a16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600454600160a060020a031681565b60035433600160a060020a03908116911614610a4457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ad057600080fd5b6102c65a03f11515610ae157600080fd5b505050604051805190501515610af357fe5b505050565b6000600160a060020a0383161515610b0f57600080fd5b600160a060020a038416600090815260016020526040902054821115610b3457600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610b6757600080fd5b600160a060020a038416600090815260016020526040902054610b90908363ffffffff610c8916565b600160a060020a038086166000908152600160205260408082209390935590851681522054610bc5908363ffffffff610c7a16565b600160a060020a03808516600090815260016020908152604080832094909455878316825260028152838220339093168252919091522054610c0d908363ffffffff610c8916565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60008282018381101561094457fe5b600082821115610c9557fe5b50900390565b6000600160a060020a0383161515610cb257600080fd5b600160a060020a033316600090815260016020526040902054821115610cd757600080fd5b600160a060020a033316600090815260016020526040902054610d00908363ffffffff610c8916565b600160a060020a033381166000908152600160205260408082209390935590851681522054610d35908363ffffffff610c7a16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001929150505600a165627a7a723058203fb31a45d5aca375ad8734a96460c2b95dfe55e1c7e140cc01b8bd1b7da6d7ba0029

Deployed Bytecode

0x6060604052600436106100f85763ffffffff60e060020a60003504166305d2035b81146100fd57806306fdde0314610124578063095ea7b3146101ae57806317ffc320146101d057806318160ddd146101f157806323b872dd14610216578063313ce5671461023e57806340c10f19146102675780634e71e0c814610289578063661884631461029c57806370a08231146102be5780637d64bcb4146102dd5780638da5cb5b146102f057806395d89b411461031f578063a9059cbb14610332578063c0ee0b8a14610354578063d73dd62314610383578063dd62ed3e146103a5578063e30c3978146103ca578063f2fde38b146103dd575b600080fd5b341561010857600080fd5b6101106103fc565b604051901515815260200160405180910390f35b341561012f57600080fd5b61013761040c565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017357808201518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b957600080fd5b610110600160a060020a0360043516602435610443565b34156101db57600080fd5b6101ef600160a060020a03600435166104af565b005b34156101fc57600080fd5b610204610565565b60405190815260200160405180910390f35b341561022157600080fd5b610110600160a060020a036004358116906024351660443561056b565b341561024957600080fd5b610251610599565b60405160ff909116815260200160405180910390f35b341561027257600080fd5b610110600160a060020a036004351660243561059e565b341561029457600080fd5b6101ef6106ab565b34156102a757600080fd5b610110600160a060020a0360043516602435610739565b34156102c957600080fd5b610204600160a060020a0360043516610833565b34156102e857600080fd5b61011061084e565b34156102fb57600080fd5b6103036108d9565b604051600160a060020a03909116815260200160405180910390f35b341561032a57600080fd5b6101376108e8565b341561033d57600080fd5b610110600160a060020a036004351660243561091f565b341561035f57600080fd5b6101ef60048035600160a060020a03169060248035916044359182019101356100f8565b341561038e57600080fd5b610110600160a060020a036004351660243561094b565b34156103b057600080fd5b610204600160a060020a03600435811690602435166109ef565b34156103d557600080fd5b610303610a1a565b34156103e857600080fd5b6101ef600160a060020a0360043516610a29565b60045460a060020a900460ff1681565b60408051908101604052600481527f5669636500000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035460009033600160a060020a039081169116146104cd57600080fd5b81600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561052457600080fd5b6102c65a03f1151561053557600080fd5b50505060405180516003549092506105619150600160a060020a0384811691168363ffffffff610a7316565b5050565b60005481565b60045460009060a060020a900460ff16151561058657600080fd5b610591848484610af8565b949350505050565b601281565b60035460009033600160a060020a039081169116146105bc57600080fd5b60045460a060020a900460ff16156105d357600080fd5b6000546105e6908363ffffffff610c7a16565b6000908155600160a060020a038416815260016020526040902054610611908363ffffffff610c7a16565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a03831660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b60045433600160a060020a039081169116146106c657600080fd5b600454600354600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600480546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561079657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556107cd565b6107a6818463ffffffff610c8916565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60035460009033600160a060020a0390811691161461086c57600080fd5b60045460a060020a900460ff161561088357600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a1790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600354600160a060020a031681565b60408051908101604052600381527f5649540000000000000000000000000000000000000000000000000000000000602082015281565b60045460009060a060020a900460ff16151561093a57600080fd5b6109448383610c9b565b9392505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610983908363ffffffff610c7a16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600454600160a060020a031681565b60035433600160a060020a03908116911614610a4457600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ad057600080fd5b6102c65a03f11515610ae157600080fd5b505050604051805190501515610af357fe5b505050565b6000600160a060020a0383161515610b0f57600080fd5b600160a060020a038416600090815260016020526040902054821115610b3457600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610b6757600080fd5b600160a060020a038416600090815260016020526040902054610b90908363ffffffff610c8916565b600160a060020a038086166000908152600160205260408082209390935590851681522054610bc5908363ffffffff610c7a16565b600160a060020a03808516600090815260016020908152604080832094909455878316825260028152838220339093168252919091522054610c0d908363ffffffff610c8916565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60008282018381101561094457fe5b600082821115610c9557fe5b50900390565b6000600160a060020a0383161515610cb257600080fd5b600160a060020a033316600090815260016020526040902054821115610cd757600080fd5b600160a060020a033316600090815260016020526040902054610d00908363ffffffff610c8916565b600160a060020a033381166000908152600160205260408082209390935590851681522054610d35908363ffffffff610c7a16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001929150505600a165627a7a723058203fb31a45d5aca375ad8734a96460c2b95dfe55e1c7e140cc01b8bd1b7da6d7ba0029

Swarm Source

bzzr://3fb31a45d5aca375ad8734a96460c2b95dfe55e1c7e140cc01b8bd1b7da6d7ba
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.