ETH Price: $3,155.78 (+1.17%)
Gas: 2 Gwei

Contract

0xBE2530028229198D2c383F2D3FB9f40EBf24dEed
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer58539152018-06-25 21:25:442209 days ago1529961944IN
0xBE253002...EBf24dEed
1.2 ETH0.000022221
Transfer58518692018-06-25 12:58:272210 days ago1529931507IN
0xBE253002...EBf24dEed
0.2 ETH0.0041031541
Transfer58518682018-06-25 12:58:142210 days ago1529931494IN
0xBE253002...EBf24dEed
1.8 ETH0.0020015420
Transfer58518502018-06-25 12:54:042210 days ago1529931244IN
0xBE253002...EBf24dEed
1.031 ETH0.000500385
Transfer58518462018-06-25 12:52:372210 days ago1529931157IN
0xBE253002...EBf24dEed
0.3 ETH0.0050038550
Add Users Whitel...58518332018-06-25 12:48:572210 days ago1529930937IN
0xBE253002...EBf24dEed
0 ETH0.0004928111
Transfer58518312018-06-25 12:48:412210 days ago1529930921IN
0xBE253002...EBf24dEed
1 ETH0.0025019225
Transfer58518162018-06-25 12:44:462210 days ago1529930686IN
0xBE253002...EBf24dEed
1 ETH0.0035038550
Transfer58518132018-06-25 12:43:512210 days ago1529930631IN
0xBE253002...EBf24dEed
0.2 ETH0.0028731541
Transfer58518002018-06-25 12:41:322210 days ago1529930492IN
0xBE253002...EBf24dEed
1 ETH0.0035026935
Transfer58517952018-06-25 12:40:262210 days ago1529930426IN
0xBE253002...EBf24dEed
0.8 ETH0.00040034
Transfer58517592018-06-25 12:31:062210 days ago1529929866IN
0xBE253002...EBf24dEed
9.9 ETH0.0041031541
Transfer58517472018-06-25 12:28:242210 days ago1529929704IN
0xBE253002...EBf24dEed
0.2 ETH0.00130113
Add Users Whitel...58517452018-06-25 12:27:422210 days ago1529929662IN
0xBE253002...EBf24dEed
0 ETH0.0005824113
Transfer58517352018-06-25 12:25:012210 days ago1529929501IN
0xBE253002...EBf24dEed
0.3 ETH0.0041031541
Transfer58517242018-06-25 12:21:482210 days ago1529929308IN
0xBE253002...EBf24dEed
2 ETH0.0007033727.91176192
Transfer58517212018-06-25 12:20:332210 days ago1529929233IN
0xBE253002...EBf24dEed
0.4 ETH0.004848
Transfer58516722018-06-25 12:07:402210 days ago1529928460IN
0xBE253002...EBf24dEed
1.129 ETH0.00260226
Transfer58516392018-06-25 12:02:072210 days ago1529928127IN
0xBE253002...EBf24dEed
0.22 ETH0.000210233
Transfer58516322018-06-25 12:00:192210 days ago1529928019IN
0xBE253002...EBf24dEed
2 ETH0.0020015420
Transfer58516242018-06-25 11:57:482210 days ago1529927868IN
0xBE253002...EBf24dEed
2 ETH0.0004220
Transfer58516162018-06-25 11:56:062210 days ago1529927766IN
0xBE253002...EBf24dEed
1.1 ETH0.0035038550
Transfer58516062018-06-25 11:53:112210 days ago1529927591IN
0xBE253002...EBf24dEed
0.4 ETH0.000300233
Transfer58515662018-06-25 11:44:182210 days ago1529927058IN
0xBE253002...EBf24dEed
5.983 ETH0.0007007710
Transfer58515572018-06-25 11:40:512210 days ago1529926851IN
0xBE253002...EBf24dEed
0.2414727 ETH0.00055
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
58518692018-06-25 12:58:272210 days ago1529931507
0xBE253002...EBf24dEed
0.2 ETH
58518682018-06-25 12:58:142210 days ago1529931494
0xBE253002...EBf24dEed
1.8 ETH
58518502018-06-25 12:54:042210 days ago1529931244
0xBE253002...EBf24dEed
1.031 ETH
58518462018-06-25 12:52:372210 days ago1529931157
0xBE253002...EBf24dEed
0.3 ETH
58518312018-06-25 12:48:412210 days ago1529930921
0xBE253002...EBf24dEed
1 ETH
58518162018-06-25 12:44:462210 days ago1529930686
0xBE253002...EBf24dEed
1 ETH
58518132018-06-25 12:43:512210 days ago1529930631
0xBE253002...EBf24dEed
0.2 ETH
58518002018-06-25 12:41:322210 days ago1529930492
0xBE253002...EBf24dEed
1 ETH
58517952018-06-25 12:40:262210 days ago1529930426
0xBE253002...EBf24dEed
0.8 ETH
58517592018-06-25 12:31:062210 days ago1529929866
0xBE253002...EBf24dEed
9.9 ETH
58517472018-06-25 12:28:242210 days ago1529929704
0xBE253002...EBf24dEed
0.2 ETH
58517352018-06-25 12:25:012210 days ago1529929501
0xBE253002...EBf24dEed
0.3 ETH
58516722018-06-25 12:07:402210 days ago1529928460
0xBE253002...EBf24dEed
1.129 ETH
58516392018-06-25 12:02:072210 days ago1529928127
0xBE253002...EBf24dEed
0.22 ETH
58516322018-06-25 12:00:192210 days ago1529928019
0xBE253002...EBf24dEed
2 ETH
58516162018-06-25 11:56:062210 days ago1529927766
0xBE253002...EBf24dEed
1.1 ETH
58516062018-06-25 11:53:112210 days ago1529927591
0xBE253002...EBf24dEed
0.4 ETH
58515662018-06-25 11:44:182210 days ago1529927058
0xBE253002...EBf24dEed
5.983 ETH
58515282018-06-25 11:31:012210 days ago1529926261
0xBE253002...EBf24dEed
11 ETH
58514962018-06-25 11:22:062210 days ago1529925726
0xBE253002...EBf24dEed
0.23 ETH
58514842018-06-25 11:16:312210 days ago1529925391
0xBE253002...EBf24dEed
10 ETH
58514692018-06-25 11:12:102210 days ago1529925130
0xBE253002...EBf24dEed
1 ETH
58514692018-06-25 11:12:102210 days ago1529925130
0xBE253002...EBf24dEed
0.5 ETH
58514612018-06-25 11:09:482210 days ago1529924988
0xBE253002...EBf24dEed
1 ETH
58514552018-06-25 11:08:352210 days ago1529924915
0xBE253002...EBf24dEed
1 ETH
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x5Bb67F36...E424755f9
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
DAVCrowdsale

