Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3 txns
 Latest 3 txns

TxHash Age From To Value [TxFee]
0x3e8b034cfa1b690a4a972ee2821b53c8ac1d22649abcd8563b332f45fe1fc8d7243 days 15 hrs ago0x9eee1bfa51d6af0b208346682445a49b6c383bb4  IN   0x74b9751af2b1f2f4bd07bddaa550e1586b32cb210.24 Ether0.002674799
0x1bb523e66b71d28c50ec3745574166ea1eb8d60b144048fc998e2dc3ea985a08244 days 7 hrs ago0x9eee1bfa51d6af0b208346682445a49b6c383bb4  IN   0x74b9751af2b1f2f4bd07bddaa550e1586b32cb210.12 Ether0.004519799
0x8d0c3ca6bb116b5f382a94223de3535b182e318b0579a236532a586b6983f2c3258 days 5 hrs ago0x00d7b5789e5f983ae8b1072c2a82e577e5d49ea7  IN    Contract Creation0 Ether0.000985304
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x3e8b034cfa1b690a4a972ee2821b53c8ac1d22649abcd8563b332f45fe1fc8d75133921243 days 15 hrs ago0x74b9751af2b1f2f4bd07bddaa550e1586b32cb210x00d7b5789e5f983ae8b1072c2a82e577e5d49ea70.24 Ether
0x1bb523e66b71d28c50ec3745574166ea1eb8d60b144048fc998e2dc3ea985a085129935244 days 7 hrs ago0x74b9751af2b1f2f4bd07bddaa550e1586b32cb210x00d7b5789e5f983ae8b1072c2a82e577e5d49ea70.12 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0xdd92a257d279c99579aad35b544285fa42d563bd(Excluding Constructor Arguments if_any)
Contract Name: StarsICO
Compiler Text: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.3;


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

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

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

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


contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) constant returns (uint256);
  function transfer(address to, uint256 value) returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}


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) returns (bool) {
    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) constant returns (uint256 balance) {
    return balances[_owner];
  }

}


contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) constant returns (uint256);
  function transferFrom(address from, address to, uint256 value) returns (bool);
  function approve(address spender, uint256 value) returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}


contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) 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 amout of tokens to be transfered
   */
  function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
    var _allowance = allowed[_from][msg.sender];

    // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
    // require (_value <= _allowance);

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

  /**
   * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) returns (bool) {

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

    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 specifing the amount of tokens still avaible for the spender.
   */
  function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

}


contract Stars is StandardToken {

  string public name = "Stars";
  string public symbol = "STR";
  uint public decimals = 8;
  uint public INITIAL_SUPPLY = 60000000 * 10**8;  // 100 millions tokens

  /**
   * @dev Contructor that gives msg.sender all of existing tokens.
   */
  function Stars() {
    totalSupply = INITIAL_SUPPLY;
    balances[msg.sender] = INITIAL_SUPPLY;
  }
}


contract Ownable {
  address public owner;


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


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


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

}


contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev modifier to allow actions only when the contract IS paused
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev modifier to allow actions only when the contract IS NOT paused
   */
  modifier whenPaused {
    require(paused);
    _;
  }

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

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


