Contract Overview
Balance: 0.054573015915553768 Ether
Ether Value: $11.55 (@ $211.56/ETH)
Transactions: 7861 txns
Token Tracker: CryptoAllStars (AllStarTo...)
 Latest 25 txns From a total of 7861 Transactions
(+2 PendingTxns)

TxHash Age From To Value [TxFee]
0x4a6b0840fde3158824d54bda91dd55ebd64d0fc1968cadb0aaeed63ac4ed22ef(pending)0xc58d8a7c3a9df733a9bf2144eca01737a0b14fcc  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.009631777159203642 Ether(Pending)
0xac1c35b983e84fd6f50e05fbc5138062b39b927b3b07a7653b84ef534bbced5a(pending)0x4532b73b1c5f13c1e00f0f5bd3e8a8d4dc2aad71  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether(Pending)
0xdf11dfc2dcc88e4dc347f509761ed29b148abb7f4ae5359ad9262e8c8428745099 days 1 hr ago0xd304e97d8ddc84025dc371ce712b915e5e052cca  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00033825
0x2a1452a20c88524c6f6e96c14c81cd20ea58229a49ad231c2cc54df996f1311799 days 22 hrs ago0xd304e97d8ddc84025dc371ce712b915e5e052cca  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0017385
0x04313323619a912add6403d3000a4bc3c5854566d73f15b05aea87c56a8cbb22122 days 21 hrs ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00022875
0x1dd5b349861303195a646e1492276fc51b8af484033c2b858d9637532a65c2cd137 days 19 hrs ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000369
0xa074cf7d955c809b02a776633b300e82e447738b8aaa8f444f37f94de205ec28137 days 19 hrs ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0004305
0x1e3991b24567068a1b1f71a4eb8313ed501ab32d7cb4ac95296b2847886f5982154 days 19 hrs ago0x047f606fd5b2baa5f5c6c4ab8958e45cb6b054b7  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00022875
0xea0bd3aed29ddfd352e517b2d46dc37d5d786c06b7cf3dba0cbe0c921a9fb3cf157 days 8 hrs ago0xb8ab59b528d4b6a49cca41d528c34472dabe350e  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0004575
0x7e6ff14f1e0dec069f57a49d6735685e2ee30a41ae17569928ffbf24c159ec3d157 days 8 hrs ago0xb8ab59b528d4b6a49cca41d528c34472dabe350e  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000366
0x0f7878e5e5f358c860c40476dc1945171b51f2d24a753080aa032aa6c2e79dd4161 days 22 hrs ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0000615
0xeedcff5e4d81abb68ae9b475dc627a6ad32cfc704d6ef0e17852456b5911cb1d162 days 1 hr ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0000915
0x8783286ab234713e32434d6fd586049dba14c46341dd80abba1f253a48f16477164 days 20 hrs ago0x9c783640aff6f5ce34c25769527f5460b11d7fc1  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00013725
0xae19203eb1fbea8ebec85e94915a356e4afb81ef86874b072a45533501a430e4169 days 22 hrs ago0xbb1c298226157fba45ed112772b1c1ba655b7749  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000123
0x71fe8a972b10ac7d32ec8c39299b5b8162702af2ea26c0e247d13e70ff0be0fa174 days 18 hrs ago0x3251e03f4c2ce703432f3d78fff6bf489a5bf96f  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00004575
0x94e1bf68e07f2a57b9ea23d2d30b18d7b0c76b88f007471da9df25c38382305d177 days 1 hr ago0x0c24c748ddab4afe06bc44988f5fe6e788c019f3  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00004575
0x090876c02b41e4a68668a216af530169845c24b03a425fc24d337461be4ffb98177 days 1 hr ago0x0c24c748ddab4afe06bc44988f5fe6e788c019f3  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0000915
0x775960e32fd2910aa2c70354a3a36619fea17fe53104c2db4b2a13a760613c5f178 days 1 hr ago0xbb1c298226157fba45ed112772b1c1ba655b7749  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000183
0xc270cbdb7597dfcd99a27a67e77307c125e8e5532037acf6d8368f063625e0bf180 days 22 hrs ago0x0c24c748ddab4afe06bc44988f5fe6e788c019f3  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0000535275
0x9fcae27c521d612b2a59efa01985145f0013953cba8efc2ce562dcac08c7382c185 days 8 hrs ago0x72b9d561d9eeff069d9b28a568c65945174f9e0b  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00013725
0x4032f3ee87f46f12d36cf12bcf1c8cd1867b97bfb439bced55e9d725f7289d68189 days 12 hrs ago0x4829c076e3fe1604af20f34d51c207fee37f3cbb  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0000915
0x21f3a9e10b11aa4bed43f7d969878928f7c3172d5ae605fecbece0924c1d2507190 days 4 hrs ago0x9c783640aff6f5ce34c25769527f5460b11d7fc1  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0000615
0xb168710fe5fdb35f8c3a6057cdd8262dd2b27a62bc68de412c854c9fdc9542e8192 days 21 hrs ago0x2dd04d8ce286dc6f0d528ca05dda090298f3bf19  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00004575
0xa0a1fa2764d0f94b401111000a4045f26e344baec9614d5e3927c8bc27563f4b195 days 20 hrs ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00013725
0x72c71482e9b994a21b4519e72f314a0ae7287af37e8650b7d3aba011794f1237196 days 4 hrs ago0x0ab67c237486a2bffc509b5722b17694e402b764  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000046212303
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0x6ad17bf1d0c9f9e11961c27b11102b54db2dc7d3b57000536a3802efca342ee75113027239 days 3 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x074cce9d497fec7831891d0e42e0120afeb3fe100.627589683028868312 Ether
0x7ed26d38e8b7f6a618ee3b277b289c93d9d918dd74b4aa7db3e3f67fb7a777d05110048239 days 14 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xed8efe0c11e7f13be0b9d2cd5a675095739664d64.234646388506572025 Ether
0x7ed26d38e8b7f6a618ee3b277b289c93d9d918dd74b4aa7db3e3f67fb7a777d05110048239 days 14 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x047f606fd5b2baa5f5c6c4ab8958e45cb6b054b712.703939165519716076 Ether
0x2a3fa47051ecea1f0a66da3c4406935f9870469c55ded06758f95a3025cd6d435109502239 days 17 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xe19089602cf169fe1da167b00e58430ed61d32170.627589683028868312 Ether
0xceddd7ffa022b5a6f68f65b78e839c77aebccd98f04f4cc4778c312e85595fc15108196239 days 22 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xbb151d5a034fbda38ee1c7320aee8dc6f258f8431.109788229665693456 Ether
0xd599a4c82c80746e877cd972d8250d9014bb2b6f822b7fd688edead8c984bbd35104898240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xa2381223639181689cd6c46d38a1a4884bb6d83c0.471947441637708971 Ether
0x8cb6d4b3cecfd160e77ea86b2b35d2d8ebc2bce378c12371380657488731981b5104875240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x7648c24fb3b22abd79339241c33ed1172b49782c0.471947441637708971 Ether
0x6895b7a3abf55b5b9bc097f7bce656378415331f48d712e718944f3cdea8f5e85104866240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.471947441637708971 Ether
0xce971737e93e42d12dcde87817f149010f15e0aa4829bef1558ddae92e99a7e65104863240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x96209ee926b91ac72254897b1a5788f740ef2cd10.471947441637708971 Ether
0xd9b919f3f0912996ce84a1bd9504ce9203b34873868310a8a598fde8c4254e2f5104860240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.471947441637708971 Ether
0xfa4f2948face9d1bc0904cbca4da5bda19a55fd6c412607a818236a037ddeb395104858240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xd61a00797ac8170a44cdbe95eb37c745490cf29a0.354904476111557146 Ether
0xece47c3d550574b3c95ea63fd08e7424f7c93306943e2de4101fcb0bc5132c5a5104856240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xa2381223639181689cd6c46d38a1a4884bb6d83c0.054234265096133536 Ether
0xece47c3d550574b3c95ea63fd08e7424f7c93306943e2de4101fcb0bc5132c5a5104856240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x72b9d561d9eeff069d9b28a568c65945174f9e0b0.354904476111557146 Ether
0x2cf616a07972aa26e2dd4d3231117520c4bf541fc192d5baf01756680b22b05e5104854240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xb348925c8a2b6d6c99e3310bf7289e2cdb67283b0.266888166035890974 Ether
0x7b49f8601263a526d65cdaf0fd3db1d51223a0b7e5ad3c58b870add583e941f15104854240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x238361f646681118c3dc9df3197fd82d3324856e0.266888166035890974 Ether
0x6fe166c7083267967ff0076446db8e5222dd22659aa35104d2f4ff3686d797b85104850240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.200699900858990012 Ether
0xd41d5aedf466ce56212b95a86188f53e2bbbf25ae3b9bc734d957dbaca13d64a5104849240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x7648c24fb3b22abd79339241c33ed1172b49782c0.471947441637708971 Ether
0xecdbf4036615fffe9e454315c0162f39a4d921e24d0ecc579e9f4eefa9a0a2865104848240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.238077305828858857 Ether
0xecdbf4036615fffe9e454315c0162f39a4d921e24d0ecc579e9f4eefa9a0a2865104848240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.150926325445960489 Ether
0x41dc41fde90c40a94f8810ae95192fc732a5de728baa5f1e76a43bab08a0a33f5104848240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.27663413398330186 Ether
0x41dc41fde90c40a94f8810ae95192fc732a5de728baa5f1e76a43bab08a0a33f5104848240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x72b9d561d9eeff069d9b28a568c65945174f9e0b0.113496596735362288 Ether
0x4cc4d2e07819a73f34d582fe836f45bff6055b32f49f7a3541612b5a831d542c5104848240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x238361f646681118c3dc9df3197fd82d3324856e0.281847933848923899 Ether
0x4cc4d2e07819a73f34d582fe836f45bff6055b32f49f7a3541612b5a831d542c5104848240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.200699900858990012 Ether
0x9f5e721e33cdff40f77b2ba577cf4c91d8023a96d5f3de258fba34fe2a470fdc5104847240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.085349440744992441 Ether
0x02b250e7def4a319559b9fefe04fd7887c6f2f46aecd879e357acaf14613ca495104845240 days 11 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x203b0a62e2ad8d4e73a1989140a4d4d5d0d28b190.627589683028868312 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 (Exact Match)
Contract Name: CryptoAllStars
Compiler Text: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18; // solhint-disable-line



