Sponsored Link:  Up to 2% Cryptocurrency Cashback - Reserve your card - Monaco App - www.mona.co
Contract Overview | CryptoKittiesSiringAuction
ETH Balance: 2.058147855666991271 Ether
ETH USD Value: $1,629.07 (@ $791.52/ETH)
No Of Transactions: 27850 txns
  Latest 25 txns from a total Of 27850 transactions (> more than 25 PendingTxns) View All

TxHash Age From To Value [TxFee]
0x795b4c45bf6d5c62920ec6befa211d2a557dc0083aa1dfc7ae43b418cc650939(pending) 2 secs ago0xa2aadfb81b99ca59645a9cddaabd7b09fc3615ac  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xa4cb7ba55e18c00c2c132e020d15000346164672f39c9afec4699086bf366114(pending) 20 secs ago0x23db88c11988a0e69ec7f94b043d27b748d53ee3  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x14b80f8f6d731e1db018466097429c88ca5ee79fcfe931e6e6aaea0f2deabade(pending)1 min ago0xb608cd075f1c50668edfd453e225e850f5d58a11  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x1ed57ea0bbec389dee53d2338ce878f4cf2d70e763d1bbaf2dffc74ca33708cf(pending)2 mins ago0x693ee889984d66c691315dd666a5eb45fd3d2fb0  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x36487f5727eca9b6cfb8f32bfdac909ce6ee1af95789bc59b771023b460bf40d(pending)2 mins ago0x8a989b6422d8f618df84bd2d7ab2fa21040d206a  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xd69e24786541c2583789062b0b20f7086d09ea1c5737e258b6f1c35f99c049d5(pending)3 mins ago0x81eadb252d3a1073da09eb2492f9b2cccf046c24  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xf6eba4ce732caf44317f4e03389265e673f14cd28f33c99ca91008d4b3f73e7e(pending)3 mins ago0xd815aff2df478ce14fe98c657ece0fbf7bd972fe  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xc841719793bd83ed379028f30afaa46b343c502b89792b635f60ee63bae67b8e(pending)3 mins ago0x81eadb252d3a1073da09eb2492f9b2cccf046c24  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xe5ae2e884c9b29b5a698db3290ac0208df0826f0034bc91399dc032b8cd84b4d(pending)5 mins ago0x0429c8d18b916dffa9d3ac0bc56d34d9014456ef  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xa8d7249bd5e92dbce6040f29887eedfa588850b7ac4348726e8a15499a882a15(pending)5 mins ago0x88f8c74a8dbf9172ca9a60e007c8b85fc501da0a  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x60d62935ef4e54642c3755547f2927d015eb031c2d771aa98338631a8f12a664(pending)5 mins ago0x88f8c74a8dbf9172ca9a60e007c8b85fc501da0a  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xe0fcc3296e492b8a14c1363ebf5380bd4e4ad804218eb31c04f36de34c22b4af(pending)6 mins ago0x02c6d31121e5e3cc649a6ce064b41fce5d3ef9a1  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x0466b5762c1942954fbfda9051d727fa24370ffdf2e4070950be7bca71b8d1fb(pending)6 mins ago0x02c6d31121e5e3cc649a6ce064b41fce5d3ef9a1  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x8590bd9678ac47eb303c9acd3693a83f334ebe54225b50acf89557ba7abaa1c6(pending)7 mins ago0x287b1574aff39811c0b38fa24aafa7f0dfc1dbd1  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x9d64b56a0c1330b1f421cfd481b2238338e6fbbea97d1184436355764c25f31e(pending)7 mins ago0xcaad2041a575e5a28c940a29f66235be9939e2b0  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xb4a1202fa4ee7ff392b16d50a22cd237ab9e5320d16b36e4bd0c81b35866186f(pending)7 mins ago0x013e04bf165637bb8401e6621bb804eb25c54b60  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x18b57c5d3b1738da99b50dcd3651bb889fed8acf3e9c59809908f3edfede5fa4(pending)8 mins ago0xfbb1d2260e06b5838979e56854d4fdde68a971ef  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xd0289e76d4bed1d40ddb406af12e4e7f7bcbacf3d622d850fc16dbf257269e1a(pending)8 mins ago0x339bd597182f2351c8f3714a1082cb3060469efd  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x562032a6f3df74036f02db053cbbbe477d548977fc406bc7438e08e6b5d5fbde(pending)9 mins ago0x6975be450864c02b4613023c2152ee0743572325  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x2a19d4edbd130ebc816e775732cbe4abba8ecdb53e8b50d7274423629ea0bdfc(pending)9 mins ago0xc10f78b0608a9874d5fa739cb11e62ccd7f257a7  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x0402d8089095ec4dc21459b2674e23add6b1a2116f18efdf7f61e0a2fb396bb2(pending)10 mins ago0x3bdad638178383c111ffc57fdb874c40be5d399b  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xf5db84c35472fe4adcbc3ea257f8a25bc2a68bfcd103a00b01c6685c88ec474f(pending)11 mins ago0xe4449467b841787087cb2b5ceb50dd3a6a5232aa  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x77b7d651e75c4d377a192ec1b5c3622a3892bded7716378b7636d5a51cb658e2(pending)11 mins ago0x886e8464df533e8a209096756473747166fef4fe  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0xf537390f0e91d02575b0d738262f83c42a18b02b6fbb8d89ad9d63122a6beed0(pending)12 mins ago0x02c6d31121e5e3cc649a6ce064b41fce5d3ef9a1  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
0x14201be89c90d0394918905509a94dfbd5c9764364b9b6183a2ce89cce0316fa(pending)13 mins ago0x10d868fe303ae09af2c0a9b832367da0c44c9c17  IN  0xc7af99fe5513eb6710e6d5f44f9989da40f27f260 Ether(pending)
 Internal Transactions as a result of Contract Execution
  Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x22aa335745eaefa2b2ba92b2c873238cc020ee3c6806c41cbbc3ab416ab37e1347566732 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000087379020833333 Ether
