ETH Price: $3,479.87 (+2.33%)

Token

punksVSapes (PvsA)
 

Overview

Max Total Supply

1,621 PvsA

Holders

918

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
dvcoolster.eth
Balance
6 PvsA
0x92be9a3f9f5b3ba7d8d18430723d3c4f82539e74
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:
ShuffleWar

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 13 : ShuffleWar.sol
// SPDX-License-Identifier: MIT
/*
                                                                ,.                                  
                    @@@                                       ,@@@@@@@@@@@@@                        
                  @@@@@@@                                    @@   @@@@@#  (@@@@@*     %@@(          
                  @@@@@@@                               @@@@@.@               @@@@@@@@@@@@@&        
                  @@@@@@@                              %@@@@@@@ @@,,  @@,      .@@@@@@@@@@@@@       
             @@@@@@@@@@@@@@@                            @@@@@@@@      .@@@@@   &@@@@@@@@@@@@@       
          #@@     @@@@@@@   @@*                           @@@@&              @@@@@@@@@@@@@@@&       
        @@#                   &@@                           *@@@         .@@@@@@@@@@@@@@@@@         
        @@#                   &@@                            @@             @@@@@@@                 
        @@#                   &@@       /@   @@ @%@@@.       (@&              @@@@@@@                
     @@@                      &@@       /@   @@  @&.        @@                %@@@@@                
     @@@     @@%         ,@@  &@@        @@ @@     @@      @@                  @@@@ .               
     @@@@@#                   &@@         @@@   @@@@       @@                 @@@@                 
        @@#                   &@@                           @@              (@@@@@@                 
        @@#         ,@@       &@@                             @@@@@@@@@@@@@@@@@@@@@,                
        @@#              ,@@@@@@@@@@@@@@                               * @@@@@@@@@@@                
        @@#                             @@@                         &.,/@@@@@@@@@@@@(  ,            
          %@@            ,@@@@@@@@@@@@@@                         %    @@@@@@@@@@@@ ,      @         
          %@@            ,@@                                   @@@@ (&@@@@@@@@@/  ,  * @@@@@@@@@    
          %@@     @@@@@@@@                                    @@@   *(@@@@@@@  ..     ,@@@@@@@@@@   
          %@@       ,@@                                       @@@      @@@@/  ,,    ,@@@@@@@@@@@@@  
          %@@       ,@@                                      @@@@@   @  @    @    (@@@@@@@@@@@@@@@@ 

*/
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Puzzle.sol";

contract ShuffleWar is ERC721, Puzzle, Ownable {

  using Strings for uint256;

  string public baseURI;
  bool public isBaseURIset = false;

  uint256 public mintPrice = 20000000000000000;
  uint256 public editPrice = 0;

  uint16 constant MAX_TOKEN_ID = 9999;

  uint256 public earlyAccessWindowOpens = 1641916800;
  uint256 public gameStartWindowOpens  = 1641920400;

  uint16 public freeMintCount = 1000;
  uint8 public maxBatchMintCount = 20;

  bool public paused = false;

  uint16 public apeTotal;
  uint16 public punkTotal;

  struct TokenInfo {
      uint8 tokenType;
      bool editAllowed;
      uint16 shuffleTokenId;
      uint256[] movesData;
  }

  mapping (uint16 => TokenInfo) public tokenInfo;
  event NftMinted(address sender, uint16 tokenId);

  constructor() ERC721("punksVSapes", "PvsA") {}

  function _baseURI() override internal view virtual returns (string memory) {
      return baseURI;
  }

  function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
      require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
      string memory _base = _baseURI();
      return bytes(_base).length > 0 ? string(abi.encodePacked(_base, uint(tokenInfo[uint16(tokenId)].tokenType).toString(), "/", tokenId.toString())) : "";
  }

  function totalSupply() external view returns (uint16) {
    return getTotalMintedCount();
  }

  function getTotalMintedCount() public view returns (uint16) {
    return apeTotal + punkTotal;
 }

  function getMintPrice(uint8 count) public view returns (uint) {
    if (getTotalMintedCount() > freeMintCount) {
        return mintPrice * count;
    } else if (getTotalMintedCount() + count < freeMintCount) {
      return 0;
    } else {
      return (getTotalMintedCount() + count - freeMintCount) * mintPrice;
    }
  }
 
 function getTotalMintedCountForType() external view returns (uint16, uint16) {
   return (apeTotal, punkTotal);
 }

  function getOwnerInfoForToken(uint16 tokenId) external view returns (uint8, address) {
    TokenInfo memory info = tokenInfo[tokenId];
    return (info.tokenType, ownerOf(tokenId));
  }

   function isAvailableForSale(uint16 tokenId) external view returns (bool) {
    return !(_exists(tokenId));
  }

  function getGameStartWindows() external view returns (uint256, uint256) {
    return (earlyAccessWindowOpens, gameStartWindowOpens);
  }

   function getShuffledNumbersForToken(uint16 tokenId) public view returns (uint8[9] memory shuffledOrder, uint16 shuffleIteration) {
        uint16 shuffleTokenId = tokenInfo[tokenId].shuffleTokenId;
        if (shuffleTokenId != 0) {
          return _getShuffledNumbersForToken(shuffleTokenId);
        } else {
          return _getShuffledNumbersForToken(tokenId);
        }
    }

  function getOwnerInfoForTokens(uint16[] memory tokenIds) external view returns (uint8[] memory) {
      uint totalCount = tokenIds.length;
      uint8[] memory ownerInfo = new uint8[](totalCount);

      for (uint16 i=0; i < totalCount; i++) {
        TokenInfo memory info = tokenInfo[tokenIds[i]];

        bool available = !_exists(tokenIds[i]);
        uint8 tokenType = info.tokenType;
        
        if (available) {
            ownerInfo[i] = 1;
        } else {
            if (tokenType == 0) {
              ownerInfo[i] = 2;
            } else {
              ownerInfo[i] = 3;
            }
        }
      }
      return ownerInfo;
  }

   function getMovesForToken(uint16 tokenId) external view returns (uint256[] memory) {
    return tokenInfo[uint16(tokenId)].movesData;
   }

/*
tokenType - 0 (ape), 1 (punk)
only 1 type can be minted for a tokenId
eg. if someone mints 80 for ape, then 80 can't be minted for punk

@dev

There are two parameters for moves data, bytes moves is optimised for verification of moves
and uint256[] movesData is optimised for storage

All moves of the user are replayed on the original shuffle order for that tokenId (also generated from contract) and the final order
order is verified to make sure user actually solved the puzzle

_movesData is a compressed array of uint256 representing the user's moves. Each move on the puzzle is recorded as a up,down,left,right action
(as 1,2,3,4 in this data, represented as base5). These moves are then converted to base10 and split into multiple uint256 each having 76 digits.
Around 104 moves can be stored in a single uint256 in 76 digits after changing the base from 5 to 10.
Effectively - 300 moves can be packed into an array of 3 uint256
*/

  function verifyAndMintItem(uint16 tokenId, 
        uint8 tokenType, 
        bytes memory moves, 
        uint256[] memory _movesData,
        uint16 shuffleIterationCount,
        uint16[] memory batchMintTokens)
      external
      payable
  {

      require(!paused, "Minting paused");

      require(block.timestamp >= earlyAccessWindowOpens, "Game not started");
      require(block.timestamp >= gameStartWindowOpens || getTotalMintedCount() < freeMintCount, "EA limit reached");

      uint8 totalMintCount = uint8(batchMintTokens.length) + 1;
      require(msg.value == getMintPrice(totalMintCount), "Incorrect payment");

      require(!(_exists(tokenId)), "Already minted");
      require(tokenId > 0 && tokenId <= MAX_TOKEN_ID, "Invalid tokenId");
      require(tokenType == 0 || tokenType == 1, "Invalid tokenType");

      require(batchMintTokens.length <= maxBatchMintCount, "Token limit exceeded");

      require (verifyMoves(tokenId, moves, shuffleIterationCount), "Puzzle not solved, unable to verify moves");

      for (uint8 i = 0; i < batchMintTokens.length; i++) {
          uint16 nextMintTokenId = batchMintTokens[i];
          require(!(_exists(nextMintTokenId)), "Already minted");
          require(nextMintTokenId > 0 && nextMintTokenId <= MAX_TOKEN_ID, "Invalid tokenId");
          tokenInfo[nextMintTokenId] = TokenInfo(tokenType, false, tokenId, _movesData);
          _safeMint(msg.sender, nextMintTokenId);
          emit NftMinted(msg.sender, nextMintTokenId);
      }

      tokenInfo[tokenId] = TokenInfo(tokenType, false, 0, _movesData);
      _safeMint(msg.sender, tokenId);
      emit NftMinted(msg.sender, tokenId);

      if (tokenType == 0) {
          apeTotal += totalMintCount;
      } else {
          punkTotal += totalMintCount;
      }
  }


  function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._transfer( from, to, tokenId);
        // @dev
        // once a transfer happens, the new owner is allowed to solve the puzzle again and
        // will be able to edit their moves once
        tokenInfo[uint16(tokenId)].editAllowed = true;
    }

  function setBaseURI(string memory _newBaseURI) external onlyOwner {
    require(!isBaseURIset, "Base URI is locked");
    baseURI = _newBaseURI;
  }

  function lockBaseURI() external onlyOwner {
     isBaseURIset = true;
  }

  function setMintPrice(uint256 newMintPrice) external onlyOwner {
    mintPrice = newMintPrice;
  }

  function setEditPrice(uint256 newEditPrice) external onlyOwner {
    editPrice = newEditPrice;
  }

  function setFreeMintCount(uint16 count) external onlyOwner {
    freeMintCount = count;
  }

  function setMaxBatchMintCount(uint8 count) external onlyOwner {
    maxBatchMintCount = count;
  }

  function pause(bool _state) external onlyOwner {
    paused = _state;
  }

  function editStartWindows(
        uint256 _earlyAccessWindowOpens,
        uint256 _gameStartWindowOpens
    ) external onlyOwner {
        require(
            _gameStartWindowOpens > _earlyAccessWindowOpens,
            "window combination not allowed"
        );
        gameStartWindowOpens = _gameStartWindowOpens;
        earlyAccessWindowOpens = _earlyAccessWindowOpens;
  }

   function getShuffledNumbersForEditMoves(uint16 tokenId) public pure returns (uint8[9] memory shuffledOrder, uint16 shuffleIteration) {
       return _getShuffledNumbersForToken(tokenId);
    }

  function editMoves(
        uint16 tokenId, 
        uint8 tokenType, 
        bytes memory moves, 
        uint256[] memory _movesData, 
        uint16 shuffleIterationCount
    ) external payable {

    require(_exists(tokenId), "EditMoves: TokenId doesn't exist");
    require(tokenInfo[uint16(tokenId)].editAllowed, "EditMoves: Not allowed to edit moves");
    require(msg.sender == ownerOf(tokenId), "Not authorised to edit token type");
    require(msg.value == editPrice, "Incorrect payment");
    require(tokenType == 0 || tokenType == 1, "Invalid tokenType");
    require (verifyMoves(tokenId, moves, shuffleIterationCount), "Puzzle not solved, unable to verify moves");

    tokenInfo[tokenId] = TokenInfo(tokenType, false, 0, _movesData);
  }

  function releaseFunds() public onlyOwner {
    (bool success, ) = payable(0x54caD98D0EFF87A31fB0BF046e2912e836fa832B).call{value: address(this).balance}("");
    require(success);
  }
}

