Sponsored Link:   trade.io - The Future of Crypto Trading - A Better, Faster, Smarter Crypto Exchange - Pre-Register Now!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 16 txns
 Latest 16 txns

TxHash Age From To Value [TxFee]
0x90ab35eac42680d215963ed04065f08fa1509a5c67b4a7da073d3b010620e9ed90 days 19 hrs ago0x29598b26331a8c7099655a0ece540fdbbd1a6eb7  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3491 Ether0.000615115
0xd5162b8008fd3bc6ad4e939a78627ce3afabf4a4f946b13c9b3fa79e4da5b8db90 days 22 hrs ago0xb7630f066123b727d4472ba52d690aa5f3ff2c9a  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.025 Ether0.000615115
0xb828434b17aff8ab3d966e062870405c81cab4c1206350400e31fc7f89e22aa491 days 9 hrs ago0x700b3f945d49e9c31651a6b34113fec728a887cc  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.637033560999999 Ether0.000615115
0x2a008bb46ad4f8a21431c184c396a2089279227483bc6065e72da815b823db6d92 days 13 mins ago0xd298d1786d35e3b969430ed3c85adbc51d59cb96  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.4 Ether0.002583483
0x77e87078d0c29c332b2a51095f80667b1fe3dee17f7f7d7c3c7178b152dd4f7f92 days 1 hr ago0x141983e639cabb8cc2e44e903d264c60128d3a7c  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.04778425 Ether0.000269736
0xffdb4271ac3b7efd2fd1f1f2d85bd0757ee51a9188b881d14d7087709553e0c092 days 12 hrs ago0xb3761e3ca44a969bed26de6a5e69ebb1a0cc508e  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3493 Ether0.005043943
0xb88a20c38f8624b5ca93af06c534d2bd63a189b81c2ffd3d3ce0ad9591f0ac6092 days 14 hrs ago0xb8db2ade5ea3f02647898d45ce22f6e939479e56  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3495 Ether0.005043943
0xbd11dfe106c68b66f7b1745476d3f1fc83eb4c2fa46a575c60c029d36041e7e692 days 16 hrs ago0x3e8eabfe63d6db1988d55902f805d3f26d56a35f  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3493 Ether0.005043943
0x0f44db0477f637e793d657f31eb4f78bc9497d0cc74bbb7f0376a0c9afeeaeb692 days 17 hrs ago0x1dd2df1aff0d6ac8dc4f626c5a199ba79a5ed75e  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3494 Ether0.005043943
0x236962d92ce2a1ce1150edcad9ca8d94e16c6568070230bf7ec78f942241fa6592 days 18 hrs agoUpbit  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.08190602 Ether0.0099083024
0x8c65a622ea5ecbc451168b3747c883dddd372a2712c995c2bdc0bf1a65fb599693 days 3 hrs ago0x80a909968642f7f90686ff964e71154a00ce6e49  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3491.71684303 Ether0.0021
0x8b83c349fb52d59f88d1bb2de485d56b07d12d85178bebbaafe2988ce23278a893 days 5 hrs ago0x79a8e429cbbbeadf661e79a668dd0b4fb9325a52  IN   0xf75e3e8d275146157b8e0e540542adceeccbb34921 Ether0.00492092
0xb7599657d6888f7720e566980aa5bb7f4f440d9a30cbb50523f83c301bca6a1793 days 6 hrs ago0x79a8e429cbbbeadf661e79a668dd0b4fb9325a52  IN   0xf75e3e8d275146157b8e0e540542adceeccbb34924.9 Ether0.00084
0x0a2e176b522b3658fd92fc338930fa43859f5035ad2cbbf4c38daffb1922e79a93 days 6 hrs ago0x6c1399b4e4971bea025c27a263bbb78f078904c3  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.8 Ether0.000615115
0x5e88febb05c8c1f60b278ad796362c921074b3dc3ba5247e14a7bf6594be8ec893 days 8 hrs ago0xc3f0e78d537ff754d17405cc4d6632a175fab7e8  IN   0xf75e3e8d275146157b8e0e540542adceeccbb3490.01 Ether0.000208023
0xaadbdb2023b5128aad86a99063fb38ebea0c5d230feeadd4e0af2cebc1e1016693 days 15 hrs ago0xc3f0e78d537ff754d17405cc4d6632a175fab7e8  IN    Contract Creation0 Ether0.001180763
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 11 Internal Transactions

