Crypto Kitties offers a marketplace where you can buy kitties. The functionality is handeled by a contract called SaleClockAuction
. This contract inherits from ClockAuctionBase
where all auctions are stored in a mapping mapping (uint256 => Auction) tokenIdToAuction;
The only way to get an auction seems to be the function getAuction(uint256 _tokenId)
.
If I want a list of all auctions would mean I had to iterate over all kitties and call getAuction(uint256 _tokenId)
for each kitty to check if an auction exists.
Question is: Is this really the way to do it or am I missing something here?
https://github.com/dapperlabs/cryptokitties-bounty/tree/master/contracts/Auction