Contract 0x825c1d61a5b170808a31b895c26ee4f24B690d59 1

 

Contract Overview

Balance:
0.0051 Ether

EtherValue:
$6.27 (@ $1,228.94/ETH)

Token:
 
Txn Hash
Method
Block
From
To
Value
0x26710d11d219fc1eb101daaeb087b2b6ca867b7b2550b42cef3e963e0ac1ceaaBuy One Rabbit131350592021-08-31 18:57:33462 days 15 hrs ago0x4bafbd65c2af682f60ae092e690edb4cf9d20a65 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.0051 Ether0.01340136120
0x67faae8f7b06fe4344cbc8762318b282ae4bc53d8074867f49863fb3ebb756e5Cancel Auction68965432018-12-16 9:54:351452 days 40 mins ago0x72b13957a627d71d11a079cf461feb237d21b379 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000046112
0x638c2b56e0b223085675bf7f1609e766fda4c18ea0005462a07dc681307e994bCancel Auction62645992018-09-03 13:29:371555 days 21 hrs ago0x72b13957a627d71d11a079cf461feb237d21b379 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000046112
0x4fe9aee3fc42f5ff53e8c5c148f8d19890b011c7a44d91f766c0f8014ad3ee75Cancel Auction62530072018-09-01 14:48:061557 days 19 hrs ago0x72b13957a627d71d11a079cf461feb237d21b379 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000046112
0xcff34bada6f853309906b2ebfd00a4a5b8801f650884bcab21a2b24cbae08e65Get Free Rabbit57226302018-06-03 1:47:331648 days 8 hrs ago0x1b8e15229f052b42c1bdff4a7d131fa600447972 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000803565
0x47980f8605b019d18916679369110116490cd392ab43cf7df4a9968010a7ce24Cancel Auction56827872018-05-27 0:18:051655 days 10 hrs ago0x72b13957a627d71d11a079cf461feb237d21b379 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000046112
0xd5d2e580da2fa4c0ac43ef7a207d0e4a5df56bb16068b47d2c1baa773bba5b5dCancel Auction56260602018-05-16 23:10:331665 days 11 hrs ago0xfb75bb989efce7c93002f35b9e992873144e1fd0 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000236916
0x06f8ce089ad22aeebd9e23ae6fca36bdd51e4c20cf26d79a560c02d4bb453bcbGet Free Rabbit55887912018-05-10 10:29:291672 days 5 mins ago0xe9760b55bf072d1b637d522852bbc1221e514918 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000167236
0x155a772ca7ac9359393261cc1627c6cf54694de4fb3251f48348ea03013c4d5aGet Free Rabbit55887882018-05-10 10:28:451672 days 6 mins ago0xe9760b55bf072d1b637d522852bbc1221e514918 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000874276
0xdf1a257e05183aa90e077f6da59306d13bf242f023bfa24cdaf73c15f7d241e8Withdraw Balance55706422018-05-07 6:42:301675 days 3 hrs ago0xe9760b55bf072d1b637d522852bbc1221e514918 IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590 Ether0.000121354
0x2952094f2454e4f123ada7b41e307b92f2f38bcfc3032ec389df1acfeb9c0bddBuy Box255700942018-05-07 4:25:101675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x70585d4ef18c0dd59b8b17018123d7262ed2b39c3342b36547496b47861961afBuy Box255700902018-05-07 4:24:331675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x35e2510bc131952aab8ef1cad1b5b8f959e871d5b93bd740052b3d6065832ac6Buy Box255700902018-05-07 4:24:331675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0xc89547fd03e438367e979b7c0330488af786ff15c0b56854e5bbb3a714639dbcBuy Box255700812018-05-07 4:23:011675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x37861ea88655f9d573213f50ca0a331054bb7e6593c154fbb50ef69669a67538Buy Box255700632018-05-07 4:19:051675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x88ade458fd79fdce2cd559a5105667f934384545466ff39de072de42b7f4ed40Buy Box255700202018-05-07 4:07:381675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x367c1f09b116812462aebe24b0ba68dcce2c7ddca17df5bc3d676d0048e7462fBuy Box255699872018-05-07 3:59:201675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x553e4b4485473b888a0c5a532464d5f233c0a41c8f2df0d87035a41726044fc4Buy Box255699732018-05-07 3:56:581675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0xc100b3d78f931ba01d70476168ac94081e1e5a55a59f17dffcc13990885cd75aBuy Box255699652018-05-07 3:54:501675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x2534cf99aa106526a9d850b9de0fe960fe3a5cf32793f035da046053d8af96b8Buy Box255699482018-05-07 3:51:321675 days 6 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x21d23a000b972fd2009f80cbf51e7a2a443dc47d91754e6f5fe4eb829854c65aBuy Box255698602018-05-07 3:27:001675 days 7 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0xb1ebfe14472e3cf2125cfa321841aaa6d951fe2f3006129555f3cdde4c998049Buy Box255697872018-05-07 3:05:591675 days 7 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x373d7a7ca9c17a18ef29a355e35c2665ffbc4781dbc82bd611faa8b68e5d9f84Buy Box255697192018-05-07 2:52:121675 days 7 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x3898bee073ec9363c59c07123498d68b6c3bfdf0ace0a92ee6fe24c73cdd9e5bBuy Box255694132018-05-07 1:29:181675 days 9 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d590.1 Ether0.000120651
0x42fafe2215387e1e3c216c7b355706b09ff2a15401be5e5f12f9fa15cdcb587eBuy One Rabbit55693552018-05-07 1:15:221675 days 9 hrs ago0x836360cd3c5891533cd0e0f7e95e49d985c16dcc IN  0x825c1d61a5b170808a31b895c26ee4f24b690d592.072 Ether0.000252
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xdf1a257e05183aa90e077f6da59306d13bf242f023bfa24cdaf73c15f7d241e855706422018-05-07 6:42:301675 days 3 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491827.079 Ether
0xc532338f3a868295e2285c3b448e6b24cf1d2b33d06b0502db43532d97a8705855427362018-05-02 9:28:281680 days 1 hr ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.844 Ether
0x3403291a98272585889294137c4875da31f0d29c8a393a0f417c606d74f2878d55372622018-05-01 10:12:471681 days 22 mins ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.152 Ether
0xdd5ab7f016ec6d4800527bdb6346825819e5e6807180b8c1d0a7f74dd66b782655364652018-05-01 6:53:431681 days 3 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491824.644 Ether
0xf660c00372dd0299188a4e5e1b754125aaa8f1371d7bcb7eaf76692224c58d9d55350012018-05-01 0:36:531681 days 9 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.506 Ether
0x3a94ad3d26ef2b878733d7c42845c66b42322932003af74c2da7343ec4fded7355329112018-04-30 15:55:011681 days 18 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.168 Ether
0xf54dd3a0a7e90f4816b05b4878c904f4515c619107398556d6c81f61655ec64555324032018-04-30 13:42:581681 days 20 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.135 Ether
0x5b6ca6bced19dbc7da2b8299e2dea65d9daa160e7bb73b4205ae25d03629eb9655271312018-04-29 15:44:061682 days 18 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491824.492 Ether
0x99894330c929733e7591544c870d6d6aa32fb62cc5700aa146e2ccaa426cb12655250152018-04-29 6:52:151683 days 3 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491826.198 Ether
0x0807635f743bad69d17239f5808913898fe56511f46d9f5a2e97d57f0921838a55239482018-04-29 2:28:361683 days 8 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.806 Ether
0xc5d8807f095bb4c085ddcbc896f24fa485d4c352b5562e1f911f71740b4908e055235132018-04-29 0:51:071683 days 9 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491824.726 Ether
0x1c2ceb65a1cfab796615cc4209fbc871280c6df3be310fcd4ef2d3f40d6006b055209392018-04-28 14:02:301683 days 20 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491823.088 Ether
0x8cb9ce71626c59018fff3032f8e050f216561a527972b6c2315f893215cf381755187172018-04-28 4:40:481684 days 5 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491824.486 Ether
0x762b3fc76754f1e0a2fc4b44d32cbdb310e47243c26979f2734d7de0e839911e55179422018-04-28 1:22:541684 days 9 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.8 Ether
0x5b3cafd802d07314a55678ae36ca5e40f6bb07c03ce9ec5f03531ec397455db455142532018-04-27 10:11:441685 days 23 mins ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491825.35 Ether
0x7294211a24d7451448f7ec90ba736448beaba99217ee8c51a5f52dfb1ce2530455134292018-04-27 6:41:001685 days 3 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491824.9 Ether
0x21eb55bc7999a1e11929212f09761179b82aee11f593235eed8a8be8f5c48e5255124362018-04-27 2:24:351685 days 8 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491824.45 Ether
0xdc190122d6238437555ec97d4311da5518ab80cf9e017a43f8c90855da4bc83555070562018-04-26 4:16:041686 days 6 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491822.414 Ether
0xee93d59ca660e252a6d4f9bc1d96199f4835a2d5983b0954e29316026629959555025032018-04-25 9:29:251687 days 1 hr ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491822.022 Ether
0x0217ce89d52792be6b098836def50535e4a93139e6c2eee67883708091cb67a655008782018-04-25 2:46:051687 days 7 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491823.16 Ether
0x0b2497836aff62a5c6b25051193a38cc2e186058624ba374d36d3a545c4c8d6d54961722018-04-24 7:10:461688 days 3 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491822.71 Ether
0x1edc7d399bc5f25b387352a1cac4bbc7c5a753456d356ec101ec19855958960654951562018-04-24 2:51:511688 days 7 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491822.26 Ether
0x497c50047a53a67a09edce03ab1a5b8b97267e41da21100b7baf0e6b0766c31054903502018-04-23 6:50:331689 days 3 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491823.248 Ether
0x4c3fb9ddff7ba4b507800a8f064b3ad1fe3b10d685f43c17c79c4ca83c366a0754724582018-04-20 5:20:121692 days 5 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491823.576 Ether
0x5f931414c85c631bfe5740760f89a6272e4cc9f52e8c895f6b5b63ec9c2298d654668632018-04-19 6:02:411693 days 4 hrs ago 0x825c1d61a5b170808a31b895c26ee4f24b690d590xe9760b55bf072d1b637d522852bbc1221e51491823.526 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RabbitCore

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-04-10
*/