File 2 of 13 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 3 of 13 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 4 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 13 : Puzzle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract Puzzle {

    function _getShuffledNumbersForToken(uint16 tokenId) internal pure returns (uint8[9] memory shuffledOrder, uint16 shuffleIteration) {
        return _getShuffledNumbersForToken(tokenId, 0, false);
    }

    function _getShuffledNumbersForToken(uint16 tokenId, uint16 shuffleIterationCount, bool skipCheckSolvable) private pure returns (uint8[9] memory shuffledOrder, uint16 shuffleIteration) {
        return _shuffleNumbers(tokenId, shuffleIterationCount, skipCheckSolvable);
    }

    function _shuffleNumbers(uint16 tokenId, uint16 shuffleIteration, bool skipCheckSolvable) private pure returns (uint8[9] memory, uint16 shuffleIterationCount) {
        uint8[9] memory _numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8];

        uint16 shuffledTokenId = tokenId + shuffleIteration;

        for (uint8 i = 0; i < _numbers.length; i++) {
            uint256 n = i + uint256(keccak256(abi.encodePacked(shuffledTokenId))) % (_numbers.length - i);
            uint8 temp = _numbers[n];
            _numbers[n] = _numbers[i];
            _numbers[i] = temp;
        }
        // the order created based on a tokenId might not be solvable, check if this order is solvable in a 3x3 puzzle else
        // create another shuffle order based on next tokenId.
        // The shuffleIterations required to get a solvable shuffled order (generally 0 or 1) is also passed in return so that 
        // we can skip the isSolvable checks in actual minting to prevent gas
        if (skipCheckSolvable || _checkSolvable(_numbers)) {
            return (_numbers, shuffleIteration);
        } else {
            return _shuffleNumbers(tokenId, shuffleIteration + 1, skipCheckSolvable);
        }
    }

    function verifyMoves(uint16 tokenId, bytes memory moves, uint16 shuffleIterationCount) public pure returns (bool) {

        (uint8[9] memory shuffledOrder, ) = _getShuffledNumbersForToken(tokenId, shuffleIterationCount, true);

        bytes1 indexOf1 = 0;
        bytes1 indexOf2 = 0;
        bytes1 indexOf3 = 0;
        bytes1 indexOf4 = 0;
        bytes1 indexOf5 = 0;
        bytes1 indexOf6 = 0;
        bytes1 indexOf7 = 0;
        bytes1 indexOf8 = 0;
        bytes1 indexOf0 = 0;

        
        for (uint8 i=0; i < shuffledOrder.length; i++) {
            uint8 order = shuffledOrder[i];
            if (order == 0) {
                indexOf0 = bytes1(i);
            } else if (order == 1) {
                indexOf1 = bytes1(i);
            } else if (order == 2) {
                indexOf2 = bytes1(i);
            } else if (order == 3) {
                indexOf3 = bytes1(i);
            } else if (order == 4) {
                indexOf4 = bytes1(i);
            } else if (order == 5) {
                indexOf5 = bytes1(i);
            } else if (order == 6) {
                indexOf6 = bytes1(i);
            } else if (order == 7) {
                indexOf7 = bytes1(i);
            } else if (order == 8) {
                indexOf8 = bytes1(i);
            }
        }

        for (uint16 i=0; i < moves.length; i++) {

            bytes1 move = moves[i];

            if (move == 0x01) {
                (indexOf0, indexOf1) = (indexOf1, indexOf0);
            } else if (move == 0x02) {
                (indexOf0, indexOf2) = (indexOf2, indexOf0);
            } else if (move == 0x03) {
                (indexOf0, indexOf3) = (indexOf3, indexOf0);
            } else if (move == 0x04) {
                (indexOf0, indexOf4) = (indexOf4, indexOf0);
            } else if (move == 0x05) {
                (indexOf0, indexOf5) = (indexOf5, indexOf0);
            } else if (move == 0x06) {
                (indexOf0, indexOf6) = (indexOf6, indexOf0);
            } else if (move == 0x07) {
                (indexOf0, indexOf7) = (indexOf7, indexOf0);
            } else if (move == 0x08) {
                (indexOf0, indexOf8) = (indexOf8, indexOf0);
            }
        }

        // final array should be 1,2,3,4,5,6,7,8,0
        return indexOf1 == 0 && indexOf2 == 0x01 && indexOf3 == 0x02 && indexOf4 == 0x03
                && indexOf5 == 0x04 && indexOf6 == 0x05 && indexOf7 == 0x06 && indexOf8 == 0x07
                && indexOf0 == 0x08;
    }

    function _checkSolvable(uint8[9] memory puzzle) private pure returns (bool) {

        uint16 parity = 0;
        uint8 gridWidth = 3;
        uint8 row = 0; 
        uint8 blankRow = 0;

        for (uint16 i = 0; i < puzzle.length; i++)
        {
            if (i % gridWidth == 0) { 
                row++;
            }
            if (puzzle[i] == 0) { 
                blankRow = row;
                continue;
            }
            for (uint16 j = i + 1; j < puzzle.length; j++)
            {
                if (puzzle[i] > puzzle[j] && puzzle[j] != 0)
                {
                    parity++;
                }
            }
        }

        if (gridWidth % 2 == 0) {
            if (blankRow % 2 == 0) {
                return parity % 2 == 0;
            } else { 
                return parity % 2 != 0;
            }
        } else {
            return parity % 2 == 0;
        }
    }
}

File 6 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 7 of 13 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 13 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 9 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 11 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 12 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 13 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"NftMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"apeTotal","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earlyAccessWindowOpens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint8","name":"tokenType","type":"uint8"},{"internalType":"bytes","name":"moves","type":"bytes"},{"internalType":"uint256[]","name":"_movesData","type":"uint256[]"},{"internalType":"uint16","name":"shuffleIterationCount","type":"uint16"}],"name":"editMoves","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"editPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_earlyAccessWindowOpens","type":"uint256"},{"internalType":"uint256","name":"_gameStartWindowOpens","type":"uint256"}],"name":"editStartWindows","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeMintCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameStartWindowOpens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGameStartWindows","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"count","type":"uint8"}],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"getMovesForToken","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"getOwnerInfoForToken","outputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"getOwnerInfoForTokens","outputs":[{"internalType":"uint8[]","name":"","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"getShuffledNumbersForEditMoves","outputs":[{"internalType":"uint8[9]","name":"shuffledOrder","type":"uint8[9]"},{"internalType":"uint16","name":"shuffleIteration","type":"uint16"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"getShuffledNumbersForToken","outputs":[{"internalType":"uint8[9]","name":"shuffledOrder","type":"uint8[9]"},{"internalType":"uint16","name":"shuffleIteration","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalMintedCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalMintedCountForType","outputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"isAvailableForSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBaseURIset","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxBatchMintCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"punkTotal","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEditPrice","type":"uint256"}],"name":"setEditPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"count","type":"uint16"}],"name":"setFreeMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"count","type":"uint8"}],"name":"setMaxBatchMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"tokenInfo","outputs":[{"internalType":"uint8","name":"tokenType","type":"uint8"},{"internalType":"bool","name":"editAllowed","type":"bool"},{"internalType":"uint16","name":"shuffleTokenId","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint8","name":"tokenType","type":"uint8"},{"internalType":"bytes","name":"moves","type":"bytes"},{"internalType":"uint256[]","name":"_movesData","type":"uint256[]"},{"internalType":"uint16","name":"shuffleIterationCount","type":"uint16"},{"internalType":"uint16[]","name":"batchMintTokens","type":"uint16[]"}],"name":"verifyAndMintItem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"bytes","name":"moves","type":"bytes"},{"internalType":"uint16","name":"shuffleIterationCount","type":"uint16"}],"name":"verifyMoves","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]

