Overview
ETH Balance
0.000057822682285641 ETH
Eth Value
$0.10 (@ $1,756.11/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Sponsored
Latest 25 from a total of 264 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Approve | 13126695 | 567 days 8 hrs ago | IN | 0 ETH | 0.00181234 | ||||
Approve | 13106812 | 570 days 10 hrs ago | IN | 0 ETH | 0.00184436 | ||||
Train | 7369188 | 1467 days 3 mins ago | IN | 0.00001 ETH | 0.00009857 | ||||
Set Gene | 7234205 | 1491 days 18 hrs ago | IN | 0 ETH | 0.00017485 | ||||
Set Gene | 7234190 | 1491 days 18 hrs ago | IN | 0 ETH | 0.00017517 | ||||
Prepare To Breed | 7150324 | 1510 days 25 mins ago | IN | 0 ETH | 0.0001197 | ||||
Prepare To Breed | 7150315 | 1510 days 28 mins ago | IN | 0 ETH | 0.00005894 | ||||
Prepare To Breed | 7150298 | 1510 days 31 mins ago | IN | 0 ETH | 0.00017975 | ||||
Set Gene | 7150291 | 1510 days 33 mins ago | IN | 0 ETH | 0.00010491 | ||||
Prepare To Breed | 7059194 | 1527 days 7 hrs ago | IN | 0 ETH | 0.00017271 | ||||
Prepare To Breed | 7059187 | 1527 days 7 hrs ago | IN | 0 ETH | 0.00008156 | ||||
Setprice | 7059181 | 1527 days 7 hrs ago | IN | 0 ETH | 0.00009031 | ||||
Purchase | 6486394 | 1622 days 17 hrs ago | IN | 0.004 ETH | 0.00058272 | ||||
Purchase | 6465047 | 1626 days 4 hrs ago | IN | 0.001 ETH | 0.00028683 | ||||
Approve | 6394733 | 1637 days 16 hrs ago | IN | 0 ETH | 0.00034047 | ||||
Approve | 6394731 | 1637 days 16 hrs ago | IN | 0 ETH | 0.00034047 | ||||
Approve | 6394731 | 1637 days 16 hrs ago | IN | 0 ETH | 0.00034047 | ||||
Approve | 6394728 | 1637 days 16 hrs ago | IN | 0 ETH | 0.00050547 | ||||
Approve | 6394726 | 1637 days 16 hrs ago | IN | 0 ETH | 0.00034047 | ||||
Approve | 6359824 | 1643 days 10 hrs ago | IN | 0 ETH | 0.00030952 | ||||
Approve | 6359821 | 1643 days 10 hrs ago | IN | 0 ETH | 0.00045952 | ||||
Approve | 6043251 | 1696 days 15 hrs ago | IN | 0 ETH | 0.0000919 | ||||
Approve | 6043246 | 1696 days 15 hrs ago | IN | 0 ETH | 0.00009177 | ||||
Purchase | 6037176 | 1697 days 16 hrs ago | IN | 0.001 ETH | 0.00009561 | ||||
Purchase | 6035532 | 1697 days 22 hrs ago | IN | 0.001 ETH | 0.00009561 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
7369188 | 1467 days 3 mins ago | 0.00013491 ETH | ||||
7369188 | 1467 days 3 mins ago | 0.0000826 ETH | ||||
6486394 | 1622 days 17 hrs ago | 0.004 ETH | ||||
6465047 | 1626 days 4 hrs ago | 0.001 ETH | ||||
6037176 | 1697 days 16 hrs ago | 0.001 ETH | ||||
6035532 | 1697 days 22 hrs ago | 0.001 ETH | ||||
5999218 | 1704 days 2 hrs ago | 0.00061914 ETH | ||||
5999218 | 1704 days 2 hrs ago | 0.00037906 ETH | ||||
5999218 | 1704 days 2 hrs ago | 0.001 ETH | ||||
5987134 | 1706 days 4 hrs ago | 0.00061495 ETH | ||||
5987134 | 1706 days 4 hrs ago | 0.0003765 ETH | ||||
5987134 | 1706 days 4 hrs ago | 0.0001 ETH | ||||
5981460 | 1707 days 3 hrs ago | 0.00059503 ETH | ||||
5981460 | 1707 days 3 hrs ago | 0.0003643 ETH | ||||
5981460 | 1707 days 3 hrs ago | 0.0025 ETH | ||||
5981421 | 1707 days 4 hrs ago | 0.00050015 ETH | ||||
5981421 | 1707 days 4 hrs ago | 0.00030621 ETH | ||||
5981421 | 1707 days 4 hrs ago | 0.001 ETH | ||||
5887678 | 1723 days 2 hrs ago | 0.001 ETH | ||||
5883766 | 1723 days 19 hrs ago | 0.001 ETH | ||||
5883396 | 1723 days 20 hrs ago | 0.001 ETH | ||||
5878985 | 1724 days 14 hrs ago | 0.00004834 ETH | ||||
5878985 | 1724 days 14 hrs ago | 0.00002959 ETH | ||||
5878971 | 1724 days 14 hrs ago | 0.00004355 ETH | ||||
5878971 | 1724 days 14 hrs ago | 0.00002666 ETH |
Loading...
Loading
Contract Name:
CelebrityBreederToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-05-27 */ pragma solidity ^0.4.18; // solhint-disable-line /// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens /// @author Dieter Shirley <[email protected]> (https://github.com/dete) contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); // Optional // function name() public view returns (string name); // function symbol() public view returns (string symbol); // function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId); // function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl); } contract CelebrityToken is ERC721 { /*** EVENTS ***/ /// @dev The Birth event is fired whenever a new person comes into existence. event Birth(uint256 tokenId, string name, address owner); /// @dev The TokenSold event is fired whenever a token is sold. event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name); /// @dev Transfer event as defined in current draft of ERC721. /// ownership is assigned, including births. event Transfer(address from, address to, uint256 tokenId); /*** CONSTANTS ***/ /// @notice Name and symbol of the non fungible token, as defined in ERC721. string public constant NAME = "CryptoCelebrities"; // solhint-disable-line string public constant SYMBOL = "CelebrityToken"; // solhint-disable-line uint256 private startingPrice = 0.001 ether; uint256 private constant PROMO_CREATION_LIMIT = 5000; uint256 private firstStepLimit = 0.053613 ether; uint256 private secondStepLimit = 0.564957 ether; /*** STORAGE ***/ /// @dev A mapping from person IDs to the address that owns them. All persons have /// some valid owner address. mapping (uint256 => address) public personIndexToOwner; // @dev A mapping from owner address to count of tokens that address owns. // Used internally inside balanceOf() to resolve ownership count. mapping (address => uint256) private ownershipTokenCount; /// @dev A mapping from PersonIDs to an address that has been approved to call /// transferFrom(). Each Person can only have one approved address for transfer /// at any time. A zero value means no approval is outstanding. mapping (uint256 => address) public personIndexToApproved; // @dev A mapping from PersonIDs to the price of the token. mapping (uint256 => uint256) private personIndexToPrice; // The addresses of the accounts (or contracts) that can execute actions within each roles. address public ceoAddress; address public cooAddress; uint256 public promoCreatedCount; /*** DATATYPES ***/ struct Person { string name; } Person[] private persons; /*** ACCESS MODIFIERS ***/ /// @dev Access modifier for CEO-only functionality modifier onlyCEO() { require(msg.sender == ceoAddress); _; } /// @dev Access modifier for COO-only functionality modifier onlyCOO() { require(msg.sender == cooAddress); _; } /// Access modifier for contract owner only functionality modifier onlyCLevel() { require( msg.sender == ceoAddress || msg.sender == cooAddress ); _; } /*** CONSTRUCTOR ***/ function CelebrityToken() public { ceoAddress = msg.sender; cooAddress = msg.sender; } /*** PUBLIC FUNCTIONS ***/ /// @notice Grant another address the right to transfer token via takeOwnership() and transferFrom(). /// @param _to The address to be granted transfer approval. Pass address(0) to /// clear all approvals. /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function approve( address _to, uint256 _tokenId ) public { // Caller must own token. require(_owns(msg.sender, _tokenId)); personIndexToApproved[_tokenId] = _to; Approval(msg.sender, _to, _tokenId); } /// For querying balance of a particular account /// @param _owner The address for balance query /// @dev Required for ERC-721 compliance. function balanceOf(address _owner) public view returns (uint256 balance) { return ownershipTokenCount[_owner]; } /// @dev Creates a new promo Person with the given name, with given _price and assignes it to an address. function createPromoPerson(address _owner, string _name, uint256 _price) public onlyCOO { require(promoCreatedCount < PROMO_CREATION_LIMIT); address personOwner = _owner; if (personOwner == address(0)) { personOwner = cooAddress; } if (_price <= 0) { _price = startingPrice; } promoCreatedCount++; _createPerson(_name, personOwner, _price); } /// @dev Creates a new Person with the given name. function createContractPerson(string _name) public onlyCOO { _createPerson(_name, address(this), startingPrice); } /// @notice Returns all the relevant information about a specific person. /// @param _tokenId The tokenId of the person of interest. function getPerson(uint256 _tokenId) public view returns ( string personName, uint256 sellingPrice, address owner ) { Person storage person = persons[_tokenId]; personName = person.name; sellingPrice = personIndexToPrice[_tokenId]; owner = personIndexToOwner[_tokenId]; } function implementsERC721() public pure returns (bool) { return true; } /// @dev Required for ERC-721 compliance. function name() public pure returns (string) { return NAME; } /// For querying owner of token /// @param _tokenId The tokenID for owner inquiry /// @dev Required for ERC-721 compliance. function ownerOf(uint256 _tokenId) public view returns (address owner) { owner = personIndexToOwner[_tokenId]; require(owner != address(0)); } function payout(address _to) public onlyCLevel { _payout(_to); } // Allows someone to send ether and obtain the token function purchase(uint256 _tokenId) public payable { address oldOwner = personIndexToOwner[_tokenId]; address newOwner = msg.sender; uint256 sellingPrice = personIndexToPrice[_tokenId]; // Making sure token owner is not sending to self require(oldOwner != newOwner); // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); // Making sure sent amount is greater than or equal to the sellingPrice require(msg.value >= sellingPrice); uint256 payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 94), 100)); uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice); // Update prices if (sellingPrice < firstStepLimit) { // first stage personIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 200), 94); } else if (sellingPrice < secondStepLimit) { // second stage personIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 120), 94); } else { // third stage personIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 115), 94); } _transfer(oldOwner, newOwner, _tokenId); // Pay previous tokenOwner if owner is not contract if (oldOwner != address(this)) { oldOwner.transfer(payment); //(1-0.06) } TokenSold(_tokenId, sellingPrice, personIndexToPrice[_tokenId], oldOwner, newOwner, persons[_tokenId].name); msg.sender.transfer(purchaseExcess); } function priceOf(uint256 _tokenId) public view returns (uint256 price) { return personIndexToPrice[_tokenId]; } /// @dev Assigns a new address to act as the CEO. Only available to the current CEO. /// @param _newCEO The address of the new CEO function setCEO(address _newCEO) public onlyCEO { require(_newCEO != address(0)); ceoAddress = _newCEO; } /// @dev Assigns a new address to act as the COO. Only available to the current COO. /// @param _newCOO The address of the new COO function setCOO(address _newCOO) public onlyCEO { require(_newCOO != address(0)); cooAddress = _newCOO; } /// @dev Required for ERC-721 compliance. function symbol() public pure returns (string) { return SYMBOL; } /// @notice Allow pre-approved user to take ownership of a token /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function takeOwnership(uint256 _tokenId) public { address newOwner = msg.sender; address oldOwner = personIndexToOwner[_tokenId]; // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); // Making sure transfer is approved require(_approved(newOwner, _tokenId)); _transfer(oldOwner, newOwner, _tokenId); } /// @param _owner The owner whose celebrity tokens we are interested in. /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly /// expensive (it walks the entire Persons array looking for persons belonging to owner), /// but it also returns a dynamic array, which is only supported for web3 calls, and /// not contract-to-contract calls. function tokensOfOwner(address _owner) public view returns(uint256[] ownerTokens) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { // Return an empty array return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); uint256 totalPersons = totalSupply(); uint256 resultIndex = 0; uint256 personId; for (personId = 0; personId <= totalPersons; personId++) { if (personIndexToOwner[personId] == _owner) { result[resultIndex] = personId; resultIndex++; } } return result; } } /// For querying totalSupply of token /// @dev Required for ERC-721 compliance. function totalSupply() public view returns (uint256 total) { return persons.length; } /// Owner initates the transfer of the token to another account /// @param _to The address for the token to be transferred to. /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function transfer( address _to, uint256 _tokenId ) public { require(_owns(msg.sender, _tokenId)); require(_addressNotNull(_to)); _transfer(msg.sender, _to, _tokenId); } /// Third-party initiates transfer of token from address _from to address _to /// @param _from The address for the token to be transferred from. /// @param _to The address for the token to be transferred to. /// @param _tokenId The ID of the Token that can be transferred if this call succeeds. /// @dev Required for ERC-721 compliance. function transferFrom( address _from, address _to, uint256 _tokenId ) public { require(_owns(_from, _tokenId)); require(_approved(_to, _tokenId)); require(_addressNotNull(_to)); _transfer(_from, _to, _tokenId); } /*** PRIVATE FUNCTIONS ***/ /// Safety check on _to address to prevent against an unexpected 0x0 default. function _addressNotNull(address _to) private pure returns (bool) { return _to != address(0); } /// For checking approval of transfer for address _to function _approved(address _to, uint256 _tokenId) private view returns (bool) { return personIndexToApproved[_tokenId] == _to; } /// For creating Person function _createPerson(string _name, address _owner, uint256 _price) private { Person memory _person = Person({ name: _name }); uint256 newPersonId = persons.push(_person) - 1; // It's probably never going to happen, 4 billion tokens are A LOT, but // let's just be 100% sure we never let this happen. require(newPersonId == uint256(uint32(newPersonId))); Birth(newPersonId, _name, _owner); personIndexToPrice[newPersonId] = _price; // This will assign ownership, and also emit the Transfer event as // per ERC721 draft _transfer(address(0), _owner, newPersonId); } /// Check for token ownership function _owns(address claimant, uint256 _tokenId) private view returns (bool) { return claimant == personIndexToOwner[_tokenId]; } /// For paying out balance on contract function _payout(address _to) private { if (_to == address(0)) { ceoAddress.transfer(this.balance); } else { _to.transfer(this.balance); } } /// @dev Assigns ownership of a specific Person to an address. function _transfer(address _from, address _to, uint256 _tokenId) private { // Since the number of persons is capped to 2^32 we can't overflow this ownershipTokenCount[_to]++; //transfer ownership personIndexToOwner[_tokenId] = _to; // When creating new persons _from is 0x0, but we can't account that address. if (_from != address(0)) { ownershipTokenCount[_from]--; // clear any previously approved ownership exchange delete personIndexToApproved[_tokenId]; } // Emit the transfer event. Transfer(_from, _to, _tokenId); } } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /// @author Artyom Harutyunyan <[email protected]> contract CelebrityBreederToken is ERC721 { /// @dev The Birth event is fired whenever a new person comes into existence. event Birth(uint256 tokenId, string name, address owner); /// @dev The TokenSold event is fired whenever a token is sold. event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name); /// @dev Transfer event as defined in current draft of ERC721. /// ownership is assigned, including births. event Transfer(address from, address to, uint256 tokenId); event Trained(address caller, uint256 tokenId, bool generation); event Beaten(address caller, uint256 tokenId, bool generation); event SiringPriceEvent(address caller, uint256 tokenId, bool generation, uint price); event SellingPriceEvent(address caller, uint256 tokenId, bool generation, uint price); event GenesInitialisedEvent(address caller, uint256 tokenId, bool generation, uint genes); CelebrityToken private CelGen0=CelebrityToken(0xbb5Ed1EdeB5149AF3ab43ea9c7a6963b3C1374F7); //@Artyom Pointing to original CC CelebrityBreederToken private CelBetta=CelebrityBreederToken(0xdab64dc4a02225f76fccce35ab9ba53b3735c684); //@Artyom Pointing to betta string public constant NAME = "CryptoCelebrityBreederCards"; string public constant SYMBOL = "CeleBreedCard"; uint256 public breedingFee = 0.01 ether; uint256 public initialTraining = 0.00001 ether; uint256 public initialBeating = 0.00002 ether; uint256 private constant CreationLimitGen0 = 5000; uint256 private constant CreationLimitGen1 = 2500000; uint256 public constant MaxValue = 100000000 ether; mapping (uint256 => address) public personIndexToOwnerGen1; mapping (address => uint256) private ownershipTokenCountGen1; mapping (uint256 => address) public personIndexToApprovedGen1; mapping (uint256 => uint256) private personIndexToPriceGen1; mapping (uint256 => address) public ExternalAllowdContractGen0; mapping (uint256 => address) public ExternalAllowdContractGen1; mapping (uint256 => uint256) public personIndexToSiringPrice0; mapping (uint256 => uint256) public personIndexToSiringPrice1; address public CeoAddress; address public DevAddress; struct Person { string name; string surname; uint64 genes; uint64 birthTime; uint32 fatherId; uint32 motherId; uint32 readyToBreedWithId; uint32 trainedcount; uint32 beatencount; bool readyToBreedWithGen; bool gender; bool fatherGeneration; bool motherGeneration; } Person[] private PersonsGen0; Person[] private PersonsGen1; modifier onlyCEO() { require(msg.sender == CeoAddress); _; } modifier onlyDEV() { require(msg.sender == DevAddress); _; } modifier onlyPlayers() { require(ownershipTokenCountGen1[msg.sender]>0 || CelGen0.balanceOf(msg.sender)>0); _; } /// Access modifier for contract owner only functionality /* modifier onlyTopLevel() { require( msg.sender == CeoAddress || msg.sender == DevAddress ); _; } */ function masscreate(uint256 fromindex, uint256 toindex) external onlyCEO{ string memory name; string memory surname; uint64 genes; bool gender; for(uint256 i=fromindex;i<=toindex;i++) { ( name, surname, genes, , , , , , gender)=CelBetta.getPerson(i,false); _birthPerson(name, surname ,genes, gender, false); } } function CelebrityBreederToken() public { CeoAddress= msg.sender; DevAddress= msg.sender; } function setBreedingFee(uint256 newfee) external onlyCEO{ breedingFee=newfee; } function allowexternalContract(address _to, uint256 _tokenId,bool _tokengeneration) public { // Caller must own token. require(_owns(msg.sender, _tokenId, _tokengeneration)); if(_tokengeneration) { if(_addressNotNull(_to)) { ExternalAllowdContractGen1[_tokenId]=_to; } else { delete ExternalAllowdContractGen1[_tokenId]; } } else { if(_addressNotNull(_to)) { ExternalAllowdContractGen0[_tokenId]=_to; } else { delete ExternalAllowdContractGen0[_tokenId]; } } } //@Artyom Required for ERC-721 compliance. function approve(address _to, uint256 _tokenId) public { //@Artyom only gen1 // Caller must own token. require(_owns(msg.sender, _tokenId, true)); personIndexToApprovedGen1[_tokenId] = _to; Approval(msg.sender, _to, _tokenId); } // @Artyom Required for ERC-721 compliance. //@Artyom only gen1 function balanceOf(address _owner) public view returns (uint256 balance) { return ownershipTokenCountGen1[_owner]; } function getPerson(uint256 _tokenId,bool generation) public view returns ( string name, string surname, uint64 genes,uint64 birthTime, uint32 readyToBreedWithId, uint32 trainedcount,uint32 beatencount,bool readyToBreedWithGen, bool gender) { Person person; if(generation==false) { person = PersonsGen0[_tokenId]; } else { person = PersonsGen1[_tokenId]; } name = person.name; surname=person.surname; genes=person.genes; birthTime=person.birthTime; readyToBreedWithId=person.readyToBreedWithId; trainedcount=person.trainedcount; beatencount=person.beatencount; readyToBreedWithGen=person.readyToBreedWithGen; gender=person.gender; } function getPersonParents(uint256 _tokenId, bool generation) public view returns ( uint32 fatherId, uint32 motherId, bool fatherGeneration, bool motherGeneration) { Person person; if(generation==false) { person = PersonsGen0[_tokenId]; } else { person = PersonsGen1[_tokenId]; } fatherId=person.fatherId; motherId=person.motherId; fatherGeneration=person.fatherGeneration; motherGeneration=person.motherGeneration; } // @Artyom Required for ERC-721 compliance. function implementsERC721() public pure returns (bool) { return true; } // @Artyom Required for ERC-721 compliance. function name() public pure returns (string) { return NAME; } // @Artyom Required for ERC-721 compliance. function ownerOf(uint256 _tokenId) public view returns (address owner) { owner = personIndexToOwnerGen1[_tokenId]; require(_addressNotNull(owner)); } //@Artyom only gen1 function purchase(uint256 _tokenId) public payable { address oldOwner = personIndexToOwnerGen1[_tokenId]; address newOwner = msg.sender; uint256 sellingPrice = personIndexToPriceGen1[_tokenId]; personIndexToPriceGen1[_tokenId]=MaxValue; // Making sure token owner is not sending to self require(oldOwner != newOwner); // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); // Making sure sent amount is greater than or equal to the sellingPrice require(msg.value >= sellingPrice); // uint256 payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 94), 100)); uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice); _transfer(oldOwner, newOwner, _tokenId); // Pay previous tokenOwner if owner is not contract if (oldOwner != address(this)) { // oldOwner.transfer(payment); //(1-0.06) //old code for holding some percents oldOwner.transfer(sellingPrice); } blankbreedingdata(_tokenId,true); TokenSold(_tokenId, sellingPrice, personIndexToPriceGen1[_tokenId], oldOwner, newOwner, PersonsGen1[_tokenId].name); msg.sender.transfer(purchaseExcess); } //@Artyom only gen1 function priceOf(uint256 _tokenId) public view returns (uint256 price) { return personIndexToPriceGen1[_tokenId]; } function setCEO(address _newCEO) external onlyCEO { require(_addressNotNull(_newCEO)); CeoAddress = _newCEO; } //@Artyom only gen1 function setprice(uint256 _tokenId, uint256 _price) public { require(_owns(msg.sender, _tokenId, true)); if(_price<=0 || _price>=MaxValue) { personIndexToPriceGen1[_tokenId]=MaxValue; } else { personIndexToPriceGen1[_tokenId]=_price; } SellingPriceEvent(msg.sender,_tokenId,true,_price); } function setDEV(address _newDEV) external onlyDEV { require(_addressNotNull(_newDEV)); DevAddress = _newDEV; } // @Artyom Required for ERC-721 compliance. function symbol() public pure returns (string) { return SYMBOL; } // @Artyom Required for ERC-721 compliance. //@Artyom only gen1 function takeOwnership(uint256 _tokenId) public { address newOwner = msg.sender; address oldOwner = personIndexToOwnerGen1[_tokenId]; // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); // Making sure transfer is approved require(_approvedGen1(newOwner, _tokenId)); _transfer(oldOwner, newOwner, _tokenId); } //@Artyom only gen1 function tokensOfOwner(address _owner) public view returns(uint256[] ownerTokens) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { // Return an empty array return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); uint256 totalPersons = totalSupply(); uint256 resultIndex = 0; uint256 personId; for (personId = 0; personId <= totalPersons; personId++) { if (personIndexToOwnerGen1[personId] == _owner) { result[resultIndex] = personId; resultIndex++; } } return result; } } // @Artyom Required for ERC-721 compliance. //@Artyom only gen1 function totalSupply() public view returns (uint256 total) { return PersonsGen1.length; } // @Artyom Required for ERC-721 compliance. //@Artyom only gen1 function transfer( address _to, uint256 _tokenId) public { require(_owns(msg.sender, _tokenId, true)); require(_addressNotNull(_to)); _transfer(msg.sender, _to, _tokenId); } // @Artyom Required for ERC-721 compliance. //@Artyom only gen1 function transferFrom(address _from, address _to, uint256 _tokenId) public { require(_owns(_from, _tokenId, true)); require(_approvedGen1(_to, _tokenId)); require(_addressNotNull(_to)); _transfer(_from, _to, _tokenId); } function _addressNotNull(address _to) private pure returns (bool) { return _to != address(0); } /// For checking approval of transfer for address _to function _approvedGen1(address _to, uint256 _tokenId) private view returns (bool) { return personIndexToApprovedGen1[_tokenId] == _to; } //@Artyom only gen0 function createPersonGen0(string _name, string _surname,uint64 _genes, bool _gender) external onlyCEO returns(uint256) { return _birthPerson(_name, _surname ,_genes, _gender, false); } function SetGene(uint256 tokenId,bool generation, uint64 newgene) public { require(_owns(msg.sender, tokenId, generation) || msg.sender==CeoAddress); require(newgene<=9999999999 && newgene>=10); Person person; //@Artyom reference if (generation==false) { person = PersonsGen0[tokenId]; } else { person = PersonsGen1[tokenId]; } require(person.genes<=90); uint64 _gene=newgene; uint64 _pointCount=0; for(uint i=0;i<10;i++) { _pointCount+=_gene%10; _gene=_gene/10; } // log(_pointCount,person.genes); require(_pointCount==person.genes); person.genes=newgene; GenesInitialisedEvent(msg.sender,tokenId,generation,newgene); } function breed(uint256 _mypersonid, bool _mypersongeneration, uint256 _withpersonid, bool _withpersongeneration, string _boyname, string _girlname) public payable { //@Artyom mother require(_owns(msg.sender, _mypersonid, _mypersongeneration)); require(CreationLimitGen1>totalSupply()+1); //Mother Person person; //@Artyom reference if(_mypersongeneration==false) { person = PersonsGen0[_mypersonid]; } else { person = PersonsGen1[_mypersonid]; require(person.gender==false); //@Artyom checking gender for gen1 to be mother in this case } require(person.genes>90);//@Artyom if its unlocked uint64 genes1=person.genes; //Father if(_withpersongeneration==false) { person = PersonsGen0[_withpersonid]; } else { person = PersonsGen1[_withpersonid]; } require(readyTobreed(_mypersonid, _mypersongeneration, _withpersonid, _withpersongeneration)); require(breedingFee<=msg.value); delete person.readyToBreedWithId; person.readyToBreedWithGen=false; // uint64 genes2=person.genes; uint64 _generatedGen; bool _gender; (_generatedGen,_gender)=_generateGene(genes1,person.genes,_mypersonid,_withpersonid); if(_gender) { _girlname=_boyname; //@Artyom if gender is true/1 then it should take the boyname } uint newid=_birthPerson(_girlname, person.surname, _generatedGen, _gender, true); PersonsGen1[newid].fatherGeneration=_withpersongeneration; // @ Artyom, did here because stack too deep for function PersonsGen1[newid].motherGeneration=_mypersongeneration; PersonsGen1[newid].fatherId=uint32(_withpersonid); PersonsGen1[newid].motherId=uint32(_mypersonid); _payout(); } function breedOnAuction(uint256 _mypersonid, bool _mypersongeneration, uint256 _withpersonid, bool _withpersongeneration, string _boyname, string _girlname) public payable { //@Artyom mother require(_owns(msg.sender, _mypersonid, _mypersongeneration)); require(CreationLimitGen1>totalSupply()+1); require(!(_mypersonid==_withpersonid && _mypersongeneration==_withpersongeneration));// @Artyom not to breed with self require(!((_mypersonid==0 && _mypersongeneration==false) || (_withpersonid==0 && _withpersongeneration==false))); //Not to touch Satoshi //Mother Person person; //@Artyom reference if(_mypersongeneration==false) { person = PersonsGen0[_mypersonid]; } else { person = PersonsGen1[_mypersonid]; require(person.gender==false); //@Artyom checking gender for gen1 to be mother in this case } require(person.genes>90);//@Artyom if its unlocked address owneroffather; uint256 _siringprice; uint64 genes1=person.genes; //Father if(_withpersongeneration==false) { person = PersonsGen0[_withpersonid]; _siringprice=personIndexToSiringPrice0[_withpersonid]; owneroffather=CelGen0.ownerOf(_withpersonid); } else { person = PersonsGen1[_withpersonid]; _siringprice=personIndexToSiringPrice1[_withpersonid]; owneroffather= personIndexToOwnerGen1[_withpersonid]; } require(_siringprice>0 && _siringprice<MaxValue); require((breedingFee+_siringprice)<=msg.value); // uint64 genes2=; uint64 _generatedGen; bool _gender; (_generatedGen,_gender)=_generateGene(genes1,person.genes,_mypersonid,_withpersonid); if(_gender) { _girlname=_boyname; //@Artyom if gender is true/1 then it should take the boyname } uint newid=_birthPerson(_girlname, person.surname, _generatedGen, _gender, true); PersonsGen1[newid].fatherGeneration=_withpersongeneration; // @ Artyom, did here because stack too deep for function PersonsGen1[newid].motherGeneration=_mypersongeneration; PersonsGen1[newid].fatherId=uint32(_withpersonid); PersonsGen1[newid].motherId=uint32(_mypersonid); owneroffather.transfer(_siringprice); _payout(); } function prepareToBreed(uint256 _mypersonid, bool _mypersongeneration, uint256 _withpersonid, bool _withpersongeneration, uint256 _siringprice) external { //@Artyom father require(_owns(msg.sender, _mypersonid, _mypersongeneration)); Person person; //@Artyom reference if(_mypersongeneration==false) { person = PersonsGen0[_mypersonid]; personIndexToSiringPrice0[_mypersonid]=_siringprice; } else { person = PersonsGen1[_mypersonid]; require(person.gender==true);//@Artyom for gen1 checking genders to be male personIndexToSiringPrice1[_mypersonid]=_siringprice; } require(person.genes>90);//@Artyom if its unlocked person.readyToBreedWithId=uint32(_withpersonid); person.readyToBreedWithGen=_withpersongeneration; SiringPriceEvent(msg.sender,_mypersonid,_mypersongeneration,_siringprice); } function readyTobreed(uint256 _mypersonid, bool _mypersongeneration, uint256 _withpersonid, bool _withpersongeneration) public view returns(bool) { if (_mypersonid==_withpersonid && _mypersongeneration==_withpersongeneration) //Not to fuck Themselves return false; if((_mypersonid==0 && _mypersongeneration==false) || (_withpersonid==0 && _withpersongeneration==false)) //Not to touch Satoshi return false; Person withperson; //@Artyom reference if(_withpersongeneration==false) { withperson = PersonsGen0[_withpersonid]; } else { withperson = PersonsGen1[_withpersonid]; } if(withperson.readyToBreedWithGen==_mypersongeneration) { if(withperson.readyToBreedWithId==_mypersonid) { return true; } } return false; } function _birthPerson(string _name, string _surname, uint64 _genes, bool _gender, bool _generation) private returns(uint256) { // about this steps Person memory _person = Person({ name: _name, surname: _surname, genes: _genes, birthTime: uint64(now), fatherId: 0, motherId: 0, readyToBreedWithId: 0, trainedcount: 0, beatencount: 0, readyToBreedWithGen: false, gender: _gender, fatherGeneration: false, motherGeneration: false }); uint256 newPersonId; if(_generation==false) { newPersonId = PersonsGen0.push(_person) - 1; } else { newPersonId = PersonsGen1.push(_person) - 1; personIndexToPriceGen1[newPersonId] = MaxValue; //@Artyom indicating not for sale // per ERC721 draft-This will assign ownership, and also emit the Transfer event as _transfer(address(0), msg.sender, newPersonId); } Birth(newPersonId, _name, msg.sender); return newPersonId; } function _generateGene(uint64 _genes1,uint64 _genes2,uint256 _mypersonid,uint256 _withpersonid) private returns(uint64,bool) { uint64 _gene; uint64 _gene1; uint64 _gene2; uint64 _rand; uint256 _finalGene=0; bool gender=false; for(uint i=0;i<10;i++) { _gene1 =_genes1%10; _gene2=_genes2%10; _genes1=_genes1/10; _genes2=_genes2/10; _rand=uint64(keccak256(block.blockhash(block.number), i, now,_mypersonid,_withpersonid))%10000; _gene=(_gene1+_gene2)/2; if(_rand<26) { _gene-=3; } else if(_rand<455) { _gene-=2; } else if(_rand<3173) { _gene-=1; } else if(_rand<6827) { } else if(_rand<9545) { _gene+=1; } else if(_rand<9974) { _gene+=2; } else if(_rand<10000) { _gene+=3; } if(_gene>12) //@Artyom to avoid negative overflow _gene=0; if(_gene>9) _gene=9; _finalGene+=(uint(10)**i)*_gene; } if(uint64(keccak256(block.blockhash(block.number), 11, now,_mypersonid,_withpersonid))%2>0) gender=true; return(uint64(_finalGene),gender); } function _owns(address claimant, uint256 _tokenId,bool _tokengeneration) private view returns (bool) { if(_tokengeneration) { return ((claimant == personIndexToOwnerGen1[_tokenId]) || (claimant==ExternalAllowdContractGen1[_tokenId])); } else { return ((claimant == CelGen0.personIndexToOwner(_tokenId)) || (claimant==ExternalAllowdContractGen0[_tokenId])); } } function _payout() private { DevAddress.transfer((this.balance/10)*3); CeoAddress.transfer((this.balance/10)*7); } // @Artyom Required for ERC-721 compliance. //@Artyom only gen1 function _transfer(address _from, address _to, uint256 _tokenId) private { // Since the number of persons is capped to 2^32 we can't overflow this ownershipTokenCountGen1[_to]++; //transfer ownership personIndexToOwnerGen1[_tokenId] = _to; // When creating new persons _from is 0x0, but we can't account that address. if (_addressNotNull(_from)) { ownershipTokenCountGen1[_from]--; // clear any previously approved ownership exchange blankbreedingdata(_tokenId,true); } // Emit the transfer event. Transfer(_from, _to, _tokenId); } function blankbreedingdata(uint256 _personid, bool _persongeneration) private{ Person person; if(_persongeneration==false) { person = PersonsGen0[_personid]; delete ExternalAllowdContractGen0[_personid]; delete personIndexToSiringPrice0[_personid]; } else { person = PersonsGen1[_personid]; delete ExternalAllowdContractGen1[_personid]; delete personIndexToSiringPrice1[_personid]; delete personIndexToApprovedGen1[_personid]; } delete person.readyToBreedWithId; delete person.readyToBreedWithGen; } function train(uint256 personid, bool persongeneration, uint8 gene) external payable onlyPlayers { require(gene>=0 && gene<10); uint256 trainingPrice=checkTrainingPrice(personid,persongeneration); require(msg.value >= trainingPrice); Person person; if(persongeneration==false) { person = PersonsGen0[personid]; } else { person = PersonsGen1[personid]; } require(person.genes>90);//@Artyom if its unlocked uint gensolo=person.genes/(uint(10)**gene); gensolo=gensolo%10; require(gensolo<9); //@Artyom not to train after 9 person.genes+=uint64(10)**gene; person.trainedcount++; uint256 purchaseExcess = SafeMath.sub(msg.value, trainingPrice); msg.sender.transfer(purchaseExcess); _payout(); Trained(msg.sender, personid, persongeneration); } function beat(uint256 personid, bool persongeneration, uint8 gene) external payable onlyPlayers { require(gene>=0 && gene<10); uint256 beatingPrice=checkBeatingPrice(personid,persongeneration); require(msg.value >= beatingPrice); Person person; if(persongeneration==false) { person = PersonsGen0[personid]; } else { person = PersonsGen1[personid]; } require(person.genes>90);//@Artyom if its unlocked uint gensolo=person.genes/(uint(10)**gene); gensolo=gensolo%10; require(gensolo>0); person.genes-=uint64(10)**gene; person.beatencount++; uint256 purchaseExcess = SafeMath.sub(msg.value, beatingPrice); msg.sender.transfer(purchaseExcess); _payout(); Beaten(msg.sender, personid, persongeneration); } function checkTrainingPrice(uint256 personid, bool persongeneration) view returns (uint256) { Person person; if(persongeneration==false) { person = PersonsGen0[personid]; } else { person = PersonsGen1[personid]; } uint256 _trainingprice= (uint(2)**person.trainedcount) * initialTraining; if (_trainingprice > 5 ether) _trainingprice=5 ether; return _trainingprice; } function checkBeatingPrice(uint256 personid, bool persongeneration) view returns (uint256) { Person person; if(persongeneration==false) { person = PersonsGen0[personid]; } else { person = PersonsGen1[personid]; } uint256 _beatingprice=(uint(2)**person.beatencount) * initialBeating; if (_beatingprice > 7 ether) _beatingprice=7 ether; return _beatingprice; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"personid","type":"uint256"},{"name":"persongeneration","type":"bool"},{"name":"gene","type":"uint8"}],"name":"beat","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CeoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ExternalAllowdContractGen0","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_mypersonid","type":"uint256"},{"name":"_mypersongeneration","type":"bool"},{"name":"_withpersonid","type":"uint256"},{"name":"_withpersongeneration","type":"bool"}],"name":"readyTobreed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementsERC721","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"total","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"personIndexToSiringPrice0","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newCEO","type":"address"}],"name":"setCEO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"generation","type":"bool"}],"name":"getPersonParents","outputs":[{"name":"fatherId","type":"uint32"},{"name":"motherId","type":"uint32"},{"name":"fatherGeneration","type":"bool"},{"name":"motherGeneration","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newfee","type":"uint256"}],"name":"setBreedingFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_tokengeneration","type":"bool"}],"name":"allowexternalContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"personIndexToOwnerGen1","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_surname","type":"string"},{"name":"_genes","type":"uint64"},{"name":"_gender","type":"bool"}],"name":"createPersonGen0","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newDEV","type":"address"}],"name":"setDEV","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_price","type":"uint256"}],"name":"setprice","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":false,"inputs":[{"name":"tokenId","type":"uint256"},{"name":"generation","type":"bool"},{"name":"newgene","type":"uint64"}],"name":"SetGene","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"DevAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"personid","type":"uint256"},{"name":"persongeneration","type":"bool"}],"name":"checkBeatingPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"NAME","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ExternalAllowdContractGen1","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"priceOf","outputs":[{"name":"price","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"initialTraining","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_mypersonid","type":"uint256"},{"name":"_mypersongeneration","type":"bool"},{"name":"_withpersonid","type":"uint256"},{"name":"_withpersongeneration","type":"bool"},{"name":"_boyname","type":"string"},{"name":"_girlname","type":"string"}],"name":"breedOnAuction","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"breedingFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"personIndexToSiringPrice1","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"fromindex","type":"uint256"},{"name":"toindex","type":"uint256"}],"name":"masscreate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MaxValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"generation","type":"bool"}],"name":"getPerson","outputs":[{"name":"name","type":"string"},{"name":"surname","type":"string"},{"name":"genes","type":"uint64"},{"name":"birthTime","type":"uint64"},{"name":"readyToBreedWithId","type":"uint32"},{"name":"trainedcount","type":"uint32"},{"name":"beatencount","type":"uint32"},{"name":"readyToBreedWithGen","type":"bool"},{"name":"gender","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"personid","type":"uint256"},{"name":"persongeneration","type":"bool"},{"name":"gene","type":"uint8"}],"name":"train","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_mypersonid","type":"uint256"},{"name":"_mypersongeneration","type":"bool"},{"name":"_withpersonid","type":"uint256"},{"name":"_withpersongeneration","type":"bool"},{"name":"_boyname","type":"string"},{"name":"_girlname","type":"string"}],"name":"breed","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"purchase","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"initialBeating","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"personIndexToApprovedGen1","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SYMBOL","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"personid","type":"uint256"},{"name":"persongeneration","type":"bool"}],"name":"checkTrainingPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_mypersonid","type":"uint256"},{"name":"_mypersongeneration","type":"bool"},{"name":"_withpersonid","type":"uint256"},{"name":"_withpersongeneration","type":"bool"},{"name":"_siringprice","type":"uint256"}],"name":"prepareToBreed","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"name","type":"string"},{"indexed":false,"name":"owner","type":"address"}],"name":"Birth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"oldPrice","type":"uint256"},{"indexed":false,"name":"newPrice","type":"uint256"},{"indexed":false,"name":"prevOwner","type":"address"},{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"name","type":"string"}],"name":"TokenSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"caller","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"generation","type":"bool"}],"name":"Trained","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"caller","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"generation","type":"bool"}],"name":"Beaten","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"caller","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"generation","type":"bool"},{"indexed":false,"name":"price","type":"uint256"}],"name":"SiringPriceEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"caller","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"generation","type":"bool"},{"indexed":false,"name":"price","type":"uint256"}],"name":"SellingPriceEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"caller","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"generation","type":"bool"},{"indexed":false,"name":"genes","type":"uint256"}],"name":"GenesInitialisedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"approved","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
608060405260008054600160a060020a031990811673bb5ed1edeb5149af3ab43ea9c7a6963b3c1374f7179091556001805490911673dab64dc4a02225f76fccce35ab9ba53b3735c684179055662386f26fc100006002556509184e72a0006003556512309ce5400060045534801561007757600080fd5b50600d805433600160a060020a03199182168117909255600e805490911690911790556135f2806100a96000396000f30060806040526004361061020b5763ffffffff60e060020a600035041663013a83f1811461021057806306fdde0314610228578063095ea7b3146102b25780630b869824146102d65780630de7e440146103075780630e14f9551461031f5780631051db341461035857806318160ddd1461036d57806323b872dd1461039457806327cae7c0146103be57806327d7874c146103d65780633befedea146103f75780634574dea514610445578063515849161461045d5780635423977714610486578063630e0ae61461049e5780636352211e146104dc57806369288540146104f457806370a082311461051557806384317008146105365780638462151c14610551578063871388c9146105c257806389a4c1a0146105ec578063944c89291461060157806395d89b411461061e578063a3f4df7e14610633578063a9059cbb14610648578063ade2d1931461066c578063b2e6ceeb14610684578063b9186d7d1461069c578063b944ef3c146106b4578063c13fb08b146106c9578063c69cd09d14610769578063c73733861461077e578063cb01cd0214610796578063d230e875146107b1578063e282969e146107c6578063ec0d69e314610910578063ec0ea81614610926578063efef39a1146109c6578063f2abd01d146109d1578063f4c09c17146109e6578063f76f8d78146109fe578063fa28a6b614610a13578063fa6fc03714610a30575b600080fd5b610226600435602435151560ff60443516610a58565b005b34801561023457600080fd5b5061023d610cc3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027757818101518382015260200161025f565b50505050905090810190601f1680156102a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102be57600080fd5b50610226600160a060020a0360043516602435610cfb565b3480156102e257600080fd5b506102eb610d78565b60408051600160a060020a039092168252519081900360200190f35b34801561031357600080fd5b506102eb600435610d87565b34801561032b57600080fd5b5061034460043560243515156044356064351515610da2565b604080519115158252519081900360200190f35b34801561036457600080fd5b50610344610e86565b34801561037957600080fd5b50610382610e8b565b60408051918252519081900360200190f35b3480156103a057600080fd5b50610226600160a060020a0360043581169060243516604435610e91565b3480156103ca57600080fd5b50610382600435610ee1565b3480156103e257600080fd5b50610226600160a060020a0360043516610ef3565b34801561040357600080fd5b506104146004356024351515610f40565b6040805163ffffffff9586168152939094166020840152901515828401521515606082015290519081900360800190f35b34801561045157600080fd5b50610226600435610ff7565b34801561046957600080fd5b50610226600160a060020a03600435166024356044351515611013565b34801561049257600080fd5b506102eb6004356110e5565b3480156104aa57600080fd5b50610382602460048035828101929082013591813591820191013567ffffffffffffffff604435166064351515611100565b3480156104e857600080fd5b506102eb600435611192565b34801561050057600080fd5b50610226600160a060020a03600435166111c3565b34801561052157600080fd5b50610382600160a060020a0360043516611210565b34801561054257600080fd5b5061022660043560243561122b565b34801561055d57600080fd5b50610572600160a060020a03600435166112e0565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105ae578181015183820152602001610596565b505050509050019250505060405180910390f35b3480156105ce57600080fd5b50610226600435602435151567ffffffffffffffff604435166113b2565b3480156105f857600080fd5b506102eb61154e565b34801561060d57600080fd5b50610382600435602435151561155d565b34801561062a57600080fd5b5061023d6115e0565b34801561063f57600080fd5b5061023d611617565b34801561065457600080fd5b50610226600160a060020a036004351660243561164e565b34801561067857600080fd5b506102eb600435611688565b34801561069057600080fd5b506102266004356116a3565b3480156106a857600080fd5b506103826004356116f1565b3480156106c057600080fd5b50610382611703565b604080516020601f60843560048181013592830184900484028501840190955281845261022694803594602480351515956044359560643515159536959460a494909391019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506117099650505050505050565b34801561077557600080fd5b50610382611b79565b34801561078a57600080fd5b50610382600435611b7f565b3480156107a257600080fd5b50610226600435602435611b91565b3480156107bd57600080fd5b50610382611d31565b3480156107d257600080fd5b506107e36004356024351515611d40565b6040805167ffffffffffffffff808a1692820192909252908716606082015263ffffffff808716608083015285811660a0830152841660c082015282151560e08201528115156101008201526101208082528a5190820152895181906020808301916101408401918e019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b5083810382528b5181528b516020918201918d019080838360005b838110156108cc5781810151838201526020016108b4565b50505050905090810190601f1680156108f95780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390f35b610226600435602435151560ff60443516611f2f565b604080516020601f60843560048181013592830184900484028501840190955281845261022694803594602480351515956044359560643515159536959460a494909391019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506121b69650505050505050565b6102266004356124b6565b3480156109dd57600080fd5b506103826126cd565b3480156109f257600080fd5b506102eb6004356126d3565b348015610a0a57600080fd5b5061023d6126ee565b348015610a1f57600080fd5b506103826004356024351515612725565b348015610a3c57600080fd5b50610226600435602435151560443560643515156084356127ae565b33600090815260066020526040812054819081908190811080610b0a575060008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a03909216916370a082319160248082019260209290919082900301818787803b158015610adc57600080fd5b505af1158015610af0573d6000803e3d6000fd5b505050506040513d6020811015610b0657600080fd5b5051115b1515610b1557600080fd5b60008560ff1610158015610b2c5750600a8560ff16105b1515610b3757600080fd5b610b41878761155d565b935034841115610b5057600080fd5b851515610b7a57600f805488908110610b6557fe5b90600052602060002090600402019250610b99565b6010805488908110610b8857fe5b906000526020600020906004020192505b6002830154605a67ffffffffffffffff90911611610bb657600080fd5b600283015460ff8616600a0a9067ffffffffffffffff16811515610bd657fe5b600a91900406915060008211610beb57600080fd5b60028301805467ffffffffffffffff19811660ff8816600a0a67ffffffffffffffff9283160390911617905560038301805463ffffffff19811663ffffffff918216600101909116179055610c403485612903565b604051909150339082156108fc029083906000818181858888f19350505050158015610c70573d6000803e3d6000fd5b50610c79612915565b60408051338152602081018990528715158183015290517fee0cc81767fb293a336247d0b7b2d4a2bd01b9471eb023d895790c4fa4a235b19181900360600190a150505050505050565b60408051808201909152601b81527f43727970746f43656c656272697479427265656465724361726473000000000060208201525b90565b610d0733826001612999565b1515610d1257600080fd5b6000818152600760209081526040918290208054600160a060020a031916600160a060020a03861690811790915582518481529251909233927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92592918290030190a35050565b600d54600160a060020a031681565b600960205260009081526040902054600160a060020a031681565b6000808386148015610db75750821515851515145b15610dc55760009150610e7d565b85158015610dd1575084155b80610de3575083158015610de3575082155b15610df15760009150610e7d565b821515610e1b57600f805485908110610e0657fe5b90600052602060002090600402019050610e3a565b6010805485908110610e2957fe5b906000526020600020906004020190505b600381015460ff6401000000009091041615158515151415610e7857600281015460c060020a900463ffffffff16861415610e785760019150610e7d565b600091505b50949350505050565b600190565b60105490565b610e9d83826001612999565b1515610ea857600080fd5b610eb28282612ab8565b1515610ebd57600080fd5b610ec682612ad8565b1515610ed157600080fd5b610edc838383612ae6565b505050565b600b6020526000908152604090205481565b600d54600160a060020a03163314610f0a57600080fd5b610f1381612ad8565b1515610f1e57600080fd5b600d8054600160a060020a031916600160a060020a0392909216919091179055565b600080808080851515610f7057600f805488908110610f5b57fe5b90600052602060002090600402019050610f8f565b6010805488908110610f7e57fe5b906000526020600020906004020190505b600281015460039091015463ffffffff70010000000000000000000000000000000083048116997401000000000000000000000000000000000000000090930416975060ff660100000000000082048116975067010000000000000090910416945092505050565b600d54600160a060020a0316331461100e57600080fd5b600255565b61101e338383612999565b151561102957600080fd5b801561108b5761103883612ad8565b15611069576000828152600a602052604090208054600160a060020a031916600160a060020a038516179055611086565b6000828152600a602052604090208054600160a060020a03191690555b610edc565b61109483612ad8565b156110c55760008281526009602052604090208054600160a060020a031916600160a060020a038516179055610edc565b5060009081526009602052604090208054600160a060020a031916905550565b600560205260009081526040902054600160a060020a031681565b600d54600090600160a060020a0316331461111a57600080fd5b61118787878080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f8d018190048102820181019092528b815294508b93508a9250829150840183828082843782019150505050505085856000612bab565b979650505050505050565b600081815260056020526040902054600160a060020a03166111b381612ad8565b15156111be57600080fd5b919050565b600e54600160a060020a031633146111da57600080fd5b6111e381612ad8565b15156111ee57600080fd5b600e8054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a031660009081526006602052604090205490565b61123733836001612999565b151561124257600080fd5b60008111158061125d57506a52b7d2dcc80cd2e40000008110155b156112835760008281526008602052604090206a52b7d2dcc80cd2e40000009055611295565b60008281526008602052604090208190555b60408051338152602081018490526001818301526060810183905290517f913e11880c4c308f0b48d197ed7f6f0943891f2440ad527a51d2e06e111460ff9181900360800190a15050565b60606000606060008060006112f487611210565b94508415156113135760408051600081526020810190915295506113a8565b8460405190808252806020026020018201604052801561133d578160200160208202803883390190505b509350611348610e8b565b925060009150600090505b8281116113a457600081815260056020526040902054600160a060020a038881169116141561139c5780848381518110151561138b57fe5b602090810290910101526001909101905b600101611353565b8395505b5050505050919050565b6000806000806113c3338888612999565b806113d85750600d54600160a060020a031633145b15156113e357600080fd5b6402540be3ff8567ffffffffffffffff161115801561140d5750600a8567ffffffffffffffff1610155b151561141857600080fd5b85151561144257600f80548890811061142d57fe5b90600052602060002090600402019350611461565b601080548890811061145057fe5b906000526020600020906004020193505b6002840154605a67ffffffffffffffff909116111561147f57600080fd5b5083915060009050805b600a8110156114bd57600a67ffffffffffffffff8416069190910190600a67ffffffffffffffff8416049250600101611489565b600284015467ffffffffffffffff8381169116146114da57600080fd5b60028401805467ffffffffffffffff871667ffffffffffffffff19909116811790915560408051338152602081018a9052881515818301526060810192909252517fa3538417882555b2b672efa68fe316620fd2b0413107809b0653bbb4f920a6689181900360800190a150505050505050565b600e54600160a060020a031681565b6000808083151561158b57600f80548690811061157657fe5b906000526020600020906004020191506115aa565b601080548690811061159957fe5b906000526020600020906004020191505b50600454600382015463ffffffff1660020a02676124fee993bc00008111156115d85750676124fee993bc00005b949350505050565b60408051808201909152600d81527f43656c6542726565644361726400000000000000000000000000000000000000602082015290565b60408051808201909152601b81527f43727970746f43656c6562726974794272656564657243617264730000000000602082015281565b61165a33826001612999565b151561166557600080fd5b61166e82612ad8565b151561167957600080fd5b611684338383612ae6565b5050565b600a60205260009081526040902054600160a060020a031681565b6000818152600560205260409020543390600160a060020a03166116c682612ad8565b15156116d157600080fd5b6116db8284612ab8565b15156116e657600080fd5b610edc818385612ae6565b60009081526008602052604090205490565b60035481565b600080600080600080600061171f338e8e612999565b151561172a57600080fd5b611732610e8b565b600101622625a01161174357600080fd5b8a8d14801561175557508915158c1515145b1561175f57600080fd5b8c15801561176b57508b155b8061177d57508a15801561177d575089155b1561178757600080fd5b8b15156117b157600f80548e90811061179c57fe5b906000526020600020906004020196506117ed565b601080548e9081106117bf57fe5b60009182526020909120600490910201600381015490975065010000000000900460ff16156117ed57600080fd5b6002870154605a67ffffffffffffffff9091161161180a57600080fd5b600287015467ffffffffffffffff1693508915156118e657600f80548c90811061183057fe5b90600052602060002090600402019650600b60008c81526020019081526020016000205494506000809054906101000a9004600160a060020a0316600160a060020a0316636352211e8c6040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b1580156118b357600080fd5b505af11580156118c7573d6000803e3d6000fd5b505050506040513d60208110156118dd57600080fd5b5051955061192c565b601080548c9081106118f457fe5b600091825260208083208e8452600c825260408085205460059093529093205460049092029092019850600160a060020a0316965094505b60008511801561194657506a52b7d2dcc80cd2e400000085105b151561195157600080fd5b60025434908601111561196357600080fd5b600287015461197f90859067ffffffffffffffff168f8e61319d565b9093509150811561198e578897505b611a3888886001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a2a5780601f106119ff57610100808354040283529160200191611a2a565b820191906000526020600020905b815481529060010190602001808311611a0d57829003601f168201915b505050505085856001612bab565b905089601082815481101515611a4a57fe5b906000526020600020906004020160030160066101000a81548160ff0219169083151502179055508b601082815481101515611a8257fe5b906000526020600020906004020160030160076101000a81548160ff0219169083151502179055508a601082815481101515611aba57fe5b906000526020600020906004020160020160106101000a81548163ffffffff021916908363ffffffff1602179055508c601082815481101515611af957fe5b906000526020600020906004020160020160146101000a81548163ffffffff021916908363ffffffff16021790555085600160a060020a03166108fc869081150290604051600060405180830381858888f19350505050158015611b61573d6000803e3d6000fd5b50611b6a612915565b50505050505050505050505050565b60025481565b600c6020526000908152604090205481565b600d54606090819060009081908190600160a060020a03163314611bb457600080fd5b50855b858111611d2857600154604080517fe282969e000000000000000000000000000000000000000000000000000000008152600481018490526000602482018190529151600160a060020a039093169263e282969e9260448084019391929182900301818387803b158015611c2a57600080fd5b505af1158015611c3e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610120811015611c6857600080fd5b810190808051640100000000811115611c8057600080fd5b82016020810184811115611c9357600080fd5b8151640100000000811182820187101715611cad57600080fd5b50509291906020018051640100000000811115611cc957600080fd5b82016020810184811115611cdc57600080fd5b8151640100000000811182820187101715611cf657600080fd5b5050602082015160e09092015194995097509550919350611d1f91508690508585856000612bab565b50600101611bb7565b50505050505050565b6a52b7d2dcc80cd2e400000081565b6060806000808080808080808a1515611d7657600f80548d908110611d6157fe5b90600052602060002090600402019050611d95565b601080548d908110611d8457fe5b906000526020600020906004020190505b8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152918391830182828015611e1b5780601f10611df057610100808354040283529160200191611e1b565b820191906000526020600020905b815481529060010190602001808311611dfe57829003601f168201915b50505050509950806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611eba5780601f10611e8f57610100808354040283529160200191611eba565b820191906000526020600020905b815481529060010190602001808311611e9d57829003601f168201915b50505060028401546003909401549c9f929e505067ffffffffffffffff8084169d50680100000000000000008404169b63ffffffff60c060020a850481169c5060e060020a90940484169a5092831698505060ff64010000000083048116975065010000000000909204909116945092505050565b33600090815260066020526040812054819081908190811080611fe1575060008054604080517f70a082310000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a03909216916370a082319160248082019260209290919082900301818787803b158015611fb357600080fd5b505af1158015611fc7573d6000803e3d6000fd5b505050506040513d6020811015611fdd57600080fd5b5051115b1515611fec57600080fd5b60008560ff16101580156120035750600a8560ff16105b151561200e57600080fd5b6120188787612725565b93503484111561202757600080fd5b85151561205157600f80548890811061203c57fe5b90600052602060002090600402019250612070565b601080548890811061205f57fe5b906000526020600020906004020192505b6002830154605a67ffffffffffffffff9091161161208d57600080fd5b600283015460ff8616600a0a9067ffffffffffffffff168115156120ad57fe5b600a919004069150600982106120c257600080fd5b60028301805463ffffffff60e060020a67ffffffffffffffff80841660ff8b16600a0a011667ffffffffffffffff199093169290921782810482166001019091169091027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091161790556121333485612903565b604051909150339082156108fc029083906000818181858888f19350505050158015612163573d6000803e3d6000fd5b5061216c612915565b60408051338152602081018990528715158183015290517fdfda1f36e9a72c0e20d2410764fc28694c08c78e70289efc7622f83ef80e30fe9181900360600190a150505050505050565b60008060008060006121c9338c8c612999565b15156121d457600080fd5b6121dc610e8b565b600101622625a0116121ed57600080fd5b89151561221757600f80548c90811061220257fe5b90600052602060002090600402019450612253565b601080548c90811061222557fe5b60009182526020909120600490910201600381015490955065010000000000900460ff161561225357600080fd5b6002850154605a67ffffffffffffffff9091161161227057600080fd5b600285015467ffffffffffffffff1693508715156122ab57600f80548a90811061229657fe5b906000526020600020906004020194506122ca565b601080548a9081106122b957fe5b906000526020600020906004020194505b6122d68b8b8b8b610da2565b15156122e157600080fd5b6002543410156122f057600080fd5b6002850180546000805160206135a7833981519152811690915560038601805464ff000000001916905561233190859067ffffffffffffffff168d8c61319d565b90935091508115612340578695505b6123b186866001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a2a5780601f106119ff57610100808354040283529160200191611a2a565b9050876010828154811015156123c357fe5b906000526020600020906004020160030160066101000a81548160ff021916908315150217905550896010828154811015156123fb57fe5b906000526020600020906004020160030160076101000a81548160ff0219169083151502179055508860108281548110151561243357fe5b906000526020600020906004020160020160106101000a81548163ffffffff021916908363ffffffff1602179055508a60108281548110151561247257fe5b906000526020600020906004020160020160146101000a81548163ffffffff021916908363ffffffff1602179055506124a9612915565b5050505050505050505050565b6000818152600560209081526040808320546008909252822080546a52b7d2dcc80cd2e4000000909155600160a060020a0390911691339190828414156124fc57600080fd5b61250583612ad8565b151561251057600080fd5b3482111561251d57600080fd5b6125273483612903565b9050612534848487612ae6565b600160a060020a038416301461257c57604051600160a060020a0385169083156108fc029084906000818181858888f1935050505015801561257a573d6000803e3d6000fd5b505b6125878560016133d0565b7e8201e7bcbf010c2c07de59d6e97cb7e3cf67a46125c49cbc89b9d2cde1f48f85836008600089815260200190815260200160002054878760108b8154811015156125ce57fe5b6000918252602091829020604080518981529384018890528301869052600160a060020a0380861660608501528416608084015260c060a08401818152600490930290910180546002600019610100600184161502019091160491840182905292919060e0830190849080156126855780601f1061265a57610100808354040283529160200191612685565b820191906000526020600020905b81548152906001019060200180831161266857829003601f168201915b505097505050505050505060405180910390a1604051339082156108fc029083906000818181858888f193505050501580156126c5573d6000803e3d6000fd5b505050505050565b60045481565b600760205260009081526040902054600160a060020a031681565b60408051808201909152600d81527f43656c6542726565644361726400000000000000000000000000000000000000602082015281565b6000808083151561275357600f80548690811061273e57fe5b90600052602060002090600402019150612772565b601080548690811061276157fe5b906000526020600020906004020191505b5060035460028281015460e060020a900463ffffffff16900a02674563918244f400008111156115d85750674563918244f40000949350505050565b60006127bb338787612999565b15156127c657600080fd5b84151561280057600f8054879081106127db57fe5b60009182526020808320898452600b9091526040909220849055600402019050612854565b601080548790811061280e57fe5b906000526020600020906004020190508060030160059054906101000a900460ff1615156001151514151561284257600080fd5b6000868152600c602052604090208290555b6002810154605a67ffffffffffffffff9091161161287157600080fd5b6002810180546000805160206135a78339815191521660c060020a63ffffffff87160217905560038101805464ff000000001916640100000000851515021790556040805133815260208101889052861515818301526060810184905290517f9c9bbfc444fadb4f6ea76eeea0f2096baf957e36bf9dea2e1520dfc82e6934aa916080908290030190a1505050505050565b60008282111561290f57fe5b50900390565b600e54604051600160a060020a03909116906003600a3031040280156108fc02916000818181858888f19350505050158015612955573d6000803e3d6000fd5b50600d54604051600160a060020a03909116906007600a3031040280156108fc02916000818181858888f19350505050158015612996573d6000803e3d6000fd5b50565b600081156129e957600083815260056020526040902054600160a060020a03858116911614806129e257506000838152600a6020526040902054600160a060020a038581169116145b9050612ab1565b60008054604080517faa1d98af000000000000000000000000000000000000000000000000000000008152600481018790529051600160a060020a039092169263aa1d98af926024808401936020939083900390910190829087803b158015612a5157600080fd5b505af1158015612a65573d6000803e3d6000fd5b505050506040513d6020811015612a7b57600080fd5b5051600160a060020a03858116911614806129e25750600083815260096020526040902054600160a060020a0385811691161490505b9392505050565b600090815260076020526040902054600160a060020a0391821691161490565b600160a060020a0316151590565b600160a060020a038216600081815260066020908152604080832080546001019055848352600590915290208054600160a060020a0319169091179055612b2c83612ad8565b15612b5c57600160a060020a03831660009081526006602052604090208054600019019055612b5c8160016133d0565b60408051600160a060020a0380861682528416602082015280820183905290517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360600190a1505050565b6000612bb56134a2565b50604080516101a0810182528781526020810187905267ffffffffffffffff8087169282019290925242909116606082015260006080820181905260a0820181905260c0820181905260e082018190526101008201819052610120820181905284151561014083015261016082018190526101808201819052831515612e7257600f8054600181810180845560009390935284518051919392869260049091027f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020191612c879183916020019061350e565b506020828101518051612ca0926001850192019061350e565b5060408201516002820180546060850151608086015160a087015160c088015160e089015167ffffffffffffffff1990951667ffffffffffffffff978816176fffffffffffffffff000000000000000019166801000000000000000097909416969096029290921773ffffffff00000000000000000000000000000000191670010000000000000000000000000000000063ffffffff928316021777ffffffff000000000000000000000000000000000000000019167401000000000000000000000000000000000000000092821692909202919091176000805160206135a78339815191521660c060020a94821694909402939093177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e060020a91841691909102179055610100830151600390920180546101208501516101408601516101608701516101809097015163ffffffff19909316959094169490941764ff000000001916640100000000941515949094029390931765ff0000000000191665010000000000921515929092029190911766ff00000000000019166601000000000000931515939093029290921767ff000000000000001916670100000000000000911515919091021790550390506130d7565b60108054600181810180845560009390935284518051919392869260049091027f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720191612ec49183916020019061350e565b506020828101518051612edd926001850192019061350e565b506040828101516002830180546060860151608087015160a088015160c089015160e08a015167ffffffffffffffff1990951667ffffffffffffffff978816176fffffffffffffffff000000000000000019166801000000000000000097909416969096029290921773ffffffff00000000000000000000000000000000191670010000000000000000000000000000000063ffffffff928316021777ffffffff000000000000000000000000000000000000000019167401000000000000000000000000000000000000000092821692909202919091176000805160206135a78339815191521660c060020a94821694909402939093177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e060020a91841691909102179055610100840151600390930180546101208601516101408701516101608801516101809098015163ffffffff19909316969094169590951764ff000000001916640100000000951515959095029490941765ff0000000000191665010000000000921515929092029190911766ff00000000000019166601000000000000941515949094029390931767ff0000000000000019166701000000000000009215159290920291909117909155919003600081815260086020529182206a52b7d2dcc80cd2e4000000905591506130d7903383612ae6565b7fb3b0cf861f168bcdb275c69da97b2543631552ba562628aa3c7317d4a6089ef2818933604051808481526020018060200183600160a060020a0316600160a060020a03168152602001828103825284818151815260200191508051906020019080838360005b8381101561315657818101518382015260200161313e565b50505050905090810190601f1680156131835780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1979650505050505050565b600080808080808080805b600a81101561335f57600a67ffffffffffffffff8e16069550600a67ffffffffffffffff8d16069450600a67ffffffffffffffff8e16049c50600a67ffffffffffffffff8d166040805143408152602081018590524281830152606081018f9052608081018e905290519081900360a00190209190049c506127109067ffffffffffffffff16069350600267ffffffffffffffff87870116049650601a8467ffffffffffffffff16101561326157600387039650613311565b6101c78467ffffffffffffffff16101561328057600287039650613311565b610c658467ffffffffffffffff16101561329f57600187039650613311565b611aab8467ffffffffffffffff1610156132b857613311565b6125498467ffffffffffffffff1610156132d757600187019650613311565b6126f68467ffffffffffffffff1610156132f657600287019650613311565b6127108467ffffffffffffffff161015613311576003870196505b600c8767ffffffffffffffff16111561332957600096505b60098767ffffffffffffffff16111561334157600996505b600a81900a67ffffffffffffffff88160292909201916001016131a8565b60408051434081527f0b000000000000000000000000000000000000000000000000000000000000006020820152426021820152604181018d9052606181018c905290519081900360810190206000600190911611156133be57600191505b50909b909a5098505050505050505050565b600081151561342257600f8054849081106133e757fe5b600091825260208083208684526009825260408085208054600160a060020a0319169055600b90925290832092909255600402019050613477565b601080548490811061343057fe5b60009182526020808320868452600a825260408085208054600160a060020a0319908116909155600c84528186208690556007909352909320805490911690556004020190505b6002810180546000805160206135a7833981519152169055600301805464ff00000000191690555050565b604080516101a081018252606080825260208201819052600092820183905281018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061354f57805160ff191683800117855561357c565b8280016001018555821561357c579182015b8281111561357c578251825591602001919060010190613561565b5061358892915061358c565b5090565b610cf891905b8082111561358857600081556001016135925600ffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffa165627a7a72305820c5933c9bac1772928ed8a489652f6b8d336b6483d85ba07c576af10d6b9921a10029
Swarm Source
bzzr://c5933c9bac1772928ed8a489652f6b8d336b6483d85ba07c576af10d6b9921a1
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ Download: CSV Export ]
[ 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.