Compiler Version
v0.4.23+commit.124ca40d

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-06-07
*/

pragma solidity 0.4.23;

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

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

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return a / b;
  }

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

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

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

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

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

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: openzeppelin-solidity/contracts/crowdsale/Crowdsale.sol

/**
 * @title Crowdsale
 * @dev Crowdsale is a base contract for managing a token crowdsale,
 * allowing investors to purchase tokens with ether. This contract implements
 * such functionality in its most fundamental form and can be extended to provide additional
 * functionality and/or custom behavior.
 * The external interface represents the basic interface for purchasing tokens, and conform
 * the base architecture for crowdsales. They are *not* intended to be modified / overriden.
 * The internal interface conforms the extensible and modifiable surface of crowdsales. Override
 * the methods to add functionality. Consider using 'super' where appropiate to concatenate
 * behavior.
 */
contract Crowdsale {
  using SafeMath for uint256;

  // The token being sold
  ERC20 public token;

  // Address where funds are collected
  address public wallet;

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

  // Amount of wei raised
  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);

  /**
   * @param _rate Number of token units a buyer gets per wei
   * @param _wallet Address where collected funds will be forwarded to
   * @param _token Address of the token being sold
   */
  function Crowdsale(uint256 _rate, address _wallet, ERC20 _token) public {
    require(_rate > 0);
    require(_wallet != address(0));
    require(_token != address(0));

    rate = _rate;
    wallet = _wallet;
    token = _token;
  }

  // -----------------------------------------
  // Crowdsale external interface
  // -----------------------------------------

  /**
   * @dev fallback function ***DO NOT OVERRIDE***
   */
  function () external payable {
    buyTokens(msg.sender);
  }

  /**
   * @dev low level token purchase ***DO NOT OVERRIDE***
   * @param _beneficiary Address performing the token purchase
   */
  function buyTokens(address _beneficiary) public payable {

    uint256 weiAmount = msg.value;
    _preValidatePurchase(_beneficiary, weiAmount);

    // calculate token amount to be created
    uint256 tokens = _getTokenAmount(weiAmount);

    // update state
    weiRaised = weiRaised.add(weiAmount);

    _processPurchase(_beneficiary, tokens);
    emit TokenPurchase(
      msg.sender,
      _beneficiary,
      weiAmount,
      tokens
    );

    _updatePurchasingState(_beneficiary, weiAmount);

    _forwardFunds();
    _postValidatePurchase(_beneficiary, weiAmount);
  }

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

  /**
   * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
   * @param _beneficiary Address performing the token purchase
   * @param _weiAmount Value in wei involved in the purchase
   */
  function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
    require(_beneficiary != address(0));
    require(_weiAmount != 0);
  }

  /**
   * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid conditions are not met.
   * @param _beneficiary Address performing the token purchase
   * @param _weiAmount Value in wei involved in the purchase
   */
  function _postValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
    // optional override
  }

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

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

  /**
   * @dev Override for extensions that require an internal state to check for validity (current user contributions, etc.)
   * @param _beneficiary Address receiving the tokens
   * @param _weiAmount Value in wei involved in the purchase
   */
  function _updatePurchasingState(address _beneficiary, uint256 _weiAmount) internal {
    // optional override
  }

  /**
   * @dev Override to extend the way in which ether is converted to tokens.
   * @param _weiAmount Value in wei to be converted into tokens
   * @return Number of tokens that can be purchased with the specified _weiAmount
   */
  function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) {
    return _weiAmount.mul(rate);
  }

  /**
   * @dev Determines how ETH is stored/forwarded on purchases.
   */
  function _forwardFunds() internal {
    wallet.transfer(msg.value);
  }
}

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

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address 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));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

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

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

  bool public paused = false;


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

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

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

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