60806040526008805460ff1916905566470de4df8200006009556000600a556361dda980600b556361ddb790600c55600d80546103e861ffff199091161762ff00001916621400001763ff000000191690553480156200005e57600080fd5b50604080518082018252600b81526a70756e6b7356536170657360a81b6020808301918252835180850190945260048452635076734160e01b908401528151919291620000ae916000916200013d565b508051620000c49060019060208401906200013d565b505050620000e1620000db620000e760201b60201c565b620000eb565b62000220565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200014b90620001e3565b90600052602060002090601f0160209004810192826200016f5760008555620001ba565b82601f106200018a57805160ff1916838001178555620001ba565b82800160010185558215620001ba579182015b82811115620001ba5782518255916020019190600101906200019d565b50620001c8929150620001cc565b5090565b5b80821115620001c85760008155600101620001cd565b600281046001821680620001f857607f821691505b602082108114156200021a57634e487b7160e01b600052602260045260246000fd5b50919050565b61477580620002306000396000f3fe6080604052600436106103345760003560e01c80636c0360eb116101b0578063a5a639f4116100ec578063c56bf5e811610095578063e985e9c51161006f578063e985e9c5146108c5578063ef80f794146108e5578063f2fde38b14610912578063f4a0a5281461093257610334565b8063c56bf5e814610870578063c87b56dd14610890578063e55f58bb146108b057610334565b8063b2356c61116100c6578063b2356c6114610826578063b88d4fde1461083b578063c52624091461085b57610334565b8063a5a639f4146107cf578063b00554b3146107e4578063b0e360151461080657610334565b80638da5cb5b1161015957806395d89b411161013357806395d89b41146107675780639dfa263b1461077c578063a22cb4651461078f578063a27b8a17146107af57610334565b80638da5cb5b146107025780638fac18c31461071757806394a9507e1461074457610334565b8063715018a61161018a578063715018a6146106ad57806372366291146106c25780637c3d5150146106e257610334565b80636c0360eb146106635780636e8754ac1461067857806370a082311461068d57610334565b80633e8d1c071161027f57806355f804b3116102285780636352211e116102025780636352211e146105f95780636495602e146106195780636817c76c1461063957806369d895751461064e57610334565b806355f804b3146105955780635aadfc08146105b55780635c975abb146105e457610334565b80634d4f79c8116102595780634d4f79c81461052f57806353df5c7c1461055d578063558133b11461057257610334565b80633e8d1c07146104da5780633fa7e201146104fc57806342842e0e1461050f57610334565b8063127a530e116102e157806323b872dd116102bb57806323b872dd146104855780632769faa5146104a557806336466b5f146104ba57610334565b8063127a530e1461042057806318160ddd14610435578063202b8b691461045757610334565b806306fdde031161031257806306fdde03146103b1578063081812fc146103d3578063095ea7b31461040057610334565b806301ffc9a71461033957806302329a291461036f57806305bf3ccb14610391575b600080fd5b34801561034557600080fd5b5061035961035436600461366d565b610952565b6040516103669190613b12565b60405180910390f35b34801561037b57600080fd5b5061038f61038a366004613653565b6109fc565b005b34801561039d57600080fd5b5061038f6103ac3660046138c1565b610a7d565b3480156103bd57600080fd5b506103c6610ae3565b6040516103669190613b1d565b3480156103df57600080fd5b506103f36103ee3660046138a9565b610b75565b60405161036691906139e5565b34801561040c57600080fd5b5061038f61041b3660046135f7565b610bb8565b34801561042c57600080fd5b50610359610c50565b34801561044157600080fd5b5061044a610c59565b60405161036691906143d6565b34801561046357600080fd5b506104776104723660046136eb565b610c68565b60405161036692919061441f565b34801561049157600080fd5b5061038f6104a036600461352d565b610d27565b3480156104b157600080fd5b5061044a610d5f565b3480156104c657600080fd5b506103596104d53660046136eb565b610d73565b3480156104e657600080fd5b506104ef610d89565b60405161036691906143fa565b61038f61050a3660046137f4565b610d8f565b34801561051b57600080fd5b5061038f61052a36600461352d565b6112b0565b34801561053b57600080fd5b5061054f61054a3660046136eb565b6112cb565b604051610366929190613a96565b34801561056957600080fd5b5061038f611314565b34801561057e57600080fd5b50610587611380565b6040516103669291906143e5565b3480156105a157600080fd5b5061038f6105b03660046136a5565b6113a0565b3480156105c157600080fd5b506105d56105d03660046136eb565b611419565b6040516103669392919061443b565b3480156105f057600080fd5b50610359611444565b34801561060557600080fd5b506103f36106143660046138a9565b611454565b34801561062557600080fd5b5061054f6106343660046136eb565b611489565b34801561064557600080fd5b506104ef6114a5565b34801561065a57600080fd5b5061038f6114ab565b34801561066f57600080fd5b506103c661156a565b34801561068457600080fd5b506104ef6115f8565b34801561069957600080fd5b506104ef6106a83660046134e1565b6115fe565b3480156106b957600080fd5b5061038f611642565b3480156106ce57600080fd5b5061038f6106dd3660046138e2565b61168d565b3480156106ee57600080fd5b506103596106fd366004613705565b611706565b34801561070e57600080fd5b506103f3611db2565b34801561072357600080fd5b50610737610732366004613620565b611dc1565b6040516103669190613ad7565b34801561075057600080fd5b50610759612006565b604051610366929190614403565b34801561077357600080fd5b506103c6612010565b61038f61078a366004613761565b61201f565b34801561079b57600080fd5b5061038f6107aa3660046135ce565b61221d565b3480156107bb57600080fd5b5061038f6107ca3660046138a9565b61222f565b3480156107db57600080fd5b506104ef612273565b3480156107f057600080fd5b506107f9612279565b6040516103669190614411565b34801561081257600080fd5b506104ef6108213660046138e2565b612288565b34801561083257600080fd5b5061044a612323565b34801561084757600080fd5b5061038f610856366004613568565b612335565b34801561086757600080fd5b5061044a612374565b34801561087c57600080fd5b5061038f61088b3660046136eb565b61239c565b34801561089c57600080fd5b506103c66108ab3660046138a9565b612410565b3480156108bc57600080fd5b5061044a6124b5565b3480156108d157600080fd5b506103596108e03660046134fb565b6124bf565b3480156108f157600080fd5b506109056109003660046136eb565b6124ed565b6040516103669190613a52565b34801561091e57600080fd5b5061038f61092d3660046134e1565b612557565b34801561093e57600080fd5b5061038f61094d3660046138a9565b6125c5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806109e557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109f457506109f482612609565b90505b919050565b610a04612653565b6001600160a01b0316610a15611db2565b6001600160a01b031614610a445760405162461bcd60e51b8152600401610a3b9061412b565b60405180910390fd5b600d80549115156301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff909216919091179055565b610a85612653565b6001600160a01b0316610a96611db2565b6001600160a01b031614610abc5760405162461bcd60e51b8152600401610a3b9061412b565b818111610adb5760405162461bcd60e51b8152600401610a3b9061439f565b600c55600b55565b606060008054610af2906145c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1e906145c2565b8015610b6b5780601f10610b4057610100808354040283529160200191610b6b565b820191906000526020600020905b815481529060010190602001808311610b4e57829003601f168201915b5050505050905090565b6000610b8082612657565b610b9c5760405162461bcd60e51b8152600401610a3b906140ce565b506000908152600460205260409020546001600160a01b031690565b6000610bc382611454565b9050806001600160a01b0316836001600160a01b03161415610bf75760405162461bcd60e51b8152600401610a3b90614277565b806001600160a01b0316610c09612653565b6001600160a01b03161480610c255750610c25816108e0612653565b610c415760405162461bcd60e51b8152600401610a3b90613f4b565b610c4b8383612674565b505050565b60085460ff1681565b6000610c63612374565b905090565b61ffff8082166000908152600e602090815260408083208151608081018352815460ff808216835261010082041615158286015262010000900490951685830152600181018054835181860281018601909452808452949586958695919460608601939092909190830182828015610cff57602002820191906000526020600020905b815481526020019060010190808311610ceb575b50505050508152505090508060000151610d1c8561ffff16611454565b92509250505b915091565b610d38610d32612653565b826126fa565b610d545760405162461bcd60e51b8152600401610a3b906142d4565b610c4b83838361277f565b600d546601000000000000900461ffff1681565b6000610d828261ffff16612657565b1592915050565b600b5481565b600d546301000000900460ff1615610db95760405162461bcd60e51b8152600401610a3b90613c58565b600b54421015610ddb5760405162461bcd60e51b8152600401610a3b90614062565b600c5442101580610dfc5750600d5461ffff16610df6612374565b61ffff16105b610e185760405162461bcd60e51b8152600401610a3b90613d23565b600081516001610e2891906144e6565b9050610e3381612288565b3414610e515760405162461bcd60e51b8152600401610a3b90613b30565b610e5e8761ffff16612657565b15610e7b5760405162461bcd60e51b8152600401610a3b90613b67565b60008761ffff16118015610e95575061270f61ffff881611155b610eb15760405162461bcd60e51b8152600401610a3b90613e4b565b60ff86161580610ec457508560ff166001145b610ee05760405162461bcd60e51b8152600401610a3b90613f14565b600d5482516201000090910460ff161015610f0d5760405162461bcd60e51b8152600401610a3b90614368565b610f18878685611706565b610f345760405162461bcd60e51b8152600401610a3b90613b9e565b60005b82518160ff1610156110f6576000838260ff1681518110610f6857634e487b7160e01b600052603260045260246000fd5b60200260200101519050610f7f8161ffff16612657565b15610f9c5760405162461bcd60e51b8152600401610a3b90613b67565b60008161ffff16118015610fb6575061270f61ffff821611155b610fd25760405162461bcd60e51b8152600401610a3b90613e4b565b60405180608001604052808960ff1681526020016000151581526020018a61ffff16815260200187815250600e60008361ffff1661ffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160000160026101000a81548161ffff021916908361ffff1602179055506060820151816001019080519060200190611098929190613243565b509050506110aa338261ffff166127ca565b7f9b5e0dc74ea40b721d8d4a1cbf16c62360c0bc5d51fb9e286ac597b5362ae52233826040516110db929190613a35565b60405180910390a150806110ee81614658565b915050610f37565b506040805160808101825260ff888116825260006020808401828152848601838152606086018b815261ffff8f81168652600e85529790942086518154935192517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009094169616959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010091151591909102177fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff16620100009190961602949094178255518051929391926111d69260018501920190613243565b509050506111e8338861ffff166127ca565b7f9b5e0dc74ea40b721d8d4a1cbf16c62360c0bc5d51fb9e286ac597b5362ae5223388604051611219929190613a35565b60405180910390a160ff861661126a578060ff16600d60048282829054906101000a900461ffff1661124b91906144a8565b92506101000a81548161ffff021916908361ffff1602179055506112a7565b8060ff16600d60068282829054906101000a900461ffff1661128c91906144a8565b92506101000a81548161ffff021916908361ffff1602179055505b50505050505050565b610c4b83838360405180602001604052806000815250612335565b6112d361328e565b61ffff8083166000908152600e602052604081205490916201000090910416801561130b57611301816127e4565b9250925050610d22565b611301846127e4565b61131c612653565b6001600160a01b031661132d611db2565b6001600160a01b0316146113535760405162461bcd60e51b8152600401610a3b9061412b565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600d5461ffff640100000000820481169166010000000000009004169091565b6113a8612653565b6001600160a01b03166113b9611db2565b6001600160a01b0316146113df5760405162461bcd60e51b8152600401610a3b9061412b565b60085460ff16156114025760405162461bcd60e51b8152600401610a3b90614331565b80516114159060079060208401906132ad565b5050565b600e6020526000908152604090205460ff8082169161010081049091169062010000900461ffff1683565b600d546301000000900460ff1681565b6000818152600260205260408120546001600160a01b0316806109f45760405162461bcd60e51b8152600401610a3b90614005565b61149161328e565b600061149c836127e4565b91509150915091565b60095481565b6114b3612653565b6001600160a01b03166114c4611db2565b6001600160a01b0316146114ea5760405162461bcd60e51b8152600401610a3b9061412b565b60007354cad98d0eff87a31fb0bf046e2912e836fa832b6001600160a01b031647604051611517906139b2565b60006040518083038185875af1925050503d8060008114611554576040519150601f19603f3d011682016040523d82523d6000602084013e611559565b606091505b505090508061156757600080fd5b50565b60078054611577906145c2565b80601f01602080910402602001604051908101604052809291908181526020018280546115a3906145c2565b80156115f05780601f106115c5576101008083540402835291602001916115f0565b820191906000526020600020905b8154815290600101906020018083116115d357829003601f168201915b505050505081565b600a5481565b60006001600160a01b0382166116265760405162461bcd60e51b8152600401610a3b90613fa8565b506001600160a01b031660009081526003602052604090205490565b61164a612653565b6001600160a01b031661165b611db2565b6001600160a01b0316146116815760405162461bcd60e51b8152600401610a3b9061412b565b61168b60006127fa565b565b611695612653565b6001600160a01b03166116a6611db2565b6001600160a01b0316146116cc5760405162461bcd60e51b8152600401610a3b9061412b565b600d805460ff90921662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909216919091179055565b60008061171585846001612864565b50905060008080808080808080805b60098160ff1610156118365760008b8260ff166009811061175557634e487b7160e01b600052603260045260246000fd5b6020020151905060ff811661176f578160f81b9250611823565b8060ff1660011415611786578160f81b9a50611823565b8060ff166002141561179d578160f81b9950611823565b8060ff16600314156117b4578160f81b9850611823565b8060ff16600414156117cb578160f81b9750611823565b8060ff16600514156117e2578160f81b9650611823565b8060ff16600614156117f9578160f81b9550611823565b8060ff1660071415611810578160f81b9450611823565b8060ff1660081415611823578160f81b93505b508061182e81614658565b915050611724565b5060005b8d518161ffff161015611b135760008e8261ffff168151811061186d57634e487b7160e01b600052603260045260246000fd5b01602001517fff000000000000000000000000000000000000000000000000000000000000001690507f01000000000000000000000000000000000000000000000000000000000000008114156118c657919991611b00565b7f02000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216141561191857919891611b00565b7f03000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216141561196a57919791611b00565b7f04000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821614156119bc57919691611b00565b7f05000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611a0e57919591611b00565b7f06000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611a6057919491611b00565b7f07000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611ab257919391611b00565b7f08000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611b00579192915b5080611b0b816145fd565b91505061183a565b507fff000000000000000000000000000000000000000000000000000000000000008916158015611b8557507f01000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008916145b8015611bd257507f02000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008816145b8015611c1f57507f03000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008716145b8015611c6c57507f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008616145b8015611cb957507f05000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008516145b8015611d0657507f06000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008416145b8015611d5357507f07000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008316145b8015611da057507f08000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216145b9e9d5050505050505050505050505050565b6006546001600160a01b031690565b805160609060008167ffffffffffffffff811115611def57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e18578160200160208202803683370190505b50905060005b828161ffff161015611ffe576000600e6000878461ffff1681518110611e5457634e487b7160e01b600052603260045260246000fd5b60209081029190910181015161ffff90811683528282019390935260409182016000208251608081018452815460ff80821683526101008204161515828501526201000090049094168484015260018101805484518185028101850190955280855291936060860193909290830182828015611eef57602002820191906000526020600020905b815481526020019060010190808311611edb575b50505050508152505090506000611f34878461ffff1681518110611f2357634e487b7160e01b600052603260045260246000fd5b602002602001015161ffff16612657565b8251901591508115611f7f576001858561ffff1681518110611f6657634e487b7160e01b600052603260045260246000fd5b602002602001019060ff16908160ff1681525050611fe8565b60ff8116611fad576002858561ffff1681518110611f6657634e487b7160e01b600052603260045260246000fd5b6003858561ffff1681518110611fd357634e487b7160e01b600052603260045260246000fd5b602002602001019060ff16908160ff16815250505b5050508080611ff6906145fd565b915050611e1e565b509392505050565b600b54600c549091565b606060018054610af2906145c2565b61202c8561ffff16612657565b6120485760405162461bcd60e51b8152600401610a3b90613e82565b61ffff85166000908152600e6020526040902054610100900460ff166120805760405162461bcd60e51b8152600401610a3b90613d5a565b61208d8561ffff16611454565b6001600160a01b0316336001600160a01b0316146120bd5760405162461bcd60e51b8152600401610a3b9061421a565b600a5434146120de5760405162461bcd60e51b8152600401610a3b90613b30565b60ff841615806120f157508360ff166001145b61210d5760405162461bcd60e51b8152600401610a3b90613f14565b612118858483611706565b6121345760405162461bcd60e51b8152600401610a3b90613b9e565b6040805160808101825260ff8681168252600060208084018281528486018381526060860189815261ffff8d81168652600e85529790942086518154935192517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009094169616959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010091151591909102177fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff16620100009190961602949094178255518051929391926122139260018501920190613243565b5050505050505050565b611415612228612653565b8383612886565b612237612653565b6001600160a01b0316612248611db2565b6001600160a01b03161461226e5760405162461bcd60e51b8152600401610a3b9061412b565b600a55565b600c5481565b600d5462010000900460ff1681565b600d5460009061ffff1661229a612374565b61ffff1611156122bc578160ff166009546122b5919061451f565b90506109f7565b600d5461ffff1660ff83166122cf612374565b6122d991906144a8565b61ffff1610156122eb575060006109f7565b600954600d5461ffff1660ff8416612301612374565b61230b91906144a8565b612315919061455c565b61ffff166122b5919061451f565b600d54640100000000900461ffff1681565b612346612340612653565b836126fa565b6123625760405162461bcd60e51b8152600401610a3b906142d4565b61236e84848484612947565b50505050565b600d54600090610c639061ffff660100000000000082048116916401000000009004166144a8565b6123a4612653565b6001600160a01b03166123b5611db2565b6001600160a01b0316146123db5760405162461bcd60e51b8152600401610a3b9061412b565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff92909216919091179055565b606061241b82612657565b6124375760405162461bcd60e51b8152600401610a3b906141bd565b600061244161297a565b9050600081511161246157604051806020016040528060008152506124ae565b61ffff83166000908152600e602052604090205481906124839060ff16612989565b61248c85612989565b60405160200161249e93929190613946565b6040516020818303038152906040525b9392505050565b600d5461ffff1681565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61ffff81166000908152600e602090815260409182902060010180548351818402810184019094528084526060939283018282801561254b57602002820191906000526020600020905b815481526020019060010190808311612537575b50505050509050919050565b61255f612653565b6001600160a01b0316612570611db2565b6001600160a01b0316146125965760405162461bcd60e51b8152600401610a3b9061412b565b6001600160a01b0381166125bc5760405162461bcd60e51b8152600401610a3b90613c8f565b611567816127fa565b6125cd612653565b6001600160a01b03166125de611db2565b6001600160a01b0316146126045760405162461bcd60e51b8152600401610a3b9061412b565b600955565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906126c182611454565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061270582612657565b6127215760405162461bcd60e51b8152600401610a3b90613eb7565b600061272c83611454565b9050806001600160a01b0316846001600160a01b031614806127675750836001600160a01b031661275c84610b75565b6001600160a01b0316145b80612777575061277781856124bf565b949350505050565b61278a838383612ad8565b61ffff166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555050565b611415828260405180602001604052806000815250612c1d565b6127ec61328e565b600061149c83600080612864565b600680546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61286c61328e565b6000612879858585612c50565b915091505b935093915050565b816001600160a01b0316836001600160a01b031614156128b85760405162461bcd60e51b8152600401610a3b90613e14565b6001600160a01b038381166000818152600560209081526040808320948716808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061293a908590613b12565b60405180910390a3505050565b61295284848461277f565b61295e84848484612e1b565b61236e5760405162461bcd60e51b8152600401610a3b90613bfb565b606060078054610af2906145c2565b6060816129ca575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526109f7565b8160005b81156129f457806129de8161461f565b91506129ed9050600a8361450b565b91506129ce565b60008167ffffffffffffffff811115612a1d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612a47576020820181803683370190505b5090505b841561277757612a5c60018361457f565b9150612a69600a86614699565b612a749060306144ce565b60f81b818381518110612a9757634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612ad1600a8661450b565b9450612a4b565b826001600160a01b0316612aeb82611454565b6001600160a01b031614612b115760405162461bcd60e51b8152600401610a3b90614160565b6001600160a01b038216612b375760405162461bcd60e51b8152600401610a3b90613db7565b612b42838383610c4b565b612b4d600082612674565b6001600160a01b0383166000908152600360205260408120805460019290612b7690849061457f565b90915550506001600160a01b0382166000908152600360205260408120805460019290612ba49084906144ce565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612c278383612f85565b612c346000848484612e1b565b610c4b5760405162461bcd60e51b8152600401610a3b90613bfb565b612c5861328e565b60408051610120810182526000808252600160208301526002928201929092526003606082015260046080820152600560a0820152600660c0820152600760e0820152600861010082015281612cae86886144a8565b905060005b60098160ff161015612dda576000612ccf60ff8316600961457f565b83604051602001612ce091906139b5565b6040516020818303038152906040528051906020012060001c612d039190614699565b612d109060ff84166144ce565b90506000848260098110612d3457634e487b7160e01b600052603260045260246000fd5b60200201519050848360ff1660098110612d5e57634e487b7160e01b600052603260045260246000fd5b6020020151858360098110612d8357634e487b7160e01b600052603260045260246000fd5b602002019060ff16908160ff168152505080858460ff1660098110612db857634e487b7160e01b600052603260045260246000fd5b60ff909216602092909202015250819050612dd281614658565b915050612cb3565b508480612deb5750612deb8261307c565b15612dfb5750915083905061287e565b612e1087612e0a8860016144a8565b87612c50565b93509350505061287e565b6000612e2f846001600160a01b031661323d565b15612f7a57836001600160a01b031663150b7a02612e4b612653565b8786866040518563ffffffff1660e01b8152600401612e6d94939291906139f9565b602060405180830381600087803b158015612e8757600080fd5b505af1925050508015612ed5575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612ed291810190613689565b60015b612f2f573d808015612f03576040519150601f19603f3d011682016040523d82523d6000602084013e612f08565b606091505b508051612f275760405162461bcd60e51b8152600401610a3b90613bfb565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612777565b506001949350505050565b6001600160a01b038216612fab5760405162461bcd60e51b8152600401610a3b90614099565b612fb481612657565b15612fd15760405162461bcd60e51b8152600401610a3b90613cec565b612fdd60008383610c4b565b6001600160a01b03821660009081526003602052604081208054600192906130069084906144ce565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008060038180805b60098161ffff1610156131d25761309f60ff851682614678565b61ffff166130b557826130b181614658565b9350505b868161ffff16600981106130d957634e487b7160e01b600052603260045260246000fd5b602002015160ff166130ed578291506131c0565b60006130fa8260016144a8565b90505b60098161ffff1610156131be57878161ffff166009811061312e57634e487b7160e01b600052603260045260246000fd5b602002015160ff16888361ffff166009811061315a57634e487b7160e01b600052603260045260246000fd5b602002015160ff161180156131995750878161ffff166009811061318e57634e487b7160e01b600052603260045260246000fd5b602002015160ff1615155b156131ac57856131a8816145fd565b9650505b806131b6816145fd565b9150506130fd565b505b806131ca816145fd565b915050613085565b506131de6002846146ad565b60ff16613232576131f06002826146ad565b60ff1661321457613202600285614678565b61ffff166000149450505050506109f7565b61321f600285614678565b61ffff16600014159450505050506109f7565b613202600285614678565b3b151590565b82805482825590600052602060002090810192821561327e579160200282015b8281111561327e578251825591602001919060010190613263565b5061328a929150613320565b5090565b6040518061012001604052806009906020820280368337509192915050565b8280546132b9906145c2565b90600052602060002090601f0160209004810192826132db576000855561327e565b82601f106132f457805160ff191683800117855561327e565b8280016001018555821561327e579182018281111561327e578251825591602001919060010190613263565b5b8082111561328a5760008155600101613321565b600067ffffffffffffffff83111561334f5761334f6146fb565b61338060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160161445a565b905082815283838301111561339457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146109f757600080fd5b600082601f8301126133d2578081fd5b813560206133e76133e283614484565b61445a565b8281528181019085830183850287018401881015613403578586fd5b855b8581101561342857613416826134be565b84529284019290840190600101613405565b5090979650505050505050565b600082601f830112613445578081fd5b813560206134556133e283614484565b8281528181019085830183850287018401881015613471578586fd5b855b8581101561342857813584529284019290840190600101613473565b803580151581146109f757600080fd5b600082601f8301126134af578081fd5b6124ae83833560208501613335565b803561ffff811681146109f757600080fd5b803560ff811681146109f757600080fd5b6000602082840312156134f2578081fd5b6124ae826133ab565b6000806040838503121561350d578081fd5b613516836133ab565b9150613524602084016133ab565b90509250929050565b600080600060608486031215613541578081fd5b61354a846133ab565b9250613558602085016133ab565b9150604084013590509250925092565b6000806000806080858703121561357d578081fd5b613586856133ab565b9350613594602086016133ab565b925060408501359150606085013567ffffffffffffffff8111156135b6578182fd5b6135c28782880161349f565b91505092959194509250565b600080604083850312156135e0578182fd5b6135e9836133ab565b91506135246020840161348f565b60008060408385031215613609578182fd5b613612836133ab565b946020939093013593505050565b600060208284031215613631578081fd5b813567ffffffffffffffff811115613647578182fd5b612777848285016133c2565b600060208284031215613664578081fd5b6124ae8261348f565b60006020828403121561367e578081fd5b81356124ae81614711565b60006020828403121561369a578081fd5b81516124ae81614711565b6000602082840312156136b6578081fd5b813567ffffffffffffffff8111156136cc578182fd5b8201601f810184136136dc578182fd5b61277784823560208401613335565b6000602082840312156136fc578081fd5b6124ae826134be565b600080600060608486031215613719578081fd5b613722846134be565b9250602084013567ffffffffffffffff81111561373d578182fd5b6137498682870161349f565b925050613758604085016134be565b90509250925092565b600080600080600060a08688031215613778578283fd5b613781866134be565b945061378f602087016134d0565b9350604086013567ffffffffffffffff808211156137ab578485fd5b6137b789838a0161349f565b945060608801359150808211156137cc578283fd5b506137d988828901613435565b9250506137e8608087016134be565b90509295509295909350565b60008060008060008060c0878903121561380c578384fd5b613815876134be565b9550613823602088016134d0565b9450604087013567ffffffffffffffff8082111561383f578586fd5b61384b8a838b0161349f565b95506060890135915080821115613860578283fd5b61386c8a838b01613435565b945061387a60808a016134be565b935060a089013591508082111561388f578283fd5b5061389c89828a016133c2565b9150509295509295509295565b6000602082840312156138ba578081fd5b5035919050565b600080604083850312156138d3578182fd5b50508035926020909101359150565b6000602082840312156138f3578081fd5b6124ae826134d0565b60008151808452613914816020860160208601614596565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008451613958818460208901614596565b84519083019061396c818360208901614596565b7f2f00000000000000000000000000000000000000000000000000000000000000910190815283516139a5816001840160208801614596565b0160010195945050505050565b90565b60f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016815260020190565b6001600160a01b0391909116815260200190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613a2b60808301846138fc565b9695505050505050565b6001600160a01b0392909216825261ffff16602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015613a8a57835183529284019291840191600101613a6e565b50909695505050505050565b6101408101818460005b6009811015613ac257815160ff16835260209283019290910190600101613aa0565b50505061ffff83166101208301529392505050565b6020808252825182820181905260009190848201906040850190845b81811015613a8a57835160ff1683529284019291840191600101613af3565b901515815260200190565b6000602082526124ae60208301846138fc565b60208082526011908201527f496e636f7272656374207061796d656e74000000000000000000000000000000604082015260600190565b6020808252600e908201527f416c7265616479206d696e746564000000000000000000000000000000000000604082015260600190565b60208082526029908201527f50757a7a6c65206e6f7420736f6c7665642c20756e61626c6520746f2076657260408201527f696679206d6f7665730000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b6020808252600e908201527f4d696e74696e6720706175736564000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526010908201527f4541206c696d6974207265616368656400000000000000000000000000000000604082015260600190565b60208082526024908201527f456469744d6f7665733a204e6f7420616c6c6f77656420746f2065646974206d60408201527f6f76657300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600f908201527f496e76616c696420746f6b656e49640000000000000000000000000000000000604082015260600190565b6020808252818101527f456469744d6f7665733a20546f6b656e496420646f65736e2774206578697374604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b60208082526011908201527f496e76616c696420746f6b656e54797065000000000000000000000000000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b60208082526010908201527f47616d65206e6f74207374617274656400000000000000000000000000000000604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606082015260800190565b60208082526021908201527f4e6f7420617574686f726973656420746f206564697420746f6b656e2074797060408201527f6500000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526012908201527f4261736520555249206973206c6f636b65640000000000000000000000000000604082015260600190565b60208082526014908201527f546f6b656e206c696d6974206578636565646564000000000000000000000000604082015260600190565b6020808252601e908201527f77696e646f7720636f6d62696e6174696f6e206e6f7420616c6c6f7765640000604082015260600190565b61ffff91909116815260200190565b61ffff92831681529116602082015260400190565b90815260200190565b918252602082015260400190565b60ff91909116815260200190565b60ff9290921682526001600160a01b0316602082015260400190565b60ff939093168352901515602083015261ffff16604082015260600190565b60405181810167ffffffffffffffff8111828210171561447c5761447c6146fb565b604052919050565b600067ffffffffffffffff82111561449e5761449e6146fb565b5060209081020190565b600061ffff8083168185168083038211156144c5576144c56146cf565b01949350505050565b600082198211156144e1576144e16146cf565b500190565b600060ff821660ff84168060ff03821115614503576145036146cf565b019392505050565b60008261451a5761451a6146e5565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614557576145576146cf565b500290565b600061ffff83811690831681811015614577576145776146cf565b039392505050565b600082821015614591576145916146cf565b500390565b60005b838110156145b1578181015183820152602001614599565b8381111561236e5750506000910152565b6002810460018216806145d657607f821691505b602082108114156145f757634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415614615576146156146cf565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614651576146516146cf565b5060010190565b600060ff821660ff81141561466f5761466f6146cf565b60010192915050565b600061ffff8084168061468d5761468d6146e5565b92169190910692915050565b6000826146a8576146a86146e5565b500690565b600060ff8316806146c0576146c06146e5565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461156757600080fdfea2646970667358221220e851967e49416df09b6637c9da69255385c1000e48daf75c66927385b6d7156664736f6c63430008000033

