ETH Price: $3,201.53 (+2.05%)

Contract

0xe666Aa1C62b5294529E9027A21e3C6E70Da91DE7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create Kitties58545982018-06-26 0:22:542330 days ago1529972574IN
0xe666Aa1C...70Da91DE7
0 ETH0.007569861
Create Kitties58536342018-06-25 20:11:092330 days ago1529957469IN
0xe666Aa1C...70Da91DE7
0 ETH0.001098351
Birth Kitty58518662018-06-25 12:57:472330 days ago1529931467IN
0xe666Aa1C...70Da91DE7
0 ETH0.000131016
Create Kitties58515822018-06-25 11:47:332330 days ago1529927253IN
0xe666Aa1C...70Da91DE7
0 ETH0.003413374
Create Kitties58513212018-06-25 10:39:102330 days ago1529923150IN
0xe666Aa1C...70Da91DE7
0 ETH0.001588748
Create Kitties58511452018-06-25 9:56:432330 days ago1529920603IN
0xe666Aa1C...70Da91DE7
0 ETH0.0144478620
Create Kitties58510172018-06-25 9:22:552330 days ago1529918575IN
0xe666Aa1C...70Da91DE7
0 ETH0.0065908620
Create Kitties58508492018-06-25 8:37:482330 days ago1529915868IN
0xe666Aa1C...70Da91DE7
0 ETH0.0111524310
Create Kitties58508222018-06-25 8:30:532330 days ago1529915453IN
0xe666Aa1C...70Da91DE7
0 ETH0.1378760718.1875
Create Kitties58508072018-06-25 8:26:442330 days ago1529915204IN
0xe666Aa1C...70Da91DE7
0 ETH0.0054209110.75
Create Kitties58507912018-06-25 8:22:582330 days ago1529914978IN
0xe666Aa1C...70Da91DE7
0 ETH0.0014318919.75
Create Kitties58498972018-06-25 4:25:152330 days ago1529900715IN
0xe666Aa1C...70Da91DE7
0 ETH0.004519941
Birth Kitty58498792018-06-25 4:19:182330 days ago1529900358IN
0xe666Aa1C...70Da91DE7
0 ETH0.000021831
Set Action Contr...58496492018-06-25 3:18:462331 days ago1529896726IN
0xe666Aa1C...70Da91DE7
0 ETH0.000043931
Set Action Contr...58496332018-06-25 3:13:582331 days ago1529896438IN
0xe666Aa1C...70Da91DE7
0 ETH0.000043931
Create Kitties58495752018-06-25 2:59:092331 days ago1529895549IN
0xe666Aa1C...70Da91DE7
0 ETH0.001706682
Create Kitties58495662018-06-25 2:56:322331 days ago1529895392IN
0xe666Aa1C...70Da91DE7
0 ETH0.000198591
Create Kitties58348262018-06-22 15:04:312333 days ago1529679871IN
0xe666Aa1C...70Da91DE7
0 ETH0.000964722.8
Set Kitty Token ...58287862018-06-21 14:03:052334 days ago1529589785IN
0xe666Aa1C...70Da91DE7
0 ETH0.000172226
Set Kitty Contra...58287042018-06-21 13:43:372334 days ago1529588617IN
0xe666Aa1C...70Da91DE7
0 ETH0.000087272
Set Kitty Token ...58287022018-06-21 13:43:202334 days ago1529588600IN
0xe666Aa1C...70Da91DE7
0 ETH0.00008742
0x6060604058286872018-06-21 13:40:432334 days ago1529588443IN
 Create: CaptainKitty
0 ETH0.00177084

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CaptainKitty

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-06-21
*/

pragma solidity ^0.4.18;

/* ==================================================================== */
/* Copyright (c) 2018 The Priate Conquest Project.  All rights reserved.
/* 
/* https://www.pirateconquest.com One of the world's slg games of blockchain 
/*  
/* authors [email protected]/[email protected]
/*                 
/* ==================================================================== */

contract KittyInterface {
  function tokensOfOwner(address _owner) external view returns(uint256[] ownerTokens);
  function ownerOf(uint256 _tokenId) external view returns (address owner);
  function balanceOf(address _owner) public view returns (uint256 count);
}

