Sponsored Link:   SHARPAY.io • Share button with blockchain profit • ICOBench TOP Project • 30% Bonus • Buy Now!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 5 txns
Misc
Address Watch: Add To Watch List
Contract Creator: 0x00d7b5789e5f983ae8b1072c2a82e577e5d49ea7at txn 0x67f62ffe84f016b248a54318d85adfc9577af552c1f7cd31b8fe6cfc0e9eac35
Token Balances:
 Latest 5 txns


TxHash Age From To Value [TxFee]
0xc841ccd6f631f264439224b15b2d73ae372bc35da8fd9437394c5b9e8a933605113 days 16 hrs ago0xa2c26e87b6ce42a4001ee36690467d683827fb47  IN   0x1bffa323d25ce1b2709d4d346b3a4670faa948c70.005 Ether0.000320956
0x5988e77e496f4d7ea2cdeb5d41dc87397ff1df8179859d948c2a625080b20ef2114 days 21 hrs ago0x5ea5eaffb4a6b1ec7c6e28530e63dfa99d550407  IN   0x1bffa323d25ce1b2709d4d346b3a4670faa948c70.008 Ether0.002674799
0xe73753808aa46855f463e2034609b8d04d0c91b1042a07c7cc7a651a74a2ca17115 days 13 hrs ago0x5ea5eaffb4a6b1ec7c6e28530e63dfa99d550407  IN   0x1bffa323d25ce1b2709d4d346b3a4670faa948c70.012 Ether0.002674799
0xe38e981925b07853700d726e0f9ed418a65f1c60a56f6cdfade3c3ed6b675320115 days 13 hrs ago0x5ea5eaffb4a6b1ec7c6e28530e63dfa99d550407  IN   0x1bffa323d25ce1b2709d4d346b3a4670faa948c70.004 Ether0.004519799
0x67f62ffe84f016b248a54318d85adfc9577af552c1f7cd31b8fe6cfc0e9eac35143 days 9 hrs ago0x00d7b5789e5f983ae8b1072c2a82e577e5d49ea7  IN    Contract Creation0 Ether0.0098524
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 4 Internal Transactions