0x22aa335745eaefa2b2ba92b2c873238cc020ee3c6806c41cbbc3ab416ab37e1347566732 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.006635167534722223 Ether
0x22aa335745eaefa2b2ba92b2c873238cc020ee3c6806c41cbbc3ab416ab37e1347566732 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.006981059576388889 Ether
0xab8029b0a5650a45ff5cdd0340f0b3abf95c0443223bd721f126e8eb684adc1547566712 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x609f3a23938a4156ca9d5bfcc108d795a2e259850.01925 Ether
0xab8029b0a5650a45ff5cdd0340f0b3abf95c0443223bd721f126e8eb684adc1547566712 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.02 Ether
0xb85f2eb54f8e31c478f6c8cdce2e883d862df1962c5c409367b0ecb23f1dff2d47566624 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000039425091666666 Ether
0xb85f2eb54f8e31c478f6c8cdce2e883d862df1962c5c409367b0ecb23f1dff2d47566624 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x3688cff169beb7aa60fcd1157ddea07077d25d4f0.006697663194444446 Ether
0xb85f2eb54f8e31c478f6c8cdce2e883d862df1962c5c409367b0ecb23f1dff2d47566624 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.006998036202777778 Ether
0x2274b0cf86c5b34ed5241f37726d03764fef04eef667bb3ea79b8e23030d2f4c475664211 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000053899832561728 Ether
0x2274b0cf86c5b34ed5241f37726d03764fef04eef667bb3ea79b8e23030d2f4c475664211 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.023388675733024692 Ether
0x2274b0cf86c5b34ed5241f37726d03764fef04eef667bb3ea79b8e23030d2f4c475664211 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.024353822672067901 Ether
0x8d9844a8e1cd055275f242b6b8b28c7c4b9d081b496851b2a8a45cc7697d8c7c475663614 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000005023606944444 Ether
0x8d9844a8e1cd055275f242b6b8b28c7c4b9d081b496851b2a8a45cc7697d8c7c475663614 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x99c04ae385e3c247d8af67b193357b79ade10cf20.007311925347222223 Ether
0x8d9844a8e1cd055275f242b6b8b28c7c4b9d081b496851b2a8a45cc7697d8c7c475663614 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.0076018291625 Ether
0xe859645343aaafbf5be649e86995e5599c8b01d3768b9fd9c6ee0989c97771d3475662915 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000289035872685185 Ether
0xe859645343aaafbf5be649e86995e5599c8b01d3768b9fd9c6ee0989c97771d3475662915 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x42cec1efe742be293cdf8df2a89f48814cf084ff0.063050322627314816 Ether
0xe859645343aaafbf5be649e86995e5599c8b01d3768b9fd9c6ee0989c97771d3475662915 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.065795864576388889 Ether
0x8ceb664863f19d101378844281c059f103074a2ca36b8b7e6df29c3a110ae194475662616 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000027963090277777 Ether
0x8ceb664863f19d101378844281c059f103074a2ca36b8b7e6df29c3a110ae194475662616 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x8b9aeb3aac88f59d7441216dd37bcb98bf8a6b790.079395332754629631 Ether
0x8ceb664863f19d101378844281c059f103074a2ca36b8b7e6df29c3a110ae194475662616 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.082516620497685185 Ether
0x234f3d28bd9deb246b64f4c2b9483fd605306d22924ff21c3a78196002c7c371475661719 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260x06012c8cf97bead5deae237070f9587f8e7a266d0.000007251284722222 Ether
0x234f3d28bd9deb246b64f4c2b9483fd605306d22924ff21c3a78196002c7c371475661719 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260xeca46592d25c07f72bbf6ed5ee10c31b24fa9d1d0.01442546875 Ether
0x234f3d28bd9deb246b64f4c2b9483fd605306d22924ff21c3a78196002c7c371475661719 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.014994751284722222 Ether
0x7c8201f4052e1de48576ea31516b8676bde1027e3c8e0b24732db6ecc107960a475661220 mins ago0xc7af99fe5513eb6710e6d5f44f9989da40f27f260xe0fdd61ae3e982da2a242219d4ae5b42bc9492570.0009625 Ether
0x7c8201f4052e1de48576ea31516b8676bde1027e3c8e0b24732db6ecc107960a475661220 mins ago0x06012c8cf97bead5deae237070f9587f8e7a266d0xc7af99fe5513eb6710e6d5f44f9989da40f27f260.001 Ether
[ Download CSV Export  ] 
Contract Source Code Verified
Contract Name: SiringClockAuction
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.11;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }

}



