ETH Price: $3,250.70 (+3.77%)
 

Overview

Max Total Supply

168

Holders

44

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Balance
1

Value
$0.00
0x2F2A6f077d8edD63C6d7D1B7145C64450f5b76b7
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CryptoHandles

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-02-23
*/

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
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;
  }
}


/**
 * @title ERC721 interface
 * @dev see https://github.com/ethereum/eips/issues/721
 */
contract ERC721 {
  event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
  event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId);

  function balanceOf(address _owner) public view returns (uint256 _balance);
  function ownerOf(uint256 _tokenId) public view returns (address _owner);
  function transfer(address _to, uint256 _tokenId) public;
  function approve(address _to, uint256 _tokenId) public;
  function takeOwnership(uint256 _tokenId) public;
}

/**
 * @title ERC721Token
 * Generic implementation for the required functionality of the ERC721 standard
 */
contract ERC721Token is ERC721 {
  using SafeMath for uint256;

  // Total amount of tokens
  uint256 internal totalTokens;

  // Mapping from token ID to owner
  mapping (uint256 => address) internal tokenOwner;

  // Mapping from token ID to approved address
  mapping (uint256 => address) internal tokenApprovals;

  // Mapping from owner to list of owned token IDs
  mapping (address => uint256[]) internal ownedTokens;

  // Mapping from token ID to index of the owner tokens list
  mapping(uint256 => uint256) internal ownedTokensIndex;

  /**
  * @dev Guarantees msg.sender is owner of the given token
  * @param _tokenId uint256 ID of the token to validate its ownership belongs to msg.sender
  */
  modifier onlyOwnerOf(uint256 _tokenId) {
    require(ownerOf(_tokenId) == msg.sender);
    _;
  }

  /**
  * @dev Gets the total amount of tokens stored by the contract
  * @return uint256 representing the total amount of tokens
  */
  function totalSupply() public view returns (uint256) {
    return totalTokens;
  }

  /**
  * @dev Gets the balance of the specified address
  * @param _owner address to query the balance of
  * @return uint256 representing the amount owned by the passed address
  */
  function balanceOf(address _owner) public view returns (uint256) {
    return ownedTokens[_owner].length;
  }

  /**
  * @dev Gets the list of tokens owned by a given address
  * @param _owner address to query the tokens of
  * @return uint256[] representing the list of tokens owned by the passed address
  */
  function tokensOf(address _owner) public view returns (uint256[]) {
    return ownedTokens[_owner];
  }

  /**
  * @dev Gets the owner of the specified token ID
  * @param _tokenId uint256 ID of the token to query the owner of
  * @return owner address currently marked as the owner of the given token ID
  */
  function ownerOf(uint256 _tokenId) public view returns (address) {
    address owner = tokenOwner[_tokenId];
    require(owner != address(0));
    return owner;
  }

  /**
   * @dev Gets the approved address to take ownership of a given token ID
   * @param _tokenId uint256 ID of the token to query the approval of
   * @return address currently approved to take ownership of the given token ID
   */
  function approvedFor(uint256 _tokenId) public view returns (address) {
    return tokenApprovals[_tokenId];
  }

  /**
  * @dev Transfers the ownership of a given token ID to another address
  * @param _to address to receive the ownership of the given token ID
  * @param _tokenId uint256 ID of the token to be transferred
  */
  function transfer(address _to, uint256 _tokenId) public onlyOwnerOf(_tokenId) {
    clearApprovalAndTransfer(msg.sender, _to, _tokenId);
  }

  /**
  * @dev Approves another address to claim for the ownership of the given token ID
  * @param _to address to be approved for the given token ID
  * @param _tokenId uint256 ID of the token to be approved
  */
  function approve(address _to, uint256 _tokenId) public onlyOwnerOf(_tokenId) {
    address owner = ownerOf(_tokenId);
    require(_to != owner);
    if (approvedFor(_tokenId) != 0 || _to != 0) {
      tokenApprovals[_tokenId] = _to;
      Approval(owner, _to, _tokenId);
    }
  }

  /**
  * @dev Claims the ownership of a given token ID
  * @param _tokenId uint256 ID of the token being claimed by the msg.sender
  */
  function takeOwnership(uint256 _tokenId) public {
    require(isApprovedFor(msg.sender, _tokenId));
    clearApprovalAndTransfer(ownerOf(_tokenId), msg.sender, _tokenId);
  }

  /**
  * @dev Mint token function
  * @param _to The address that will own the minted token
  * @param _tokenId uint256 ID of the token to be minted by the msg.sender
  */
  function _mint(address _to, uint256 _tokenId) internal {
    require(_to != address(0));
    addToken(_to, _tokenId);
    Transfer(0x0, _to, _tokenId);
  }

  /**
  * @dev Burns a specific token
  * @param _tokenId uint256 ID of the token being burned by the msg.sender
  */
  function _burn(uint256 _tokenId) onlyOwnerOf(_tokenId) internal {
    if (approvedFor(_tokenId) != 0) {
      clearApproval(msg.sender, _tokenId);
    }
    removeToken(msg.sender, _tokenId);
    Transfer(msg.sender, 0x0, _tokenId);
  }

  /**
   * @dev Tells whether the msg.sender is approved for the given token ID or not
   * This function is not private so it can be extended in further implementations like the operatable ERC721
   * @param _owner address of the owner to query the approval of
   * @param _tokenId uint256 ID of the token to query the approval of
   * @return bool whether the msg.sender is approved for the given token ID or not
   */
  function isApprovedFor(address _owner, uint256 _tokenId) internal view returns (bool) {
    return approvedFor(_tokenId) == _owner;
  }

  /**
  * @dev Internal function to clear current approval and transfer the ownership of a given token ID
  * @param _from address which you want to send tokens from
  * @param _to address which you want to transfer the token to
  * @param _tokenId uint256 ID of the token to be transferred
  */
  function clearApprovalAndTransfer(address _from, address _to, uint256 _tokenId) internal {
    require(_to != address(0));
    require(_to != ownerOf(_tokenId));
    require(ownerOf(_tokenId) == _from);

    clearApproval(_from, _tokenId);
    removeToken(_from, _tokenId);
    addToken(_to, _tokenId);
    Transfer(_from, _to, _tokenId);
  }

  /**
  * @dev Internal function to clear current approval of a given token ID
  * @param _tokenId uint256 ID of the token to be transferred
  */
  function clearApproval(address _owner, uint256 _tokenId) private {
    require(ownerOf(_tokenId) == _owner);
    tokenApprovals[_tokenId] = 0;
    Approval(_owner, 0, _tokenId);
  }

  /**
  * @dev Internal function to add a token ID to the list of a given address
  * @param _to address representing the new owner of the given token ID
  * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
  */
  function addToken(address _to, uint256 _tokenId) private {
    require(tokenOwner[_tokenId] == address(0));
    tokenOwner[_tokenId] = _to;
    uint256 length = balanceOf(_to);
    ownedTokens[_to].push(_tokenId);
    ownedTokensIndex[_tokenId] = length;
    totalTokens = totalTokens.add(1);
  }

  /**
  * @dev Internal function to remove a token ID from the list of a given address
  * @param _from address representing the previous owner of the given token ID
  * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
  */
  function removeToken(address _from, uint256 _tokenId) private {
    require(ownerOf(_tokenId) == _from);

    uint256 tokenIndex = ownedTokensIndex[_tokenId];
    uint256 lastTokenIndex = balanceOf(_from).sub(1);
    uint256 lastToken = ownedTokens[_from][lastTokenIndex];

    tokenOwner[_tokenId] = 0;
    ownedTokens[_from][tokenIndex] = lastToken;
    ownedTokens[_from][lastTokenIndex] = 0;
    // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to
    // be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping
    // the lastToken to the first position, and then dropping the element placed in the last position of the list

    ownedTokens[_from].length--;
    ownedTokensIndex[_tokenId] = 0;
    ownedTokensIndex[lastToken] = tokenIndex;
    totalTokens = totalTokens.sub(1);
  }
}