ParentTxHash Block Age From To Value
0x90ab35eac42680d215963ed04065f08fa1509a5c67b4a7da073d3b010620e9ed547199690 days 19 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1501 Ether
0xd5162b8008fd3bc6ad4e939a78627ce3afabf4a4f946b13c9b3fa79e4da5b8db547132290 days 22 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1500.025 Ether
0xb828434b17aff8ab3d966e062870405c81cab4c1206350400e31fc7f89e22aa4546858191 days 9 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1500.6370335609999996 Ether
0x2a008bb46ad4f8a21431c184c396a2089279227483bc6065e72da815b823db6d546512592 days 13 mins ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1500.4 Ether
0xffdb4271ac3b7efd2fd1f1f2d85bd0757ee51a9188b881d14d7087709553e0c0546211092 days 12 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1503 Ether
0xb88a20c38f8624b5ca93af06c534d2bd63a189b81c2ffd3d3ce0ad9591f0ac60546167192 days 14 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1505 Ether
0xbd11dfe106c68b66f7b1745476d3f1fc83eb4c2fa46a575c60c029d36041e7e6546127092 days 16 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1503 Ether
0x0f44db0477f637e793d657f31eb4f78bc9497d0cc74bbb7f0376a0c9afeeaeb6546096492 days 17 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1504 Ether
0x8b83c349fb52d59f88d1bb2de485d56b07d12d85178bebbaafe2988ce23278a8545805093 days 5 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c15021 Ether
0x0a2e176b522b3658fd92fc338930fa43859f5035ad2cbbf4c38daffb1922e79a545789293 days 6 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1500.8 Ether
0x5e88febb05c8c1f60b278ad796362c921074b3dc3ba5247e14a7bf6594be8ec8545721493 days 8 hrs ago0xf75e3e8d275146157b8e0e540542adceeccbb3490xd4f39ed7499097a35dccdc59eabad25ce6a6c1500.01 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: RootsSale
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.21;

// File: zeppelin-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));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

// File: zeppelin-solidity/contracts/Ownership/Contactable.sol

/**
 * @title Contactable token
 * @dev Basic version of a contactable contract, allowing the owner to provide a string with their
 * contact information.
 */
contract Contactable is Ownable {

  string public contactInformation;

  /**
    * @dev Allows the owner to set a string with their contact information.
    * @param info The contact information to attach to the contract.
    */
  function setContactInformation(string info) onlyOwner public {
    contactInformation = info;
  }
}