/// @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 totalSupply() public view returns (uint256 total);
    function balanceOf(address _owner) public view returns (uint256 balance);
    function ownerOf(uint256 _tokenId) external view returns (address owner);
    function approve(address _to, uint256 _tokenId) external;
    function transfer(address _to, uint256 _tokenId) external;
    function transferFrom(address _from, address _to, uint256 _tokenId) external;

    // Events
    event Transfer(address from, address to, uint256 tokenId);
    event Approval(address owner, address approved, uint256 tokenId);

    // Optional
    // function name() public view returns (string name);
    // function symbol() public view returns (string symbol);
    // function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
    // function tokenMetadata(uint256 _tokenId, string _preferredTransport) public view returns (string infoUrl);

    // ERC-165 Compatibility (https://github.com/ethereum/EIPs/issues/165)
    function supportsInterface(bytes4 _interfaceID) external view returns (bool);
}









/// @title Auction Core
/// @dev Contains models, variables, and internal methods for the auction.
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract ClockAuctionBase {

    // 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
        // NOTE: 0 if this auction has been concluded
        uint64 startedAt;
    }

    // Reference to contract tracking NFT ownership
    ERC721 public nonFungibleContract;

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

    // Map from token ID to their corresponding auction.
    mapping (uint256 => Auction) tokenIdToAuction;

    event AuctionCreated(uint256 tokenId, uint256 startingPrice, uint256 endingPrice, uint256 duration);
    event AuctionSuccessful(uint256 tokenId, uint256 totalPrice, address winner);
    event AuctionCancelled(uint256 tokenId);

    /// @dev Returns true if the claimant owns the token.
    /// @param _claimant - Address claiming to own the token.
    /// @param _tokenId - ID of token whose ownership to verify.
    function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return (nonFungibleContract.ownerOf(_tokenId) == _claimant);
    }

    /// @dev Escrows the NFT, assigning ownership to this contract.
    /// Throws if the escrow fails.
    /// @param _owner - Current owner address of token to escrow.
    /// @param _tokenId - ID of token whose approval to verify.
    function _escrow(address _owner, uint256 _tokenId) internal {
        // it will throw if transfer fails
        nonFungibleContract.transferFrom(_owner, this, _tokenId);
    }

    /// @dev Transfers an NFT owned by this contract to another address.
    /// Returns true if the transfer succeeds.
    /// @param _receiver - Address to transfer NFT to.
    /// @param _tokenId - ID of token to transfer.
    function _transfer(address _receiver, uint256 _tokenId) internal {
        // it will throw if transfer fails
        nonFungibleContract.transfer(_receiver, _tokenId);
    }

    /// @dev Adds an auction to the list of open auctions. Also fires the
    ///  AuctionCreated event.
    /// @param _tokenId The ID of the token to be put on auction.
    /// @param _auction Auction to add.
    function _addAuction(uint256 _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;

        AuctionCreated(
            uint256(_tokenId),
            uint256(_auction.startingPrice),
            uint256(_auction.endingPrice),
            uint256(_auction.duration)
        );
    }

    /// @dev Cancels an auction unconditionally.
    function _cancelAuction(uint256 _tokenId, address _seller) internal {
        _removeAuction(_tokenId);
        _transfer(_seller, _tokenId);
        AuctionCancelled(_tokenId);
    }

    /// @dev Computes the price and transfers winnings.
    /// Does NOT transfer ownership of token.
    function _bid(uint256 _tokenId, uint256 _bidAmount)
        internal
        returns (uint256)
    {
        // Get a reference to the auction struct
        Auction storage auction = tokenIdToAuction[_tokenId];

        // Explicitly check that this auction is currently live.
        // (Because of how Ethereum mappings work, we can't just count
        // on the lookup above failing. An invalid _tokenId will just
        // return an auction object that is all zeros.)
        require(_isOnAuction(auction));

        // Check that the bid is greater than or equal to the current price
        uint256 price = _currentPrice(auction);
        require(_bidAmount >= price);

        // Grab a reference to the seller before the auction struct
        // gets deleted.
        address seller = auction.seller;

        // The bid is good! Remove the auction before sending the fees
        // to the sender so we can't have a reentrancy attack.
        _removeAuction(_tokenId);

        // Transfer proceeds to seller (if there are any!)
        if (price > 0) {
            // Calculate the auctioneer's cut.
            // (NOTE: _computeCut() is guaranteed to return a
            // value <= price, so this subtraction can't go negative.)
            uint256 auctioneerCut = _computeCut(price);
            uint256 sellerProceeds = price - auctioneerCut;

            // NOTE: Doing a transfer() in the middle of a complex
            // method like this is generally discouraged because of
            // reentrancy attacks and DoS attacks if the seller is
            // a contract with an invalid fallback function. We explicitly
            // guard against reentrancy attacks by removing the auction
            // before calling transfer(), and the only thing the seller
            // can DoS is the sale of their own asset! (And if it's an
            // accident, they can call cancelAuction(). )
            seller.transfer(sellerProceeds);
        }

        // Calculate any excess funds included with the bid. If the excess
        // is anything worth worrying about, transfer it back to bidder.
        // NOTE: We checked above that the bid amount is greater than or
        // equal to the price so this cannot underflow.
        uint256 bidExcess = _bidAmount - price;

        // Return the funds. Similar to the previous transfer, this is
        // not susceptible to a re-entry attack because the auction is
        // removed before any transfers occur.
        msg.sender.transfer(bidExcess);

        // Tell the world!
        AuctionSuccessful(_tokenId, price, msg.sender);

        return price;
    }

    /// @dev Removes an auction from the list of open auctions.
    /// @param _tokenId - ID of NFT on auction.
    function _removeAuction(uint256 _tokenId) internal {
        delete tokenIdToAuction[_tokenId];
    }

    /// @dev Returns true if the NFT is on auction.
    /// @param _auction - Auction to check.
    function _isOnAuction(Auction storage _auction) internal view returns (bool) {
        return (_auction.startedAt > 0);
    }

    /// @dev Returns current price of an NFT on auction. Broken into two
    ///  functions (this one, that computes the duration from the auction
    ///  structure, and the other that does the price computation) so we
    ///  can easily test that the price computation works correctly.
    function _currentPrice(Auction storage _auction)
        internal
        view
        returns (uint256)
    {
        uint256 secondsPassed = 0;

        // A bit of insurance against negative values (or wraparound).
        // Probably not necessary (since Ethereum guarnatees that the
        // now variable doesn't ever go backwards).
        if (now > _auction.startedAt) {
            secondsPassed = now - _auction.startedAt;
        }

        return _computeCurrentPrice(
            _auction.startingPrice,
            _auction.endingPrice,
            _auction.duration,
            secondsPassed
        );
    }

    /// @dev Computes the current price of an auction. Factored out
    ///  from _currentPrice so we can run extensive unit tests.
    ///  When testing, make this function public and turn on
    ///  `Current price computation` test suite.
    function _computeCurrentPrice(
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        uint256 _secondsPassed
    )
        internal
        pure
        returns (uint256)
    {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our public functions carefully cap the maximum values for
        //  time (at 64-bits) and currency (at 128-bits). _duration is
        //  also known to be non-zero (see the require() statement in
        //  _addAuction())
        if (_secondsPassed >= _duration) {
            // We've reached the end of the dynamic pricing portion
            // of the auction, just return the end price.
            return _endingPrice;
        } else {
            // Starting price can be higher than ending price (and often is!), so
            // this delta can be negative.
            int256 totalPriceChange = int256(_endingPrice) - int256(_startingPrice);

            // This multiplication can't overflow, _secondsPassed will easily fit within
            // 64-bits, and totalPriceChange will easily fit within 128-bits, their product
            // will always fit within 256-bits.
            int256 currentPriceChange = totalPriceChange * int256(_secondsPassed) / int256(_duration);

            // currentPriceChange can be negative, but if so, will have a magnitude
            // less that _startingPrice. Thus, this result will always end up positive.
            int256 currentPrice = int256(_startingPrice) + currentPriceChange;

            return uint256(currentPrice);
        }
    }

    /// @dev Computes owner's cut of a sale.
    /// @param _price - Sale price of NFT.
    function _computeCut(uint256 _price) internal view returns (uint256) {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our entry functions carefully cap the maximum values for
        //  currency (at 128-bits), and ownerCut <= 10000 (see the require()
        //  statement in the ClockAuction constructor). The result of this
        //  function is always guaranteed to be <= _price.
        return _price * ownerCut / 10000;
    }

}