contract AuctionHouse {
    address owner;

    function AuctionHouse() {
        owner = msg.sender;
    }

    // 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;
    }

    // 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 = 375; // Default is 3.75%

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

    // Allowed tokens
    mapping (address => bool) supportedTokens;

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

    // Admin

    // Change owner of the contract
    function changeOwner(address newOwner) external {
        require(msg.sender == owner);
        owner = newOwner;
    }

    // Add or remove supported tokens
    function setSupportedToken(address tokenAddress, bool supported) external {
        require(msg.sender == owner);
        supportedTokens[tokenAddress] = supported;
    }

    // Set the owner cut for auctions
    function setOwnerCut(uint256 cut) external {
        require(msg.sender == owner);
        require(cut <= 10000);
        ownerCut = cut;
    }

    // Withdraw sales fees
    function withdraw() external {
      require(msg.sender == owner);
      owner.transfer(this.balance);
    }

    /// @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 _tokenAddress, address _claimant, uint256 _tokenId) internal view returns (bool) {
        return (ERC721Token(_tokenAddress).ownerOf(_tokenId) == _claimant);
    }

    /// @dev Escrows the NFT, assigning ownership to this contract.
    /// Throws if the escrow fails.
    /// @param _tokenId - ID of token whose approval to verify.
    function _escrow(address _tokenAddress, uint256 _tokenId) internal {
        // it will throw if transfer fails
        ERC721Token token = ERC721Token(_tokenAddress);
        if (token.ownerOf(_tokenId) != address(this)) {
          token.takeOwnership(_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 _tokenAddress, address _receiver, uint256 _tokenId) internal {
        // it will throw if transfer fails
        ERC721Token(_tokenAddress).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(address _tokenAddress, 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[_tokenAddress][_tokenId] = _auction;

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

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

    /// @dev Computes the price and transfers winnings.
    /// Does NOT transfer ownership of token.
    function _bid(address _tokenAddress, uint256 _tokenId, uint256 _bidAmount)
        internal
        returns (uint256)
    {
        // Get a reference to the auction struct
        Auction storage auction = tokenIdToAuction[_tokenAddress][_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(_tokenAddress, _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(_tokenAddress, _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(address _tokenAddress, uint256 _tokenId) internal {
        delete tokenIdToAuction[_tokenAddress][_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;
    }

    /// @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(
        address _tokenAddress,
        uint256 _tokenId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        address _seller
    )
        public
    {
        // Check this token is supported
        require(supportedTokens[_tokenAddress]);

        // Auctions must be made by the token contract or the token owner
        require(msg.sender == _tokenAddress || _owns(_tokenAddress, msg.sender, _tokenId));

        // 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)));

        _escrow(_tokenAddress, _tokenId);
        Auction memory auction = Auction(
            _seller,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenAddress, _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(address _tokenAddress, uint256 _tokenId)
        external
        payable
    {
        // Check this token is supported
        require(supportedTokens[_tokenAddress]);
        // _bid will throw if the bid or funds transfer fails
        _bid(_tokenAddress, _tokenId, msg.value);
        _transfer(_tokenAddress, 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(address _tokenAddress, uint256 _tokenId)
        external
    {
        // We don't check if a token is supported here because we may remove supported
        // This allows users to cancel auctions for tokens that have been removed
        Auction storage auction = tokenIdToAuction[_tokenAddress][_tokenId];
        require(_isOnAuction(auction));
        address seller = auction.seller;
        require(msg.sender == seller);
        _cancelAuction(_tokenAddress, _tokenId, seller);
    }

    /// @dev Returns auction info for an NFT on auction.
    /// @param _tokenId - ID of NFT on auction.
    function getAuction(address _tokenAddress, uint256 _tokenId)
        external
        view
        returns
    (
        address seller,
        uint256 startingPrice,
        uint256 endingPrice,
        uint256 duration,
        uint256 startedAt
    ) {
        // Check this token is supported
        require(supportedTokens[_tokenAddress]);
        Auction storage auction = tokenIdToAuction[_tokenAddress][_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(address _tokenAddress, uint256 _tokenId)
        external
        view
        returns (uint256)
    {
        // Check this token is supported
        require(supportedTokens[_tokenAddress]);
        Auction storage auction = tokenIdToAuction[_tokenAddress][_tokenId];
        require(_isOnAuction(auction));
        return _currentPrice(auction);
    }
}

contract CryptoHandles is ERC721Token {

    address public owner;
    uint256 public defaultBuyNowPrice = 100 finney;
    uint256 public defaultAuctionPrice = 1 ether;
    uint256 public defaultAuctionDuration = 1 days;

    AuctionHouse public auctions;

    mapping (uint => bytes32) handles;
    mapping (bytes32 => uint) reverse;

    event SetRecord(bytes32 indexed handle, string indexed key, string value);

    function CryptoHandles(address auctionAddress) {
      owner = msg.sender;
      auctions = AuctionHouse(auctionAddress);
    }

    /**
    * @dev Change owner of the contract
    */
    function changeOwner(address newOwner) external {
      require(msg.sender == owner);
      owner = newOwner;
    }

    /**
    * @dev Withdraw funds
    */
    function withdraw() external {
      require(msg.sender == owner);
      owner.transfer(this.balance);
    }

    /**
    * @dev Set buy now price
    */
    function setBuyNowPrice(uint price) external {
      require(msg.sender == owner);
      defaultBuyNowPrice = price;
    }

    /**
    * @dev Set buy now price
    */
    function setAuctionPrice(uint price) external {
      require(msg.sender == owner);
      defaultAuctionPrice = price;
    }

    /**
    * @dev Set duration
    */
    function setAuctionDuration(uint duration) external {
      require(msg.sender == owner);
      defaultAuctionDuration = duration;
    }

    /**
    * @dev Accept proceeds from auction sales
    */
    function() public payable {}

    /**
    * @dev Create a new handle if the handle is valid and not owned
    * @param _handle bytes32 handle to register
    */
    function create(bytes32 _handle) external payable {
        require(isHandleValid(_handle));
        require(isHandleAvailable(_handle));
        uint _tokenId = totalTokens;
        handles[_tokenId] = _handle;
        reverse[_handle] = _tokenId;

        // handle buy now
        if (msg.value == defaultBuyNowPrice) {
          _mint(msg.sender, _tokenId);
        } else {
          // otherwise start an auction
          require(msg.value == 0);
          // mint the token to the address
          _mint(address(auctions), _tokenId);
          auctions.createAuction(
              address(this),
              _tokenId,
              defaultAuctionPrice,
              0,
              defaultAuctionDuration,
              address(this)
          );
        }
    }

    /**
    * @dev Checks if a handle is valid: a-z, 0-9, _
    * @param _handle bytes32 to check validity
    */
    function isHandleValid(bytes32 _handle) public pure returns (bool) {
        if (_handle == 0x0) {
            return false;
        }
        bool padded;
        for (uint i = 0; i < 32; i++) {
            byte char = byte(bytes32(uint(_handle) * 2 ** (8 * i)));
            // null for padding
            if (char == 0x0) {
                padded = true;
                continue;
            }
            // numbers 0-9
            if (char >= 0x30  && char <= 0x39 && !padded) {
                continue;
            }
            // lowercase letters a-z
            if (char >= 0x61  && char <= 0x7A && !padded) {
                continue;
            }
            // underscores _
            if (char == 0x5F && !padded) {
                continue;
            }
            return false;
        }
        return true;
    }

    /**
    * @dev Checks if a handle is available
    * @param _handle bytes32 handle to check availability
    */
    function isHandleAvailable(bytes32 _handle) public view returns (bool) {
        // Get the tokenId for a given handle
        uint tokenId = reverse[_handle];
        if (handles[tokenId] != _handle) {
          return true;
        }
    }

    /**
    * @dev Approve the AuctionHouse and start an auction
    * @param _tokenId uint256
    * @param _startingPrice uint256
    * @param _endingPrice uint256
    * @param _duration uint256
    */
    function approveAndAuction(uint256 _tokenId, uint256 _startingPrice, uint256 _endingPrice, uint256 _duration) external {
        require(ownerOf(_tokenId) == msg.sender);
        tokenApprovals[_tokenId] = address(auctions);
        auctions.createAuction(
            address(this),
            _tokenId,
            _startingPrice,
            _endingPrice,
            _duration,
            msg.sender
        );
    }

    /**
    * @dev Get tokenId for a given handle
    * @param _handle bytes32 handle
    */
    function tokenIdForHandle(bytes32 _handle) public view returns (uint) {
        // Handle 0 index
        uint tokenId = reverse[_handle];
        require(handles[tokenId] == _handle);
        return tokenId;
    }

    /**
    * @dev Get handle for a given tokenId
    * @param _tokenId uint
    */
    function handleForTokenId(uint _tokenId) public view returns (bytes32) {
        bytes32 handle = handles[_tokenId];
        require(handle != 0x0);
        return handle;
    }

    /**
    * @dev Get the handle owner
    * @param _handle bytes32 handle to check availability
    */
    function getHandleOwner(bytes32 _handle) public view returns (address) {
        // Handle 0 index
        uint tokenId = reverse[_handle];
        require(handles[tokenId] == _handle);
        return ownerOf(tokenId);
    }

    /// Records for a handle
    mapping(bytes32 => mapping(string => string)) internal records;

    function setRecord(bytes32 _handle, string _key, string _value) external {
        uint tokenId = reverse[_handle];
        require(ownerOf(tokenId) == msg.sender);
        records[_handle][_key] = _value;
        SetRecord(_handle, _key, _value);
    }

    function getRecord(bytes32 _handle, string _key) external view returns (string) {
        return records[_handle][_key];
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"_handle","type":"bytes32"}],"name":"isHandleValid","outputs":[{"name":"","type":"bool"}],"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":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"approvedFor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"setAuctionPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_handle","type":"bytes32"}],"name":"getHandleOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"defaultAuctionDuration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"tokensOf","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_handle","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getRecord","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_handle","type":"bytes32"}],"name":"create","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"handleForTokenId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_startingPrice","type":"uint256"},{"name":"_endingPrice","type":"uint256"},{"name":"_duration","type":"uint256"}],"name":"approveAndAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"auctions","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_handle","type":"bytes32"}],"name":"isHandleAvailable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"duration","type":"uint256"}],"name":"setAuctionDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_handle","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"string"}],"name":"setRecord","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_handle","type":"bytes32"}],"name":"tokenIdForHandle","outputs":[{"name":"","type":"uint256"}],"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":"defaultBuyNowPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"setBuyNowPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"defaultAuctionPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"auctionAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"handle","type":"bytes32"},{"indexed":true,"name":"key","type":"string"},{"indexed":false,"name":"value","type":"string"}],"name":"SetRecord","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":false,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"}]

606060405267016345785d8a0000600655670de0b6b3a764000060075562015180600855341561002e57600080fd5b60405160208061221f8339810160405280805190602001909190505033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050612143806100dc6000396000f30060606040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305afff5b14610161578063095ea7b3146101a057806318160ddd146101e25780632a6dd48f1461020b5780633b33fe731461026e5780633ccfd60b14610291578063443bd56f146102a6578063510219cd1461030d5780635a3f2672146103365780636352211e146103c457806370a08231146104275780637275c8cb146104745780637368a8ce1461052857806379444ad3146105445780637f0538081461058357806385aa6103146105c15780638da5cb5b14610616578063948769951461066b578063a497e674146106aa578063a59b193a146106cd578063a6f9dae11461071c578063a9059cbb14610755578063ac38eb0714610797578063b2e6ceeb146107d2578063b83506cf146107f5578063dd0b7ffe1461081e578063f3eac09414610841575b005b341561016c57600080fd5b61018660048080356000191690602001909190505061086a565b604051808215151515815260200191505060405180910390f35b34156101ab57600080fd5b6101e0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ada565b005b34156101ed57600080fd5b6101f5610c6d565b6040518082815260200191505060405180910390f35b341561021657600080fd5b61022c6004808035906020019091905050610c76565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561027957600080fd5b61028f6004808035906020019091905050610cb3565b005b341561029c57600080fd5b6102a4610d19565b005b34156102b157600080fd5b6102cb600480803560001916906020019091905050610df0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561031857600080fd5b610320610e4b565b6040518082815260200191505060405180910390f35b341561034157600080fd5b61036d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e51565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103b0578082015181840152602081019050610395565b505050509050019250505060405180910390f35b34156103cf57600080fd5b6103e56004808035906020019091905050610eee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043257600080fd5b61045e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f6c565b6040518082815260200191505060405180910390f35b341561047f57600080fd5b6104ad6004808035600019169060200190919080359060200190820180359060200191909192905050610fb8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ed5780820151818401526020810190506104d2565b50505050905090810190601f16801561051a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105426004808035600019169060200190919050506110a0565b005b341561054f57600080fd5b610565600480803590602001909190505061128d565b60405180826000191660001916815260200191505060405180910390f35b341561058e57600080fd5b6105bf60048080359060200190919080359060200190919080359060200190919080359060200190919050506112c6565b005b34156105cc57600080fd5b6105d46114a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561062157600080fd5b6106296114cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561067657600080fd5b6106906004808035600019169060200190919050506114f2565b604051808215151515815260200191505060405180910390f35b34156106b557600080fd5b6106cb6004808035906020019091905050611547565b005b34156106d857600080fd5b61071a600480803560001916906020019091908035906020019082018035906020019190919290803590602001908201803590602001919091929050506115ad565b005b341561072757600080fd5b610753600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506116d8565b005b341561076057600080fd5b610795600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611778565b005b34156107a257600080fd5b6107bc6004808035600019169060200190919050506117cb565b6040518082815260200191505060405180910390f35b34156107dd57600080fd5b6107f3600480803590602001909190505061181e565b005b341561080057600080fd5b610808611849565b6040518082815260200191505060405180910390f35b341561082957600080fd5b61083f600480803590602001909190505061184f565b005b341561084c57600080fd5b6108546118b5565b6040518082815260200191505060405180910390f35b6000806000806000600102856000191614156108895760009350610ad2565b600091505b6020821015610acd578160080260020a856001900402600102905060007f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156108ff5760019250610ac0565b60307f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015610999575060397f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b80156109a3575082155b156109ad57610ac0565b60617f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015610a475750607a7f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b8015610a51575082155b15610a5b57610ac0565b605f7f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610aad575082155b15610ab757610ac0565b60009350610ad2565b818060010192505061088e565b600193505b505050919050565b6000813373ffffffffffffffffffffffffffffffffffffffff16610afd82610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515610b1f57600080fd5b610b2883610eee565b91508173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b6557600080fd5b6000610b7084610c76565b73ffffffffffffffffffffffffffffffffffffffff16141580610baa575060008473ffffffffffffffffffffffffffffffffffffffff1614155b15610c6757836002600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a35b50505050565b60008054905090565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d0f57600080fd5b8060078190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d7557600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610dee57600080fd5b565b600080600b600084600019166000191681526020019081526020016000205490508260001916600a60008381526020019081526020016000205460001916141515610e3a57600080fd5b610e4381610eee565b915050919050565b60085481565b610e59611ff2565b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610ee257602002820191906000526020600020905b815481526020019060010190808311610ece575b50505050509050919050565b6000806001600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f6357600080fd5b80915050919050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b610fc0612006565b600c6000856000191660001916815260200190815260200160002083836040518083838082843782019150509250505090815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110925780601f1061106757610100808354040283529160200191611092565b820191906000526020600020905b81548152906001019060200180831161107557829003601f168201915b505050505090509392505050565b60006110ab8261086a565b15156110b657600080fd5b6110bf826114f2565b15156110ca57600080fd5b600054905081600a6000838152602001908152602001600020816000191690555080600b60008460001916600019168152602001908152602001600020819055506006543414156111245761111f33826118bb565b611289565b60003414151561113357600080fd5b61115f600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826118bb565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6effbe930836007546000600854306040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b151561127457600080fd5b6102c65a03f1151561128557600080fd5b5050505b5050565b600080600a600084815260200190815260200160002054905060006001028160001916141515156112bd57600080fd5b80915050919050565b3373ffffffffffffffffffffffffffffffffffffffff166112e685610eee565b73ffffffffffffffffffffffffffffffffffffffff1614151561130857600080fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166002600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6effbe93086868686336040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b151561148c57600080fd5b6102c65a03f1151561149d57600080fd5b50505050505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600b600084600019166000191681526020019081526020016000205490508260001916600a600083815260200190815260200160002054600019161415156115405760019150611541565b5b50919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115a357600080fd5b8060088190555050565b6000600b600087600019166000191681526020019081526020016000205490503373ffffffffffffffffffffffffffffffffffffffff166115ed82610eee565b73ffffffffffffffffffffffffffffffffffffffff1614151561160f57600080fd5b8282600c600089600019166000191681526020019081526020016000208787604051808383808284378201915050925050509081526020016040518091039020919061165c92919061201a565b50848460405180838380828437820191505092505050604051809103902086600019167f2ecfd43e9dc9dd606a3b37f9bb54195e4d74d34d0d9cedfdad9a4eb92cc11d608585604051808060200182810382528484828181526020019250808284378201915050935050505060405180910390a3505050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561173457600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b803373ffffffffffffffffffffffffffffffffffffffff1661179982610eee565b73ffffffffffffffffffffffffffffffffffffffff161415156117bb57600080fd5b6117c6338484611955565b505050565b600080600b600084600019166000191681526020019081526020016000205490508260001916600a6000838152602001908152602001600020546000191614151561181557600080fd5b80915050919050565b6118283382611a9e565b151561183357600080fd5b61184661183f82610eee565b3383611955565b50565b60065481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118ab57600080fd5b8060068190555050565b60075481565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156118f757600080fd5b6119018282611adf565b8173ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561199157600080fd5b61199a81610eee565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156119d457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166119f482610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515611a1657600080fd5b611a208382611c4a565b611a2a8382611d33565b611a348282611adf565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008273ffffffffffffffffffffffffffffffffffffffff16611ac083610c76565b73ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff166001600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b4e57600080fd5b826001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611ba983610f6c565b9050600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281611bfc919061209a565b916000526020600020900160008490919091505550806004600084815260200190815260200160002081905550611c3f6001600054611fbb90919063ffffffff16565b600081905550505050565b8173ffffffffffffffffffffffffffffffffffffffff16611c6a82610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515611c8c57600080fd5b60006002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35050565b60008060008473ffffffffffffffffffffffffffffffffffffffff16611d5885610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515611d7a57600080fd5b60046000858152602001908152602001600020549250611dac6001611d9e87610f6c565b611fd990919063ffffffff16565b9150600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481101515611dfa57fe5b906000526020600020900154905060006001600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002084815481101515611ea857fe5b9060005260206000209001819055506000600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481101515611f0557fe5b906000526020600020900181905550600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480919060019003611f6691906120c6565b5060006004600086815260200190815260200160002081905550826004600083815260200190815260200160002081905550611fae6001600054611fd990919063ffffffff16565b6000819055505050505050565b6000808284019050838110151515611fcf57fe5b8091505092915050565b6000828211151515611fe757fe5b818303905092915050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061205b57803560ff1916838001178555612089565b82800160010185558215612089579182015b8281111561208857823582559160200191906001019061206d565b5b50905061209691906120f2565b5090565b8154818355818115116120c1578183600052602060002091820191016120c091906120f2565b5b505050565b8154818355818115116120ed578183600052602060002091820191016120ec91906120f2565b5b505050565b61211491905b808211156121105760008160009055506001016120f8565b5090565b905600a165627a7a72305820aa46507ed0a2b9285be9727ab36236461772ee5d104a88ddb6fc23512e0dd0dd002900000000000000000000000024027b8e12383ee6d726b5b6a48562c484593846

Deployed Bytecode

0x60606040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305afff5b14610161578063095ea7b3146101a057806318160ddd146101e25780632a6dd48f1461020b5780633b33fe731461026e5780633ccfd60b14610291578063443bd56f146102a6578063510219cd1461030d5780635a3f2672146103365780636352211e146103c457806370a08231146104275780637275c8cb146104745780637368a8ce1461052857806379444ad3146105445780637f0538081461058357806385aa6103146105c15780638da5cb5b14610616578063948769951461066b578063a497e674146106aa578063a59b193a146106cd578063a6f9dae11461071c578063a9059cbb14610755578063ac38eb0714610797578063b2e6ceeb146107d2578063b83506cf146107f5578063dd0b7ffe1461081e578063f3eac09414610841575b005b341561016c57600080fd5b61018660048080356000191690602001909190505061086a565b604051808215151515815260200191505060405180910390f35b34156101ab57600080fd5b6101e0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ada565b005b34156101ed57600080fd5b6101f5610c6d565b6040518082815260200191505060405180910390f35b341561021657600080fd5b61022c6004808035906020019091905050610c76565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561027957600080fd5b61028f6004808035906020019091905050610cb3565b005b341561029c57600080fd5b6102a4610d19565b005b34156102b157600080fd5b6102cb600480803560001916906020019091905050610df0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561031857600080fd5b610320610e4b565b6040518082815260200191505060405180910390f35b341561034157600080fd5b61036d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e51565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103b0578082015181840152602081019050610395565b505050509050019250505060405180910390f35b34156103cf57600080fd5b6103e56004808035906020019091905050610eee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043257600080fd5b61045e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f6c565b6040518082815260200191505060405180910390f35b341561047f57600080fd5b6104ad6004808035600019169060200190919080359060200190820180359060200191909192905050610fb8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ed5780820151818401526020810190506104d2565b50505050905090810190601f16801561051a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105426004808035600019169060200190919050506110a0565b005b341561054f57600080fd5b610565600480803590602001909190505061128d565b60405180826000191660001916815260200191505060405180910390f35b341561058e57600080fd5b6105bf60048080359060200190919080359060200190919080359060200190919080359060200190919050506112c6565b005b34156105cc57600080fd5b6105d46114a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561062157600080fd5b6106296114cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561067657600080fd5b6106906004808035600019169060200190919050506114f2565b604051808215151515815260200191505060405180910390f35b34156106b557600080fd5b6106cb6004808035906020019091905050611547565b005b34156106d857600080fd5b61071a600480803560001916906020019091908035906020019082018035906020019190919290803590602001908201803590602001919091929050506115ad565b005b341561072757600080fd5b610753600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506116d8565b005b341561076057600080fd5b610795600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611778565b005b34156107a257600080fd5b6107bc6004808035600019169060200190919050506117cb565b6040518082815260200191505060405180910390f35b34156107dd57600080fd5b6107f3600480803590602001909190505061181e565b005b341561080057600080fd5b610808611849565b6040518082815260200191505060405180910390f35b341561082957600080fd5b61083f600480803590602001909190505061184f565b005b341561084c57600080fd5b6108546118b5565b6040518082815260200191505060405180910390f35b6000806000806000600102856000191614156108895760009350610ad2565b600091505b6020821015610acd578160080260020a856001900402600102905060007f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156108ff5760019250610ac0565b60307f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015610999575060397f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b80156109a3575082155b156109ad57610ac0565b60617f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015610a475750607a7f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b8015610a51575082155b15610a5b57610ac0565b605f7f010000000000000000000000000000000000000000000000000000000000000002817effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610aad575082155b15610ab757610ac0565b60009350610ad2565b818060010192505061088e565b600193505b505050919050565b6000813373ffffffffffffffffffffffffffffffffffffffff16610afd82610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515610b1f57600080fd5b610b2883610eee565b91508173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610b6557600080fd5b6000610b7084610c76565b73ffffffffffffffffffffffffffffffffffffffff16141580610baa575060008473ffffffffffffffffffffffffffffffffffffffff1614155b15610c6757836002600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a35b50505050565b60008054905090565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d0f57600080fd5b8060078190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d7557600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610dee57600080fd5b565b600080600b600084600019166000191681526020019081526020016000205490508260001916600a60008381526020019081526020016000205460001916141515610e3a57600080fd5b610e4381610eee565b915050919050565b60085481565b610e59611ff2565b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610ee257602002820191906000526020600020905b815481526020019060010190808311610ece575b50505050509050919050565b6000806001600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f6357600080fd5b80915050919050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b610fc0612006565b600c6000856000191660001916815260200190815260200160002083836040518083838082843782019150509250505090815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110925780601f1061106757610100808354040283529160200191611092565b820191906000526020600020905b81548152906001019060200180831161107557829003601f168201915b505050505090509392505050565b60006110ab8261086a565b15156110b657600080fd5b6110bf826114f2565b15156110ca57600080fd5b600054905081600a6000838152602001908152602001600020816000191690555080600b60008460001916600019168152602001908152602001600020819055506006543414156111245761111f33826118bb565b611289565b60003414151561113357600080fd5b61115f600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826118bb565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6effbe930836007546000600854306040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b151561127457600080fd5b6102c65a03f1151561128557600080fd5b5050505b5050565b600080600a600084815260200190815260200160002054905060006001028160001916141515156112bd57600080fd5b80915050919050565b3373ffffffffffffffffffffffffffffffffffffffff166112e685610eee565b73ffffffffffffffffffffffffffffffffffffffff1614151561130857600080fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166002600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6effbe93086868686336040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b151561148c57600080fd5b6102c65a03f1151561149d57600080fd5b50505050505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600b600084600019166000191681526020019081526020016000205490508260001916600a600083815260200190815260200160002054600019161415156115405760019150611541565b5b50919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115a357600080fd5b8060088190555050565b6000600b600087600019166000191681526020019081526020016000205490503373ffffffffffffffffffffffffffffffffffffffff166115ed82610eee565b73ffffffffffffffffffffffffffffffffffffffff1614151561160f57600080fd5b8282600c600089600019166000191681526020019081526020016000208787604051808383808284378201915050925050509081526020016040518091039020919061165c92919061201a565b50848460405180838380828437820191505092505050604051809103902086600019167f2ecfd43e9dc9dd606a3b37f9bb54195e4d74d34d0d9cedfdad9a4eb92cc11d608585604051808060200182810382528484828181526020019250808284378201915050935050505060405180910390a3505050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561173457600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b803373ffffffffffffffffffffffffffffffffffffffff1661179982610eee565b73ffffffffffffffffffffffffffffffffffffffff161415156117bb57600080fd5b6117c6338484611955565b505050565b600080600b600084600019166000191681526020019081526020016000205490508260001916600a6000838152602001908152602001600020546000191614151561181557600080fd5b80915050919050565b6118283382611a9e565b151561183357600080fd5b61184661183f82610eee565b3383611955565b50565b60065481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118ab57600080fd5b8060068190555050565b60075481565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156118f757600080fd5b6119018282611adf565b8173ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561199157600080fd5b61199a81610eee565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156119d457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166119f482610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515611a1657600080fd5b611a208382611c4a565b611a2a8382611d33565b611a348282611adf565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008273ffffffffffffffffffffffffffffffffffffffff16611ac083610c76565b73ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff166001600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b4e57600080fd5b826001600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611ba983610f6c565b9050600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281611bfc919061209a565b916000526020600020900160008490919091505550806004600084815260200190815260200160002081905550611c3f6001600054611fbb90919063ffffffff16565b600081905550505050565b8173ffffffffffffffffffffffffffffffffffffffff16611c6a82610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515611c8c57600080fd5b60006002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35050565b60008060008473ffffffffffffffffffffffffffffffffffffffff16611d5885610eee565b73ffffffffffffffffffffffffffffffffffffffff16141515611d7a57600080fd5b60046000858152602001908152602001600020549250611dac6001611d9e87610f6c565b611fd990919063ffffffff16565b9150600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481101515611dfa57fe5b906000526020600020900154905060006001600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002084815481101515611ea857fe5b9060005260206000209001819055506000600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481101515611f0557fe5b906000526020600020900181905550600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480919060019003611f6691906120c6565b5060006004600086815260200190815260200160002081905550826004600083815260200190815260200160002081905550611fae6001600054611fd990919063ffffffff16565b6000819055505050505050565b6000808284019050838110151515611fcf57fe5b8091505092915050565b6000828211151515611fe757fe5b818303905092915050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061205b57803560ff1916838001178555612089565b82800160010185558215612089579182015b8281111561208857823582559160200191906001019061206d565b5b50905061209691906120f2565b5090565b8154818355818115116120c1578183600052602060002091820191016120c091906120f2565b5b505050565b8154818355818115116120ed578183600052602060002091820191016120ec91906120f2565b5b505050565b61211491905b808211156121105760008160009055506001016120f8565b5090565b905600a165627a7a72305820aa46507ed0a2b9285be9727ab36236461772ee5d104a88ddb6fc23512e0dd0dd0029

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

00000000000000000000000024027b8e12383ee6d726b5b6a48562c484593846

-----Decoded View---------------
Arg [0] : auctionAddress (address): 0x24027B8E12383eE6D726b5b6A48562c484593846

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000024027b8e12383ee6d726b5b6a48562c484593846


Swarm Source

bzzr://aa46507ed0a2b9285be9727ab36236461772ee5d104a88ddb6fc23512e0dd0dd
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.