// File: contracts/PausableCrowdsale.sol

/**
 * @title PausableCrowdsale
 * @dev Extension of Crowdsale contract that can be paused and unpaused by owner
 */
contract PausableCrowdsale is Crowdsale, Pausable {

  /**
   * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
   * @param _beneficiary Address performing the token purchase
   * @param _weiAmount Value in wei involved in the purchase
   */
  function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal whenNotPaused {
    return super._preValidatePurchase(_beneficiary, _weiAmount);
  }
}

// File: contracts/interfaces/IDAVToken.sol

contract IDAVToken is ERC20 {

  function name() public view returns (string) {}
  function symbol() public view returns (string) {}
  function decimals() public view returns (uint8) {}
  function increaseApproval(address _spender, uint _addedValue) public returns (bool success);
  function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success);

  function owner() public view returns (address) {}
  function transferOwnership(address newOwner) public;

  function burn(uint256 _value) public;

  function pauseCutoffTime() public view returns (uint256) {}
  function paused() public view returns (bool) {}
  function pause() public;
  function unpause() public;
  function setPauseCutoffTime(uint256 _pauseCutoffTime) public;

}

// File: openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol

/**
 * @title TimedCrowdsale
 * @dev Crowdsale accepting contributions only within a time frame.
 */
contract TimedCrowdsale is Crowdsale {
  using SafeMath for uint256;

  uint256 public openingTime;
  uint256 public closingTime;

  /**
   * @dev Reverts if not in crowdsale time range.
   */
  modifier onlyWhileOpen {
    // solium-disable-next-line security/no-block-members
    require(block.timestamp >= openingTime && block.timestamp <= closingTime);
    _;
  }

  /**
   * @dev Constructor, takes crowdsale opening and closing times.
   * @param _openingTime Crowdsale opening time
   * @param _closingTime Crowdsale closing time
   */
  function TimedCrowdsale(uint256 _openingTime, uint256 _closingTime) public {
    // solium-disable-next-line security/no-block-members
    require(_openingTime >= block.timestamp);
    require(_closingTime >= _openingTime);

    openingTime = _openingTime;
    closingTime = _closingTime;
  }

  /**
   * @dev Checks whether the period in which the crowdsale is open has already elapsed.
   * @return Whether crowdsale period has elapsed
   */
  function hasClosed() public view returns (bool) {
    // solium-disable-next-line security/no-block-members
    return block.timestamp > closingTime;
  }

  /**
   * @dev Extend parent behavior requiring to be within contributing period
   * @param _beneficiary Token purchaser
   * @param _weiAmount Amount of wei contributed
   */
  function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal onlyWhileOpen {
    super._preValidatePurchase(_beneficiary, _weiAmount);
  }

}