// CryptoRabbit Source code

pragma solidity ^0.4.20;


/**
 * 
 * @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
 * @author cuilichen
 */
contract ERC721 {
    // Required methods
    function totalSupply() public view returns (uint total);
    function balanceOf(address _owner) public view returns (uint balance);
    function ownerOf(uint _tokenId) external view returns (address owner);
    function approve(address _to, uint _tokenId) external;
    function transfer(address _to, uint _tokenId) external;
    function transferFrom(address _from, address _to, uint _tokenId) external;

    // Events
    event Transfer(address indexed from, address indexed to, uint tokenId);
    event Approval(address indexed owner, address indexed approved, uint tokenId);
    
}



/// @title A base contract to control ownership
/// @author cuilichen
contract OwnerBase {

    // The addresses of the accounts that can execute actions within each roles.
    address public ceoAddress;
    address public cfoAddress;
    address public cooAddress;

    // @dev Keeps track whether the contract is paused. When that is true, most actions are blocked
    bool public paused = false;
    
    /// constructor
    function OwnerBase() public {
       ceoAddress = msg.sender;
       cfoAddress = msg.sender;
       cooAddress = msg.sender;
    }

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

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

    /// @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) external onlyCEO {
        require(_newCEO != address(0));

        ceoAddress = _newCEO;
    }


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

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

        cooAddress = _newCOO;
    }

    /// @dev Modifier to allow actions only when the contract IS NOT paused
    modifier whenNotPaused() {
        require(!paused);
        _;
    }

    /// @dev Modifier to allow actions only when the contract IS paused
    modifier whenPaused {
        require(paused);
        _;
    }

    /// @dev Called by any "C-level" role to pause the contract. Used only when
    ///  a bug or exploit is detected and we need to limit damage.
    function pause() external onlyCOO whenNotPaused {
        paused = true;
    }

    /// @dev Unpauses the smart contract. Can only be called by the CEO, since
    ///  one reason we may pause the contract is when CFO or COO accounts are
    ///  compromised.
    /// @notice This is public rather than external so it can be called by
    ///  derived contracts.
    function unpause() public onlyCOO whenPaused {
        // can't unpause if contract was upgraded
        paused = false;
    }
	
	
	/// @dev check wether target address is a contract or not
    function isNotContract(address addr) internal view returns (bool) {
        uint size = 0;
        assembly { 
		    size := extcodesize(addr) 
		} 
        return size == 0;
    }
}




/**
 * 
 * @title Interface for contracts conforming to fighters camp
 * @author cuilichen
 */
contract FighterCamp {
    
    //
    function isCamp() public pure returns (bool);
    
    // Required methods
    function getFighter(uint _tokenId) external view returns (uint32);
    
}

/// @title Base contract for CryptoRabbit. Holds all common structs, events and base variables.
/// @author cuilichen
/// @dev See the RabbitCore contract documentation to understand how the various contract facets are arranged.
contract RabbitBase is ERC721, OwnerBase, FighterCamp {

    /*** EVENTS ***/
    /// @dev The Birth event is fired whenever a new rabbit comes into existence. 
    event Birth(address owner, uint rabbitId, uint32 star, uint32 explosive, uint32 endurance, uint32 nimble, uint64 genes, uint8 isBox);

    /*** DATA TYPES ***/
    struct RabbitData {
        //genes for rabbit
        uint64 genes;
        //
        uint32 star;
        //
        uint32 explosive;
        //
        uint32 endurance;
        //
        uint32 nimble;
        //birth time 
        uint64 birthTime;
    }

    /// @dev An array containing the Rabbit struct for all rabbits in existence. The ID
    ///  of each rabbit is actually an index into this array. 
    RabbitData[] rabbits;

    /// @dev A mapping from rabbit IDs to the address that owns them. 
    mapping (uint => address) rabbitToOwner;

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

    /// @dev A mapping from RabbitIDs to an address that has been approved to call
    ///  transfeFrom(). Each Rabbit can only have one approved address for transfer
    ///  at any time. A zero value means no approval is outstanding.
    mapping (uint => address) public rabbitToApproved;

	
	
    /// @dev Assigns ownership of a specific Rabbit to an address.
    function _transItem(address _from, address _to, uint _tokenId) internal {
        // Since the number of rabbits is capped to 2^32 we can't overflow this
        howManyDoYouHave[_to]++;
        // transfer ownership
        rabbitToOwner[_tokenId] = _to;
        // When creating new rabbits _from is 0x0, but we can't account that address.
        if (_from != address(0)) {
            howManyDoYouHave[_from]--;
        }
        // clear any previously approved ownership exchange
        delete rabbitToApproved[_tokenId];
        
        // Emit the transfer event.
		if (_tokenId > 0) {
			emit Transfer(_from, _to, _tokenId);
		}
    }

    /// @dev An internal method that creates a new rabbit and stores it. This
    ///  method doesn't do any checking and should only be called when the
    ///  input data is known to be valid. Will generate both a Birth event
    ///  and a Transfer event.
    function _createRabbit(
        uint _star,
        uint _explosive,
        uint _endurance,
        uint _nimble,
        uint _genes,
        address _owner,
		uint8 isBox
    )
        internal
        returns (uint)
    {
        require(_star >= 1 && _star <= 5);
		
		RabbitData memory _tmpRbt = RabbitData({
            genes: uint64(_genes),
            star: uint32(_star),
            explosive: uint32(_explosive),
            endurance: uint32(_endurance),
            nimble: uint32(_nimble),
            birthTime: uint64(now)
        });
        uint newRabbitID = rabbits.push(_tmpRbt) - 1;
        
        
        /* */

        // emit the birth event
        emit Birth(
            _owner,
            newRabbitID,
            _tmpRbt.star,
            _tmpRbt.explosive,
            _tmpRbt.endurance,
            _tmpRbt.nimble,
            _tmpRbt.genes,
			isBox
        );

        // This will assign ownership, and also emit the Transfer event as
        // per ERC721 draft
        if (_owner != address(0)){
            _transItem(0, _owner, newRabbitID);
        } else {
            _transItem(0, ceoAddress, newRabbitID);
        }
        
        
        return newRabbitID;
    }
    
    /// @notice Returns all the relevant information about a specific rabbit.
    /// @param _tokenId The ID of the rabbit of interest.
    function getRabbit(uint _tokenId) external view returns (
        uint32 outStar,
        uint32 outExplosive,
        uint32 outEndurance,
        uint32 outNimble,
        uint64 outGenes,
        uint64 outBirthTime
    ) {
        RabbitData storage rbt = rabbits[_tokenId];
        outStar = rbt.star;
        outExplosive = rbt.explosive;
        outEndurance = rbt.endurance;
        outNimble = rbt.nimble;
        outGenes = rbt.genes;
        outBirthTime = rbt.birthTime;
    }
	
	
    function isCamp() public pure returns (bool){
        return true;
    }
    
    
    /// @dev An external method that get infomation of the fighter
    /// @param _tokenId The ID of the fighter.
    function getFighter(uint _tokenId) external view returns (uint32) {
        RabbitData storage rbt = rabbits[_tokenId];
        uint32 strength = uint32(rbt.explosive + rbt.endurance + rbt.nimble); 
		return strength;
    }

}



