Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 1644 txns
Token Tracker: CryptoCars (Cryptocar...)
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x29c980769fc993d181dd85b53f050f7559ee7455at txn 0xe1ee42c5593d1ec88e02442c5cfa9b31742e6e9e973a89a9d00303bb08fbbe0b
Token Balance:
 Latest 25 transactions from a total of 1644 transactions

TxHash Age From To Value [TxFee]
0x89c9d3e8b32e39d692f1feb29021d840a68687c467ce2032603cd7ff9e31f7d9152 days 4 hrs ago0x29c980769fc993d181dd85b53f050f7559ee7455  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0 Ether0.000346388
0xad20d36f6599d3bdc5a532bd530baec43b7d377dd3f58fa9927ebfb7cf7f50ad152 days 4 hrs ago0x29c980769fc993d181dd85b53f050f7559ee7455  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0 Ether0.000786925
0x2186336be5dcfc70944f59808448a014825bcda8f8ec0c6801a5ff3e3516dfa9228 days 23 hrs ago0x7ab993448237207de41ec89714f04e55c1af7cea  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.214 Ether0.0003568
0xc62820bb5387dcc649dd6889b4762769d30bb352e2b117237cf59b364b4bc591235 days 10 hrs ago0x930a20c1ae49018848ba066b016836d6a4912787  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.214 Ether0.00005636
0xc1d96ad95549f961da2da7084638195d0da6157a685215bbc5eb0aef14f23dc3236 days 3 hrs ago0x930a20c1ae49018848ba066b016836d6a4912787  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.460026067045627 Ether0.00069088
0xca7bd18e6cc2bfe96a605397d7c761a564594d43b0055c050ee28bc3032ca9cd239 days 15 hrs ago0xad565956ae5bd43117f6b0a650ec18c621ff8e0d  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.22 Ether0.00235488
0x1f3c35361e6283366ab32e25d10d86778e8afeedf6bcba85a81e4df39053944b239 days 15 hrs ago0x1b90c11dc80ad019c53af41ca3ffb178fbf41117  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.1 Ether0.00060452
0x14c2a4ebb330edfdacf4acdfd4d871f8ae948631879b110cb6443419b26d3a9c239 days 15 hrs ago0x26a3b0c7244f017a350508549b3e56b75fce6777  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.09 Ether0.000206262
0xf5dd2bdcc2c78432ee3f512793552d66fd947730e2ed8616ee86d7c37d1b370f239 days 15 hrs ago0x7f20310058bb81b68515c2e94a5d522763c2e15c  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.05 Ether0.00064224
0x7a1f4aa1157642543653bc65bafa1cee2d594d18c90a658f901109adeb535701239 days 15 hrs ago0x49f70c81a088df026cf87ba18db312eae9d4958c  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.05 Ether0.00085632
0xae6c57758cc1e34f5664b37c1f7162e2719f0dcb7983da1ea77ae335daa06634239 days 15 hrs ago0xb03beb926a762a925da368a74caede7f238fdf10  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.07 Ether0.00099904
0x962ef982aad5c92b6604b48e793934f77d693efb23f89fcbe344b5cbaaa265ae239 days 15 hrs ago0x29c980769fc993d181dd85b53f050f7559ee7455  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0 Ether0.000644178
0xd02311ed479ee0c91370491c75370fc17fdf255dd5a48ec7ce4a30cb79c3607d239 days 15 hrs ago0x29c980769fc993d181dd85b53f050f7559ee7455  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0 Ether0.000429452
0x5f18e99448e80225e0f58b0f8efc8c17feb2ce0bc171f4ab0f8746b9d7db5f2b239 days 18 hrs ago0x1eb695d7575eda1f2c8a0aa6edf871b5fc73ea6d  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.055 Ether0.000022918
0xedabfe569b4e81cd430894fddd74cdf3ec5b21d4fbf24497989403611a1f2abc239 days 18 hrs ago0xf0aa74e39fe0f3d26d6ca623978918250c2f9011  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.046298121170077 Ether0.00011459
0xac069b5dfbe9119f804eb8bba174d1409dc50ecaf8202b7a4bd1abb3db469821239 days 18 hrs ago0x3130259deedb3052e24fad9d5e1f490cb8cccaa0  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.214 Ether0.00185988
0x41d9afc600d2a23b7c232b00d24023f913ca6d38ca50c585d354999bcdcbbdea239 days 18 hrs ago0xa72b88b7b79bdcaaf5b666462fe917ae95564286  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.11 Ether0.002268882
0x3c4ea45716ee98baad44df398d35a7e6ea1a902d48d79b9b66ff63640f8abdc5239 days 18 hrs ago0xa153b17a8b23d99f49475d49e6c30e78462a8d2e  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.11 Ether0.000068754
0x504e36a1b876189708712ae7ed57a63f1033153809eb211f11700be545fadd81239 days 18 hrs ago0x26a3b0c7244f017a350508549b3e56b75fce6777  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.09 Ether0.000160426
0x3e333add14b758292bbb416d2014082878569982c36966d51119dd0a5b229fae239 days 18 hrs ago0xad565956ae5bd43117f6b0a650ec18c621ff8e0d  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.22 Ether0.00189992
0x84849b7020a3516da1125e28b871af951fde5b03ad18e13c349b60d5fa5e5433239 days 18 hrs ago0x7f20310058bb81b68515c2e94a5d522763c2e15c  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.07 Ether0.000206262
0x2fd2b3694011041690233ee96afc8d2d386cca7467635bd7c3d1d804def34528239 days 18 hrs ago0xf0aa74e39fe0f3d26d6ca623978918250c2f9011  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.01005 Ether0.00022918
0xd2c40f7c41972f6c886eb65b92dcc0eb16d1b51002cdec9aa17f773e9355427f239 days 18 hrs ago0x49f70c81a088df026cf87ba18db312eae9d4958c  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.02 Ether0.000252098
0x881ab91f95cda73995e97bb92f6adcb45c74cc8937ec1f36fc5d59ab47177b95239 days 18 hrs ago0x3130259deedb3052e24fad9d5e1f490cb8cccaa0  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.22 Ether0.00156992
0x874ee4aba68da0a655c6a55763b13f23ff81c19b771b09ab2c6ba5c8868ad871239 days 18 hrs ago0xb03beb926a762a925da368a74caede7f238fdf10  IN   0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0.03 Ether0.00085632
[ 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
0xad20d36f6599d3bdc5a532bd530baec43b7d377dd3f58fa9927ebfb7cf7f50ad5974059152 days 4 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x29c980769fc993d181dd85b53f050f7559ee74550.169083567518756278 Ether
0x2186336be5dcfc70944f59808448a014825bcda8f8ec0c6801a5ff3e3516dfa95532605228 days 23 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x7ab993448237207de41ec89714f04e55c1af7cea0.000111128823783265 Ether
0x2186336be5dcfc70944f59808448a014825bcda8f8ec0c6801a5ff3e3516dfa95532605228 days 23 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xeddad54e9e1f8dd01e815d84b255998a0a901bbf0.198916650193881563 Ether
0xc62820bb5387dcc649dd6889b4762769d30bb352e2b117237cf59b364b4bc5915495390235 days 10 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x930a20c1ae49018848ba066b016836d6a49127870.000111128823783265 Ether
0xc62820bb5387dcc649dd6889b4762769d30bb352e2b117237cf59b364b4bc5915495390235 days 10 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x7f20310058bb81b68515c2e94a5d522763c2e15c0.198916650193881563 Ether
0xc1d96ad95549f961da2da7084638195d0da6157a685215bbc5eb0aef14f23dc35491501236 days 3 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x930a20c1ae49018848ba066b016836d6a49127870.000050000000000013 Ether
0xc1d96ad95549f961da2da7084638195d0da6157a685215bbc5eb0aef14f23dc35491501236 days 3 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x3130259deedb3052e24fad9d5e1f490cb8cccaa00.427777742352433469 Ether
0xca7bd18e6cc2bfe96a605397d7c761a564594d43b0055c050ee28bc3032ca9cd5471070239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xad565956ae5bd43117f6b0a650ec18c621ff8e0d0.006111128823783265 Ether
0xca7bd18e6cc2bfe96a605397d7c761a564594d43b0055c050ee28bc3032ca9cd5471070239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x1b90c11dc80ad019c53af41ca3ffb178fbf411170.198916650193881563 Ether
0x1f3c35361e6283366ab32e25d10d86778e8afeedf6bcba85a81e4df39053944b5471067239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x1b90c11dc80ad019c53af41ca3ffb178fbf411170.000541674903059218 Ether
0x1f3c35361e6283366ab32e25d10d86778e8afeedf6bcba85a81e4df39053944b5471067239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x7f20310058bb81b68515c2e94a5d522763c2e15c0.092496242340154927 Ether
0xf5dd2bdcc2c78432ee3f512793552d66fd947730e2ed8616ee86d7c37d1b370f5471064239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x7f20310058bb81b68515c2e94a5d522763c2e15c0.003751878829922536 Ether
0xf5dd2bdcc2c78432ee3f512793552d66fd947730e2ed8616ee86d7c37d1b370f5471064239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x49f70c81a088df026cf87ba18db312eae9d4958c0.043010752688172041 Ether
0x7a1f4aa1157642543653bc65bafa1cee2d594d18c90a658f901109adeb5357015471064239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x49f70c81a088df026cf87ba18db312eae9d4958c0.028494623655913979 Ether
0x7a1f4aa1157642543653bc65bafa1cee2d594d18c90a658f901109adeb5357015471064239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xb03beb926a762a925da368a74caede7f238fdf100.019999999999999999 Ether
0xae6c57758cc1e34f5664b37c1f7162e2719f0dcb7983da1ea77ae335daa066345471064239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xb03beb926a762a925da368a74caede7f238fdf100.06 Ether
0xae6c57758cc1e34f5664b37c1f7162e2719f0dcb7983da1ea77ae335daa066345471064239 days 15 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x2a4270a7f105d8e7b8a075914aa4dc4d07aa20330.0093 Ether
0xac069b5dfbe9119f804eb8bba174d1409dc50ecaf8202b7a4bd1abb3db4698215470168239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x3130259deedb3052e24fad9d5e1f490cb8cccaa00.000111128823783265 Ether
0xac069b5dfbe9119f804eb8bba174d1409dc50ecaf8202b7a4bd1abb3db4698215470168239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xad565956ae5bd43117f6b0a650ec18c621ff8e0d0.198916650193881563 Ether
0x3e333add14b758292bbb416d2014082878569982c36966d51119dd0a5b229fae5470159239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xad565956ae5bd43117f6b0a650ec18c621ff8e0d0.120541674903059218 Ether
0x3e333add14b758292bbb416d2014082878569982c36966d51119dd0a5b229fae5470159239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x3130259deedb3052e24fad9d5e1f490cb8cccaa00.092496242340154927 Ether
0x881ab91f95cda73995e97bb92f6adcb45c74cc8937ec1f36fc5d59ab47177b955470158239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0x3130259deedb3052e24fad9d5e1f490cb8cccaa00.173751878829922536 Ether
0x881ab91f95cda73995e97bb92f6adcb45c74cc8937ec1f36fc5d59ab47177b955470158239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xb03beb926a762a925da368a74caede7f238fdf100.043010752688172041 Ether
0x874ee4aba68da0a655c6a55763b13f23ff81c19b771b09ab2c6ba5c8868ad8715470156239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xb03beb926a762a925da368a74caede7f238fdf100.008494623655913979 Ether
0x874ee4aba68da0a655c6a55763b13f23ff81c19b771b09ab2c6ba5c8868ad8715470156239 days 18 hrs ago0x8200341ffa058a4b2fa5bef16c8cca0330d529ed0xa153b17a8b23d99f49475d49e6c30e78462a8d2e0.019999999999999999 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: CryptocarToken
Compiler Text: v0.4.18+commit.9cf6e910
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);

  // Optional
  // function name() public view returns (string name);
  // function symbol() public view returns (string symbol);
  // function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
  // function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}