// File: zeppelin-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) {
    if (a == 0) {
      return 0;
    }
    uint256 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 c;
  }

  /**
  * @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) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

// File: zeppelin-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: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol

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

  mapping(address => uint256) balances;

  uint256 totalSupply_;

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

  /**
  * @dev transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

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

}

// File: zeppelin-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: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol

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

}

// File: zeppelin-solidity/contracts/token/ERC20/MintableToken.sol

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

// File: contracts/RootsSaleToken.sol

contract RootsSaleToken is Contactable, MintableToken {

    string constant public name = "ROOTS Sale Token";
    string constant public symbol = "ROOTSSale";
    uint constant public decimals = 18;

    bool public isTransferable = false;

    function transfer(address _to, uint _value) public returns (bool) {
        require(isTransferable);
        return false;
    }

    function transfer(address _to, uint _value, bytes _data) public returns (bool) {
        require(isTransferable);
        return false;
    }

    function transferFrom(address _from, address _to, uint _value) public returns (bool) {
        require(isTransferable);
        return false;
    }

    function transferFrom(address _from, address _to, uint _value, bytes _data) public returns (bool) {
        require(isTransferable);
        return false;
    }
}

// File: zeppelin-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;
    Pause();
  }

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

// File: contracts/RootsSale.sol

contract RootsSale is Pausable {
  using SafeMath for uint256;

  // The token being sold
  RootsSaleToken public token;

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

  // address where funds are collected
  address public wallet;

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

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

  // amount of tokens that was sold on the crowdsale
  uint public tokensSold;

  // maximum amount of wei in total, that can be bought
  uint public weiMaximumGoal;

  // minimum amount of wel, that can be contributed
  uint public weiMinimumAmount;

  // maximum amount of wei, that can be contributed
  uint public weiMaximumAmount;

  // How many distinct addresses have bought
  uint public buyerCount;

  // how much ETH each address has bought to this crowdsale
  mapping (address => uint) public boughtAmountOf;

  // whether a buyer already bought some tokens
  mapping (address => bool) public isBuyer;

  // whether a buyer bought tokens through other currencies
  mapping (address => bool) public isExternalBuyer;

  address public admin;

  /**
   * 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 tokenAmount amount of tokens purchased
   */
  event TokenPurchase(
      address indexed purchaser,
      address indexed beneficiary,
      uint value,
      uint tokenAmount
  );

  function RootsSale(
      uint _startTime,
      uint _endTime,
      uint _rate,
      RootsSaleToken _token,
      address _wallet,
      uint _weiMaximumGoal,
      uint _weiMinimumAmount,
      uint _weiMaximumAmount,
      address _admin
  ) public
  {
      require(_startTime >= now);
      require(_endTime >= _startTime);
      require(_rate > 0);
      require(address(_token) != 0x0);
      require(_wallet != 0x0);
      require(_weiMaximumGoal > 0);
      require(_admin != 0x0);

      startTime = _startTime;
      endTime = _endTime;
      token = _token;
      rate = _rate;
      wallet = _wallet;
      weiMaximumGoal = _weiMaximumGoal;
      weiMinimumAmount = _weiMinimumAmount;
      weiMaximumAmount = _weiMaximumAmount;
      admin = _admin;
  }


  modifier onlyOwnerOrAdmin() {
      require(msg.sender == owner || msg.sender == admin);
      _;
  }

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

  // low level token purchase function
  function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
      uint weiAmount = msg.value;

      require(beneficiary != 0x0);
      require(weiAmount >= weiMinimumAmount);
      require(weiAmount <= weiMaximumAmount);
      require(validPurchase(msg.value));

      // calculate token amount to be created
      uint tokenAmount = calculateTokenAmount(weiAmount, weiRaised);

      mintTokenToBuyer(beneficiary, tokenAmount, weiAmount);

      wallet.transfer(msg.value);

      return true;
  }

  function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
      if (!isBuyer[beneficiary]) {
          // A new buyer
          buyerCount++;
          isBuyer[beneficiary] = true;
      }

      boughtAmountOf[beneficiary] = boughtAmountOf[beneficiary].add(weiAmount);
      weiRaised = weiRaised.add(weiAmount);
      tokensSold = tokensSold.add(tokenAmount);

      token.mint(beneficiary, tokenAmount);
      TokenPurchase(msg.sender, beneficiary, weiAmount, tokenAmount);
  }

  // return true if the transaction can buy tokens
  function validPurchase(uint weiAmount) internal constant returns (bool) {
      bool withinPeriod = now >= startTime && now <= endTime;
      bool withinCap = weiRaised.add(weiAmount) <= weiMaximumGoal;

      return withinPeriod && withinCap;
  }

  // return true if crowdsale event has ended
  function hasEnded() public constant returns (bool) {
      bool capReached = weiRaised >= weiMaximumGoal;
      bool afterEndTime = now > endTime;

      return capReached || afterEndTime;
  }

  // get the amount of unsold tokens allocated to this contract;
  function getWeiLeft() external constant returns (uint) {
      return weiMaximumGoal - weiRaised;
  }

  // allows to update tokens rate for owner
  function setPricingStrategy(
    uint _startTime,
    uint _endTime,
    uint _rate,
    uint _weiMaximumGoal,
    uint _weiMinimumAmount,
    uint _weiMaximumAmount
)  external onlyOwner returns (bool) {
    require(!hasEnded());
    require(_endTime >= _startTime);
    require(_weiMaximumGoal > 0);

    startTime = _startTime;
    endTime = _endTime;
    rate = _rate;
    weiMaximumGoal = _weiMaximumGoal;
    weiMinimumAmount = _weiMinimumAmount;
    weiMaximumAmount = _weiMaximumAmount;
    return true;
  }

  function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
      require(validPurchase(weiAmount));
      isExternalBuyer[beneficiary] = true;
      mintTokenToBuyer(beneficiary, tokenAmount, weiAmount);
  }

  function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
      require(beneficiaries.length == tokenAmounts.length);
      require(tokenAmounts.length == weiAmounts.length);

      for (uint i = 0; i < beneficiaries.length; i++) {
          registerPayment(beneficiaries[i], tokenAmounts[i], weiAmounts[i]);
      }
  }

  function setAdmin(address adminAddress) external onlyOwner {
      admin = adminAddress;
  }

  /** Calculate the current price for buy in amount. */
  function calculateTokenAmount(uint weiAmount, uint weiRaised) public view returns (uint tokenAmount) {
      return weiAmount.mul(rate);
  }

  function changeTokenOwner(address newOwner) external onlyOwner {
      require(newOwner != 0x0);
      require(hasEnded());

      token.transferOwnership(newOwner);
  }

  function finishMinting() public onlyOwnerOrAdmin {
      require(hasEnded());

      token.finishMinting();
  }


}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"weiAmount","type":"uint256"},{"name":"weiRaised","type":"uint256"}],"name":"calculateTokenAmount","outputs":[{"name":"tokenAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeTokenOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getWeiLeft","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isBuyer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiMinimumAmount","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":true,"inputs":[],"name":"tokensSold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiMaximumGoal","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiaries","type":"address[]"},{"name":"tokenAmounts","type":"uint256[]"},{"name":"weiAmounts","type":"uint256[]"}],"name":"registerPayments","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"buyerCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiMaximumAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"boughtAmountOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"tokenAmount","type":"uint256"},{"name":"weiAmount","type":"uint256"}],"name":"registerPayment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"hasEnded","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isExternalBuyer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_endTime","type":"uint256"},{"name":"_rate","type":"uint256"},{"name":"_weiMaximumGoal","type":"uint256"},{"name":"_weiMinimumAmount","type":"uint256"},{"name":"_weiMaximumAmount","type":"uint256"}],"name":"setPricingStrategy","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_endTime","type":"uint256"},{"name":"_rate","type":"uint256"},{"name":"_token","type":"address"},{"name":"_wallet","type":"address"},{"name":"_weiMaximumGoal","type":"uint256"},{"name":"_weiMinimumAmount","type":"uint256"},{"name":"_weiMaximumAmount","type":"uint256"},{"name":"_admin","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"tokenAmount","type":"uint256"}],"name":"TokenPurchase","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"}]

  Contract Creation Code Switch To Opcodes View
60606040526000805460a060020a60ff0219169055341561001f57600080fd5b60405161012080610ebc83398101604052808051919060200180519190602001805191906020018051919060200180519190602001805191906020018051919060200180519190602001805160008054600160a060020a03191633600160a060020a03161790559150504289101561009657600080fd5b888810156100a357600080fd5b600087116100b057600080fd5b600160a060020a03861615156100c557600080fd5b600160a060020a03851615156100da57600080fd5b600084116100e757600080fd5b600160a060020a03811615156100fc57600080fd5b60029890985560039690965560018054600160a060020a0319908116600160a060020a039687161790915560059590955560048054861693851693909317909255600855600955600a92909255600f805490911691909216179055610d56806101666000396000f3006060604052600436106101665763ffffffff60e060020a6000350416630355383581146101725780630f809adb1461019d578063122e74f4146101be5780632a55feec146101d15780632c4e722e146102045780633197cbb61461021757806338310f491461022a5780633f4ba83a1461023d5780634042b66f14610250578063518ab2a814610263578063521eb273146102765780635506aa6c146102a55780635c975abb146102b8578063704b6c02146102cb57806378e97925146102ea5780637d64bcb4146102fd5780638456cb59146103105780638da5cb5b1461032357806396581de1146103365780639e0cea051461036c578063b032fff41461037f578063b6f3562414610392578063ead1ed5b146103b1578063ec8ac4d8146103d6578063ecb70fb7146103ea578063efb610bc146103fd578063f2fde38b1461041c578063f851a4401461043b578063fc0c546a1461044e578063fd6358ce14610461575b61016f33610486565b50005b341561017d57600080fd5b61018b600435602435610543565b60405190815260200160405180910390f35b34156101a857600080fd5b6101bc600160a060020a0360043516610561565b005b34156101c957600080fd5b61018b610607565b34156101dc57600080fd5b6101f0600160a060020a0360043516610611565b604051901515815260200160405180910390f35b341561020f57600080fd5b61018b610626565b341561022257600080fd5b61018b61062c565b341561023557600080fd5b61018b610632565b341561024857600080fd5b6101bc610638565b341561025b57600080fd5b61018b6106b7565b341561026e57600080fd5b61018b6106bd565b341561028157600080fd5b6102896106c3565b604051600160a060020a03909116815260200160405180910390f35b34156102b057600080fd5b61018b6106d2565b34156102c357600080fd5b6101f06106d8565b34156102d657600080fd5b6101bc600160a060020a03600435166106e8565b34156102f557600080fd5b61018b610732565b341561030857600080fd5b6101bc610738565b341561031b57600080fd5b6101bc6107d9565b341561032e57600080fd5b61028961085d565b341561034157600080fd5b6101bc602460048035828101929082013591813580830192908201359160443591820191013561086c565b341561037757600080fd5b61018b610926565b341561038a57600080fd5b61018b61092c565b341561039d57600080fd5b61018b600160a060020a0360043516610932565b34156103bc57600080fd5b6101bc600160a060020a0360043516602435604435610944565b6101f0600160a060020a0360043516610486565b34156103f557600080fd5b6101f06109c1565b341561040857600080fd5b6101f0600160a060020a03600435166109e4565b341561042757600080fd5b6101bc600160a060020a03600435166109f9565b341561044657600080fd5b610289610a94565b341561045957600080fd5b610289610aa3565b341561046c57600080fd5b6101f060043560243560443560643560843560a435610ab2565b600080548190819060a060020a900460ff16156104a257600080fd5b349150600160a060020a03841615156104ba57600080fd5b6009548210156104c957600080fd5b600a548211156104d857600080fd5b6104e134610b1b565b15156104ec57600080fd5b6104f882600654610543565b9050610505848284610b64565b600454600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561053957600080fd5b5060019392505050565b600061055a60055484610ce590919063ffffffff16565b9392505050565b60005433600160a060020a0390811691161461057c57600080fd5b600160a060020a038116151561059157600080fd5b6105996109c1565b15156105a457600080fd5b600154600160a060020a031663f2fde38b8260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156105f457600080fd5b5af1151561060157600080fd5b50505050565b6006546008540390565b600d6020526000908152604090205460ff1681565b60055481565b60035481565b60095481565b60005433600160a060020a0390811691161461065357600080fd5b60005460a060020a900460ff16151561066b57600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60065481565b60075481565b600454600160a060020a031681565b60085481565b60005460a060020a900460ff1681565b60005433600160a060020a0390811691161461070357600080fd5b600f805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025481565b60005433600160a060020a03908116911614806107635750600f5433600160a060020a039081169116145b151561076e57600080fd5b6107766109c1565b151561078157600080fd5b600154600160a060020a0316637d64bcb46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156107c057600080fd5b5af115156107cd57600080fd5b50505060405180515050565b60005433600160a060020a039081169116146107f457600080fd5b60005460a060020a900460ff161561080b57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600054600160a060020a031681565b6000805433600160a060020a03908116911614806108985750600f5433600160a060020a039081169116145b15156108a357600080fd5b8584146108af57600080fd5b8382146108bb57600080fd5b5060005b8581101561091d576109158787838181106108d657fe5b90506020020135600160a060020a031686868481811015156108f457fe5b90506020020135858585818110151561090957fe5b90506020020135610944565b6001016108bf565b50505050505050565b600b5481565b600a5481565b600c6020526000908152604090205481565b60005433600160a060020a039081169116148061096f5750600f5433600160a060020a039081169116145b151561097a57600080fd5b61098381610b1b565b151561098e57600080fd5b600160a060020a0383166000908152600e60205260409020805460ff191660011790556109bc838383610b64565b505050565b6008546006546003546000929091101590421181806109dd5750805b9250505090565b600e6020526000908152604090205460ff1681565b60005433600160a060020a03908116911614610a1457600080fd5b600160a060020a0381161515610a2957600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600f54600160a060020a031681565b600154600160a060020a031681565b6000805433600160a060020a03908116911614610ace57600080fd5b610ad66109c1565b15610ae057600080fd5b86861015610aed57600080fd5b60008411610afa57600080fd5b50600295909555600393909355600591909155600855600955600a55600190565b60008060006002544210158015610b3457506003544211155b9150600854610b4e85600654610d1b90919063ffffffff16565b11159050818015610b5c5750805b949350505050565b600160a060020a0383166000908152600d602052604090205460ff161515610bb657600b80546001908101909155600160a060020a0384166000908152600d60205260409020805460ff191690911790555b600160a060020a0383166000908152600c6020526040902054610bdf908263ffffffff610d1b16565b600160a060020a0384166000908152600c6020526040902055600654610c0b908263ffffffff610d1b16565b600655600754610c21908363ffffffff610d1b16565b600755600154600160a060020a03166340c10f19848460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610c7a57600080fd5b5af11515610c8757600080fd5b505050604051805190505082600160a060020a031633600160a060020a03167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad18838560405191825260208201526040908101905180910390a3505050565b600080831515610cf85760009150610d14565b50828202828482811515610d0857fe5b0414610d1057fe5b8091505b5092915050565b600082820183811015610d1057fe00a165627a7a7230582035d9281f4c6d2edc29107ae64940891c44c36febb2a6446565737da86bef543e0029000000000000000000000000000000000000000000000000000000005ad5fde0000000000000000000000000000000000000000000000000000000005ad99dc4000000000000000000000000000000000000000000000000000000000000acda00000000000000000000000081faa7321658f9c86eafe107896546ddea98643b000000000000000000000000d4f39ed7499097a35dccdc59eabad25ce6a6c1500000000000000000000000000000000000000000000000d8d726b7177a8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000c3f0e78d537ff754d17405cc4d6632a175fab7e8

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

-----Decoded View---------------
Found 9 constructor arguments :
Arg [0] : 000000000000000000000000000000000000000000000000000000005ad5fde0
Arg [1] : 000000000000000000000000000000000000000000000000000000005ad99dc4
Arg [2] : 000000000000000000000000000000000000000000000000000000000000acda
Arg [3] : 00000000000000000000000081faa7321658f9c86eafe107896546ddea98643b
Arg [4] : 000000000000000000000000d4f39ed7499097a35dccdc59eabad25ce6a6c150
Arg [5] : 0000000000000000000000000000000000000000000000d8d726b7177a800000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000001a055690d9db80000
Arg [8] : 000000000000000000000000c3f0e78d537ff754d17405cc4d6632a175fab7e8


   Swarm Source:
bzzr://35d9281f4c6d2edc29107ae64940891c44c36febb2a6446565737da86bef543e

 

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