ParentTxHash Block Age From To Value
0xc841ccd6f631f264439224b15b2d73ae372bc35da8fd9437394c5b9e8a9336054994968113 days 16 hrs ago0x1bffa323d25ce1b2709d4d346b3a4670faa948c70x00d7b5789e5f983ae8b1072c2a82e577e5d49ea70.005 Ether
0x5988e77e496f4d7ea2cdeb5d41dc87397ff1df8179859d948c2a625080b20ef24987578114 days 21 hrs ago0x1bffa323d25ce1b2709d4d346b3a4670faa948c70x00d7b5789e5f983ae8b1072c2a82e577e5d49ea70.008 Ether
0xe73753808aa46855f463e2034609b8d04d0c91b1042a07c7cc7a651a74a2ca174983715115 days 13 hrs ago0x1bffa323d25ce1b2709d4d346b3a4670faa948c70x00d7b5789e5f983ae8b1072c2a82e577e5d49ea70.012 Ether
0xe38e981925b07853700d726e0f9ed418a65f1c60a56f6cdfade3c3ed6b6753204983678115 days 13 hrs ago0x1bffa323d25ce1b2709d4d346b3a4670faa948c70x00d7b5789e5f983ae8b1072c2a82e577e5d49ea70.004 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: StarsICO
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.11;


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
606060405260008060146101000a81548160ff021916908315150217905550341561002957600080fd5b60405160c080610cef83398101604052808051906020019091908051906020019091908051906020019091908051906020019091908051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508585101515156100c157600080fd5b6000841115156100d057600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff16141515156100f657600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff161415151561011c57600080fd5b60008111151561012b57600080fd5b85600181905550846002819055508360058190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600681905550505050505050610b11806101de6000396000f3006060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063084ee60f146100e65780632c4e722e1461011d5780633197cbb6146101465780633f4ba83a1461016f5780634042b66f1461019c578063518ab2a8146101c55780635c975abb146101ee57806378e979251461021b5780638456cb59146102445780638c8e8fee146102715780638da5cb5b146102c6578063a0b70e871461031b578063e3bbb4f114610344578063e776a5b51461036d578063f2fde38b146103c2575b6100e4336103fb565b005b34156100f157600080fd5b61010760048080359060200190919050506106c8565b6040518082815260200191505060405180910390f35b341561012857600080fd5b610130610705565b6040518082815260200191505060405180910390f35b341561015157600080fd5b61015961070b565b6040518082815260200191505060405180910390f35b341561017a57600080fd5b610182610711565b604051808215151515815260200191505060405180910390f35b34156101a757600080fd5b6101af6107d6565b6040518082815260200191505060405180910390f35b34156101d057600080fd5b6101d86107dc565b6040518082815260200191505060405180910390f35b34156101f957600080fd5b6102016107e2565b604051808215151515815260200191505060405180910390f35b341561022657600080fd5b61022e6107f5565b6040518082815260200191505060405180910390f35b341561024f57600080fd5b6102576107fb565b604051808215151515815260200191505060405180910390f35b341561027c57600080fd5b6102846108c2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102d157600080fd5b6102d96108e8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561032657600080fd5b61032e61090d565b6040518082815260200191505060405180910390f35b341561034f57600080fd5b610357610913565b6040518082815260200191505060405180910390f35b341561037857600080fd5b61038061091c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103cd57600080fd5b6103f9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610942565b005b60008060008060149054906101000a900460ff1615151561041b57600080fd5b640ba43b74003a1115151561042f57600080fd5b60008473ffffffffffffffffffffffffffffffffffffffff161415151561045557600080fd5b61045d610a17565b151561046857600080fd5b349250610474836106c8565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156104d857600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156105fe57600080fd5b6102c65a03f1151561060f57600080fd5b50505060405180519050156106c25761063383600754610a7990919063ffffffff16565b60078190555061064e82600854610a7990919063ffffffff16565b6008819055508373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188585604051808381526020018281526020019250505060405180910390a35b50505050565b6000806106e36402540be40084610a9790919063ffffffff16565b90506106fa60055482610ab290919063ffffffff16565b905080915050919050565b60055481565b60025481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561076e57600080fd5b600060149054906101000a900460ff16151561078957600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a16001905090565b60075481565b60085481565b600060149054906101000a900460ff1681565b60015481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561085857600080fd5b600060149054906101000a900460ff1615151561087457600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a16001905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b640ba43b740081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561099d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610a1457806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000806000806001544210158015610a3157506002544211155b925060003414159150600654610a5a610a49346106c8565b600854610a7990919063ffffffff16565b11159050828015610a685750815b8015610a715750805b935050505090565b6000808284019050838110151515610a8d57fe5b8091505092915050565b6000808284811515610aa557fe5b0490508091505092915050565b60008082840290506000841480610ad35750828482811515610ad057fe5b04145b1515610adb57fe5b80915050929150505600a165627a7a723058204e9a48bcb054c5d22fb1401051caea7631b02ab37bb2e0c1ac07398508bd94b50029000000000000000000000000000000000000000000000000000000005a482880000000000000000000000000000000000000000000000000000000005a71070000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000d7b5789e5f983ae8b1072c2a82e577e5d49ea70000000000000000000000003c27a5450f01da96df97fcbcd87f549bf7160b4f000000000000000000000000000000000000000000000000000009184e72a000

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

-----Decoded View---------------
Found 6 constructor arguments :
Arg [0] : 000000000000000000000000000000000000000000000000000000005a482880
Arg [1] : 000000000000000000000000000000000000000000000000000000005a710700
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [3] : 00000000000000000000000000d7b5789e5f983ae8b1072c2a82e577e5d49ea7
Arg [4] : 0000000000000000000000003c27a5450f01da96df97fcbcd87f549bf7160b4f
Arg [5] : 000000000000000000000000000000000000000000000000000009184e72a000


   Swarm Source:
bzzr://4e9a48bcb054c5d22fb1401051caea7631b02ab37bb2e0c1ac07398508bd94b5

 

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.