interface KittyTokenInterface {
  function transferFrom(address _from, address _to, uint256 _tokenId) external;
  function setTokenPrice(uint256 _tokenId, uint256 _price) external;
  function CreateKittyToken(address _owner,uint256 _price, uint32 _kittyId) public;
}

contract CaptainKitty {
  address owner;
  //event 
  event CreateKitty(uint _count,address _owner);

  KittyInterface kittyContract;
  KittyTokenInterface kittyToken;
  /// @dev Trust contract
  mapping (address => bool) actionContracts;
  mapping (address => uint256) kittyToCount;
  mapping (address => bool) kittyGetOrNot;

  function CaptainKitty() public {
    owner = msg.sender;
  }  
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
  
  function setActionContract(address _actionAddr, bool _useful) public onlyOwner {
    actionContracts[_actionAddr] = _useful;
  }

  modifier onlyAccess() {
    require(actionContracts[msg.sender]);
    _;
  }

  function setKittyContractAddress(address _address) external onlyOwner {
    kittyContract = KittyInterface(_address);
  }

  function setKittyTokenAddress(address _address) external onlyOwner {
    kittyToken = KittyTokenInterface(_address);
  }

  function createKitties() external payable {
    uint256 kittycount = kittyContract.balanceOf(msg.sender);
    require(kittyGetOrNot[msg.sender] == false);
    if (kittycount>=99) {
      kittycount=99;
    }
    if (kittycount>0 && kittyToCount[msg.sender]==0) {
      kittyToCount[msg.sender] = kittycount;
      kittyGetOrNot[msg.sender] = true;
      for (uint i=0;i<kittycount;i++) {
        kittyToken.CreateKittyToken(msg.sender,0, 1);
      }
      //event
      CreateKitty(kittycount,msg.sender);
    }
  }

  function getKitties() external view returns(uint256 kittycnt,uint256 captaincnt,bool bGetOrNot) {
    kittycnt = kittyContract.balanceOf(msg.sender);
    captaincnt = kittyToCount[msg.sender];
    bGetOrNot = kittyGetOrNot[msg.sender];
  }

  function getKittyGetOrNot(address _addr) external view returns (bool) {
    return kittyGetOrNot[_addr];
  }

  function getKittyCount(address _addr) external view returns (uint256) {
    return kittyToCount[_addr];
  }

  function birthKitty() external onlyAccess payable {
  }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"getKittyGetOrNot","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"birthKitty","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"getKittyCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setKittyContractAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_actionAddr","type":"address"},{"name":"_useful","type":"bool"}],"name":"setActionContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"createKitties","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setKittyTokenAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getKitties","outputs":[{"name":"kittycnt","type":"uint256"},{"name":"captaincnt","type":"uint256"},{"name":"bGetOrNot","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_count","type":"uint256"},{"indexed":false,"name":"_owner","type":"address"}],"name":"CreateKitty","type":"event"}]