/// @title The facet of the CryptoRabbit core contract that manages ownership, ERC-721 (draft) compliant.
/// @author cuilichen
/// @dev Ref: https://github.com/ethereum/EIPs/issues/721
///  See the RabbitCore contract documentation to understand how the various contract facets are arranged.
contract RabbitOwnership is RabbitBase {

    /// @notice Name and symbol of the non fungible token, as defined in ERC721.
    string public name;
    string public symbol;
    
    //identify this is ERC721
    function isERC721() public pure returns (bool) {
        return true;
    }

    // Internal utility functions: These functions all assume that their input arguments
    // are valid. We leave it to public methods to sanitize their inputs and follow
    // the required logic.

    /// @dev Checks if a given address is the current owner of a particular Rabbit.
    /// @param _owner the address we are validating against.
    /// @param _tokenId rabbit id, only valid when > 0
    function _owns(address _owner, uint _tokenId) internal view returns (bool) {
        return rabbitToOwner[_tokenId] == _owner;
    }

    /// @dev Checks if a given address currently has transferApproval for a particular Rabbit.
    /// @param _claimant the address we are confirming rabbit is approved for.
    /// @param _tokenId rabbit id, only valid when > 0
    function _approvedFor(address _claimant, uint _tokenId) internal view returns (bool) {
        return rabbitToApproved[_tokenId] == _claimant;
    }

    /// @dev Marks an address as being approved for transfeFrom(), overwriting any previous
    ///  approval. Setting _approved to address(0) clears all transfer approval.
    ///  NOTE: _approve() does NOT send the Approval event. This is intentional because
    ///  _approve() and transfeFrom() are used together for putting rabbits on auction, and
    ///  there is no value in spamming the log with Approval events in that case.
    function _approve(uint _tokenId, address _to) internal {
        rabbitToApproved[_tokenId] = _to;
    }

    /// @notice Returns the number of rabbits owned by a specific address.
    /// @param _owner The owner address to check.
    /// @dev Required for ERC-721 compliance
    function balanceOf(address _owner) public view returns (uint count) {
        return howManyDoYouHave[_owner];
    }

    /// @notice Transfers a Rabbit to another address. If transferring to a smart
    ///  contract be VERY CAREFUL to ensure that it is aware of ERC-721 (or
    ///  CryptoRabbit specifically) or your Rabbit may be lost forever. Seriously.
    /// @param _to The address of the recipient, can be a user or contract.
    /// @param _tokenId The ID of the Rabbit to transfer.
    /// @dev Required for ERC-721 compliance.
    function transfer(
        address _to,
        uint _tokenId
    )
        external
        whenNotPaused
    {
        // Safety check to prevent against an unexpected 0x0 default.
        require(_to != address(0));
		
		// Disallow transfers to this contract to prevent accidental misuse.
		require(_to != address(this));
        
        // You can only send your own rabbit.
        require(_owns(msg.sender, _tokenId));
        
        // Reassign ownership, clear pending approvals, emit Transfer event.
        _transItem(msg.sender, _to, _tokenId);
    }

    /// @notice Grant another address the right to transfer a specific Rabbit via
    ///  transfeFrom(). This is the preferred flow for transfering NFTs to contracts.
    /// @param _to The address to be granted transfer approval. Pass address(0) to
    ///  clear all approvals.
    /// @param _tokenId The ID of the Rabbit that can be transferred if this call succeeds.
    /// @dev Required for ERC-721 compliance.
    function approve(
        address _to,
        uint _tokenId
    )
        external
        whenNotPaused
    {   
        require(_owns(msg.sender, _tokenId));    // Only an owner can grant transfer approval.
        require(msg.sender != _to);     // can not approve to itself;

        // Register the approval (replacing any previous approval).
        _approve(_tokenId, _to);

        // Emit approval event.
        emit Approval(msg.sender, _to, _tokenId);
    }

    /// @notice Transfer a Rabbit owned by another address, for which the calling address
    ///  has previously been granted transfer approval by the owner.
    /// @param _from The address that owns the Rabbit to be transfered.
    /// @param _to The address that should take ownership of the Rabbit. Can be any address,
    ///  including the caller.
    /// @param _tokenId The ID of the Rabbit to be transferred.
    /// @dev Required for ERC-721 compliance.
    function transferFrom(
        address _from,
        address _to,
        uint _tokenId
    )
        external
        whenNotPaused
    {
        // Safety check to prevent against an unexpected 0x0 default.
        require(_to != address(0));
        
        //
        require(_owns(_from, _tokenId));
        
        // Check for approval and valid ownership
        require(_approvedFor(msg.sender, _tokenId));
        
        // Reassign ownership (also clears pending approvals and emits Transfer event).
        _transItem(_from, _to, _tokenId);
    }

    /// @notice Returns the total number of rabbits currently in existence.
    /// @dev Required for ERC-721 compliance.
    function totalSupply() public view returns (uint) {
        return rabbits.length - 1;
    }

    /// @notice Returns the address currently assigned ownership of a given Rabbit.
    /// @dev Required for ERC-721 compliance.
    function ownerOf(uint _tokenId)
        external
        view
        returns (address owner)
    {
        owner = rabbitToOwner[_tokenId];

        require(owner != address(0));
    }

    /// @notice Returns a list of all Rabbit IDs assigned to an address.
    /// @param _owner The owner whose rabbits we are interested in.
    /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly
    ///  expensive (it walks the entire Rabbit array looking for rabbits 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) external view returns(uint[] ownerTokens) {
        uint tokenCount = balanceOf(_owner);

        if (tokenCount == 0) {
            // Return an empty array
            return new uint[](0);
        } else {
            uint[] memory result = new uint[](tokenCount);
            uint totalCats = totalSupply();
            uint resultIndex = 0;

            // We count on the fact that all rabbits have IDs starting at 1 and increasing
            // sequentially up to the totalCat count.
            uint rabbitId;

            for (rabbitId = 1; rabbitId <= totalCats; rabbitId++) {
                if (rabbitToOwner[rabbitId] == _owner) {
                    result[resultIndex] = rabbitId;
                    resultIndex++;
                }
            }

            return result;
        }
    }

}

/// @title all functions related to creating rabbits and sell rabbits
contract RabbitMinting is RabbitOwnership {
    
    // Price (in wei) for star5 rabbit 
    uint public priceStar5Now = 1 ether;
    
    // Price (in wei) for star4 rabbit 
    uint public priceStar4 = 100 finney;
    
    // Price (in wei) for star3 rabbit 
    uint public priceStar3 = 5 finney;    
    
    
    uint private priceStar5Min = 1 ether;
    uint private priceStar5Add = 2 finney;
    
    //rabbit box1 
    uint public priceBox1 = 10 finney;
    uint public box1Star5 = 50;
    uint public box1Star4 = 500;
	
	//rabbit box2
	uint public priceBox2 = 100 finney;
    uint public box2Star5 = 500;
	
    
    
    // Limits the number of star5 rabbits can ever create.
    uint public constant LIMIT_STAR5 = 2000;
	
	// Limits the number of star4 rabbits can ever create.
    uint public constant LIMIT_STAR4 = 20000;
    
    // Limits the number of rabbits the contract owner can ever create.
    uint public constant LIMIT_PROMO = 5000;
    
    // Counts the number of rabbits of star 5
    uint public CREATED_STAR5;
	
	// Counts the number of rabbits of star 4
    uint public CREATED_STAR4;
    
    // Counts the number of rabbits the contract owner has created.
    uint public CREATED_PROMO;
    
    //an secret key used for random
    uint private secretKey = 392828872;
    
    //box is on sale
    bool private box1OnSale = true;
	
	//box is on sale
    bool private box2OnSale = true;
	
	//record any task id for updating datas;
	mapping(uint => uint8) usedSignId;
   
    
    /// @dev set base infomation by coo
    function setBaseInfo(uint val, bool _onSale1, bool _onSale2) external onlyCOO {
        secretKey = val;
		box1OnSale = _onSale1;
        box2OnSale = _onSale2;
    }
    
    /// @dev we can create promo rabbits, up to a limit. Only callable by COO
    function createPromoRabbit(uint _star, address _owner) whenNotPaused external onlyCOO {
        require (_owner != address(0));
        require(CREATED_PROMO < LIMIT_PROMO);
       
        if (_star == 5){
            require(CREATED_STAR5 < LIMIT_STAR5);
        } else if (_star == 4){
            require(CREATED_STAR4 < LIMIT_STAR4);
        }
        CREATED_PROMO++;
        
        _createRabbitInGrade(_star, _owner, 0);
    }
    
    
    
    /// @dev create a rabbit with grade, and set its owner.
    function _createRabbitInGrade(uint _star, address _owner, uint8 isBox) internal {
        uint _genes = uint(keccak256(uint(_owner) + secretKey + rabbits.length));
        uint _explosive = 50;
        uint _endurance = 50;
        uint _nimble = 50;
        
        if (_star < 5) {
            uint tmp = _genes; 
            tmp = uint(keccak256(tmp));
            _explosive =  1 + 10 * (_star - 1) + tmp % 10;
            tmp = uint(keccak256(tmp));
            _endurance = 1 + 10 * (_star - 1) + tmp % 10;
            tmp = uint(keccak256(tmp));
            _nimble = 1 + 10 * (_star - 1) + tmp % 10;
        } 
		
		uint64 _geneShort = uint64(_genes);
		if (_star == 5){
			CREATED_STAR5++;
			priceStar5Now = priceStar5Min + priceStar5Add * CREATED_STAR5;
			_geneShort = uint64(_geneShort - _geneShort % 2000 + CREATED_STAR5);
		} else if (_star == 4){
			CREATED_STAR4++;
		} 
		
        _createRabbit(
            _star, 
            _explosive, 
            _endurance, 
            _nimble, 
            _geneShort, 
            _owner,
			isBox);
    }
    
    
        
    /// @notice customer buy a rabbit
    /// @param _star the star of the rabbit to buy
    function buyOneRabbit(uint _star) external payable whenNotPaused returns (bool) {
		require(isNotContract(msg.sender));
		
        uint tmpPrice = 0;
        if (_star == 5){
            tmpPrice = priceStar5Now;
			require(CREATED_STAR5 < LIMIT_STAR5);
        } else if (_star == 4){
            tmpPrice = priceStar4;
			require(CREATED_STAR4 < LIMIT_STAR4);
        } else if (_star == 3){
            tmpPrice = priceStar3;
        } else {
			revert();
		}
        
        require(msg.value >= tmpPrice);
        _createRabbitInGrade(_star, msg.sender, 0);
        
        // Return the funds. 
        uint fundsExcess = msg.value - tmpPrice;
        if (fundsExcess > 1 finney) {
            msg.sender.transfer(fundsExcess);
        }
        return true;
    }
    
    
        
    /// @notice customer buy a box
    function buyBox1() external payable whenNotPaused returns (bool) {
		require(isNotContract(msg.sender));
        require(box1OnSale);
        require(msg.value >= priceBox1);
		
        uint tempVal = uint(keccak256(uint(msg.sender) + secretKey + rabbits.length));
        tempVal = tempVal % 10000;
        uint _star = 3; //default
        if (tempVal <= box1Star5){
            _star = 5;
			require(CREATED_STAR5 < LIMIT_STAR5);
        } else if (tempVal <= box1Star5 + box1Star4){
            _star = 4;
			require(CREATED_STAR4 < LIMIT_STAR4);
        } 
        
        _createRabbitInGrade(_star, msg.sender, 2);
        
        // Return the funds. 
        uint fundsExcess = msg.value - priceBox1;
        if (fundsExcess > 1 finney) {
            msg.sender.transfer(fundsExcess);
        }
        return true;
    }
	
	    
    /// @notice customer buy a box
    function buyBox2() external payable whenNotPaused returns (bool) {
		require(isNotContract(msg.sender));
        require(box2OnSale);
        require(msg.value >= priceBox2);
		
        uint tempVal = uint(keccak256(uint(msg.sender) + secretKey + rabbits.length));
        tempVal = tempVal % 10000;
        uint _star = 4; //default
        if (tempVal <= box2Star5){
            _star = 5;
			require(CREATED_STAR5 < LIMIT_STAR5);
        } else {
			require(CREATED_STAR4 < LIMIT_STAR4);
		}
        
        _createRabbitInGrade(_star, msg.sender, 3);
        
        // Return the funds. 
        uint fundsExcess = msg.value - priceBox2;
        if (fundsExcess > 1 finney) {
            msg.sender.transfer(fundsExcess);
        }
        return true;
    }
	
}





