Sponsored Link:   SocialMedia.Market - The most cost effective advertising platform with 1069% ROI. Join ICO Now!
Contract Overview
ETH Balance: 0.054573015915553768 Ether
ETH USD Value: $43.94 (@ $805.20/ETH)
No Of Transactions: 7722 txns
  Latest 25 txns from a total Of 7722 transactions (+8 PendingTxns) View All

TxHash Age From To Value [TxFee]
0x7e9a8efd523e826c91836442055706a901ca5973aade6f9634d684691fb8eb17(pending)7 mins ago0xc58d8a7c3a9df733a9bf2144eca01737a0b14fcc  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.009631777159203642 Ether(pending)
0x4a6b0840fde3158824d54bda91dd55ebd64d0fc1968cadb0aaeed63ac4ed22ef(pending)7 mins ago0xc58d8a7c3a9df733a9bf2144eca01737a0b14fcc  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.009631777159203642 Ether(pending)
0xd659460e37e299bfee576c0fbcf19fc50d9c27452208e87cda7abb0b863c5db5(pending)10 mins ago0xe803d5739bef2a6b4bc7244c89b26b5ad08ca44c  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.02049314289192264 Ether(pending)
0xf0d377273f9045931412a9a95e45fcd3eb7648e7161c4419f280ca65b6e27266(pending)10 mins ago0xe803d5739bef2a6b4bc7244c89b26b5ad08ca44c  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.001 Ether(pending)
0x5ed095b3b5c5d8fb4b6b9073075f11355e9c3d7179c600e4c6e151aa1216b454(pending)10 mins ago0xe803d5739bef2a6b4bc7244c89b26b5ad08ca44c  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.02049314289192264 Ether(pending)
0x501931551e29305e634499b2472370121a9d8df8c4f0153d8e4ff22b1b851f60(pending)10 mins ago0xe803d5739bef2a6b4bc7244c89b26b5ad08ca44c  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.02049314289192264 Ether(pending)
0x469491e4538955632fb85c31e73fd4bf286f8fd854dee1908891f91fa806548c(pending)11 mins ago0xe803d5739bef2a6b4bc7244c89b26b5ad08ca44c  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.02049314289192264 Ether(pending)
0x10f28e91d9796d03f899b6fc550183919bf4ab6b0ef3ae8a7bc4775815879243(pending)14 mins ago0xf22e18fa829a7658d088e6bb4a7c1aeeee852e31  IN  0x7d152fe26431e6585dbff9ef37e375e49b8627390.02049314289192264 Ether(pending)
0x78af53bc90777e7ae7302568414e62239d80129fcb132dbd4576baf6165848bf2 hrs 17 mins ago0x778d04ec165d15bcd350593af3661fb032cfabfd  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00013725
0x4b88b6dbcbb7c00d367bf2e8e45d05f2491151ce1ee16849bccf670686f5e7083 hrs 54 mins ago0x9c783640aff6f5ce34c25769527f5460b11d7fc1  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0003294
0x954dd77627f6808a2956844b44cf426bffcc59f41066fac4c86cb4e73c9dff664 hrs 50 mins ago0x8798a672b25fa60d9c2a3a14b3a5a7a2210b0d90  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.0022875
0xdbb55dffee455fb5d272fa1df2a314a2f22337797e041959857529be0e1647275 hrs 44 mins ago0x0219060afbb0de3170baadaf523b46e2f27da0ff  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000366
0xd042e9c316e1db3b09f2e5b73afe84685d0b6134602028a28cb2b0035fc891845 hrs 44 mins ago0x8798a672b25fa60d9c2a3a14b3a5a7a2210b0d90  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.005856
0x27f12fbcb9ab941d33f5edf8ca15aadabae12de0f0b7a4f8277ceae9eb36cbe86 hrs 22 mins ago0xa55a2c1a63ddd3faf81f0f2400ca076ca533e6e2  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00032025
0x2072628881a123e6b03c8e96a3299a214e0fd60c3040b790aeac6d6dbed04d747 hrs 22 mins ago0xeb99993b04377f39ea630ace76e13cff118c4ac5  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00096075
0x574533f91204b31daff9a0efd547101a15e015b670d13556ebacca6bb14e18317 hrs 28 mins ago0xeca77ac43cbb2e3e558ec487ad4557b75e0f1594  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000366
0xcbd6ac056cb06130276241ae2941c766ce339eb1b5a0315b88c6d06788c1c7a87 hrs 30 mins ago0xeb99993b04377f39ea630ace76e13cff118c4ac5  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00064575
0x7d70ced05f4aebb03445f005b219fdb1080076fdf4c4b9f8f4ef833743e14dba7 hrs 33 mins ago0xeb99993b04377f39ea630ace76e13cff118c4ac5  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00096075
0x2fa98f3ca49703682dea825c2dffa7a8c26f39d1add86729dbdd4fdadbff7a117 hrs 42 mins ago0xeb99993b04377f39ea630ace76e13cff118c4ac5  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00064575
0xb2f6a5eb92e559178cac3123d96afe01deaa23e2ba1d37df6b425a849b2b55d07 hrs 46 mins ago0xeb99993b04377f39ea630ace76e13cff118c4ac5  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00096075
0xff6c30851d7790e6f071519debb40b9b5b3bc1e6af5060b64bf54447bc8043b37 hrs 48 mins ago0xeb99993b04377f39ea630ace76e13cff118c4ac5  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00096075
0x3939c07506a807e6b3c74190b4f96b08b1082d6c29d3ef8628065e3536cc4db110 hrs 42 mins ago0x7648c24fb3b22abd79339241c33ed1172b49782c  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000246
0xee7c26a63a7009cec02533dcaf5098f21bf467810952f3deff28464687a981d711 hrs 48 mins ago0x047f606fd5b2baa5f5c6c4ab8958e45cb6b054b7  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000183
0x04e5312a5f0f4fbd20a23e62903709bc43629ee3ce9ee3e4c587ba9b28e9b06611 hrs 48 mins ago0x3251e03f4c2ce703432f3d78fff6bf489a5bf96f  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.000183
0x6bb3b817d808bd731c9ebba78e2bbecd2f0d248ff9756bf07fe045593445484311 hrs 54 mins ago0x074cce9d497fec7831891d0e42e0120afeb3fe10  IN   0x7d152fe26431e6585dbff9ef37e375e49b8627390 Ether0.00004575
[ 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
0x6ad17bf1d0c9f9e11961c27b11102b54db2dc7d3b57000536a3802efca342ee751130274 days 1 hr ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x074cce9d497fec7831891d0e42e0120afeb3fe100.627589683028868312 Ether
0x7ed26d38e8b7f6a618ee3b277b289c93d9d918dd74b4aa7db3e3f67fb7a777d051100484 days 12 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xed8efe0c11e7f13be0b9d2cd5a675095739664d64.234646388506572025 Ether
0x7ed26d38e8b7f6a618ee3b277b289c93d9d918dd74b4aa7db3e3f67fb7a777d051100484 days 12 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x047f606fd5b2baa5f5c6c4ab8958e45cb6b054b712.703939165519716076 Ether
0x2a3fa47051ecea1f0a66da3c4406935f9870469c55ded06758f95a3025cd6d4351095024 days 15 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xe19089602cf169fe1da167b00e58430ed61d32170.627589683028868312 Ether
0xceddd7ffa022b5a6f68f65b78e839c77aebccd98f04f4cc4778c312e85595fc151081964 days 20 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xbb151d5a034fbda38ee1c7320aee8dc6f258f8431.109788229665693456 Ether
0xd599a4c82c80746e877cd972d8250d9014bb2b6f822b7fd688edead8c984bbd351048985 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xa2381223639181689cd6c46d38a1a4884bb6d83c0.471947441637708971 Ether
0x8cb6d4b3cecfd160e77ea86b2b35d2d8ebc2bce378c12371380657488731981b51048755 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x7648c24fb3b22abd79339241c33ed1172b49782c0.471947441637708971 Ether
0x6895b7a3abf55b5b9bc097f7bce656378415331f48d712e718944f3cdea8f5e851048665 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.471947441637708971 Ether
0xce971737e93e42d12dcde87817f149010f15e0aa4829bef1558ddae92e99a7e651048635 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x96209ee926b91ac72254897b1a5788f740ef2cd10.471947441637708971 Ether
0xd9b919f3f0912996ce84a1bd9504ce9203b34873868310a8a598fde8c4254e2f51048605 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.471947441637708971 Ether
0xfa4f2948face9d1bc0904cbca4da5bda19a55fd6c412607a818236a037ddeb3951048585 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xd61a00797ac8170a44cdbe95eb37c745490cf29a0.354904476111557146 Ether
0xece47c3d550574b3c95ea63fd08e7424f7c93306943e2de4101fcb0bc5132c5a51048565 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xa2381223639181689cd6c46d38a1a4884bb6d83c0.054234265096133536 Ether
0xece47c3d550574b3c95ea63fd08e7424f7c93306943e2de4101fcb0bc5132c5a51048565 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x72b9d561d9eeff069d9b28a568c65945174f9e0b0.354904476111557146 Ether
0x2cf616a07972aa26e2dd4d3231117520c4bf541fc192d5baf01756680b22b05e51048545 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xb348925c8a2b6d6c99e3310bf7289e2cdb67283b0.266888166035890974 Ether
0x7b49f8601263a526d65cdaf0fd3db1d51223a0b7e5ad3c58b870add583e941f151048545 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x238361f646681118c3dc9df3197fd82d3324856e0.266888166035890974 Ether
0x6fe166c7083267967ff0076446db8e5222dd22659aa35104d2f4ff3686d797b851048505 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.200699900858990012 Ether
0xd41d5aedf466ce56212b95a86188f53e2bbbf25ae3b9bc734d957dbaca13d64a51048495 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x7648c24fb3b22abd79339241c33ed1172b49782c0.471947441637708971 Ether
0xecdbf4036615fffe9e454315c0162f39a4d921e24d0ecc579e9f4eefa9a0a28651048485 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.238077305828858857 Ether
0xecdbf4036615fffe9e454315c0162f39a4d921e24d0ecc579e9f4eefa9a0a28651048485 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.150926325445960489 Ether
0x41dc41fde90c40a94f8810ae95192fc732a5de728baa5f1e76a43bab08a0a33f51048485 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.27663413398330186 Ether
0x41dc41fde90c40a94f8810ae95192fc732a5de728baa5f1e76a43bab08a0a33f51048485 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x72b9d561d9eeff069d9b28a568c65945174f9e0b0.113496596735362288 Ether
0x4cc4d2e07819a73f34d582fe836f45bff6055b32f49f7a3541612b5a831d542c51048485 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x238361f646681118c3dc9df3197fd82d3324856e0.281847933848923899 Ether
0x4cc4d2e07819a73f34d582fe836f45bff6055b32f49f7a3541612b5a831d542c51048485 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x1561b611aabe08bc6678df2bc10756d14daa4e8d0.200699900858990012 Ether
0x9f5e721e33cdff40f77b2ba577cf4c91d8023a96d5f3de258fba34fe2a470fdc51048475 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.085349440744992441 Ether
0x02b250e7def4a319559b9fefe04fd7887c6f2f46aecd879e357acaf14613ca4951048455 days 9 hrs ago0x7d152fe26431e6585dbff9ef37e375e49b8627390x203b0a62e2ad8d4e73a1989140a4d4d5d0d28b190.627589683028868312 Ether
[ Download CSV Export  ] 
Contract Source Code Verified
Contract Name: CryptoAllStars
Compiler Version: 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 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.