观察者模式类图
2018-03-06 13:42:12 0 举报
kitty
作者其他创作
大纲/内容
KittyBreeding
-uint256 public autoBirthFee = 2 finney;-uint256 public pregnantKitties;-GeneScienceInterface public geneScience;
+ Pregnant+ setGeneScienceAddress+ _isReadyToBreed+ _isSiringPermitted+ _triggerCooldown+ approveSiring+ setAutoBirthFee+ _isReadyToGiveBirth+ isReadyToBreed+ isPregnant+ _isValidMatingPair+ _canBreedWithViaAuction+ canBreedWith+ _breedWith+ breedWithAuto+ giveBirth
struct Kitty
-uint256 genes;-uint64 birthTime;-uint64 cooldownEndBlock;-uint32 matronId;-uint32 sireId;-uint32 siringWithId;-uint16 cooldownIndex;-uint16 generation;
KittyAccessControl
-address public ceoAddress-address public cfoAddress-address public cooAddress-bool public paused = false;
+ onlyCEO+ onlyCFO+ onlyCOO+ onlyCLevel+ setCEO+ setCFO+ setCOO+ whenNotPaused+ whenPaused+ pause+ unpause
ERC721Metadata
+getMetadata
KittyCore
-address public newContractAddress;
+ KittyCore+ setNewAddress+ function() external payable+ getKitty+ unpause+ withdrawBalance
KittyBase
-uint32[14] public cooldowns-uint256 public secondsPerBlock-Kitty[] kitties;-mapping (uint256 = address) public kittyIndexToOwner;-mapping (address = uint256) ownershipTokenCount;-mapping (uint256 = address) public kittyIndexToApproved;-mapping (uint256 = address) public sireAllowedToAddress;-SaleClockAuction public saleAuction;-SiringClockAuction public siringAuction;
+ Birth+ Transfer+ _transfer+ _createKitty+ setSecondsPerBlock
SiringClockAuction
-bool public isSiringClockAuction = true;
+ SiringClockAuction+ createAuction+ bid
Pausable
-bool public paused = false;
+ Pause+ Unpause+ whenNotPaused+ whenPaused+ pause+ unpause
KittyOwnership
-string public constant name = \"CryptoKitties\";-string public constant symbol = \"CK\";-ERC721Metadata public erc721Metadata;-bytes4 constant InterfaceSignature_ERC165 = bytes4(keccak256('supportsInterface(bytes4)'));-bytes4 constant InterfaceSignature_ERC721
+ supportsInterface+ setMetadataAddress+ _owns+ _approvedFor+ _approve+ balanceOf+ transfer+ approve+ whenPaused+ pause+ unpause
ERC721
+ totalSupply+ balanceOf+ ownerOf+ approve+ transfer+ transferFrom+ Transfer+ Approval+ supportsInterface
ClockAuction
-bytes4 constant InterfaceSignature_ERC721 = bytes4(0x9a20483d);
+ ClockAuction+ withdrawBalance+ createAuction+ bid+ cancelAuction+ cancelAuctionWhenPaused+ getAuction+ getCurrentPrice
SaleClockAuction
-bool public isSaleClockAuction = true;-uint256 public gen0SaleCount;-uint256[5] public lastGen0SalePrices;
+ SaleClockAuction+ createAuction+ bid+ averageGen0SalePrice
KittyAuction
+ setSaleAuctionAddress+ setSiringAuctionAddress+ createSaleAuction+ createSiringAuction+ bidOnSiringAuction+ withdrawAuctionBalances
ClockAuctionBase
-struct Auction-ERC721 public nonFungibleContract;-uint256 public ownerCut;-mapping (uint256 = Auction) tokenIdToAuction;
+ AuctionCreated+ AuctionSuccessful+ AuctionCancelled+ _owns+ _escrow+ _transfer+ _addAuction+ _cancelAuction+ _bid+ _removeAuction+ _isOnAuction+ _currentPrice+ _computeCurrentPrice+ _computeCut
Ownable
-address public owner
+ Ownable+ onlyOwner+ transferOwnership
GeneScienceInterface
+ isGeneScience+ mixGenes
KittyMinting
-uint256 public constant PROMO_CREATION_LIMIT = 5000;-uint256 public constant GEN0_CREATION_LIMIT = 45000;-uint256 public constant GEN0_STARTING_PRICE = 10 finney;-uint256 public constant GEN0_AUCTION_DURATION = 1 days;-uint256 public promoCreatedCount;-uint256 public gen0CreatedCount;
+ createPromoKitty+ createGen0Auction+ _computeNextGen0Price
0 条评论
下一页