/// @title all functions related to creating rabbits and sell rabbits
contract RabbitAuction is RabbitMinting {
    
    //events about auctions
    event AuctionCreated(uint tokenId, uint startingPrice, uint endingPrice, uint duration, uint startTime, uint32 explosive, uint32 endurance, uint32 nimble, uint32 star);
    event AuctionSuccessful(uint tokenId, uint totalPrice, address winner);
    event AuctionCancelled(uint tokenId);
	event UpdateComplete(address account, uint tokenId);
    
    // Represents an auction on an NFT
    struct Auction {
        // Current owner of NFT
        address seller;
        // Price (in wei) at beginning of auction
        uint128 startingPrice;
        // Price (in wei) at end of auction
        uint128 endingPrice;
        // Duration (in seconds) of auction
        uint64 duration;
        // Time when auction started
        uint64 startedAt;
    }

    // Cut owner takes on each auction, measured in basis points (1/100 of a percent).
    // Values 0-10,000 map to 0%-100%
    uint public masterCut = 200;

    // Map from token ID to their corresponding auction.
    mapping (uint => Auction) tokenIdToAuction;
    
    
    /// @dev Creates and begins a new auction.
    /// @param _tokenId - ID of token to auction, sender must be owner.
    /// @param _startingPrice - Price of item (in wei) at beginning of auction.
    /// @param _endingPrice - Price of item (in wei) at end of auction.
    /// @param _duration - Length of time to move between starting
    ///  price and ending price (in seconds).
    function createAuction(
        uint _tokenId,
        uint _startingPrice,
        uint _endingPrice,
        uint _duration
    )
        external whenNotPaused
    {
		require(isNotContract(msg.sender));
        require(_endingPrice >= 1 finney);
        require(_startingPrice >= _endingPrice);
        require(_duration <= 100 days); 
        require(_owns(msg.sender, _tokenId));
        
		//assigning the ownship to this contract,
        _transItem(msg.sender, this, _tokenId);
        
        Auction memory auction = Auction(
            msg.sender,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenId, auction);
    }
    
    
    /// @dev Returns auction info for an NFT on auction.
    /// @param _tokenId - ID of NFT on auction.
    function getAuctionData(uint _tokenId) external view returns (
        address seller,
        uint startingPrice,
        uint endingPrice,
        uint duration,
        uint startedAt,
        uint currentPrice
    ) {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(auction.startedAt > 0);
        seller = auction.seller;
        startingPrice = auction.startingPrice;
        endingPrice = auction.endingPrice;
        duration = auction.duration;
        startedAt = auction.startedAt;
        currentPrice = _calcCurrentPrice(auction);
    }

    /// @dev Bids on an open auction, completing the auction and transferring
    ///  ownership of the NFT if enough Ether is supplied.
    /// @param _tokenId - ID of token to bid on.
    function bid(uint _tokenId) external payable whenNotPaused {
		require(isNotContract(msg.sender));
		
        // Get a reference to the auction struct
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(auction.startedAt > 0);

        // Check that the bid is greater than or equal to the current price
        uint price = _calcCurrentPrice(auction);
        require(msg.value >= price);

        // Grab a reference to the seller before the auction struct gets deleted.
        address seller = auction.seller;
		
		//
		require(_owns(this, _tokenId));

        // The bid is good! Remove the auction before sending the fees
        // to the sender so we can't have a reentrancy endurance.
        delete tokenIdToAuction[_tokenId];

        if (price > 0) {
            // Calculate the auctioneer's cut.
            uint auctioneerCut = price * masterCut / 10000;
            uint sellerProceeds = price - auctioneerCut;
			require(sellerProceeds <= price);

            // Doing a transfer() after removing the auction
            seller.transfer(sellerProceeds);
        }

        // Calculate any excess funds included with the bid. 
        uint bidExcess = msg.value - price;

        // Return the funds. 
		if (bidExcess >= 1 finney) {
			msg.sender.transfer(bidExcess);
		}

        // Tell the world!
        emit AuctionSuccessful(_tokenId, price, msg.sender);
        
        //give goods to bidder.
        _transItem(this, msg.sender, _tokenId);
    }

    /// @dev Cancels an auction that hasn't been won yet.
    ///  Returns the NFT to original owner.
    /// @notice This is a state-modifying function that can
    ///  be called while the contract is paused.
    /// @param _tokenId - ID of token on auction
    function cancelAuction(uint _tokenId) external whenNotPaused {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(auction.startedAt > 0);
        address seller = auction.seller;
        require(msg.sender == seller);
        _cancelAuction(_tokenId);
    }

    /// @dev Cancels an auction when the contract is paused.
    ///  Only the owner may do this, and NFTs are returned to
    ///  the seller. This should only be used in emergencies.
    /// @param _tokenId - ID of the NFT on auction to cancel.
    function cancelAuctionByMaster(uint _tokenId)
        external onlyCOO whenPaused
    {
        _cancelAuction(_tokenId);
    }
	
    
    /// @dev Adds an auction to the list of open auctions. Also fires an event.
    /// @param _tokenId The ID of the token to be put on auction.
    /// @param _auction Auction to add.
    function _addAuction(uint _tokenId, Auction _auction) internal {
        // Require that all auctions have a duration of
        // at least one minute. (Keeps our math from getting hairy!)
        require(_auction.duration >= 1 minutes);

        tokenIdToAuction[_tokenId] = _auction;
        
        RabbitData storage rdata = rabbits[_tokenId];

        emit AuctionCreated(
            uint(_tokenId),
            uint(_auction.startingPrice),
            uint(_auction.endingPrice),
            uint(_auction.duration),
            uint(_auction.startedAt),
            uint32(rdata.explosive),
            uint32(rdata.endurance),
            uint32(rdata.nimble),
            uint32(rdata.star)
        );
    }

    /// @dev Cancels an auction unconditionally.
    function _cancelAuction(uint _tokenId) internal {
	    Auction storage auction = tokenIdToAuction[_tokenId];
		_transItem(this, auction.seller, _tokenId);
        delete tokenIdToAuction[_tokenId];
        emit AuctionCancelled(_tokenId);
    }

    /// @dev Returns current price of an NFT on auction. 
    function _calcCurrentPrice(Auction storage _auction)
        internal
        view
        returns (uint outPrice)
    {
        int256 duration = _auction.duration;
        int256 price0 = _auction.startingPrice;
        int256 price2 = _auction.endingPrice;
        require(duration > 0);
        
        int256 secondsPassed = int256(now) - int256(_auction.startedAt);
        require(secondsPassed >= 0);
        if (secondsPassed < _auction.duration) {
            int256 priceChanged = (price2 - price0) * secondsPassed / duration;
            int256 currentPrice = price0 + priceChanged;
            outPrice = uint(currentPrice);
        } else {
            outPrice = _auction.endingPrice;
        }
    }
    
	
	
	
	/// @dev tranfer token to the target, in case of some error occured.
    ///  Only the coo may do this.
	/// @param _to The target address.
	/// @param _to The id of the token.
	function transferOnError(address _to, uint _tokenId) external onlyCOO {
		require(_owns(this, _tokenId));		
		Auction storage auction = tokenIdToAuction[_tokenId];
		require(auction.startedAt == 0);
		
		_transItem(this, _to, _tokenId);
	}
	
	
	/// @dev allow the user to draw a rabbit, with a signed message from coo
	function getFreeRabbit(uint32 _star, uint _taskId, uint8 v, bytes32 r, bytes32 s) external {
		require(usedSignId[_taskId] == 0);
		uint[2] memory arr = [_star, _taskId];
		string memory text = uint2ToStr(arr);
		address signer = verify(text, v, r, s);
		require(signer == cooAddress);
		
		_createRabbitInGrade(_star, msg.sender, 4);
		usedSignId[_taskId] = 1;
	}
	
	
	/// @dev allow any user to set rabbit data, with a signed message from coo
	function setRabbitData(
		uint _tokenId, 
		uint32 _explosive, 
		uint32 _endurance, 
		uint32 _nimble,
		uint _taskId,
		uint8 v, 
		bytes32 r, 
		bytes32 s
	) external {
		require(usedSignId[_taskId] == 0);
		
		Auction storage auction = tokenIdToAuction[_tokenId];
		require (auction.startedAt == 0);
		
		uint[5] memory arr = [_tokenId, _explosive, _endurance, _nimble, _taskId];
		string memory text = uint5ToStr(arr);
		address signer = verify(text, v, r, s);
		require(signer == cooAddress);
		
		RabbitData storage rdata = rabbits[_tokenId];
		rdata.explosive = _explosive;
		rdata.endurance = _endurance;
		rdata.nimble = _nimble;
		rabbits[_tokenId] = rdata;		
		
		usedSignId[_taskId] = 1;
		emit UpdateComplete(msg.sender, _tokenId);
	}
	
	/// @dev werify wether the message is form coo or not.
	function verify(string text, uint8 v, bytes32 r, bytes32 s) public pure returns (address) {		
		bytes32 hash = keccak256(text);
		bytes memory prefix = "\x19Ethereum Signed Message:\n32";
		bytes32 prefixedHash = keccak256(prefix, hash);
		address tmp = ecrecover(prefixedHash, v, r, s);
		return tmp;
	}
    
	/// @dev create an string according to the array
    function uint2ToStr(uint[2] arr) internal pure returns (string){
    	uint length = 0;
    	uint i = 0;
    	uint val = 0;
    	for(; i < arr.length; i++){
    		val = arr[i];
    		while(val >= 10) {
    			length += 1;
    			val = val / 10;
    		}
    		length += 1;//for single 
    		length += 1;//for comma
    	}
    	length -= 1;//remove last comma
    	
    	//copy char to bytes
    	bytes memory bstr = new bytes(length);
        uint k = length - 1;
        int j = int(arr.length - 1);
    	while (j >= 0) {
    		val = arr[uint(j)];
    		if (val == 0) {
    			bstr[k] = byte(48);
    			if (k > 0) {
    			    k--;
    			}
    		} else {
    		    while (val != 0){
    				bstr[k] = byte(48 + val % 10);
    				val /= 10;
    				if (k > 0) {
        			    k--;
        			}
    			}
    		}
    		
    		if (j > 0) { //add comma
				assert(k > 0);
    			bstr[k] = byte(44);
    			k--;
    		}
    		
    		j--;
    	}
    	
        return string(bstr);
    }
	
	/// @dev create an string according to the array
    function uint5ToStr(uint[5] arr) internal pure returns (string){
    	uint length = 0;
    	uint i = 0;
    	uint val = 0;
    	for(; i < arr.length; i++){
    		val = arr[i];
    		while(val >= 10) {
    			length += 1;
    			val = val / 10;
    		}
    		length += 1;//for single 
    		length += 1;//for comma
    	}
    	length -= 1;//remove last comma
    	
    	//copy char to bytes
    	bytes memory bstr = new bytes(length);
        uint k = length - 1;
        int j = int(arr.length - 1);
    	while (j >= 0) {
    		val = arr[uint(j)];
    		if (val == 0) {
    			bstr[k] = byte(48);
    			if (k > 0) {
    			    k--;
    			}
    		} else {
    		    while (val != 0){
    				bstr[k] = byte(48 + val % 10);
    				val /= 10;
    				if (k > 0) {
        			    k--;
        			}
    			}
    		}
    		
    		if (j > 0) { //add comma
				assert(k > 0);
    			bstr[k] = byte(44);
    			k--;
    		}
    		
    		j--;
    	}
    	
        return string(bstr);
    }

}