/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


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

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

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused returns (bool) {
    paused = true;
    Pause();
    return true;
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused returns (bool) {
    paused = false;
    Unpause();
    return true;
  }
}


/// @title Clock auction for non-fungible tokens.
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract ClockAuction is Pausable, ClockAuctionBase {

    /// @dev The ERC-165 interface signature for ERC-721.
    ///  Ref: https://github.com/ethereum/EIPs/issues/165
    ///  Ref: https://github.com/ethereum/EIPs/issues/721
    bytes4 constant InterfaceSignature_ERC721 = bytes4(0x9a20483d);

    /// @dev Constructor creates a reference to the NFT ownership contract
    ///  and verifies the owner cut is in the valid range.
    /// @param _nftAddress - address of a deployed contract implementing
    ///  the Nonfungible Interface.
    /// @param _cut - percent cut the owner takes on each auction, must be
    ///  between 0-10,000.
    function ClockAuction(address _nftAddress, uint256 _cut) public {
        require(_cut <= 10000);
        ownerCut = _cut;

        ERC721 candidateContract = ERC721(_nftAddress);
        require(candidateContract.supportsInterface(InterfaceSignature_ERC721));
        nonFungibleContract = candidateContract;
    }

    /// @dev Remove all Ether from the contract, which is the owner's cuts
    ///  as well as any Ether sent directly to the contract address.
    ///  Always transfers to the NFT contract, but can be called either by
    ///  the owner or the NFT contract.
    function withdrawBalance() external {
        address nftAddress = address(nonFungibleContract);

        require(
            msg.sender == owner ||
            msg.sender == nftAddress
        );
        // We are using this boolean method to make sure that even if one fails it will still work
        bool res = nftAddress.send(this.balance);
    }

    /// @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).
    /// @param _seller - Seller, if not the message sender
    function createAuction(
        uint256 _tokenId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        address _seller
    )
        external
        whenNotPaused
    {
        // Sanity check that no inputs overflow how many bits we've allocated
        // to store them in the auction struct.
        require(_startingPrice == uint256(uint128(_startingPrice)));
        require(_endingPrice == uint256(uint128(_endingPrice)));
        require(_duration == uint256(uint64(_duration)));

        require(_owns(msg.sender, _tokenId));
        _escrow(msg.sender, _tokenId);
        Auction memory auction = Auction(
            _seller,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenId, 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(uint256 _tokenId)
        external
        payable
        whenNotPaused
    {
        // _bid will throw if the bid or funds transfer fails
        _bid(_tokenId, msg.value);
        _transfer(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(uint256 _tokenId)
        external
    {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        address seller = auction.seller;
        require(msg.sender == seller);
        _cancelAuction(_tokenId, seller);
    }

    /// @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 cancelAuctionWhenPaused(uint256 _tokenId)
        whenPaused
        onlyOwner
        external
    {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        _cancelAuction(_tokenId, auction.seller);
    }

    /// @dev Returns auction info for an NFT on auction.
    /// @param _tokenId - ID of NFT on auction.
    function getAuction(uint256 _tokenId)
        external
        view
        returns
    (
        address seller,
        uint256 startingPrice,
        uint256 endingPrice,
        uint256 duration,
        uint256 startedAt
    ) {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        return (
            auction.seller,
            auction.startingPrice,
            auction.endingPrice,
            auction.duration,
            auction.startedAt
        );
    }

    /// @dev Returns the current price of an auction.
    /// @param _tokenId - ID of the token price we are checking.
    function getCurrentPrice(uint256 _tokenId)
        external
        view
        returns (uint256)
    {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        return _currentPrice(auction);
    }

}


/// @title Reverse auction modified for siring
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract SiringClockAuction is ClockAuction {

    // @dev Sanity check that allows us to ensure that we are pointing to the
    //  right auction in our setSiringAuctionAddress() call.
    bool public isSiringClockAuction = true;

    // Delegate constructor
    function SiringClockAuction(address _nftAddr, uint256 _cut) public
        ClockAuction(_nftAddr, _cut) {}

    /// @dev Creates and begins a new auction. Since this function is wrapped,
    /// require sender to be KittyCore contract.
    /// @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 auction (in seconds).
    /// @param _seller - Seller, if not the message sender
    function createAuction(
        uint256 _tokenId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        address _seller
    )
        external
    {
        // Sanity check that no inputs overflow how many bits we've allocated
        // to store them in the auction struct.
        require(_startingPrice == uint256(uint128(_startingPrice)));
        require(_endingPrice == uint256(uint128(_endingPrice)));
        require(_duration == uint256(uint64(_duration)));

        require(msg.sender == address(nonFungibleContract));
        _escrow(_seller, _tokenId);
        Auction memory auction = Auction(
            _seller,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenId, auction);
    }

    /// @dev Places a bid for siring. Requires the sender
    /// is the KittyCore contract because all bid methods
    /// should be wrapped. Also returns the kitty to the
    /// seller rather than the winner.
    function bid(uint256 _tokenId)
        external
        payable
    {
        require(msg.sender == address(nonFungibleContract));
        address seller = tokenIdToAuction[_tokenId].seller;
        // _bid checks that token ID is valid and will throw if bid fails
        _bid(_tokenId, msg.value);
        // We transfer the kitty back to the seller, the winner will get
        // the offspring
        _transfer(seller, _tokenId);
    }

}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_startingPrice","type":"uint256"},{"name":"_endingPrice","type":"uint256"},{"name":"_duration","type":"uint256"},{"name":"_seller","type":"address"}],"name":"createAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"bid","outputs":[],"payable":true,"stateMutability":"payable","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":"isSiringClockAuction","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getAuction","outputs":[{"name":"seller","type":"address"},{"name":"startingPrice","type":"uint256"},{"name":"endingPrice","type":"uint256"},{"name":"duration","type":"uint256"},{"name":"startedAt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ownerCut","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"cancelAuctionWhenPaused","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"cancelAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getCurrentPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nonFungibleContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_nftAddr","type":"address"},{"name":"_cut","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"}],"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":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526000805460a060020a60ff02191690556004805460ff19166001179055341561002c57600080fd5b604051604080610e43833981016040528080519190602001805160008054600160a060020a03191633600160a060020a0316178155909250839150829061271082111561007857600080fd5b50600281905581600160a060020a0381166301ffc9a77f9a20483d000000000000000000000000000000000000000000000000000000006000604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281527fffffffff000000000000000000000000000000000000000000000000000000009091166004820152602401602060405180830381600087803b151561012857600080fd5b6102c65a03f1151561013957600080fd5b50505060405180519050151561014e57600080fd5b60018054600160a060020a03909216600160a060020a031990921691909117905550505050610cc1806101826000396000f3006060604052600436106100c15763ffffffff60e060020a60003504166327ebe40a81146100c65780633f4ba83a146100f3578063454a2ab31461011a5780635c975abb146101255780635fd8c7101461013857806376190f8f1461014b57806378bd79351461015e57806383b5ff8b146101af5780638456cb59146101d4578063878eb368146101e75780638da5cb5b146101fd57806396b5a7551461022c578063c55d0f5614610242578063dd1b7a0f14610258578063f2fde38b1461026b575b600080fd5b34156100d157600080fd5b6100f1600435602435604435606435600160a060020a036084351661028a565b005b34156100fe57600080fd5b610106610362565b604051901515815260200160405180910390f35b6100f16004356103e6565b341561013057600080fd5b610106610436565b341561014357600080fd5b6100f1610446565b341561015657600080fd5b6101066104bc565b341561016957600080fd5b6101746004356104c5565b604051600160a060020a03909516855260208501939093526040808501929092526060840152608083019190915260a0909101905180910390f35b34156101ba57600080fd5b6101c2610552565b60405190815260200160405180910390f35b34156101df57600080fd5b610106610558565b34156101f257600080fd5b6100f16004356105e1565b341561020857600080fd5b61021061064e565b604051600160a060020a03909116815260200160405180910390f35b341561023757600080fd5b6100f160043561065d565b341561024d57600080fd5b6101c26004356106ab565b341561026357600080fd5b6102106106dd565b341561027657600080fd5b6100f1600160a060020a03600435166106ec565b610292610c67565b6001608060020a03851685146102a757600080fd5b6001608060020a03841684146102bc57600080fd5b67ffffffffffffffff831683146102d257600080fd5b60015433600160a060020a039081169116146102ed57600080fd5b6102f78287610742565b60a06040519081016040528083600160a060020a03168152602001866001608060020a03168152602001856001608060020a031681526020018467ffffffffffffffff1681526020014267ffffffffffffffff16815250905061035a86826107bd565b505050505050565b6000805433600160a060020a0390811691161461037e57600080fd5b60005460a060020a900460ff16151561039657600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a150600190565b60015460009033600160a060020a0390811691161461040457600080fd5b50600081815260036020526040902054600160a060020a03166104278234610958565b506104328183610a89565b5050565b60005460a060020a900460ff1681565b60015460008054600160a060020a03928316923381169116148061047b575081600160a060020a031633600160a060020a0316145b151561048657600080fd5b81600160a060020a03166108fc30600160a060020a0316319081150290604051600060405180830381858888f150505050505050565b60045460ff1681565b600081815260036020526040812081908190819081906104e481610adf565b15156104ef57600080fd5b80546001820154600290920154600160a060020a03909116986001608060020a038084169950700100000000000000000000000000000000909304909216965067ffffffffffffffff808216965068010000000000000000909104169350915050565b60025481565b6000805433600160a060020a0390811691161461057457600080fd5b60005460a060020a900460ff161561058b57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a150600190565b6000805460a060020a900460ff1615156105fa57600080fd5b60005433600160a060020a0390811691161461061557600080fd5b50600081815260036020526040902061062d81610adf565b151561063857600080fd5b8054610432908390600160a060020a0316610b00565b600054600160a060020a031681565b60008181526003602052604081209061067582610adf565b151561068057600080fd5b508054600160a060020a03908116903316811461069c57600080fd5b6106a68382610b00565b505050565b60008181526003602052604081206106c281610adf565b15156106cd57600080fd5b6106d681610b4a565b9392505050565b600154600160a060020a031681565b60005433600160a060020a0390811691161461070757600080fd5b600160a060020a0381161561073f576000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600154600160a060020a03166323b872dd83308460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156107a557600080fd5b6102c65a03f115156107b657600080fd5b5050505050565b603c816060015167ffffffffffffffff1610156107d957600080fd5b600082815260036020526040902081908151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039190911617815560208201516001820180546fffffffffffffffffffffffffffffffff19166001608060020a039290921691909117905560408201516001820180546001608060020a03928316700100000000000000000000000000000000029216919091179055606082015160028201805467ffffffffffffffff191667ffffffffffffffff9290921691909117905560808201516002909101805467ffffffffffffffff9290921668010000000000000000026fffffffffffffffff000000000000000019909216919091179055507fa9c8dfcda5664a5a124c713e386da27de87432d5b668e79458501eb296389ba78260208301516001608060020a031683604001516001608060020a0316846060015167ffffffffffffffff166040518085815260200184815260200183815260200182815260200194505050505060405180910390a15050565b6000828152600360205260408120818080808061097486610adf565b151561097f57600080fd5b61098886610b4a565b94508488101561099757600080fd5b8554600160a060020a031693506109ad89610bd1565b60008511156109f7576109bf85610c1e565b92508285039150600160a060020a03841682156108fc0283604051600060405180830381858888f1935050505015156109f757600080fd5b50838703600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610a2c57600080fd5b7f4fcc30d90a842164dd58501ab874a101a3749c3d4747139cefe7c876f4ccebd28986336040519283526020830191909152600160a060020a03166040808301919091526060909101905180910390a15092979650505050505050565b600154600160a060020a031663a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156107a557600080fd5b6002015460006801000000000000000090910467ffffffffffffffff161190565b610b0982610bd1565b610b138183610a89565b7f2809c7e17bf978fbc7194c0a694b638c4215e9140cacc6c38ca36010b45697df8260405190815260200160405180910390a15050565b6002810154600090819068010000000000000000900467ffffffffffffffff16421115610b905750600282015468010000000000000000900467ffffffffffffffff1642035b600183015460028401546106d6916001608060020a0380821692700100000000000000000000000000000000909204169067ffffffffffffffff1684610c2a565b6000908152600360205260408120805473ffffffffffffffffffffffffffffffffffffffff19168155600181019190915560020180546fffffffffffffffffffffffffffffffff19169055565b60025461271091020490565b6000808080858510610c3e57869350610c5c565b878703925085858402811515610c5057fe5b05915081880190508093505b505050949350505050565b60a06040519081016040908152600080835260208301819052908201819052606082018190526080820152905600a165627a7a723058202470b2745ab24e608ac20f9f3f5d70d3c8328adc42a802a76e2305ffac8bc0ac002900000000000000000000000006012c8cf97bead5deae237070f9587f8e7a266d0000000000000000000000000000000000000000000000000000000000000177

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

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 00000000000000000000000006012c8cf97bead5deae237070f9587f8e7a266d
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000177


   Swarm Source:
bzzr://2470b2745ab24e608ac20f9f3f5d70d3c8328adc42a802a76e2305ffac8bc0ac

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.