contract CryptocarToken is ERC721 {

  /*** EVENTS ***/

  /// @dev The Birth event is fired whenever a new car 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 = "CryptoCars"; // solhint-disable-line
  string public constant SYMBOL = "CryptocarToken"; // solhint-disable-line

  uint256 private startingPrice = 0.01 ether;
  uint256 private constant PROMO_CREATION_LIMIT = 5000;
  uint256 private firstStepLimit =  0.9999998 ether;
  uint256 private secondStepLimit = 0.9999999 ether;

  /*** STORAGE ***/

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

  // @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 CarIDs to an address that has been approved to call
  ///  transferFrom(). Each Car can only have one approved address for transfer
  ///  at any time. A zero value means no approval is outstanding.
  mapping (uint256 => address) public carIndexToApproved;

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

  // The addresses of the accounts (or contracts) that can execute actions within each roles.
  address public ceoAddress;
  address public cooAddress;

  uint256 public promoCreatedCount;

  /*** DATATYPES ***/
  struct Car {
    string name;
  }

  Car[] private cars;

  /*** ACCESS MODIFIERS ***/
  /// @dev Access modifier for CEO-only functionality
  modifier onlyCEO() {
    require(msg.sender == ceoAddress);
    _;
  }

  /// @dev Access modifier for COO-only functionality
  modifier onlyCOO() {
    require(msg.sender == cooAddress);
    _;
  }

  /// Access modifier for contract owner only functionality
  modifier onlyCLevel() {
    require(
      msg.sender == ceoAddress ||
      msg.sender == cooAddress
    );
    _;
  }

  /*** CONSTRUCTOR ***/
  function CryptocarToken() public {
    ceoAddress = msg.sender;
    cooAddress = 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));

    carIndexToApproved[_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 Car with the given name, with given _price and assignes it to an address.
  function createPromoCar(address _owner, string _name, uint256 _price) public onlyCOO {
    require(promoCreatedCount < PROMO_CREATION_LIMIT);

    address carOwner = _owner;
    if (carOwner == address(0)) {
      carOwner = cooAddress;
    }

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

    promoCreatedCount++;
    _createCar(_name, carOwner, _price);
  }

  /// @dev Creates a new Car with the given name.
  function createContractCar(string _name) public onlyCOO {
    _createCar(_name, address(this), startingPrice);
  }

  /// @notice Returns all the relevant information about a specific car.
  /// @param _tokenId The tokenId of the car of interest.
  function getCar(uint256 _tokenId) public view returns (
    string carName,
    uint256 sellingPrice,
    address owner
  ) {
    Car storage car = cars[_tokenId];
    carName = car.name;
    sellingPrice = carIndexToPrice[_tokenId];
    owner = carIndexToOwner[_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 = carIndexToOwner[_tokenId];
    require(owner != address(0));
    return owner;
  }

  function payout(address _to) public onlyCLevel {
    _payout(_to);
  }

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

    uint256 sellingPrice = carIndexToPrice[_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, 93), 100));
    uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice);

    // Update prices
    if (sellingPrice < firstStepLimit) {
      // first stage
      carIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 200), 93);
    } else if (sellingPrice < secondStepLimit) {
      // second stage
      carIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 118), 93);
    } else {
      // third stage
      carIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 118), 93);
    }

    _transfer(oldOwner, newOwner, _tokenId);

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

    TokenSold(_tokenId, sellingPrice, carIndexToPrice[_tokenId], oldOwner, newOwner, cars[_tokenId].name);

    msg.sender.transfer(purchaseExcess);
  }

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

  /// @dev Assigns a new address to act as the CEO. Only available to the current CEO.
  /// @param _newCEO The address of the new CEO
  function setCEO(address _newCEO) public onlyCEO {
    require(_newCEO != address(0));

    ceoAddress = _newCEO;
  }

  /// @dev Assigns a new address to act as the COO. Only available to the current COO.
  /// @param _newCOO The address of the new COO
  function setCOO(address _newCOO) public onlyCEO {
    require(_newCOO != address(0));

    cooAddress = _newCOO;
  }

  /// @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 = carIndexToOwner[_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);
  }

  /// @param _owner The owner whose supercar tokens we are interested in.
  /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly
  ///  expensive (it walks the entire Cars array looking for cars belonging to owner),
  ///  but it also returns a dynamic array, which is only supported for web3 calls, and
  ///  not contract-to-contract calls.
  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 totalCars = totalSupply();
      uint256 resultIndex = 0;

      uint256 carId;
      for (carId = 0; carId <= totalCars; carId++) {
        if (carIndexToOwner[carId] == _owner) {
          result[resultIndex] = carId;
          resultIndex++;
        }
      }
      return result;
    }
  }

  /// For querying totalSupply of token
  /// @dev Required for ERC-721 compliance.
  function totalSupply() public view returns (uint256 total) {
    return cars.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 carIndexToApproved[_tokenId] == _to;
  }

  /// For creating Car
  function _createCar(string _name, address _owner, uint256 _price) private {
    Car memory _car = Car({
      name: _name
    });
    uint256 newCarId = cars.push(_car) - 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(newCarId == uint256(uint32(newCarId)));

    Birth(newCarId, _name, _owner);

    carIndexToPrice[newCarId] = _price;

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

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

  /// For paying out balance on contract
  function _payout(address _to) private {
    if (_to == address(0)) {
      ceoAddress.transfer(this.balance);
    } else {
      _to.transfer(this.balance);
    }
  }

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

    // When creating new cars _from is 0x0, but we can't account that address.
    if (_from != address(0)) {
      ownershipTokenCount[_from]--;
      // clear any previously approved ownership exchange
      delete carIndexToApproved[_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":true,"inputs":[],"name":"ceoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"payout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"implementsERC721","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"total","type":"uint256"}],"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":"_newCEO","type":"address"}],"name":"setCEO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_name","type":"string"},{"name":"_price","type":"uint256"}],"name":"createPromoCar","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newCOO","type":"address"}],"name":"setCOO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"carIndexToApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getCar","outputs":[{"name":"carName","type":"string"},{"name":"sellingPrice","type":"uint256"},{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","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":false,"inputs":[{"name":"_name","type":"string"}],"name":"createContractCar","outputs":[],"payable":false,"stateMutability":"nonpayable","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":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cooAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"carIndexToOwner","outputs":[{"name":"","type":"address"}],"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":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"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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