/// @title CryptoRabbit: Collectible, oh-so-adorable rabbits on the Ethereum blockchain.
/// @author cuilichen
/// @dev The main CryptoRabbit contract, keeps track of rabbits so they don't wander around and get lost.
/// This is the main CryptoRabbit contract. In order to keep our code seperated into logical sections.
contract RabbitCore is RabbitAuction {
    
    event ContractUpgrade(address newContract);

    // Set in case the core contract is broken and an upgrade is required
    address public newContractAddress;

    /// @notice Creates the main CryptoRabbit smart contract instance.
    function RabbitCore(string _name, string _symbol) public {
        name = _name;
        symbol = _symbol;
        
        // the creator of the contract is the initial CEO
        ceoAddress = msg.sender;
        cooAddress = msg.sender;
        cfoAddress = msg.sender;
        
        //first rabbit in this world
        _createRabbit(5, 50, 50, 50, 1, msg.sender, 0);
    }
    

    /// @dev Used to mark the smart contract as upgraded.
    /// @param _v2Address new address
    function upgradeContract(address _v2Address) external onlyCOO whenPaused {
        // See README.md for updgrade plan
        newContractAddress = _v2Address;
        emit ContractUpgrade(_v2Address);
    }


    /// @dev Override unpause so it requires all external contract addresses
    ///  to be set before contract can be unpaused. Also, we can't have
    ///  newContractAddress set either, because then the contract was upgraded.
    /// @notice This is public rather than external so we can call super.unpause
    ///  without using an expensive CALL.
    function unpause() public onlyCOO {
        require(newContractAddress == address(0));
        
        // Actually unpause the contract.
        super.unpause();
    }

    // @dev Allows the CEO to capture the balance available to the contract.
    function withdrawBalance() external onlyCFO {
        address tmp = address(this);
        cfoAddress.transfer(tmp.balance);
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"cfoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","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":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ceoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","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":"_newCOO","type":"address"}],"name":"setCOO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"priceBox1","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CREATED_STAR4","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_explosive","type":"uint32"},{"name":"_endurance","type":"uint32"},{"name":"_nimble","type":"uint32"},{"name":"_taskId","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"setRabbitData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_startingPrice","type":"uint256"},{"name":"_endingPrice","type":"uint256"},{"name":"_duration","type":"uint256"}],"name":"createAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getAuctionData","outputs":[{"name":"seller","type":"address"},{"name":"startingPrice","type":"uint256"},{"name":"endingPrice","type":"uint256"},{"name":"duration","type":"uint256"},{"name":"startedAt","type":"uint256"},{"name":"currentPrice","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"bid","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"rabbitToApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buyBox1","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_newCFO","type":"address"}],"name":"setCFO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"priceStar5Now","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"text","type":"string"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"verify","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"pure","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":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferOnError","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"priceStar4","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newContractAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LIMIT_STAR4","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"count","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"masterCut","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"cancelAuctionByMaster","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"priceBox2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"_tokenId","type":"uint256"}],"name":"getFighter","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceStar3","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buyBox2","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"box2Star5","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"cancelAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"LIMIT_STAR5","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cooAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"box1Star4","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CREATED_PROMO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_star","type":"uint256"},{"name":"_owner","type":"address"}],"name":"createPromoRabbit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isERC721","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_star","type":"uint32"},{"name":"_taskId","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"getFreeRabbit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CREATED_STAR5","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_star","type":"uint256"}],"name":"buyOneRabbit","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getRabbit","outputs":[{"name":"outStar","type":"uint32"},{"name":"outExplosive","type":"uint32"},{"name":"outEndurance","type":"uint32"},{"name":"outNimble","type":"uint32"},{"name":"outGenes","type":"uint64"},{"name":"outBirthTime","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"box1Star5","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_v2Address","type":"address"}],"name":"upgradeContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isCamp","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"LIMIT_PROMO","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"val","type":"uint256"},{"name":"_onSale1","type":"bool"},{"name":"_onSale2","type":"bool"}],"name":"setBaseInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newContract","type":"address"}],"name":"ContractUpgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"startingPrice","type":"uint256"},{"indexed":false,"name":"endingPrice","type":"uint256"},{"indexed":false,"name":"duration","type":"uint256"},{"indexed":false,"name":"startTime","type":"uint256"},{"indexed":false,"name":"explosive","type":"uint32"},{"indexed":false,"name":"endurance","type":"uint32"},{"indexed":false,"name":"nimble","type":"uint32"},{"indexed":false,"name":"star","type":"uint32"}],"name":"AuctionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"totalPrice","type":"uint256"},{"indexed":false,"name":"winner","type":"address"}],"name":"AuctionSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"AuctionCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"UpdateComplete","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"rabbitId","type":"uint256"},{"indexed":false,"name":"star","type":"uint32"},{"indexed":false,"name":"explosive","type":"uint32"},{"indexed":false,"name":"endurance","type":"uint32"},{"indexed":false,"name":"nimble","type":"uint32"},{"indexed":false,"name":"genes","type":"uint64"},{"indexed":false,"name":"isBox","type":"uint8"}],"name":"Birth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"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"}]