/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
  // Required methods
  function approve(address _to, uint256 _tokenId) public;
  function balanceOf(address _owner) public view returns (uint256 balance);
  function implementsERC721() public pure returns (bool);
  function ownerOf(uint256 _tokenId) public view returns (address addr);
  function takeOwnership(uint256 _tokenId) public;
  function totalSupply() public view returns (uint256 total);
  function transferFrom(address _from, address _to, uint256 _tokenId) public;
  function transfer(address _to, uint256 _tokenId) public;

  event Transfer(address indexed from, address indexed to, uint256 tokenId);
  event Approval(address indexed owner, address indexed approved, uint256 tokenId);

}

contract CryptoAllStars is ERC721 {

  /*** EVENTS ***/

  /// @dev The Birth event is fired whenever a new all stars comes into existence.
  event Birth(uint256 tokenId, string name, address owner);

  /// @dev The TokenSold event is fired whenever a token is sold.
  event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);

  /// @dev Transfer event as defined in current draft of ERC721. 
  ///  ownership is assigned, including births.
  event Transfer(address from, address to, uint256 tokenId);

  /*** CONSTANTS ***/

  /// @notice Name and symbol of the non fungible token, as defined in ERC721.
  string public constant NAME = "CryptoAllStars"; // solhint-disable-line
  string public constant SYMBOL = "AllStarToken"; // solhint-disable-line

  uint256 private startingPrice = 0.001 ether;
  uint256 private constant PROMO_CREATION_LIMIT = 10000;
  uint256 private firstStepLimit =  0.053613 ether;
  uint public currentGen = 0;

  /*** STORAGE ***/

  /// @dev A mapping from all stars IDs to the address that owns them. All all stars have
  ///  some valid owner address.
  mapping (uint256 => address) public allStarIndexToOwner;

  // @dev A mapping from owner address to count of tokens that address owns.
  //  Used internally inside balanceOf() to resolve ownership count.
  mapping (address => uint256) private ownershipTokenCount;

  /// @dev A mapping from allStarIDs to an address that has been approved to call
  ///  transferFrom(). Each All Star can only have one approved address for transfer
  ///  at any time. A zero value means no approval is outstanding.
  mapping (uint256 => address) public allStarIndexToApproved;

  // @dev A mapping from AllStarIDs to the price of the token.
  mapping (uint256 => uint256) private allStarIndexToPrice;

  // The addresses of the accounts (or contracts) that can execute actions within each roles.
  address public ceo = 0x047F606fD5b2BaA5f5C6c4aB8958E45CB6B054B7;
  address public cfo = 0xed8eFE0C11E7f13Be0B9d2CD5A675095739664d6;

  uint256 public promoCreatedCount;

  /*** DATATYPES ***/
  struct AllStar {
    string name;
    uint gen;
  }

  AllStar[] private allStars;

  /*** ACCESS MODIFIERS ***/
  /// @dev Access modifier for owner only functionality
  modifier onlyCeo() {
    require(msg.sender == ceo);
    _;
  }

  modifier onlyManagement() {
    require(msg.sender == ceo || msg.sender == cfo);
    _;
  }

  //changes the current gen of all stars by importance
  function evolveGeneration(uint _newGen) public onlyManagement {
    currentGen = _newGen;
  }
 
  /*** CONSTRUCTOR ***/
  // function CryptoAllStars() public {
  //   owner = msg.sender;
  // }

  /*** PUBLIC FUNCTIONS ***/
  /// @notice Grant another address the right to transfer token via takeOwnership() and transferFrom().
  /// @param _to The address to be granted transfer approval. Pass address(0) to
  ///  clear all approvals.
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function approve(
    address _to,
    uint256 _tokenId
  ) public {
    // Caller must own token.
    require(_owns(msg.sender, _tokenId));

    allStarIndexToApproved[_tokenId] = _to;

    Approval(msg.sender, _to, _tokenId);
  }

  /// For querying balance of a particular account
  /// @param _owner The address for balance query
  /// @dev Required for ERC-721 compliance.
  function balanceOf(address _owner) public view returns (uint256 balance) {
    return ownershipTokenCount[_owner];
  }

  /// @dev Creates a new promo AllStar with the given name, with given _price and assignes it to an address.
  function createPromoAllStar(address _owner, string _name, uint256 _price) public onlyCeo {
    require(promoCreatedCount < PROMO_CREATION_LIMIT);

    address allStarOwner = _owner;
    if (allStarOwner == address(0)) {
      allStarOwner = ceo;
    }

    if (_price <= 0) {
      _price = startingPrice;
    }

    promoCreatedCount++;
    _createAllStar(_name, allStarOwner, _price);
  }

  /// @dev Creates a new AllStar with the given name.
  function createContractAllStar(string _name) public onlyCeo {
    _createAllStar(_name, msg.sender, startingPrice );
  }

  /// @notice Returns all the relevant information about a specific AllStar.
  /// @param _tokenId The tokenId of the All Star of interest.
  function getAllStar(uint256 _tokenId) public view returns (
    string allStarName,
    uint allStarGen,
    uint256 sellingPrice,
    address owner
  ) {
    AllStar storage allStar = allStars[_tokenId];
    allStarName = allStar.name;
    allStarGen = allStar.gen;
    sellingPrice = allStarIndexToPrice[_tokenId];
    owner = allStarIndexToOwner[_tokenId];
  }

  function implementsERC721() public pure returns (bool) {
    return true;
  }

  /// @dev Required for ERC-721 compliance.
  function name() public pure returns (string) {
    return NAME;
  }

  /// For querying owner of token
  /// @param _tokenId The tokenID for owner inquiry
  /// @dev Required for ERC-721 compliance.
  function ownerOf(uint256 _tokenId)
    public
    view
    returns (address owner)
  {
    owner = allStarIndexToOwner[_tokenId];
    require(owner != address(0));
  }

  function payout() public onlyManagement {
    _payout();
  }

  // Allows someone to send ether and obtain the token
  function purchase(uint256 _tokenId) public payable {
    address oldOwner = allStarIndexToOwner[_tokenId];
    address newOwner = msg.sender;

    uint256 sellingPrice = allStarIndexToPrice[_tokenId];

    // Making sure token owner is not sending to self
    require(oldOwner != newOwner);

    // Safety check to prevent against an unexpected 0x0 default.
    require(_addressNotNull(newOwner));

    // Making sure sent amount is greater than or equal to the sellingPrice
    require(msg.value >= sellingPrice);

    uint256 payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 92), 100));
    uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice);

    // Update prices
    if (sellingPrice < firstStepLimit) {
      // first stage
      allStarIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 200), 94);
   } else {
      // second and last stage
      allStarIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 125), 94);
    }

    _transfer(oldOwner, newOwner, _tokenId);

    // Pay previous tokenOwner if owner is not contract
    if (oldOwner != address(this)) {
      oldOwner.transfer(payment); //(1-0.06)
    }

    TokenSold(_tokenId, sellingPrice, allStarIndexToPrice[_tokenId], oldOwner, newOwner, allStars[_tokenId].name);

    msg.sender.transfer(purchaseExcess);
  }

  function priceOf(uint256 _tokenId) public view returns (uint256 price) {
    return allStarIndexToPrice[_tokenId];
  }

  /// @dev Assigns a new address to act as the owner. Only available to the current owner.
  /// @param _newOwner The address of the new owner
  function setOwner(address _newOwner) public onlyCeo {
    require(_newOwner != address(0));

    ceo = _newOwner;
  }

   function setCFO(address _newCFO) public onlyCeo {
    require(_newCFO != address(0));

    cfo = _newCFO;
  }


  /// @dev Required for ERC-721 compliance.
  function symbol() public pure returns (string) {
    return SYMBOL;
  }

  /// @notice Allow pre-approved user to take ownership of a token
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function takeOwnership(uint256 _tokenId) public {
    address newOwner = msg.sender;
    address oldOwner = allStarIndexToOwner[_tokenId];

    // Safety check to prevent against an unexpected 0x0 default.
    require(_addressNotNull(newOwner));

    // Making sure transfer is approved
    require(_approved(newOwner, _tokenId));

    _transfer(oldOwner, newOwner, _tokenId);
  }


  function tokensOfOwner(address _owner) public view returns(uint256[] ownerTokens) {
    uint256 tokenCount = balanceOf(_owner);
    if (tokenCount == 0) {
        // Return an empty array
      return new uint256[](0);
    } else {
      uint256[] memory result = new uint256[](tokenCount);
      uint256 totalAllStars = totalSupply();
      uint256 resultIndex = 0;

      uint256 allStarId;
      for (allStarId = 0; allStarId <= totalAllStars; allStarId++) {
        if (allStarIndexToOwner[allStarId] == _owner) {
          result[resultIndex] = allStarId;
          resultIndex++;
        }
      }
      return result;
    }
  }

  /// For querying totalSupply of token
  /// @dev Required for ERC-721 compliance.
  function totalSupply() public view returns (uint256 total) {
    return allStars.length;
  }

  /// Owner initates the transfer of the token to another account
  /// @param _to The address for the token to be transferred to.
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function transfer(
    address _to,
    uint256 _tokenId
  ) public {
    require(_owns(msg.sender, _tokenId));
    require(_addressNotNull(_to));

    _transfer(msg.sender, _to, _tokenId);
  }

  /// Third-party initiates transfer of token from address _from to address _to
  /// @param _from The address for the token to be transferred from.
  /// @param _to The address for the token to be transferred to.
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  ) public {
    require(_owns(_from, _tokenId));
    require(_approved(_to, _tokenId));
    require(_addressNotNull(_to));

    _transfer(_from, _to, _tokenId);
  }

  /*** PRIVATE FUNCTIONS ***/
  /// Safety check on _to address to prevent against an unexpected 0x0 default.
  function _addressNotNull(address _to) private pure returns (bool) {
    return _to != address(0);
  }

  /// For checking approval of transfer for address _to
  function _approved(address _to, uint256 _tokenId) private view returns (bool) {
    return allStarIndexToApproved[_tokenId] == _to;
  }

  /// For creating All Stars
  function _createAllStar(string _name, address _owner, uint256 _price) private {
    AllStar memory _allStar = AllStar({
      name: _name,
      gen: currentGen
    });
    uint256 newAllStarId = allStars.push(_allStar) - 1;

    // It's probably never going to happen, 4 billion tokens are A LOT, but
    // let's just be 100% sure we never let this happen.
    require(newAllStarId == uint256(uint32(newAllStarId)));

    Birth(newAllStarId, _name, _owner);

    allStarIndexToPrice[newAllStarId] = _price;

    // This will assign ownership, and also emit the Transfer event as
    // per ERC721 draft
    _transfer(address(0), _owner, newAllStarId);
  }

  /// Check for token ownership
  function _owns(address claimant, uint256 _tokenId) private view returns (bool) {
    return claimant == allStarIndexToOwner[_tokenId];
  }

  /// For paying out balance on contract
  function _payout() private {
      uint blnc = this.balance;
      ceo.transfer(SafeMath.div(SafeMath.mul(blnc, 75), 100));
      cfo.transfer(SafeMath.div(SafeMath.mul(blnc, 25), 100));
    
  }

  /// @dev Assigns ownership of a specific All Star to an address.
  function _transfer(address _from, address _to, uint256 _tokenId) private {
    // Since the number of all stars is capped to 2^32 we can't overflow this
    ownershipTokenCount[_to]++;
    //transfer ownership
    allStarIndexToOwner[_tokenId] = _to;

    // When creating new all stars _from is 0x0, but we can't account that address.
    if (_from != address(0)) {
      ownershipTokenCount[_from]--;
      // clear any previously approved ownership exchange
      delete allStarIndexToApproved[_tokenId];
    }

    // Emit the transfer event.
    Transfer(_from, _to, _tokenId);
  }
}
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 Substracts 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;
  }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"promoCreatedCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_name","type":"string"},{"name":"_price","type":"uint256"}],"name":"createPromoAllStar","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"implementsERC721","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"total","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cfo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"createContractAllStar","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newCFO","type":"address"}],"name":"setCFO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"payout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"name":"ownerTokens","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ceo","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"NAME","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getAllStar","outputs":[{"name":"allStarName","type":"string"},{"name":"allStarGen","type":"uint256"},{"name":"sellingPrice","type":"uint256"},{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentGen","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"priceOf","outputs":[{"name":"price","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"allStarIndexToApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"allStarIndexToOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"purchase","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"SYMBOL","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newGen","type":"uint256"}],"name":"evolveGeneration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"name","type":"string"},{"indexed":false,"name":"owner","type":"address"}],"name":"Birth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"oldPrice","type":"uint256"},{"indexed":false,"name":"newPrice","type":"uint256"},{"indexed":false,"name":"prevOwner","type":"address"},{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"name","type":"string"}],"name":"TokenSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"approved","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405266038d7ea4c68000600090815566be78bd4c57d00060015560025560078054600160a060020a031990811673047f606fd5b2baa5f5c6c4ab8958e45cb6b054b7179091556008805490911673ed8efe0c11e7f13be0b9d2cd5a675095739664d6179055341561007257600080fd5b611468806100816000396000f3006060604052600436106101695763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305e45546811461016e57806306fdde0314610193578063095ea7b31461021d5780630b99c9c4146102415780631051db34146102a257806313af4035146102c957806318160ddd146102e85780631ed20347146102fb57806323b872dd1461032a578063361b2f16146103525780634e0a3379146103a35780636352211e146103c257806363bd1d4a146103d857806370a08231146103eb5780638462151c1461040a578063908921fc1461047c57806395d89b411461048f578063a3f4df7e146104a2578063a58341d5146104b5578063a9059cbb14610562578063b2e6ceeb14610584578063b753485f1461059a578063b9186d7d146105ad578063df1405f3146105c3578063e7f04e80146105d9578063efef39a1146105ef578063f76f8d78146105fa578063fbaa54851461060d575b600080fd5b341561017957600080fd5b610181610623565b60405190815260200160405180910390f35b341561019e57600080fd5b6101a6610629565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101e25780820151838201526020016101ca565b50505050905090810190601f16801561020f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022857600080fd5b61023f600160a060020a036004351660243561066b565b005b341561024c57600080fd5b61023f60048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965050933593506106f792505050565b34156102ad57600080fd5b6102b561076e565b604051901515815260200160405180910390f35b34156102d457600080fd5b61023f600160a060020a0360043516610773565b34156102f357600080fd5b6101816107d2565b341561030657600080fd5b61030e6107d8565b604051600160a060020a03909116815260200160405180910390f35b341561033557600080fd5b61023f600160a060020a03600435811690602435166044356107e7565b341561035d57600080fd5b61023f60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061083595505050505050565b34156103ae57600080fd5b61023f600160a060020a0360043516610860565b34156103cd57600080fd5b61030e6004356108bf565b34156103e357600080fd5b61023f6108e8565b34156103f657600080fd5b610181600160a060020a0360043516610928565b341561041557600080fd5b610429600160a060020a0360043516610943565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610468578082015183820152602001610450565b505050509050019250505060405180910390f35b341561048757600080fd5b61030e610a24565b341561049a57600080fd5b6101a6610a33565b34156104ad57600080fd5b6101a6610a74565b34156104c057600080fd5b6104cb600435610aab565b6040516020810184905260408101839052600160a060020a038216606082015260808082528190810186818151815260200191508051906020019080838360005b8381101561052457808201518382015260200161050c565b50505050905090810190601f1680156105515780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b341561056d57600080fd5b61023f600160a060020a0360043516602435610baf565b341561058f57600080fd5b61023f600435610be7565b34156105a557600080fd5b610181610c35565b34156105b857600080fd5b610181600435610c3b565b34156105ce57600080fd5b61030e600435610c4d565b34156105e457600080fd5b61030e600435610c68565b61023f600435610c83565b341561060557600080fd5b6101a6610ef0565b341561061857600080fd5b61023f600435610f27565b60095481565b6106316112d8565b60408051908101604052600e81527f43727970746f416c6c5374617273000000000000000000000000000000000000602082015290505b90565b6106753382610f62565b151561068057600080fd5b60008181526005602052604090819020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038581169182179092559133909116907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259084905190815260200160405180910390a35050565b60075460009033600160a060020a0390811691161461071557600080fd5b600954612710901061072657600080fd5b5082600160a060020a03811615156107465750600754600160a060020a03165b600082116107545760005491505b600980546001019055610768838284610f82565b50505050565b600190565b60075433600160a060020a0390811691161461078e57600080fd5b600160a060020a03811615156107a357600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600a5490565b600854600160a060020a031681565b6107f18382610f62565b15156107fc57600080fd5b61080682826110d2565b151561081157600080fd5b61081a826110f2565b151561082557600080fd5b610830838383611100565b505050565b60075433600160a060020a0390811691161461085057600080fd5b61085d8133600054610f82565b50565b60075433600160a060020a0390811691161461087b57600080fd5b600160a060020a038116151561089057600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600081815260036020526040902054600160a060020a03168015156108e357600080fd5b919050565b60075433600160a060020a0390811691161480610913575060085433600160a060020a039081169116145b151561091e57600080fd5b6109266111f0565b565b600160a060020a031660009081526004602052604090205490565b61094b6112d8565b60006109556112d8565b600080600061096387610928565b945084151561099357600060405180591061097b5750595b90808252806020026020018201604052509550610a1a565b846040518059106109a15750595b908082528060200260200182016040525093506109bc6107d2565b925060009150600090505b828111610a1657600081815260036020526040902054600160a060020a0388811691161415610a0e57808483815181106109fd57fe5b602090810290910101526001909101905b6001016109c7565b8395505b5050505050919050565b600754600160a060020a031681565b610a3b6112d8565b60408051908101604052600c81527f416c6c53746172546f6b656e00000000000000000000000000000000000000006020820152905090565b60408051908101604052600e81527f43727970746f416c6c5374617273000000000000000000000000000000000000602082015281565b610ab36112d8565b600080600080600a86815481101515610ac857fe5b90600052602060002090600202019050806000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b705780601f10610b4557610100808354040283529160200191610b70565b820191906000526020600020905b815481529060010190602001808311610b5357829003601f168201915b5050506001909301546000988952600660209081526040808b2054600390925290992054929990989750600160a060020a039092169550909350505050565b610bb93382610f62565b1515610bc457600080fd5b610bcd826110f2565b1515610bd857600080fd5b610be3338383611100565b5050565b6000818152600360205260409020543390600160a060020a0316610c0a826110f2565b1515610c1557600080fd5b610c1f82846110d2565b1515610c2a57600080fd5b610830818385611100565b60025481565b60009081526006602052604090205490565b600560205260009081526040902054600160a060020a031681565b600360205260009081526040902054600160a060020a031681565b6000818152600360209081526040808320546006909252822054600160a060020a0391821692339281908416851415610cbb57600080fd5b610cc4846110f2565b1515610ccf57600080fd5b3483901015610cdd57600080fd5b610cf2610ceb84605c611279565b60646112af565b9150610cfe34846112c6565b9050600154831015610d3357610d1f610d188460c8611279565b605e6112af565b600087815260066020526040902055610d51565b610d41610d1884607d611279565b6000878152600660205260409020555b610d5c858588611100565b30600160a060020a031685600160a060020a0316141515610da857600160a060020a03851682156108fc0283604051600060405180830381858888f193505050501515610da857600080fd5b7e8201e7bcbf010c2c07de59d6e97cb7e3cf67a46125c49cbc89b9d2cde1f48f8684600660008a8152602001908152602001600020548888600a8c815481101515610def57fe5b90600052602060002090600202016000016040518681526020810186905260408101859052600160a060020a0380851660608301528316608082015260c060a082018181528354600260001961010060018416150201909116049183018290529060e083019084908015610ea45780601f10610e7957610100808354040283529160200191610ea4565b820191906000526020600020905b815481529060010190602001808311610e8757829003601f168201915b505097505050505050505060405180910390a1600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610ee857600080fd5b505050505050565b60408051908101604052600c81527f416c6c53746172546f6b656e0000000000000000000000000000000000000000602082015281565b60075433600160a060020a0390811691161480610f52575060085433600160a060020a039081169116145b1515610f5d57600080fd5b600255565b600090815260036020526040902054600160a060020a0390811691161490565b610f8a6112ea565b6000604080519081016040528581526002546020820152600a8054919350600191808301610fb8838261130a565b60009283526020909220859160020201815181908051610fdc929160200190611336565b5060208201516001909101555003905063ffffffff81168114610ffe57600080fd5b7fb3b0cf861f168bcdb275c69da97b2543631552ba562628aa3c7317d4a6089ef2818686604051838152600160a060020a038216604082015260606020820181815290820184818151815260200191508051906020019080838360005b8381101561107357808201518382015260200161105b565b50505050905090810190601f1680156110a05780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160008181526006602052604081208490556110cb908583611100565b5050505050565b600090815260056020526040902054600160a060020a0391821691161490565b600160a060020a0316151590565b600160a060020a0380831660008181526004602090815260408083208054600101905585835260039091529020805473ffffffffffffffffffffffffffffffffffffffff1916909117905583161561119b57600160a060020a0383166000908152600460209081526040808320805460001901905583835260059091529020805473ffffffffffffffffffffffffffffffffffffffff191690555b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef838383604051600160a060020a039384168152919092166020820152604080820192909252606001905180910390a1505050565b600754600160a060020a033081163191166108fc611212610ceb84604b611279565b9081150290604051600060405180830381858888f19350505050151561123757600080fd5b600854600160a060020a03166108fc611254610ceb846019611279565b9081150290604051600060405180830381858888f19350505050151561085d57600080fd5b60008083151561128c57600091506112a8565b5082820282848281151561129c57fe5b04146112a457fe5b8091505b5092915050565b60008082848115156112bd57fe5b04949350505050565b6000828211156112d257fe5b50900390565b60206040519081016040526000815290565b60408051908101604052806112fd6112d8565b8152602001600081525090565b8154818355818115116108305760020281600202836000526020600020918201910161083091906113b4565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061137757805160ff19168380011785556113a4565b828001600101855582156113a4579182015b828111156113a4578251825591602001919060010190611389565b506113b09291506113de565b5090565b61066891905b808211156113b05760006113ce82826113f8565b50600060018201556002016113ba565b61066891905b808211156113b057600081556001016113e4565b50805460018160011615610100020316600290046000825580601f1061141e575061085d565b601f01602090049060005260206000209081019061085d91906113de5600a165627a7a72305820a20d149dc3712708df4d6d104a1252d63ed13956a92fa9d5557e27db4fbf5ee50029

   Swarm Source:
bzzr://a20d149dc3712708df4d6d104a1252d63ed13956a92fa9d5557e27db4fbf5ee5

 

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.