// File: openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol

/**
 * @title FinalizableCrowdsale
 * @dev Extension of Crowdsale where an owner can do extra work
 * after finishing.
 */
contract FinalizableCrowdsale is TimedCrowdsale, 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() onlyOwner public {
    require(!isFinalized);
    require(hasClosed());

    finalization();
    emit 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 {
  }

}

// File: contracts/DAVCrowdsale.sol

/**
 * @title DAVCrowdsale
 * @dev DAV Crowdsale contract
 */
contract DAVCrowdsale is PausableCrowdsale, FinalizableCrowdsale {

  // Opening time for Whitelist B
  uint256 public openingTimeB;
  // Sum of contributions in Wei, per beneficiary
  mapping(address => uint256) public contributions;
  // List of beneficiaries whitelisted in group A
  mapping(address => bool) public whitelistA;
  // List of beneficiaries whitelisted in group B
  mapping(address => bool) public whitelistB;
  // Maximum number of Wei that can be raised
  uint256 public weiCap;
  // Maximum number of Vincis that can be sold in Crowdsale
  uint256 public vinciCap;
  // Minimal contribution amount in Wei per transaction
  uint256 public minimalContribution;
  // Maximal total contribution amount in Wei per beneficiary
  uint256 public maximalIndividualContribution;
  // Maximal acceptable gas price
  uint256 public gasPriceLimit = 50000000000 wei;
  // Wallet to transfer foundation tokens to
  address public tokenWallet;
  // Wallet to transfer locked tokens to (e.g., presale buyers)
  address public lockedTokensWallet;
  // DAV Token
  IDAVToken public davToken;
  // Amount of Vincis sold
  uint256 public vinciSold;
  // Address of account that can manage the whitelist
  address public whitelistManager;

  constructor(uint256 _rate, address _wallet, address _tokenWallet, address _lockedTokensWallet, IDAVToken _token, uint256 _weiCap, uint256 _vinciCap, uint256 _minimalContribution, uint256 _maximalIndividualContribution, uint256 _openingTime, uint256 _openingTimeB, uint256 _closingTime) public
    Crowdsale(_rate, _wallet, _token)
    TimedCrowdsale(_openingTime, _closingTime)
  {
    require(_openingTimeB >= _openingTime);
    require(_openingTimeB <= _closingTime);
    require(_weiCap > 0);
    require(_vinciCap > 0);
    require(_minimalContribution > 0);
    require(_maximalIndividualContribution > 0);
    require(_minimalContribution <= _maximalIndividualContribution);
    require(_tokenWallet != address(0));
    require(_lockedTokensWallet != address(0));
    weiCap = _weiCap;
    vinciCap = _vinciCap;
    minimalContribution = _minimalContribution;
    maximalIndividualContribution = _maximalIndividualContribution;
    openingTimeB = _openingTimeB;
    tokenWallet = _tokenWallet;
    lockedTokensWallet= _lockedTokensWallet;
    davToken = _token;
    whitelistManager = msg.sender;
  }

  /**
   * @dev Modifier to make a function callable only if user is in whitelist A, or in whitelist B and openingTimeB has passed
   */
  modifier onlyWhitelisted(address _beneficiary) {
    require(whitelistA[_beneficiary] || (whitelistB[_beneficiary] && block.timestamp >= openingTimeB));
    _;
  }

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

  /**
   * @dev Change the whitelist manager
   *
   * @param _whitelistManager Address of new whitelist manager
   */
  function setWhitelistManager(address _whitelistManager) external onlyOwner {
    require(_whitelistManager != address(0));
    whitelistManager= _whitelistManager;
  }

  /**
   * @dev Change the gas price limit
   *
   * @param _gasPriceLimit New gas price limit
   */
  function setGasPriceLimit(uint256 _gasPriceLimit) external onlyOwner {
    gasPriceLimit = _gasPriceLimit;
  }

  /**
   * Add a group of users to whitelist A
   *
   * @param _beneficiaries List of addresses to be whitelisted
   */
  function addUsersWhitelistA(address[] _beneficiaries) external onlyWhitelistManager {
    for (uint256 i = 0; i < _beneficiaries.length; i++) {
      whitelistA[_beneficiaries[i]] = true;
    }
  }

  /**
   * Add a group of users to whitelist B
   *
   * @param _beneficiaries List of addresses to be whitelisted
   */
  function addUsersWhitelistB(address[] _beneficiaries) external onlyWhitelistManager {
    for (uint256 i = 0; i < _beneficiaries.length; i++) {
      whitelistB[_beneficiaries[i]] = true;
    }
  }

  /**
   * Remove a group of users from whitelist A
   *
   * @param _beneficiaries List of addresses to be removed from whitelist
   */
  function removeUsersWhitelistA(address[] _beneficiaries) external onlyWhitelistManager {
    for (uint256 i = 0; i < _beneficiaries.length; i++) {
      whitelistA[_beneficiaries[i]] = false;
    }
  }

  /**
   * Remove a group of users from whitelist B
   *
   * @param _beneficiaries List of addresses to be removed from whitelist
   */
  function removeUsersWhitelistB(address[] _beneficiaries) external onlyWhitelistManager {
    for (uint256 i = 0; i < _beneficiaries.length; i++) {
      whitelistB[_beneficiaries[i]] = false;
    }
  }

  /**
   * Allow adjustment of the closing time
   *
   * @param _closingTime Time to close the sale. If in the past will set to the present
   */
  function closeEarly(uint256 _closingTime) external onlyOwner onlyWhileOpen {
    // Make sure the new closing time isn't after the old closing time
    require(_closingTime <= closingTime);
    // solium-disable-next-line security/no-block-members
    if (_closingTime < block.timestamp) {
      // If closing time is in the past, set closing time to right now
      closingTime = block.timestamp;
    } else {
      // Update the closing time
      closingTime = _closingTime;
    }
  }

  /**
   * Record a transaction that happened during the presale and transfer tokens to locked tokens wallet
   *
   * @param _weiAmount Value in wei involved in the purchase
   * @param _vinciAmount Amount of Vincis sold
   */
  function recordSale(uint256 _weiAmount, uint256 _vinciAmount) external onlyOwner {
    // Verify that the amount won't put us over the wei cap
    require(weiRaised.add(_weiAmount) <= weiCap);
    // Verify that the amount won't put us over the vinci cap
    require(vinciSold.add(_vinciAmount) <= vinciCap);
    // Verify Crowdsale hasn't been finalized yet
    require(!isFinalized);
    // Update crowdsale totals
    weiRaised = weiRaised.add(_weiAmount);
    vinciSold = vinciSold.add(_vinciAmount);
    // Transfer tokens
    token.transfer(lockedTokensWallet, _vinciAmount);
  }

  function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal onlyWhitelisted(_beneficiary) {
    super._preValidatePurchase(_beneficiary, _weiAmount);
    // Verify that the amount won't put us over the wei cap
    require(weiRaised.add(_weiAmount) <= weiCap);
    // Verify that the amount won't put us over the vinci cap
    require(vinciSold.add(_weiAmount.mul(rate)) <= vinciCap);
    // Verify amount is larger than or equal to minimal contribution
    require(_weiAmount >= minimalContribution);
    // Verify that the gas price is lower than 50 gwei
    require(tx.gasprice <= gasPriceLimit);
    // Verify that user hasn't contributed more than the individual hard cap
    require(contributions[_beneficiary].add(_weiAmount) <= maximalIndividualContribution);
  }

  function _updatePurchasingState(address _beneficiary, uint256 _weiAmount) internal {
    super._updatePurchasingState(_beneficiary, _weiAmount);
    // Update user contribution total
    contributions[_beneficiary] = contributions[_beneficiary].add(_weiAmount);
    // Update total Vincis sold
    vinciSold = vinciSold.add(_weiAmount.mul(rate));
  }

  function finalization() internal {
    super.finalization();
    // transfer tokens to foundation
    uint256 foundationTokens = weiRaised.div(2).add(weiRaised);
    foundationTokens = foundationTokens.mul(rate);
    uint256 crowdsaleBalance = davToken.balanceOf(this);
    if (crowdsaleBalance < foundationTokens) {
      foundationTokens = crowdsaleBalance;
    }
    davToken.transfer(tokenWallet, foundationTokens);
    // Burn off remaining tokens
    crowdsaleBalance = davToken.balanceOf(this);
    davToken.burn(crowdsaleBalance);
    // Set token's pause cutoff time to 3 weeks from closing time
    davToken.setPauseCutoffTime(closingTime.add(1814400));
    // transfer token Ownership back to original owner
    davToken.transferOwnership(owner);
  }

}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_gasPriceLimit","type":"uint256"}],"name":"setGasPriceLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lockedTokensWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiaries","type":"address[]"}],"name":"addUsersWhitelistB","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whitelistA","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_closingTime","type":"uint256"}],"name":"closeEarly","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hasClosed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vinciSold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_weiAmount","type":"uint256"},{"name":"_vinciAmount","type":"uint256"}],"name":"recordSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"whitelistManager","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_whitelistManager","type":"address"}],"name":"setWhitelistManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributions","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"closingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiaries","type":"address[]"}],"name":"removeUsersWhitelistB","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiaries","type":"address[]"}],"name":"removeUsersWhitelistA","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weiCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"davToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vinciCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"openingTimeB","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gasPriceLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whitelistB","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"openingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maximalIndividualContribution","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimalContribution","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiaries","type":"address[]"}],"name":"addUsersWhitelistA","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_rate","type":"uint256"},{"name":"_wallet","type":"address"},{"name":"_tokenWallet","type":"address"},{"name":"_lockedTokensWallet","type":"address"},{"name":"_token","type":"address"},{"name":"_weiCap","type":"uint256"},{"name":"_vinciCap","type":"uint256"},{"name":"_minimalContribution","type":"uint256"},{"name":"_maximalIndividualContribution","type":"uint256"},{"name":"_openingTime","type":"uint256"},{"name":"_openingTimeB","type":"uint256"},{"name":"_closingTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"Finalized","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"}]

Deployed Bytecode

0x6080604052600436106101cc5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630923160281146101d75780630e13af5d146101ef5780630f77c1d314610220578063129e77be1461024057806314c9b8a5146102755780631515bc2b1461028d5780631568a1a1146102a257806323586685146102c957806326563b40146102e45780632c4e722e146102f95780633f4ba83a1461030e5780634042b66f1461032357806341a494091461033857806342e94c90146103595780634b6753bc1461037a5780634bb278f31461038f578063521eb273146103a4578063565135ce146103b95780635c975abb146103d9578063836d9665146103ee5780638456cb591461040e57806384fe5029146104235780638d4e4083146104385780638da5cb5b1461044d5780638e7952c6146104625780638ffec6ee1461047757806394194be41461048c578063961a929c146104a1578063a61000b9146104b6578063b7a8807c146104d7578063b9908cbb146104ec578063bff99c6c14610501578063c4a4f26514610516578063d89ef0181461052b578063ec8ac4d81461054b578063f2fde38b1461055f578063fc0c546a14610580575b6101d533610595565b005b3480156101e357600080fd5b506101d5600435610642565b3480156101fb57600080fd5b50610204610662565b60408051600160a060020a039092168252519081900360200190f35b34801561022c57600080fd5b506101d56004803560248101910135610671565b34801561024c57600080fd5b50610261600160a060020a03600435166106e6565b604080519115158252519081900360200190f35b34801561028157600080fd5b506101d56004356106fb565b34801561029957600080fd5b5061026161075e565b3480156102ae57600080fd5b506102b7610766565b60408051918252519081900360200190f35b3480156102d557600080fd5b506101d560043560243561076c565b3480156102f057600080fd5b506102046108c3565b34801561030557600080fd5b506102b76108d2565b34801561031a57600080fd5b506101d56108d8565b34801561032f57600080fd5b506102b7610965565b34801561034457600080fd5b506101d5600160a060020a036004351661096b565b34801561036557600080fd5b506102b7600160a060020a03600435166109ca565b34801561038657600080fd5b506102b76109dc565b34801561039b57600080fd5b506101d56109e2565b3480156103b057600080fd5b50610204610aa3565b3480156103c557600080fd5b506101d56004803560248101910135610ab2565b3480156103e557600080fd5b50610261610b26565b3480156103fa57600080fd5b506101d56004803560248101910135610b47565b34801561041a57600080fd5b506101d5610bbb565b34801561042f57600080fd5b506102b7610c5e565b34801561044457600080fd5b50610261610c64565b34801561045957600080fd5b50610204610c86565b34801561046e57600080fd5b50610204610c95565b34801561048357600080fd5b506102b7610ca4565b34801561049857600080fd5b506102b7610caa565b3480156104ad57600080fd5b506102b7610cb0565b3480156104c257600080fd5b50610261600160a060020a0360043516610cb6565b3480156104e357600080fd5b506102b7610ccb565b3480156104f857600080fd5b506102b7610cd1565b34801561050d57600080fd5b50610204610cd7565b34801561052257600080fd5b506102b7610ce6565b34801561053757600080fd5b506101d56004803560248101910135610cec565b6101d5600160a060020a0360043516610595565b34801561056b57600080fd5b506101d5600160a060020a0360043516610d61565b34801561058c57600080fd5b50610204610dfa565b3460006105a28383610e09565b6105ab82610f17565b6003549091506105c1908363ffffffff610f3416565b6003556105ce8382610f41565b82600160a060020a031633600160a060020a03167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188484604051808381526020018281526020019250505060405180910390a361062b8383610f4f565b610633610fba565b61063d8383610f4b565b505050565b60065433600160a060020a0390811691161461065d57600080fd5b600f55565b601154600160a060020a031681565b60145460009033600160a060020a0390811691161461068f57600080fd5b5060005b8181101561063d576001600a60008585858181106106ad57fe5b60209081029290920135600160a060020a0316835250810191909152604001600020805460ff1916911515919091179055600101610693565b60096020526000908152604090205460ff1681565b60065433600160a060020a0390811691161461071657600080fd5b600454421015801561072a57506005544211155b151561073557600080fd5b60055481111561074457600080fd5b42811015610755574260055561075b565b60058190555b50565b600554421190565b60135481565b60065433600160a060020a0390811691161461078757600080fd5b600b5460035461079d908463ffffffff610f3416565b11156107a857600080fd5b600c546013546107be908363ffffffff610f3416565b11156107c957600080fd5b6006547501000000000000000000000000000000000000000000900460ff16156107f257600080fd5b600354610805908363ffffffff610f3416565b60035560135461081b908263ffffffff610f3416565b60135560008054601154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b505050506040513d60208110156108bd57600080fd5b50505050565b601454600160a060020a031681565b60025481565b60065433600160a060020a039081169116146108f357600080fd5b60065474010000000000000000000000000000000000000000900460ff16151561091c57600080fd5b6006805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60035481565b60065433600160a060020a0390811691161461098657600080fd5b600160a060020a038116151561099b57600080fd5b6014805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60086020526000908152604090205481565b60055481565b60065433600160a060020a039081169116146109fd57600080fd5b6006547501000000000000000000000000000000000000000000900460ff1615610a2657600080fd5b610a2e61075e565b1515610a3957600080fd5b610a41610ff3565b6040517f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768190600090a16006805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b600154600160a060020a031681565b60145460009033600160a060020a03908116911614610ad057600080fd5b5060005b8181101561063d576000600a81858585818110610aed57fe5b60209081029290920135600160a060020a0316835250810191909152604001600020805460ff1916911515919091179055600101610ad4565b60065474010000000000000000000000000000000000000000900460ff1681565b60145460009033600160a060020a03908116911614610b6557600080fd5b5060005b8181101561063d576000600981858585818110610b8257fe5b60209081029290920135600160a060020a0316835250810191909152604001600020805460ff1916911515919091179055600101610b69565b60065433600160a060020a03908116911614610bd657600080fd5b60065474010000000000000000000000000000000000000000900460ff1615610bfe57600080fd5b6006805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600b5481565b6006547501000000000000000000000000000000000000000000900460ff1681565b600654600160a060020a031681565b601254600160a060020a031681565b600c5481565b60075481565b600f5481565b600a6020526000908152604090205460ff1681565b60045481565b600e5481565b601054600160a060020a031681565b600d5481565b60145460009033600160a060020a03908116911614610d0a57600080fd5b5060005b8181101561063d57600160096000858585818110610d2857fe5b60209081029290920135600160a060020a0316835250810191909152604001600020805460ff1916911515919091179055600101610d0e565b60065433600160a060020a03908116911614610d7c57600080fd5b600160a060020a0381161515610d9157600080fd5b600654604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031681565b600160a060020a038216600090815260096020526040902054829060ff1680610e575750600160a060020a0381166000908152600a602052604090205460ff168015610e5757506007544210155b1515610e6257600080fd5b610e6c83836113ab565b600b54600354610e82908463ffffffff610f3416565b1115610e8d57600080fd5b600c54610eb7610ea8600254856113dd90919063ffffffff16565b6013549063ffffffff610f3416565b1115610ec257600080fd5b600d54821015610ed157600080fd5b600f543a1115610ee057600080fd5b600e54600160a060020a038416600090815260086020526040902054610f0c908463ffffffff610f3416565b111561063d57600080fd5b6000610f2e600254836113dd90919063ffffffff16565b92915050565b81810182811015610f2e57fe5b610f4b8282611406565b5050565b610f598282610f4b565b600160a060020a038216600090815260086020526040902054610f82908263ffffffff610f3416565b600160a060020a038316600090815260086020526040902055600254610fb390610ea890839063ffffffff6113dd16565b6013555050565b600154604051600160a060020a03909116903480156108fc02916000818181858888f1935050505015801561075b573d6000803e3d6000fd5b600080610ffe611478565b6003546110229061101681600263ffffffff61147a16565b9063ffffffff610f3416565b9150611039600254836113dd90919063ffffffff16565b601254604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a03308116600483015291519395509116916370a08231916024808201926020929091908290030181600087803b1580156110a357600080fd5b505af11580156110b7573d6000803e3d6000fd5b505050506040513d60208110156110cd57600080fd5b50519050818110156110dd578091505b601254601054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018690529051919092169163a9059cbb9160448083019260209291908290030181600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b505050506040513d602081101561117957600080fd5b5050601254604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a033081166004830152915191909216916370a082319160248083019260209291908290030181600087803b1580156111e357600080fd5b505af11580156111f7573d6000803e3d6000fd5b505050506040513d602081101561120d57600080fd5b5051601254604080517f42966c68000000000000000000000000000000000000000000000000000000008152600481018490529051929350600160a060020a03909116916342966c689160248082019260009290919082900301818387803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b5050601254600554600160a060020a03909116925063c84c596391506112bb90621baf8063ffffffff610f3416565b6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561130d57600080fd5b505af1158015611321573d6000803e3d6000fd5b5050601254600654604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152905191909216935063f2fde38b9250602480830192600092919082900301818387803b15801561138f57600080fd5b505af11580156113a3573d6000803e3d6000fd5b505050505050565b60065474010000000000000000000000000000000000000000900460ff16156113d357600080fd5b610f4b828261148f565b60008215156113ee57506000610f2e565b508181028183828115156113fe57fe5b0414610f2e57fe5b60008054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038681166004830152602482018690529151919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561089357600080fd5b565b6000818381151561148757fe5b049392505050565b60045442101580156114a357506005544211155b15156114ae57600080fd5b610f4b8282600160a060020a03821615156114c857600080fd5b801515610f4b57600080fd00a165627a7a723058208eecfb5da48dc83463cfe31facc7cad2ca82eb6fd3a8c94aeb8105c3e94bc3c20029

Swarm Source

bzzr://8eecfb5da48dc83463cfe31facc7cad2ca82eb6fd3a8c94aeb8105c3e94bc3c2

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.