60606040526002805460a060020a60ff0219169055670de0b6b3a7640000600981905567016345785d8a0000600a8190556611c37937e08000600b55600c9190915566071afd498d0000600d55662386f26fc10000600e556032600f556101f4601081905560119190915560125563176a17c86016556017805461ff001960ff199091166001171661010017905560c860195534156200009e57600080fd5b604051620033c5380380620033c58339810160405280805182019190602001805160008054600160a060020a033316600160a060020a0319918216811790925560018054821683179055600280549091169091179055909101905060078280516200010e9291602001906200053e565b506008818051620001249291602001906200053e565b5060008054600160a060020a0333908116600160a060020a03199283168117845560028054841682179055600180549093161782556200017e926005926032928392839291906401000000006200298e6200018782021704565b5050506200063a565b600062000193620005c3565b600060018a10158015620001a8575060058a11155b1515620001b457600080fd5b60c060405190810160405280876001604060020a031681526020018b63ffffffff1681526020018a63ffffffff1681526020018963ffffffff1681526020018863ffffffff168152602001426001604060020a03168152509150600160038054806001018281620002269190620005f8565b600092835260209092208591018151815467ffffffffffffffff19166001604060020a03919091161781556020820151815463ffffffff919091166801000000000000000002604060020a63ffffffff02199091161781556040820151815463ffffffff919091166c0100000000000000000000000002606060020a63ffffffff02199091161781556060820151815463ffffffff9190911670010000000000000000000000000000000002608060020a63ffffffff02199091161781556080820151815463ffffffff91909116740100000000000000000000000000000000000000000260a060020a63ffffffff021990911617815560a082015181546001604060020a0391909116780100000000000000000000000000000000000000000000000002600160c060020a03909116179055500390507f46bfa9096d6dec9fcdb3fa7c8330fffa6c2c1756db78fb10403fb08af45163778582602085015185604001518660600151876080015188518b604051600160a060020a039098168852602088019690965263ffffffff9485166040808901919091529385166060880152918416608087015290921660a08501526001604060020a0390911660c084015260ff90911660e0830152610100909101905180910390a1600160a060020a0385161562000431576200042b6000868364010000000062001fae6200046682021704565b62000459565b60008054620004599190600160a060020a03168364010000000062001fae6200046682021704565b9998505050505050505050565b600160a060020a03808316600081815260056020908152604080832080546001019055858352600490915290208054600160a060020a0319169091179055831615620004cd57600160a060020a038316600090815260056020526040902080546000190190555b60008181526006602052604081208054600160a060020a0319169055811115620005395781600160a060020a031683600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a35b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200058157805160ff1916838001178555620005b1565b82800160010185558215620005b1579182015b82811115620005b157825182559160200191906001019062000594565b50620005bf9291506200061a565b5090565b60c06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a082015290565b8154818355818115116200053957600083815260209020620005399181019083015b6200063791905b80821115620005bf576000815560010162000621565b90565b612d7b806200064a6000396000f3006060604052600436106102925763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630519ce79811461029757806306fdde03146102c6578063095ea7b3146103505780630a0f81681461037457806318160ddd1461038757806323b872dd146103ac57806327d7874c146103d45780632ba73c15146103f35780632d1ced821461041257806332373e251461042557806339b3fba8146104385780633f4ba83a14610472578063431f21da1461048557806344f27e30146104a4578063454a2ab31461050557806346035a7c146105105780634aa8e57e146105265780634e0a3379146105425780634ea7d483146105615780635c975abb146105745780635fd8c71014610587578063609f8fe21461059a5780636352211e146105fb578063658fbfbc146106115780636882d481146106335780636af04a57146106465780636bbae8231461065957806370a082311461066c5780637258b9011461068b57806375d91db81461069e5780637e4929c4146106b45780638456cb59146106c75780638462151c146106da578063889fa1dc1461074c5780638d5d1e971461077b578063935b2b1f1461078e57806395d89b4114610796578063964b97de146107a957806396b5a755146107bc578063a9059cbb146107d2578063a9725a68146107f4578063b047fb5014610807578063b3d737431461081a578063b4c16ea51461082d578063c89f51ef14610840578063d2afa8c114610862578063d8cb52d314610875578063de576c8a146108a0578063e6b1602f146108b3578063e6ed6c74146108be578063ea14bc1114610921578063eb2c022314610934578063f338269414610862578063f7618a4014610953578063ffd479bb14610966575b600080fd5b34156102a257600080fd5b6102aa610986565b604051600160a060020a03909116815260200160405180910390f35b34156102d157600080fd5b6102d9610995565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156103155780820151838201526020016102fd565b50505050905090810190601f1680156103425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561035b57600080fd5b610372600160a060020a0360043516602435610a33565b005b341561037f57600080fd5b6102aa610ad5565b341561039257600080fd5b61039a610ae4565b60405190815260200160405180910390f35b34156103b757600080fd5b610372600160a060020a0360043581169060243516604435610aef565b34156103df57600080fd5b610372600160a060020a0360043516610b55565b34156103fe57600080fd5b610372600160a060020a0360043516610ba7565b341561041d57600080fd5b61039a610bf9565b341561043057600080fd5b61039a610bff565b341561044357600080fd5b61037260043563ffffffff6024358116906044358116906064351660843560ff60a4351660c43560e435610c05565b341561047d57600080fd5b610372610f0e565b341561049057600080fd5b610372600435602435604435606435610f49565b34156104af57600080fd5b6104ba600435611037565b6040518087600160a060020a0316600160a060020a03168152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6103726004356110db565b341561051b57600080fd5b6102aa6004356112c0565b61052e6112db565b604051901515815260200160405180910390f35b341561054d57600080fd5b610372600160a060020a0360043516611400565b341561056c57600080fd5b61039a611452565b341561057f57600080fd5b61052e611458565b341561059257600080fd5b610372611468565b34156105a557600080fd5b6102aa60046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496505060ff85351694602081013594506040013592506114c5915050565b341561060657600080fd5b6102aa60043561163b565b341561061c57600080fd5b610372600160a060020a0360043516602435611664565b341561063e57600080fd5b61039a6116d6565b341561065157600080fd5b6102aa6116dc565b341561066457600080fd5b61039a6116eb565b341561067757600080fd5b61039a600160a060020a03600435166116f1565b341561069657600080fd5b61039a61170c565b34156106a957600080fd5b610372600435611712565b34156106bf57600080fd5b61039a61174e565b34156106d257600080fd5b610372611754565b34156106e557600080fd5b6106f9600160a060020a03600435166117ac565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610738578082015183820152602001610720565b505050509050019250505060405180910390f35b341561075757600080fd5b61076260043561188d565b60405163ffffffff909116815260200160405180910390f35b341561078657600080fd5b61039a6118e1565b61052e6118e7565b34156107a157600080fd5b6102d96119f6565b34156107b457600080fd5b61039a611a61565b34156107c757600080fd5b610372600435611a67565b34156107dd57600080fd5b610372600160a060020a0360043516602435611ade565b34156107ff57600080fd5b61039a611b4f565b341561081257600080fd5b6102aa611b55565b341561082557600080fd5b61039a611b64565b341561083857600080fd5b61039a611b6a565b341561084b57600080fd5b610372600435600160a060020a0360243516611b70565b341561086d57600080fd5b61052e611c16565b341561088057600080fd5b61037263ffffffff6004351660243560ff60443516606435608435611c1b565b34156108ab57600080fd5b61039a611ccb565b61052e600435611cd1565b34156108c957600080fd5b6108d4600435611dc4565b60405163ffffffff9687168152948616602086015292851660408086019190915291909416606084015267ffffffffffffffff9384166080840152921660a082015260c001905180910390f35b341561092c57600080fd5b61039a611e5f565b341561093f57600080fd5b610372600160a060020a0360043516611e65565b341561095e57600080fd5b61039a611ef3565b341561097157600080fd5b61037260043560243515156044351515611ef9565b600154600160a060020a031681565b60078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a2b5780601f10610a0057610100808354040283529160200191610a2b565b820191906000526020600020905b815481529060010190602001808311610a0e57829003601f168201915b505050505081565b60025460a060020a900460ff1615610a4a57600080fd5b610a543382611f40565b1515610a5f57600080fd5b81600160a060020a031633600160a060020a031614151515610a8057600080fd5b610a8a8183611f60565b81600160a060020a031633600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405190815260200160405180910390a35050565b600054600160a060020a031681565b600354600019015b90565b60025460a060020a900460ff1615610b0657600080fd5b600160a060020a0382161515610b1b57600080fd5b610b258382611f40565b1515610b3057600080fd5b610b3a3382611f8e565b1515610b4557600080fd5b610b50838383611fae565b505050565b60005433600160a060020a03908116911614610b7057600080fd5b600160a060020a0381161515610b8557600080fd5b60008054600160a060020a031916600160a060020a0392909216919091179055565b60005433600160a060020a03908116911614610bc257600080fd5b600160a060020a0381161515610bd757600080fd5b60028054600160a060020a031916600160a060020a0392909216919091179055565b600e5481565b60145481565b6000610c0f612c5d565b610c17612c84565b600087815260186020526040812054819060ff1615610c3557600080fd5b60008d8152601a60205260409020600281015490955068010000000000000000900467ffffffffffffffff1615610c6b57600080fd5b60a0604051908101604052808e81526020018d63ffffffff1681526020018c63ffffffff1681526020018b63ffffffff1681526020018a8152509350610cb084612083565b9250610cbe838989896114c5565b600254909250600160a060020a03808416911614610cdb57600080fd5b600380548e908110610ce957fe5b906000526020600020900190508b81600001600c6101000a81548163ffffffff021916908363ffffffff1602179055508a8160000160106101000a81548163ffffffff021916908363ffffffff160217905550898160000160146101000a81548163ffffffff021916908363ffffffff1602179055508060038e815481101515610d6f57fe5b6000918252602080832084549201805467ffffffffffffffff191667ffffffffffffffff93841617808255855463ffffffff680100000000000000009182900481169091026bffffffff0000000000000000199092169190911780835586546c01000000000000000000000000908190048316026fffffffff00000000000000000000000019909116178083558654608060020a9081900483160273ffffffff000000000000000000000000000000001990911617808355865460a060020a9081900490921690910277ffffffff00000000000000000000000000000000000000001990911617808255945478010000000000000000000000000000000000000000000000009081900490931690920277ffffffffffffffffffffffffffffffffffffffffffffffff9094169390931790558a81526018909152604090819020805460ff191660011790557fb5bb3154eb112fa6abee50be0b8f5d38d8e945b619866c6176768c0af5e92e1a9033908f9051600160a060020a03909216825260208201526040908101905180910390a150505050505050505050505050565b60025433600160a060020a03908116911614610f2957600080fd5b601b54600160a060020a031615610f3f57600080fd5b610f4761228b565b565b610f51612c96565b60025460a060020a900460ff1615610f6857600080fd5b610f71336122de565b1515610f7c57600080fd5b66038d7ea4c68000831015610f9057600080fd5b82841015610f9d57600080fd5b6283d600821115610fad57600080fd5b610fb73386611f40565b1515610fc257600080fd5b610fcd333087611fae565b60a06040519081016040528033600160a060020a03168152602001856001608060020a03168152602001846001608060020a031681526020018367ffffffffffffffff1681526020014267ffffffffffffffff16815250905061103085826122e3565b5050505050565b6000818152601a602052604081206002810154829182918291829182919068010000000000000000900467ffffffffffffffff1682901161107757600080fd5b805460018201546002830154600160a060020a0390921698506001608060020a038082169850608060020a90910416955067ffffffffffffffff8082169550680100000000000000009091041692506110cf81612500565b91505091939550919395565b600080600080600080600260149054906101000a900460ff1615151561110057600080fd5b611109336122de565b151561111457600080fd5b6000878152601a60205260408120600281015490975068010000000000000000900467ffffffffffffffff161161114a57600080fd5b61115386612500565b9450348590101561116357600080fd5b8554600160a060020a0316935061117a3088611f40565b151561118557600080fd5b6000878152601a602052604081208054600160a060020a03191681556001810182905560020180546fffffffffffffffffffffffffffffffff19169055851115611218576019546127109086020492508285039150848211156111e757600080fd5b600160a060020a03841682156108fc0283604051600060405180830381858888f19350505050151561121857600080fd5b503484900366038d7ea4c68000811061125c57600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561125c57600080fd5b7f4fcc30d90a842164dd58501ab874a101a3749c3d4747139cefe7c876f4ccebd28786336040519283526020830191909152600160a060020a03166040808301919091526060909101905180910390a16112b7303389611fae565b50505050505050565b600660205260009081526040902054600160a060020a031681565b60025460009081908190819060a060020a900460ff16156112fb57600080fd5b611304336122de565b151561130f57600080fd5b60175460ff16151561132057600080fd5b600e5434101561132f57600080fd5b600354601654600160a060020a0333160101604051908152602001604051908190039020600f54612710909106935060039250831161138257601354600592506107d0901061137d57600080fd5b6113a4565b601054600f540183116113a45760145460049250614e2090106113a457600080fd5b6113b0823360026125bf565b50600e54340366038d7ea4c680008111156113f657600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156113f657600080fd5b6001935050505090565b60005433600160a060020a0390811691161461141b57600080fd5b600160a060020a038116151561143057600080fd5b60018054600160a060020a031916600160a060020a0392909216919091179055565b60095481565b60025460a060020a900460ff1681565b60015460009033600160a060020a0390811691161461148657600080fd5b506001543090600160a060020a039081169082163180156108fc0290604051600060405180830381858888f1935050505015156114c257600080fd5b50565b6000806114d0612c84565b600080886040518082805190602001908083835b602083106115035780518252601f1990920191602091820191016114e4565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902093506040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250925082846040518083805190602001908083835b6020831061159a5780518252601f19909201916020918201910161157b565b6001836020036101000a03801982511681845116179092525050509190910192835250506020019050604051809103902091506001828989896040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af1151561162557600080fd5b5050602060405103519998505050505050505050565b600081815260046020526040902054600160a060020a031680151561165f57600080fd5b919050565b60025460009033600160a060020a0390811691161461168257600080fd5b61168c3083611f40565b151561169757600080fd5b506000818152601a60205260409020600281015468010000000000000000900467ffffffffffffffff16156116cb57600080fd5b610b50308484611fae565b600a5481565b601b54600160a060020a031681565b614e2081565b600160a060020a031660009081526005602052604090205490565b60195481565b60025433600160a060020a0390811691161461172d57600080fd5b60025460a060020a900460ff16151561174557600080fd5b6114c2816126f8565b60115481565b60025433600160a060020a0390811691161461176f57600080fd5b60025460a060020a900460ff161561178657600080fd5b6002805474ff0000000000000000000000000000000000000000191660a060020a179055565b6117b4612c84565b60006117be612c84565b60008060006117cc876116f1565b94508415156117fc5760006040518059106117e45750595b90808252806020026020018201604052509550611883565b8460405180591061180a5750595b90808252806020026020018201604052509350611825610ae4565b925060009150600190505b82811161187f57600081815260046020526040902054600160a060020a0388811691161415611877578084838151811061186657fe5b602090810290910101526001909101905b600101611830565b8395505b5050505050919050565b60008060006003848154811015156118a157fe5b6000918252602090912001546c01000000000000000000000000810463ffffffff908116608060020a830482160160a060020a9092041601949350505050565b600b5481565b60025460009081908190819060a060020a900460ff161561190757600080fd5b611910336122de565b151561191b57600080fd5b601754610100900460ff16151561193157600080fd5b60115434101561194057600080fd5b600354601654600160a060020a0333160101604051908152602001604051908190039020601254612710909106935060049250831161199357601354600592506107d0901061198e57600080fd5b6119a4565b601454614e2090106119a457600080fd5b6119b0823360036125bf565b50601154340366038d7ea4c680008111156113f657600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156113f657600080fd5b60088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a2b5780601f10610a0057610100808354040283529160200191610a2b565b60125481565b600254600090819060a060020a900460ff1615611a8357600080fd5b6000838152601a60205260408120600281015490935068010000000000000000900467ffffffffffffffff1611611ab957600080fd5b508054600160a060020a039081169033168114611ad557600080fd5b610b50836126f8565b60025460a060020a900460ff1615611af557600080fd5b600160a060020a0382161515611b0a57600080fd5b30600160a060020a031682600160a060020a031614151515611b2b57600080fd5b611b353382611f40565b1515611b4057600080fd5b611b4b338383611fae565b5050565b6107d081565b600254600160a060020a031681565b60105481565b60155481565b60025460a060020a900460ff1615611b8757600080fd5b60025433600160a060020a03908116911614611ba257600080fd5b600160a060020a0381161515611bb757600080fd5b6015546113889010611bc857600080fd5b8160051415611be7576013546107d09010611be257600080fd5b611c01565b8160041415611c0157601454614e209010611c0157600080fd5b601580546001019055611b4b828260006125bf565b600190565b611c23612cc4565b611c2b612c84565b60008681526018602052604081205460ff1615611c4757600080fd5b6040805190810160405263ffffffff89168152602081018890529250611c6c83612795565b9150611c7a828787876114c5565b600254909150600160a060020a03808316911614611c9757600080fd5b611ca98863ffffffff163360046125bf565b5050506000938452505060186020525060409020805460ff1916600117905550565b60135481565b6002546000908190819060a060020a900460ff1615611cef57600080fd5b611cf8336122de565b1515611d0357600080fd5b600091508360051415611d2c5760095491506107d0601354101515611d2757600080fd5b611d5b565b8360041415611d4c57600a549150614e20601454101515611d2757600080fd5b836003141561029257600b5491505b3482901015611d6957600080fd5b611d75843360006125bf565b813403905066038d7ea4c68000811115611dba57600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515611dba57600080fd5b5060019392505050565b6000806000806000806000600388815481101515611dde57fe5b60009182526020909120015463ffffffff68010000000000000000820481169a6c01000000000000000000000000830482169a50608060020a83048216995060a060020a8304909116975067ffffffffffffffff80831697507801000000000000000000000000000000000000000000000000909204909116945092505050565b600f5481565b60025433600160a060020a03908116911614611e8057600080fd5b60025460a060020a900460ff161515611e9857600080fd5b601b8054600160a060020a031916600160a060020a0383161790557f450db8da6efbe9c22f2347f7c2021231df1fc58d3ae9a2fa75d39fa44619930581604051600160a060020a03909116815260200160405180910390a150565b61138881565b60025433600160a060020a03908116911614611f1457600080fd5b6016929092556017805460ff19169115159190911761ff00191661010092151592909202919091179055565b600090815260046020526040902054600160a060020a0391821691161490565b6000918252600660205260409091208054600160a060020a031916600160a060020a03909216919091179055565b600090815260066020526040902054600160a060020a0391821691161490565b600160a060020a03808316600081815260056020908152604080832080546001019055858352600490915290208054600160a060020a031916909117905583161561201457600160a060020a038316600090815260056020526040902080546000190190555b60008181526006602052604081208054600160a060020a0319169055811115610b505781600160a060020a031683600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a3505050565b61208b612c84565b6000806000612098612c84565b6000806000955060009450600093505b60058510156120f1578785600581106120bd57fe5b602002015193505b600a84106120df5760019590950194600a840493506120c5565b600290950194600194909401936120a8565b600186039550856040518059106121055750595b818152601f19601f830116810160200160405290509250506000198501905060045b6000811261227c5787816005811061213b57fe5b602002015193508315156121a4577f300000000000000000000000000000000000000000000000000000000000000083838151811061217657fe5b906020010190600160f860020a031916908160001a905350600082111561219f57600019909101905b612213565b831561221357600a84066030017f0100000000000000000000000000000000000000000000000000000000000000028383815181106121df57fe5b906020010190600160f860020a031916908160001a905350600a84049350600082111561220e57600019909101905b6121a4565b6000811315612273576000821161222657fe5b7f2c0000000000000000000000000000000000000000000000000000000000000083838151811061225357fe5b906020010190600160f860020a031916908160001a905350600019909101905b60001901612127565b8296505b505050505050919050565b60025433600160a060020a039081169116146122a657600080fd5b60025460a060020a900460ff1615156122be57600080fd5b6002805474ff000000000000000000000000000000000000000019169055565b3b1590565b6000603c826060015167ffffffffffffffff16101561230157600080fd5b6000838152601a60205260409020829081518154600160a060020a031916600160a060020a039190911617815560208201516001820180546fffffffffffffffffffffffffffffffff19166001608060020a039290921691909117905560408201516001820180546001608060020a03928316608060020a029216919091179055606082015160028201805467ffffffffffffffff191667ffffffffffffffff9290921691909117905560808201516002909101805467ffffffffffffffff9290921668010000000000000000026fffffffffffffffff0000000000000000199092169190911790555060038054849081106123f957fe5b906000526020600020900190507fee89fc0bbb2d46e5bd60bb7c52361bc0b69d3e91c54981635b9c58d1dc96af928383602001516001608060020a031684604001516001608060020a0316856060015167ffffffffffffffff168660800151865467ffffffffffffffff919091169063ffffffff6c010000000000000000000000008204811691608060020a810482169160a060020a82048116916801000000000000000090041660405198895260208901979097526040808901969096526060880194909452608087019290925263ffffffff90811660a087015290811660c086015290811660e0850152909116610100830152610120909101905180910390a1505050565b6002810154600182015460009167ffffffffffffffff16906001608060020a0380821691608060020a90041683808080861361253b57600080fd5b600288015468010000000000000000900467ffffffffffffffff1642039250600083121561256857600080fd5b600288015467ffffffffffffffff1683121561259d5785838686030281151561258d57fe5b0591508185019050809650612280565b5050505060019390930154608060020a90046001608060020a03169392505050565b60008060008060008060038054905060165489600160a060020a03160101604051908152602001604051908190039020955060329450849350839250600589101561267a57859150816040519081526020016040519081900390209150600a820660018a03600a02600101019450816040519081526020016040519081900390209150600a820660018a03600a02600101019350816040519081526020016040519081900390209150600a820660018a03600a026001010192505b508460058914156126c0576013805460010190819055600d54600c54908202016009556107d067ffffffffffffffff831606820367ffffffffffffffff160190506126d3565b88600414156126d3576014805460010190555b6126ec898686868567ffffffffffffffff168d8d61298e565b50505050505050505050565b6000818152601a60205260409020805461271d903090600160a060020a031684611fae565b6000828152601a60205260408082208054600160a060020a03191681556001810192909255600290910180546fffffffffffffffffffffffffffffffff191690557f2809c7e17bf978fbc7194c0a694b638c4215e9140cacc6c38ca36010b45697df9083905190815260200160405180910390a15050565b61279d612c84565b60008060006127aa612c84565b6000806000955060009450600093505b6002851015612803578785600281106127cf57fe5b602002015193505b600a84106127f15760019590950194600a840493506127d7565b600290950194600194909401936127ba565b600186039550856040518059106128175750595b818152601f19601f830116810160200160405290509250506000198501905060015b6000811261227c5787816002811061284d57fe5b602002015193508315156128b6577f300000000000000000000000000000000000000000000000000000000000000083838151811061288857fe5b906020010190600160f860020a031916908160001a90535060008211156128b157600019909101905b612925565b831561292557600a84066030017f0100000000000000000000000000000000000000000000000000000000000000028383815181106128f157fe5b906020010190600160f860020a031916908160001a905350600a84049350600082111561292057600019909101905b6128b6565b6000811315612985576000821161293857fe5b7f2c0000000000000000000000000000000000000000000000000000000000000083838151811061296557fe5b906020010190600160f860020a031916908160001a905350600019909101905b60001901612839565b6000612998612cdd565b600060018a101580156129ac575060058a11155b15156129b757600080fd5b60c0604051908101604052808767ffffffffffffffff1681526020018b63ffffffff1681526020018a63ffffffff1681526020018963ffffffff1681526020018863ffffffff1681526020014267ffffffffffffffff168152509150600160038054806001018281612a299190612d12565b600092835260209092208591018151815467ffffffffffffffff191667ffffffffffffffff919091161781556020820151815463ffffffff9190911668010000000000000000026bffffffff0000000000000000199091161781556040820151815463ffffffff919091166c01000000000000000000000000026fffffffff000000000000000000000000199091161781556060820151815463ffffffff91909116608060020a0273ffffffff00000000000000000000000000000000199091161781556080820151815463ffffffff9190911660a060020a0277ffffffff00000000000000000000000000000000000000001990911617815560a0820151815467ffffffffffffffff9190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff909116179055500390507f46bfa9096d6dec9fcdb3fa7c8330fffa6c2c1756db78fb10403fb08af45163778582602085015185604001518660600151876080015188518b604051600160a060020a039098168852602088019690965263ffffffff9485166040808901919091529385166060880152918416608087015290921660a085015267ffffffffffffffff90911660c084015260ff90911660e0830152610100909101905180910390a1600160a060020a03851615612c3857612c3360008683611fae565b612c50565b60008054612c509190600160a060020a031683611fae565b9998505050505050505050565b60a06040519081016040526005815b6000815260200190600190039081612c6c5790505090565b60206040519081016040526000815290565b60a0604051908101604090815260008083526020830181905290820181905260608201819052608082015290565b6040805190810160405260008152600160208201612c6c565b60c06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a082015290565b815481835581811511610b5057600083815260209020610b50918101908301610aec91905b80821115612d4b5760008155600101612d37565b50905600a165627a7a72305820f21a16a07229d525d98b9581ad264771f93174edbef1766a26c2e462d5de6818002900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000541436f726500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035242540000000000000000000000000000000000000000000000000000000000

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

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000541436f726500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035242540000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): ACore
Arg [1] : _symbol (string): RBT

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [3] : 41436f7265000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 5242540000000000000000000000000000000000000000000000000000000000


Swarm Source

bzzr://f21a16a07229d525d98b9581ad264771f93174edbef1766a26c2e462d5de6818
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.