contract StarsICO is Pausable {
  using SafeMath for uint256;

  uint256 public constant MAX_GAS_PRICE = 50000000000 wei;    // maximum gas price for contribution transactions

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

  // address where funds are collected
  address public wallet_address;

  // address of the Stars token
  address public token_address;

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

  // upper capacity tokens to sold
  uint256 public capTokens;

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

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

  // verifies that the gas price is lower than 50 gwei
  modifier validGasPrice() {
    require(tx.gasprice <= MAX_GAS_PRICE);
    _;
  }

  function StarsICO(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet_address, address _token_address, uint256 _cap) {
    // require(_startTime >= now);
    require(_endTime >= _startTime);
    require(_rate > 0);
    require(_wallet_address != 0x0);
    require(_token_address != 0x0);
    require(_cap > 0);

    startTime = _startTime;
    endTime = _endTime;
    rate = _rate;
    wallet_address = _wallet_address;
    token_address = _token_address;
    capTokens = _cap;
  }

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

  // low level token purchase function
  function buyTokens(address beneficiary) whenNotPaused validGasPrice private {
    require(beneficiary != 0x0);
    require(validPurchase());

    uint256 weiAmount = msg.value;
    uint256 tokens = convertWeiToTokens(weiAmount);

    wallet_address.transfer(msg.value);
    Stars tok = Stars(token_address);
    if (tok.transferFrom(wallet_address, beneficiary, tokens)) {
      // update state
      weiRaised = weiRaised.add(weiAmount);
      tokensSold = tokensSold.add(tokens);
      TokenPurchase(beneficiary, beneficiary, weiAmount, tokens);
    }
  }

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

  function convertWeiToTokens(uint256 weiAmount) constant returns (uint256) {
    // calculate token amount to be created
    uint256 tokens = weiAmount.div(10 ** 10);
    tokens = tokens.mul(rate);
    return tokens;
  }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"weiAmount","type":"uint256"}],"name":"convertWeiToTokens","outputs":[{"name":"","type":"uint256"}],"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":false,"inputs":[],"name":"unpause","outputs":[{"name":"","type":"bool"}],"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":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token_address","outputs":[{"name":"","type":"address"}],"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":"capTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_GAS_PRICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wallet_address","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":[{"name":"_startTime","type":"uint256"},{"name":"_endTime","type":"uint256"},{"name":"_rate","type":"uint256"},{"name":"_wallet_address","type":"address"},{"name":"_token_address","type":"address"},{"name":"_cap","type":"uint256"}],"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":"amount","type":"uint256"}],"name":"TokenPurchase","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405260008060146101000a81548160ff021916908315150217905550341561002957600080fd5b60405160c080610cef83398101604052808051906020019091908051906020019091908051906020019091908051906020019091908051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508585101515156100c157600080fd5b6000841115156100d057600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff16141515156100f657600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff161415151561011c57600080fd5b60008111151561012b57600080fd5b85600181905550846002819055508360058190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600681905550505050505050610b11806101de6000396000f3006060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063084ee60f146100e65780632c4e722e1461011d5780633197cbb6146101465780633f4ba83a1461016f5780634042b66f1461019c578063518ab2a8146101c55780635c975abb146101ee57806378e979251461021b5780638456cb59146102445780638c8e8fee146102715780638da5cb5b146102c6578063a0b70e871461031b578063e3bbb4f114610344578063e776a5b51461036d578063f2fde38b146103c2575b6100e4336103fb565b005b34156100f157600080fd5b61010760048080359060200190919050506106c8565b6040518082815260200191505060405180910390f35b341561012857600080fd5b610130610705565b6040518082815260200191505060405180910390f35b341561015157600080fd5b61015961070b565b6040518082815260200191505060405180910390f35b341561017a57600080fd5b610182610711565b604051808215151515815260200191505060405180910390f35b34156101a757600080fd5b6101af6107d6565b6040518082815260200191505060405180910390f35b34156101d057600080fd5b6101d86107dc565b6040518082815260200191505060405180910390f35b34156101f957600080fd5b6102016107e2565b604051808215151515815260200191505060405180910390f35b341561022657600080fd5b61022e6107f5565b6040518082815260200191505060405180910390f35b341561024f57600080fd5b6102576107fb565b604051808215151515815260200191505060405180910390f35b341561027c57600080fd5b6102846108c2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102d157600080fd5b6102d96108e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561032657600080fd5b61032e61090d565b6040518082815260200191505060405180910390f35b341561034f57600080fd5b610357610913565b6040518082815260200191505060405180910390f35b341561037857600080fd5b61038061091c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103cd57600080fd5b6103f9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610942565b005b60008060008060149054906101000a900460ff1615151561041b57600080fd5b640ba43b74003a1115151561042f57600080fd5b60008473ffffffffffffffffffffffffffffffffffffffff161415151561045557600080fd5b61045d610a17565b151561046857600080fd5b349250610474836106c8565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156104d857600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156105fe57600080fd5b6102c65a03f1151561060f57600080fd5b50505060405180519050156106c25761063383600754610a7990919063ffffffff16565b60078190555061064e82600854610a7990919063ffffffff16565b6008819055508373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188585604051808381526020018281526020019250505060405180910390a35b50505050565b6000806106e36402540be40084610a9790919063ffffffff16565b90506106fa60055482610ab290919063ffffffff16565b905080915050919050565b60055481565b60025481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561076e57600080fd5b600060149054906101000a900460ff16151561078957600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a16001905090565b60075481565b60085481565b600060149054906101000a900460ff1681565b60015481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561085857600080fd5b600060149054906101000a900460ff1615151561087457600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a16001905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b640ba43b740081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561099d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610a1457806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000806000806001544210158015610a3157506002544211155b925060003414159150600654610a5a610a49346106c8565b600854610a7990919063ffffffff16565b11159050828015610a685750815b8015610a715750805b935050505090565b6000808284019050838110151515610a8d57fe5b8091505092915050565b6000808284811515610aa557fe5b0490508091505092915050565b60008082840290506000841480610ad35750828482811515610ad057fe5b04145b1515610adb57fe5b80915050929150505600a165627a7a72305820ae1b32538f9b8ce5e704687182f0a52ec1dfd4c053854e17ad39c784d091ef890029000000000000000000000000000000000000000000000000000000005aa32000000000000000000000000000000000000000000000000000000000005acd5000000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000d7b5789e5f983ae8b1072c2a82e577e5d49ea70000000000000000000000003c27a5450f01da96df97fcbcd87f549bf7160b4f00000000000000000000000000000000000000000000000000000746a5288000

   Swarm Source:
bzzr://ae1b32538f9b8ce5e704687182f0a52ec1dfd4c053854e17ad39c784d091ef89

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.