6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a03199091161790556105618061003b6000396000f3006060604052600436106100745763ffffffff60e060020a60003504166302fbe0d5811461007957806303bf8e70146100ac5780633dc60e52146100b65780635f4623f1146100e75780636fb642de146101065780637ef3bb631461012a578063cb67ce0414610132578063fb2dfa4514610151575b600080fd5b341561008457600080fd5b610098600160a060020a036004351661018a565b604051901515815260200160405180910390f35b6100b46101a8565b005b34156100c157600080fd5b6100d5600160a060020a03600435166101d1565b60405190815260200160405180910390f35b34156100f257600080fd5b6100b4600160a060020a03600435166101ec565b341561011157600080fd5b6100b4600160a060020a03600435166024351515610236565b6100b461027c565b341561013d57600080fd5b6100b4600160a060020a0360043516610449565b341561015c57600080fd5b610164610493565b604051928352602083019190915215156040808301919091526060909101905180910390f35b600160a060020a031660009081526005602052604090205460ff1690565b600160a060020a03331660009081526003602052604090205460ff1615156101cf57600080fd5b565b600160a060020a031660009081526004602052604090205490565b60005433600160a060020a0390811691161461020757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a0390811691161461025157600080fd5b600160a060020a03919091166000908152600360205260409020805460ff1916911515919091179055565b6001546000908190600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156102d157600080fd5b5af115156102de57600080fd5b5050506040518051600160a060020a03331660009081526005602052604090205490935060ff1615905061031157600080fd5b6063821061031e57606391505b6000821180156103445750600160a060020a033316600090815260046020526040902054155b156104455750600160a060020a033316600090815260046020908152604080832084905560059091528120805460ff191660011790555b8181101561040157600254600160a060020a031663ae5c1816336000600160405163ffffffff85811660e060020a028252600160a060020a0394909416600482015260248101929092529091166044820152606401600060405180830381600087803b15156103e957600080fd5b5af115156103f657600080fd5b50505060010161037b565b7f864010974a23db6786df104bb52e77e71ab4abfce20c45773d7bf2c14f8012a98233604051918252600160a060020a031660208201526040908101905180910390a15b5050565b60005433600160a060020a0390811691161461046457600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015460009081908190600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156104ea57600080fd5b5af115156104f757600080fd5b5050506040518051600160a060020a033316600090815260046020908152604080832054600590925290912054919690955060ff90911693509150505600a165627a7a7230582013bbb20ad933eca4b1a109a6155cfb1dcbc56866459177962ca39414454a3de50029

Deployed Bytecode

0x6060604052600436106100745763ffffffff60e060020a60003504166302fbe0d5811461007957806303bf8e70146100ac5780633dc60e52146100b65780635f4623f1146100e75780636fb642de146101065780637ef3bb631461012a578063cb67ce0414610132578063fb2dfa4514610151575b600080fd5b341561008457600080fd5b610098600160a060020a036004351661018a565b604051901515815260200160405180910390f35b6100b46101a8565b005b34156100c157600080fd5b6100d5600160a060020a03600435166101d1565b60405190815260200160405180910390f35b34156100f257600080fd5b6100b4600160a060020a03600435166101ec565b341561011157600080fd5b6100b4600160a060020a03600435166024351515610236565b6100b461027c565b341561013d57600080fd5b6100b4600160a060020a0360043516610449565b341561015c57600080fd5b610164610493565b604051928352602083019190915215156040808301919091526060909101905180910390f35b600160a060020a031660009081526005602052604090205460ff1690565b600160a060020a03331660009081526003602052604090205460ff1615156101cf57600080fd5b565b600160a060020a031660009081526004602052604090205490565b60005433600160a060020a0390811691161461020757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a0390811691161461025157600080fd5b600160a060020a03919091166000908152600360205260409020805460ff1916911515919091179055565b6001546000908190600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156102d157600080fd5b5af115156102de57600080fd5b5050506040518051600160a060020a03331660009081526005602052604090205490935060ff1615905061031157600080fd5b6063821061031e57606391505b6000821180156103445750600160a060020a033316600090815260046020526040902054155b156104455750600160a060020a033316600090815260046020908152604080832084905560059091528120805460ff191660011790555b8181101561040157600254600160a060020a031663ae5c1816336000600160405163ffffffff85811660e060020a028252600160a060020a0394909416600482015260248101929092529091166044820152606401600060405180830381600087803b15156103e957600080fd5b5af115156103f657600080fd5b50505060010161037b565b7f864010974a23db6786df104bb52e77e71ab4abfce20c45773d7bf2c14f8012a98233604051918252600160a060020a031660208201526040908101905180910390a15b5050565b60005433600160a060020a0390811691161461046457600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015460009081908190600160a060020a03166370a082313360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156104ea57600080fd5b5af115156104f757600080fd5b5050506040518051600160a060020a033316600090815260046020908152604080832054600590925290912054919690955060ff90911693509150505600a165627a7a7230582013bbb20ad933eca4b1a109a6155cfb1dcbc56866459177962ca39414454a3de50029

Swarm Source

bzzr://13bbb20ad933eca4b1a109a6155cfb1dcbc56866459177962ca39414454a3de5

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.