6060604052662386f26fc10000600055670de0b68516763000600155670de0b69c5eed1800600255341561003257600080fd5b60078054600160a060020a033316600160a060020a031991821681179092556008805490911690911790556113c78061006c6000396000f3006060604052600436106101535763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305e45546811461015857806306fdde031461017d578063095ea7b3146102075780630a0f81681461022b5780630b7e9c441461025a5780631051db341461027957806318160ddd146102a057806323b872dd146102b357806327d7874c146102db5780632a2879d3146102fa5780632ba73c151461035b5780632ef604771461037a5780635e8be190146103905780636352211e1461043557806370a082311461044b5780638462151c1461046a578063900d33d9146104dc57806395d89b411461052d578063a3f4df7e14610540578063a9059cbb14610553578063b047fb5014610575578063b2e6ceeb14610588578063b5c5cd131461059e578063b9186d7d146105b4578063efef39a1146105ca578063f76f8d78146105d5575b600080fd5b341561016357600080fd5b61016b6105e8565b60405190815260200160405180910390f35b341561018857600080fd5b6101906105ee565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101cc5780820151838201526020016101b4565b50505050905090810190601f1680156101f95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561021257600080fd5b610229600160a060020a0360043516602435610630565b005b341561023657600080fd5b61023e6106bc565b604051600160a060020a03909116815260200160405180910390f35b341561026557600080fd5b610229600160a060020a03600435166106cb565b341561028457600080fd5b61028c61070d565b604051901515815260200160405180910390f35b34156102ab57600080fd5b61016b610712565b34156102be57600080fd5b610229600160a060020a0360043581169060243516604435610718565b34156102e657600080fd5b610229600160a060020a0360043516610766565b341561030557600080fd5b61022960048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965050933593506107c592505050565b341561036657600080fd5b610229600160a060020a036004351661083c565b341561038557600080fd5b61023e60043561089b565b341561039b57600080fd5b6103a66004356108b6565b60405160208101839052600160a060020a038216604082015260608082528190810185818151815260200191508051906020019080838360005b838110156103f85780820151838201526020016103e0565b50505050905090810190601f1680156104255780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b341561044057600080fd5b61023e6004356109ac565b341561045657600080fd5b61016b600160a060020a03600435166109d5565b341561047557600080fd5b610489600160a060020a03600435166109f0565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104c85780820151838201526020016104b0565b505050509050019250505060405180910390f35b34156104e757600080fd5b61022960046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610ad195505050505050565b341561053857600080fd5b610190610af9565b341561054b57600080fd5b610190610b3a565b341561055e57600080fd5b610229600160a060020a0360043516602435610b71565b341561058057600080fd5b61023e610ba9565b341561059357600080fd5b610229600435610bb8565b34156105a957600080fd5b61023e600435610c06565b34156105bf57600080fd5b61016b600435610c21565b610229600435610c33565b34156105e057600080fd5b610190610eb2565b60095481565b6105f661124d565b60408051908101604052600a81527f43727970746f4361727300000000000000000000000000000000000000000000602082015290505b90565b61063a3382610ee9565b151561064557600080fd5b60008181526005602052604090819020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038581169182179092559133909116907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259084905190815260200160405180910390a35050565b600754600160a060020a031681565b60075433600160a060020a03908116911614806106f6575060085433600160a060020a039081169116145b151561070157600080fd5b61070a81610f09565b50565b600190565b600a5490565b6107228382610ee9565b151561072d57600080fd5b6107378282610f94565b151561074257600080fd5b61074b82610fb4565b151561075657600080fd5b610761838383610fc2565b505050565b60075433600160a060020a0390811691161461078157600080fd5b600160a060020a038116151561079657600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60085460009033600160a060020a039081169116146107e357600080fd5b60095461138890106107f457600080fd5b5082600160a060020a03811615156108145750600854600160a060020a03165b600082116108225760005491505b6009805460010190556108368382846110b2565b50505050565b60075433600160a060020a0390811691161461085757600080fd5b600160a060020a038116151561086c57600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600560205260009081526040902054600160a060020a031681565b6108be61124d565b6000806000600a858154811015156108d257fe5b90600052602060002090019050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109775780601f1061094c57610100808354040283529160200191610977565b820191906000526020600020905b81548152906001019060200180831161095a57829003601f168201915b50505060009788525050600660209081526040808820546003909252909620549096600160a060020a03909116945092505050565b600081815260036020526040902054600160a060020a03168015156109d057600080fd5b919050565b600160a060020a031660009081526004602052604090205490565b6109f861124d565b6000610a0261124d565b6000806000610a10876109d5565b9450841515610a40576000604051805910610a285750595b90808252806020026020018201604052509550610ac7565b84604051805910610a4e5750595b90808252806020026020018201604052509350610a69610712565b925060009150600090505b828111610ac357600081815260036020526040902054600160a060020a0388811691161415610abb5780848381518110610aaa57fe5b602090810290910101526001909101905b600101610a74565b8395505b5050505050919050565b60085433600160a060020a03908116911614610aec57600080fd5b61070a81306000546110b2565b610b0161124d565b60408051908101604052600e81527f43727970746f636172546f6b656e0000000000000000000000000000000000006020820152905090565b60408051908101604052600a81527f43727970746f4361727300000000000000000000000000000000000000000000602082015281565b610b7b3382610ee9565b1515610b8657600080fd5b610b8f82610fb4565b1515610b9a57600080fd5b610ba5338383610fc2565b5050565b600854600160a060020a031681565b6000818152600360205260409020543390600160a060020a0316610bdb82610fb4565b1515610be657600080fd5b610bf08284610f94565b1515610bfb57600080fd5b610761818385610fc2565b600360205260009081526040902054600160a060020a031681565b60009081526006602052604090205490565b6000818152600360209081526040808320546006909252822054600160a060020a0391821692339281908416851415610c6b57600080fd5b610c7484610fb4565b1515610c7f57600080fd5b3483901015610c8d57600080fd5b610ca2610c9b84605d6111ee565b6064611224565b9150610cae348461123b565b9050600154831015610ce357610ccf610cc88460c86111ee565b605d611224565b600087815260066020526040902055610d19565b600254831015610cfb57610ccf610cc88460766111ee565b610d09610cc88460766111ee565b6000878152600660205260409020555b610d24858588610fc2565b30600160a060020a031685600160a060020a0316141515610d7057600160a060020a03851682156108fc0283604051600060405180830381858888f193505050501515610d7057600080fd5b7e8201e7bcbf010c2c07de59d6e97cb7e3cf67a46125c49cbc89b9d2cde1f48f8684600660008a8152602001908152602001600020548888600a8c815481101515610db757fe5b60009182526020909120016040518681526020810186905260408101859052600160a060020a0380851660608301528316608082015260c060a082018181528354600260001961010060018416150201909116049183018290529060e083019084908015610e665780601f10610e3b57610100808354040283529160200191610e66565b820191906000526020600020905b815481529060010190602001808311610e4957829003601f168201915b505097505050505050505060405180910390a1600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610eaa57600080fd5b505050505050565b60408051908101604052600e81527f43727970746f636172546f6b656e000000000000000000000000000000000000602082015281565b600090815260036020526040902054600160a060020a0390811691161490565b600160a060020a0381161515610f5757600754600160a060020a039081169030163180156108fc0290604051600060405180830381858888f193505050501515610f5257600080fd5b61070a565b80600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f19350505050151561070a57600080fd5b600090815260056020526040902054600160a060020a0391821691161490565b600160a060020a0316151590565b600160a060020a0380831660008181526004602090815260408083208054600101905585835260039091529020805473ffffffffffffffffffffffffffffffffffffffff1916909117905583161561105d57600160a060020a0383166000908152600460209081526040808320805460001901905583835260059091529020805473ffffffffffffffffffffffffffffffffffffffff191690555b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef838383604051600160a060020a039384168152919092166020820152604080820192909252606001905180910390a1505050565b6110ba61125f565b60006020604051908101604052858152600a80549193506001918083016110e18382611278565b6000928352602090922085910181518190805161110292916020019061129c565b50505003905063ffffffff8116811461111a57600080fd5b7fb3b0cf861f168bcdb275c69da97b2543631552ba562628aa3c7317d4a6089ef2818686604051838152600160a060020a038216604082015260606020820181815290820184818151815260200191508051906020019080838360005b8381101561118f578082015183820152602001611177565b50505050905090810190601f1680156111bc5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160008181526006602052604081208490556111e7908583610fc2565b5050505050565b600080831515611201576000915061121d565b5082820282848281151561121157fe5b041461121957fe5b8091505b5092915050565b600080828481151561123257fe5b04949350505050565b60008282111561124757fe5b50900390565b60206040519081016040526000815290565b60206040519081016040528061127361124d565b905290565b8154818355818115116107615760008381526020902061076191810190830161131a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106112dd57805160ff191683800117855561130a565b8280016001018555821561130a579182015b8281111561130a5782518255916020019190600101906112ef565b5061131692915061133d565b5090565b61062d91905b808211156113165760006113348282611357565b50600101611320565b61062d91905b808211156113165760008155600101611343565b50805460018160011615610100020316600290046000825580601f1061137d575061070a565b601f01602090049060005260206000209081019061070a919061133d5600a165627a7a723058207ad47508a52618167aedbff32a7cc2cb0b93f57f2de88e1e2774728e260648da0029

   Swarm Source:
bzzr://7ad47508a52618167aedbff32a7cc2cb0b93f57f2de88e1e2774728e260648da

 

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.