Deployed Bytecode

0x6080604052600436106103345760003560e01c80636c0360eb116101b0578063a5a639f4116100ec578063c56bf5e811610095578063e985e9c51161006f578063e985e9c5146108c5578063ef80f794146108e5578063f2fde38b14610912578063f4a0a5281461093257610334565b8063c56bf5e814610870578063c87b56dd14610890578063e55f58bb146108b057610334565b8063b2356c61116100c6578063b2356c6114610826578063b88d4fde1461083b578063c52624091461085b57610334565b8063a5a639f4146107cf578063b00554b3146107e4578063b0e360151461080657610334565b80638da5cb5b1161015957806395d89b411161013357806395d89b41146107675780639dfa263b1461077c578063a22cb4651461078f578063a27b8a17146107af57610334565b80638da5cb5b146107025780638fac18c31461071757806394a9507e1461074457610334565b8063715018a61161018a578063715018a6146106ad57806372366291146106c25780637c3d5150146106e257610334565b80636c0360eb146106635780636e8754ac1461067857806370a082311461068d57610334565b80633e8d1c071161027f57806355f804b3116102285780636352211e116102025780636352211e146105f95780636495602e146106195780636817c76c1461063957806369d895751461064e57610334565b806355f804b3146105955780635aadfc08146105b55780635c975abb146105e457610334565b80634d4f79c8116102595780634d4f79c81461052f57806353df5c7c1461055d578063558133b11461057257610334565b80633e8d1c07146104da5780633fa7e201146104fc57806342842e0e1461050f57610334565b8063127a530e116102e157806323b872dd116102bb57806323b872dd146104855780632769faa5146104a557806336466b5f146104ba57610334565b8063127a530e1461042057806318160ddd14610435578063202b8b691461045757610334565b806306fdde031161031257806306fdde03146103b1578063081812fc146103d3578063095ea7b31461040057610334565b806301ffc9a71461033957806302329a291461036f57806305bf3ccb14610391575b600080fd5b34801561034557600080fd5b5061035961035436600461366d565b610952565b6040516103669190613b12565b60405180910390f35b34801561037b57600080fd5b5061038f61038a366004613653565b6109fc565b005b34801561039d57600080fd5b5061038f6103ac3660046138c1565b610a7d565b3480156103bd57600080fd5b506103c6610ae3565b6040516103669190613b1d565b3480156103df57600080fd5b506103f36103ee3660046138a9565b610b75565b60405161036691906139e5565b34801561040c57600080fd5b5061038f61041b3660046135f7565b610bb8565b34801561042c57600080fd5b50610359610c50565b34801561044157600080fd5b5061044a610c59565b60405161036691906143d6565b34801561046357600080fd5b506104776104723660046136eb565b610c68565b60405161036692919061441f565b34801561049157600080fd5b5061038f6104a036600461352d565b610d27565b3480156104b157600080fd5b5061044a610d5f565b3480156104c657600080fd5b506103596104d53660046136eb565b610d73565b3480156104e657600080fd5b506104ef610d89565b60405161036691906143fa565b61038f61050a3660046137f4565b610d8f565b34801561051b57600080fd5b5061038f61052a36600461352d565b6112b0565b34801561053b57600080fd5b5061054f61054a3660046136eb565b6112cb565b604051610366929190613a96565b34801561056957600080fd5b5061038f611314565b34801561057e57600080fd5b50610587611380565b6040516103669291906143e5565b3480156105a157600080fd5b5061038f6105b03660046136a5565b6113a0565b3480156105c157600080fd5b506105d56105d03660046136eb565b611419565b6040516103669392919061443b565b3480156105f057600080fd5b50610359611444565b34801561060557600080fd5b506103f36106143660046138a9565b611454565b34801561062557600080fd5b5061054f6106343660046136eb565b611489565b34801561064557600080fd5b506104ef6114a5565b34801561065a57600080fd5b5061038f6114ab565b34801561066f57600080fd5b506103c661156a565b34801561068457600080fd5b506104ef6115f8565b34801561069957600080fd5b506104ef6106a83660046134e1565b6115fe565b3480156106b957600080fd5b5061038f611642565b3480156106ce57600080fd5b5061038f6106dd3660046138e2565b61168d565b3480156106ee57600080fd5b506103596106fd366004613705565b611706565b34801561070e57600080fd5b506103f3611db2565b34801561072357600080fd5b50610737610732366004613620565b611dc1565b6040516103669190613ad7565b34801561075057600080fd5b50610759612006565b604051610366929190614403565b34801561077357600080fd5b506103c6612010565b61038f61078a366004613761565b61201f565b34801561079b57600080fd5b5061038f6107aa3660046135ce565b61221d565b3480156107bb57600080fd5b5061038f6107ca3660046138a9565b61222f565b3480156107db57600080fd5b506104ef612273565b3480156107f057600080fd5b506107f9612279565b6040516103669190614411565b34801561081257600080fd5b506104ef6108213660046138e2565b612288565b34801561083257600080fd5b5061044a612323565b34801561084757600080fd5b5061038f610856366004613568565b612335565b34801561086757600080fd5b5061044a612374565b34801561087c57600080fd5b5061038f61088b3660046136eb565b61239c565b34801561089c57600080fd5b506103c66108ab3660046138a9565b612410565b3480156108bc57600080fd5b5061044a6124b5565b3480156108d157600080fd5b506103596108e03660046134fb565b6124bf565b3480156108f157600080fd5b506109056109003660046136eb565b6124ed565b6040516103669190613a52565b34801561091e57600080fd5b5061038f61092d3660046134e1565b612557565b34801561093e57600080fd5b5061038f61094d3660046138a9565b6125c5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806109e557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109f457506109f482612609565b90505b919050565b610a04612653565b6001600160a01b0316610a15611db2565b6001600160a01b031614610a445760405162461bcd60e51b8152600401610a3b9061412b565b60405180910390fd5b600d80549115156301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff909216919091179055565b610a85612653565b6001600160a01b0316610a96611db2565b6001600160a01b031614610abc5760405162461bcd60e51b8152600401610a3b9061412b565b818111610adb5760405162461bcd60e51b8152600401610a3b9061439f565b600c55600b55565b606060008054610af2906145c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1e906145c2565b8015610b6b5780601f10610b4057610100808354040283529160200191610b6b565b820191906000526020600020905b815481529060010190602001808311610b4e57829003601f168201915b5050505050905090565b6000610b8082612657565b610b9c5760405162461bcd60e51b8152600401610a3b906140ce565b506000908152600460205260409020546001600160a01b031690565b6000610bc382611454565b9050806001600160a01b0316836001600160a01b03161415610bf75760405162461bcd60e51b8152600401610a3b90614277565b806001600160a01b0316610c09612653565b6001600160a01b03161480610c255750610c25816108e0612653565b610c415760405162461bcd60e51b8152600401610a3b90613f4b565b610c4b8383612674565b505050565b60085460ff1681565b6000610c63612374565b905090565b61ffff8082166000908152600e602090815260408083208151608081018352815460ff808216835261010082041615158286015262010000900490951685830152600181018054835181860281018601909452808452949586958695919460608601939092909190830182828015610cff57602002820191906000526020600020905b815481526020019060010190808311610ceb575b50505050508152505090508060000151610d1c8561ffff16611454565b92509250505b915091565b610d38610d32612653565b826126fa565b610d545760405162461bcd60e51b8152600401610a3b906142d4565b610c4b83838361277f565b600d546601000000000000900461ffff1681565b6000610d828261ffff16612657565b1592915050565b600b5481565b600d546301000000900460ff1615610db95760405162461bcd60e51b8152600401610a3b90613c58565b600b54421015610ddb5760405162461bcd60e51b8152600401610a3b90614062565b600c5442101580610dfc5750600d5461ffff16610df6612374565b61ffff16105b610e185760405162461bcd60e51b8152600401610a3b90613d23565b600081516001610e2891906144e6565b9050610e3381612288565b3414610e515760405162461bcd60e51b8152600401610a3b90613b30565b610e5e8761ffff16612657565b15610e7b5760405162461bcd60e51b8152600401610a3b90613b67565b60008761ffff16118015610e95575061270f61ffff881611155b610eb15760405162461bcd60e51b8152600401610a3b90613e4b565b60ff86161580610ec457508560ff166001145b610ee05760405162461bcd60e51b8152600401610a3b90613f14565b600d5482516201000090910460ff161015610f0d5760405162461bcd60e51b8152600401610a3b90614368565b610f18878685611706565b610f345760405162461bcd60e51b8152600401610a3b90613b9e565b60005b82518160ff1610156110f6576000838260ff1681518110610f6857634e487b7160e01b600052603260045260246000fd5b60200260200101519050610f7f8161ffff16612657565b15610f9c5760405162461bcd60e51b8152600401610a3b90613b67565b60008161ffff16118015610fb6575061270f61ffff821611155b610fd25760405162461bcd60e51b8152600401610a3b90613e4b565b60405180608001604052808960ff1681526020016000151581526020018a61ffff16815260200187815250600e60008361ffff1661ffff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160000160026101000a81548161ffff021916908361ffff1602179055506060820151816001019080519060200190611098929190613243565b509050506110aa338261ffff166127ca565b7f9b5e0dc74ea40b721d8d4a1cbf16c62360c0bc5d51fb9e286ac597b5362ae52233826040516110db929190613a35565b60405180910390a150806110ee81614658565b915050610f37565b506040805160808101825260ff888116825260006020808401828152848601838152606086018b815261ffff8f81168652600e85529790942086518154935192517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009094169616959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010091151591909102177fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff16620100009190961602949094178255518051929391926111d69260018501920190613243565b509050506111e8338861ffff166127ca565b7f9b5e0dc74ea40b721d8d4a1cbf16c62360c0bc5d51fb9e286ac597b5362ae5223388604051611219929190613a35565b60405180910390a160ff861661126a578060ff16600d60048282829054906101000a900461ffff1661124b91906144a8565b92506101000a81548161ffff021916908361ffff1602179055506112a7565b8060ff16600d60068282829054906101000a900461ffff1661128c91906144a8565b92506101000a81548161ffff021916908361ffff1602179055505b50505050505050565b610c4b83838360405180602001604052806000815250612335565b6112d361328e565b61ffff8083166000908152600e602052604081205490916201000090910416801561130b57611301816127e4565b9250925050610d22565b611301846127e4565b61131c612653565b6001600160a01b031661132d611db2565b6001600160a01b0316146113535760405162461bcd60e51b8152600401610a3b9061412b565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600d5461ffff640100000000820481169166010000000000009004169091565b6113a8612653565b6001600160a01b03166113b9611db2565b6001600160a01b0316146113df5760405162461bcd60e51b8152600401610a3b9061412b565b60085460ff16156114025760405162461bcd60e51b8152600401610a3b90614331565b80516114159060079060208401906132ad565b5050565b600e6020526000908152604090205460ff8082169161010081049091169062010000900461ffff1683565b600d546301000000900460ff1681565b6000818152600260205260408120546001600160a01b0316806109f45760405162461bcd60e51b8152600401610a3b90614005565b61149161328e565b600061149c836127e4565b91509150915091565b60095481565b6114b3612653565b6001600160a01b03166114c4611db2565b6001600160a01b0316146114ea5760405162461bcd60e51b8152600401610a3b9061412b565b60007354cad98d0eff87a31fb0bf046e2912e836fa832b6001600160a01b031647604051611517906139b2565b60006040518083038185875af1925050503d8060008114611554576040519150601f19603f3d011682016040523d82523d6000602084013e611559565b606091505b505090508061156757600080fd5b50565b60078054611577906145c2565b80601f01602080910402602001604051908101604052809291908181526020018280546115a3906145c2565b80156115f05780601f106115c5576101008083540402835291602001916115f0565b820191906000526020600020905b8154815290600101906020018083116115d357829003601f168201915b505050505081565b600a5481565b60006001600160a01b0382166116265760405162461bcd60e51b8152600401610a3b90613fa8565b506001600160a01b031660009081526003602052604090205490565b61164a612653565b6001600160a01b031661165b611db2565b6001600160a01b0316146116815760405162461bcd60e51b8152600401610a3b9061412b565b61168b60006127fa565b565b611695612653565b6001600160a01b03166116a6611db2565b6001600160a01b0316146116cc5760405162461bcd60e51b8152600401610a3b9061412b565b600d805460ff90921662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909216919091179055565b60008061171585846001612864565b50905060008080808080808080805b60098160ff1610156118365760008b8260ff166009811061175557634e487b7160e01b600052603260045260246000fd5b6020020151905060ff811661176f578160f81b9250611823565b8060ff1660011415611786578160f81b9a50611823565b8060ff166002141561179d578160f81b9950611823565b8060ff16600314156117b4578160f81b9850611823565b8060ff16600414156117cb578160f81b9750611823565b8060ff16600514156117e2578160f81b9650611823565b8060ff16600614156117f9578160f81b9550611823565b8060ff1660071415611810578160f81b9450611823565b8060ff1660081415611823578160f81b93505b508061182e81614658565b915050611724565b5060005b8d518161ffff161015611b135760008e8261ffff168151811061186d57634e487b7160e01b600052603260045260246000fd5b01602001517fff000000000000000000000000000000000000000000000000000000000000001690507f01000000000000000000000000000000000000000000000000000000000000008114156118c657919991611b00565b7f02000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216141561191857919891611b00565b7f03000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216141561196a57919791611b00565b7f04000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821614156119bc57919691611b00565b7f05000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611a0e57919591611b00565b7f06000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611a6057919491611b00565b7f07000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611ab257919391611b00565b7f08000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161415611b00579192915b5080611b0b816145fd565b91505061183a565b507fff000000000000000000000000000000000000000000000000000000000000008916158015611b8557507f01000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008916145b8015611bd257507f02000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008816145b8015611c1f57507f03000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008716145b8015611c6c57507f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008616145b8015611cb957507f05000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008516145b8015611d0657507f06000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008416145b8015611d5357507f07000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008316145b8015611da057507f08000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216145b9e9d5050505050505050505050505050565b6006546001600160a01b031690565b805160609060008167ffffffffffffffff811115611def57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e18578160200160208202803683370190505b50905060005b828161ffff161015611ffe576000600e6000878461ffff1681518110611e5457634e487b7160e01b600052603260045260246000fd5b60209081029190910181015161ffff90811683528282019390935260409182016000208251608081018452815460ff80821683526101008204161515828501526201000090049094168484015260018101805484518185028101850190955280855291936060860193909290830182828015611eef57602002820191906000526020600020905b815481526020019060010190808311611edb575b50505050508152505090506000611f34878461ffff1681518110611f2357634e487b7160e01b600052603260045260246000fd5b602002602001015161ffff16612657565b8251901591508115611f7f576001858561ffff1681518110611f6657634e487b7160e01b600052603260045260246000fd5b602002602001019060ff16908160ff1681525050611fe8565b60ff8116611fad576002858561ffff1681518110611f6657634e487b7160e01b600052603260045260246000fd5b6003858561ffff1681518110611fd357634e487b7160e01b600052603260045260246000fd5b602002602001019060ff16908160ff16815250505b5050508080611ff6906145fd565b915050611e1e565b509392505050565b600b54600c549091565b606060018054610af2906145c2565b61202c8561ffff16612657565b6120485760405162461bcd60e51b8152600401610a3b90613e82565b61ffff85166000908152600e6020526040902054610100900460ff166120805760405162461bcd60e51b8152600401610a3b90613d5a565b61208d8561ffff16611454565b6001600160a01b0316336001600160a01b0316146120bd5760405162461bcd60e51b8152600401610a3b9061421a565b600a5434146120de5760405162461bcd60e51b8152600401610a3b90613b30565b60ff841615806120f157508360ff166001145b61210d5760405162461bcd60e51b8152600401610a3b90613f14565b612118858483611706565b6121345760405162461bcd60e51b8152600401610a3b90613b9e565b6040805160808101825260ff8681168252600060208084018281528486018381526060860189815261ffff8d81168652600e85529790942086518154935192517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009094169616959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010091151591909102177fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffff16620100009190961602949094178255518051929391926122139260018501920190613243565b5050505050505050565b611415612228612653565b8383612886565b612237612653565b6001600160a01b0316612248611db2565b6001600160a01b03161461226e5760405162461bcd60e51b8152600401610a3b9061412b565b600a55565b600c5481565b600d5462010000900460ff1681565b600d5460009061ffff1661229a612374565b61ffff1611156122bc578160ff166009546122b5919061451f565b90506109f7565b600d5461ffff1660ff83166122cf612374565b6122d991906144a8565b61ffff1610156122eb575060006109f7565b600954600d5461ffff1660ff8416612301612374565b61230b91906144a8565b612315919061455c565b61ffff166122b5919061451f565b600d54640100000000900461ffff1681565b612346612340612653565b836126fa565b6123625760405162461bcd60e51b8152600401610a3b906142d4565b61236e84848484612947565b50505050565b600d54600090610c639061ffff660100000000000082048116916401000000009004166144a8565b6123a4612653565b6001600160a01b03166123b5611db2565b6001600160a01b0316146123db5760405162461bcd60e51b8152600401610a3b9061412b565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff92909216919091179055565b606061241b82612657565b6124375760405162461bcd60e51b8152600401610a3b906141bd565b600061244161297a565b9050600081511161246157604051806020016040528060008152506124ae565b61ffff83166000908152600e602052604090205481906124839060ff16612989565b61248c85612989565b60405160200161249e93929190613946565b6040516020818303038152906040525b9392505050565b600d5461ffff1681565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61ffff81166000908152600e602090815260409182902060010180548351818402810184019094528084526060939283018282801561254b57602002820191906000526020600020905b815481526020019060010190808311612537575b50505050509050919050565b61255f612653565b6001600160a01b0316612570611db2565b6001600160a01b0316146125965760405162461bcd60e51b8152600401610a3b9061412b565b6001600160a01b0381166125bc5760405162461bcd60e51b8152600401610a3b90613c8f565b611567816127fa565b6125cd612653565b6001600160a01b03166125de611db2565b6001600160a01b0316146126045760405162461bcd60e51b8152600401610a3b9061412b565b600955565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906126c182611454565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061270582612657565b6127215760405162461bcd60e51b8152600401610a3b90613eb7565b600061272c83611454565b9050806001600160a01b0316846001600160a01b031614806127675750836001600160a01b031661275c84610b75565b6001600160a01b0316145b80612777575061277781856124bf565b949350505050565b61278a838383612ad8565b61ffff166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555050565b611415828260405180602001604052806000815250612c1d565b6127ec61328e565b600061149c83600080612864565b600680546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61286c61328e565b6000612879858585612c50565b915091505b935093915050565b816001600160a01b0316836001600160a01b031614156128b85760405162461bcd60e51b8152600401610a3b90613e14565b6001600160a01b038381166000818152600560209081526040808320948716808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061293a908590613b12565b60405180910390a3505050565b61295284848461277f565b61295e84848484612e1b565b61236e5760405162461bcd60e51b8152600401610a3b90613bfb565b606060078054610af2906145c2565b6060816129ca575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526109f7565b8160005b81156129f457806129de8161461f565b91506129ed9050600a8361450b565b91506129ce565b60008167ffffffffffffffff811115612a1d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612a47576020820181803683370190505b5090505b841561277757612a5c60018361457f565b9150612a69600a86614699565b612a749060306144ce565b60f81b818381518110612a9757634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612ad1600a8661450b565b9450612a4b565b826001600160a01b0316612aeb82611454565b6001600160a01b031614612b115760405162461bcd60e51b8152600401610a3b90614160565b6001600160a01b038216612b375760405162461bcd60e51b8152600401610a3b90613db7565b612b42838383610c4b565b612b4d600082612674565b6001600160a01b0383166000908152600360205260408120805460019290612b7690849061457f565b90915550506001600160a01b0382166000908152600360205260408120805460019290612ba49084906144ce565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612c278383612f85565b612c346000848484612e1b565b610c4b5760405162461bcd60e51b8152600401610a3b90613bfb565b612c5861328e565b60408051610120810182526000808252600160208301526002928201929092526003606082015260046080820152600560a0820152600660c0820152600760e0820152600861010082015281612cae86886144a8565b905060005b60098160ff161015612dda576000612ccf60ff8316600961457f565b83604051602001612ce091906139b5565b6040516020818303038152906040528051906020012060001c612d039190614699565b612d109060ff84166144ce565b90506000848260098110612d3457634e487b7160e01b600052603260045260246000fd5b60200201519050848360ff1660098110612d5e57634e487b7160e01b600052603260045260246000fd5b6020020151858360098110612d8357634e487b7160e01b600052603260045260246000fd5b602002019060ff16908160ff168152505080858460ff1660098110612db857634e487b7160e01b600052603260045260246000fd5b60ff909216602092909202015250819050612dd281614658565b915050612cb3565b508480612deb5750612deb8261307c565b15612dfb5750915083905061287e565b612e1087612e0a8860016144a8565b87612c50565b93509350505061287e565b6000612e2f846001600160a01b031661323d565b15612f7a57836001600160a01b031663150b7a02612e4b612653565b8786866040518563ffffffff1660e01b8152600401612e6d94939291906139f9565b602060405180830381600087803b158015612e8757600080fd5b505af1925050508015612ed5575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612ed291810190613689565b60015b612f2f573d808015612f03576040519150601f19603f3d011682016040523d82523d6000602084013e612f08565b606091505b508051612f275760405162461bcd60e51b8152600401610a3b90613bfb565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612777565b506001949350505050565b6001600160a01b038216612fab5760405162461bcd60e51b8152600401610a3b90614099565b612fb481612657565b15612fd15760405162461bcd60e51b8152600401610a3b90613cec565b612fdd60008383610c4b565b6001600160a01b03821660009081526003602052604081208054600192906130069084906144ce565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008060038180805b60098161ffff1610156131d25761309f60ff851682614678565b61ffff166130b557826130b181614658565b9350505b868161ffff16600981106130d957634e487b7160e01b600052603260045260246000fd5b602002015160ff166130ed578291506131c0565b60006130fa8260016144a8565b90505b60098161ffff1610156131be57878161ffff166009811061312e57634e487b7160e01b600052603260045260246000fd5b602002015160ff16888361ffff166009811061315a57634e487b7160e01b600052603260045260246000fd5b602002015160ff161180156131995750878161ffff166009811061318e57634e487b7160e01b600052603260045260246000fd5b602002015160ff1615155b156131ac57856131a8816145fd565b9650505b806131b6816145fd565b9150506130fd565b505b806131ca816145fd565b915050613085565b506131de6002846146ad565b60ff16613232576131f06002826146ad565b60ff1661321457613202600285614678565b61ffff166000149450505050506109f7565b61321f600285614678565b61ffff16600014159450505050506109f7565b613202600285614678565b3b151590565b82805482825590600052602060002090810192821561327e579160200282015b8281111561327e578251825591602001919060010190613263565b5061328a929150613320565b5090565b6040518061012001604052806009906020820280368337509192915050565b8280546132b9906145c2565b90600052602060002090601f0160209004810192826132db576000855561327e565b82601f106132f457805160ff191683800117855561327e565b8280016001018555821561327e579182018281111561327e578251825591602001919060010190613263565b5b8082111561328a5760008155600101613321565b600067ffffffffffffffff83111561334f5761334f6146fb565b61338060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160161445a565b905082815283838301111561339457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146109f757600080fd5b600082601f8301126133d2578081fd5b813560206133e76133e283614484565b61445a565b8281528181019085830183850287018401881015613403578586fd5b855b8581101561342857613416826134be565b84529284019290840190600101613405565b5090979650505050505050565b600082601f830112613445578081fd5b813560206134556133e283614484565b8281528181019085830183850287018401881015613471578586fd5b855b8581101561342857813584529284019290840190600101613473565b803580151581146109f757600080fd5b600082601f8301126134af578081fd5b6124ae83833560208501613335565b803561ffff811681146109f757600080fd5b803560ff811681146109f757600080fd5b6000602082840312156134f2578081fd5b6124ae826133ab565b6000806040838503121561350d578081fd5b613516836133ab565b9150613524602084016133ab565b90509250929050565b600080600060608486031215613541578081fd5b61354a846133ab565b9250613558602085016133ab565b9150604084013590509250925092565b6000806000806080858703121561357d578081fd5b613586856133ab565b9350613594602086016133ab565b925060408501359150606085013567ffffffffffffffff8111156135b6578182fd5b6135c28782880161349f565b91505092959194509250565b600080604083850312156135e0578182fd5b6135e9836133ab565b91506135246020840161348f565b60008060408385031215613609578182fd5b613612836133ab565b946020939093013593505050565b600060208284031215613631578081fd5b813567ffffffffffffffff811115613647578182fd5b612777848285016133c2565b600060208284031215613664578081fd5b6124ae8261348f565b60006020828403121561367e578081fd5b81356124ae81614711565b60006020828403121561369a578081fd5b81516124ae81614711565b6000602082840312156136b6578081fd5b813567ffffffffffffffff8111156136cc578182fd5b8201601f810184136136dc578182fd5b61277784823560208401613335565b6000602082840312156136fc578081fd5b6124ae826134be565b600080600060608486031215613719578081fd5b613722846134be565b9250602084013567ffffffffffffffff81111561373d578182fd5b6137498682870161349f565b925050613758604085016134be565b90509250925092565b600080600080600060a08688031215613778578283fd5b613781866134be565b945061378f602087016134d0565b9350604086013567ffffffffffffffff808211156137ab578485fd5b6137b789838a0161349f565b945060608801359150808211156137cc578283fd5b506137d988828901613435565b9250506137e8608087016134be565b90509295509295909350565b60008060008060008060c0878903121561380c578384fd5b613815876134be565b9550613823602088016134d0565b9450604087013567ffffffffffffffff8082111561383f578586fd5b61384b8a838b0161349f565b95506060890135915080821115613860578283fd5b61386c8a838b01613435565b945061387a60808a016134be565b935060a089013591508082111561388f578283fd5b5061389c89828a016133c2565b9150509295509295509295565b6000602082840312156138ba578081fd5b5035919050565b600080604083850312156138d3578182fd5b50508035926020909101359150565b6000602082840312156138f3578081fd5b6124ae826134d0565b60008151808452613914816020860160208601614596565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008451613958818460208901614596565b84519083019061396c818360208901614596565b7f2f00000000000000000000000000000000000000000000000000000000000000910190815283516139a5816001840160208801614596565b0160010195945050505050565b90565b60f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016815260020190565b6001600160a01b0391909116815260200190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613a2b60808301846138fc565b9695505050505050565b6001600160a01b0392909216825261ffff16602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015613a8a57835183529284019291840191600101613a6e565b50909695505050505050565b6101408101818460005b6009811015613ac257815160ff16835260209283019290910190600101613aa0565b50505061ffff83166101208301529392505050565b6020808252825182820181905260009190848201906040850190845b81811015613a8a57835160ff1683529284019291840191600101613af3565b901515815260200190565b6000602082526124ae60208301846138fc565b60208082526011908201527f496e636f7272656374207061796d656e74000000000000000000000000000000604082015260600190565b6020808252600e908201527f416c7265616479206d696e746564000000000000000000000000000000000000604082015260600190565b60208082526029908201527f50757a7a6c65206e6f7420736f6c7665642c20756e61626c6520746f2076657260408201527f696679206d6f7665730000000000000000000000000000000000000000000000606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b6020808252600e908201527f4d696e74696e6720706175736564000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526010908201527f4541206c696d6974207265616368656400000000000000000000000000000000604082015260600190565b60208082526024908201527f456469744d6f7665733a204e6f7420616c6c6f77656420746f2065646974206d60408201527f6f76657300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600f908201527f496e76616c696420746f6b656e49640000000000000000000000000000000000604082015260600190565b6020808252818101527f456469744d6f7665733a20546f6b656e496420646f65736e2774206578697374604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b60208082526011908201527f496e76616c696420746f6b656e54797065000000000000000000000000000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606082015260800190565b60208082526010908201527f47616d65206e6f74207374617274656400000000000000000000000000000000604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606082015260800190565b60208082526021908201527f4e6f7420617574686f726973656420746f206564697420746f6b656e2074797060408201527f6500000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560408201527f7200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526012908201527f4261736520555249206973206c6f636b65640000000000000000000000000000604082015260600190565b60208082526014908201527f546f6b656e206c696d6974206578636565646564000000000000000000000000604082015260600190565b6020808252601e908201527f77696e646f7720636f6d62696e6174696f6e206e6f7420616c6c6f7765640000604082015260600190565b61ffff91909116815260200190565b61ffff92831681529116602082015260400190565b90815260200190565b918252602082015260400190565b60ff91909116815260200190565b60ff9290921682526001600160a01b0316602082015260400190565b60ff939093168352901515602083015261ffff16604082015260600190565b60405181810167ffffffffffffffff8111828210171561447c5761447c6146fb565b604052919050565b600067ffffffffffffffff82111561449e5761449e6146fb565b5060209081020190565b600061ffff8083168185168083038211156144c5576144c56146cf565b01949350505050565b600082198211156144e1576144e16146cf565b500190565b600060ff821660ff84168060ff03821115614503576145036146cf565b019392505050565b60008261451a5761451a6146e5565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614557576145576146cf565b500290565b600061ffff83811690831681811015614577576145776146cf565b039392505050565b600082821015614591576145916146cf565b500390565b60005b838110156145b1578181015183820152602001614599565b8381111561236e5750506000910152565b6002810460018216806145d657607f821691505b602082108114156145f757634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415614615576146156146cf565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614651576146516146cf565b5060010190565b600060ff821660ff81141561466f5761466f6146cf565b60010192915050565b600061ffff8084168061468d5761468d6146e5565b92169190910692915050565b6000826146a8576146a86146e5565b500690565b600060ff8316806146c0576146c06146e5565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461156757600080fdfea2646970667358221220e851967e49416df09b6637c9da69255385c1000e48daf75c66927385b6d7156664736f6c63430008000033

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.