ETH Price: $3,050.72 (+3.41%)

Token

FoxGame (FOX)
 

Overview

Max Total Supply

10,000 FOX

Holders

761

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 FOX
0x0B8238F17EfEABEef5f489b7Fa0D65A1c147dbE1
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

**The holder count on Opensea is not accurate as many NFTs are staked for gameplay. ** Rabbits and Foxes go head-to-head on-chain for the enticing prize of CROWN. You decide your fate in Fox Game. Around the farm, an abundance of rabbits and foxes scurry to harvest carrots, ...

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
FoxGameNFT

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : FoxGameNFT.sol
/*
███████╗ ██████╗ ██╗  ██╗     ██████╗  █████╗ ███╗   ███╗███████╗
██╔════╝██╔═══██╗╚██╗██╔╝    ██╔════╝ ██╔══██╗████╗ ████║██╔════╝
█████╗  ██║   ██║ ╚███╔╝     ██║  ███╗███████║██╔████╔██║█████╗  
██╔══╝  ██║   ██║ ██╔██╗     ██║   ██║██╔══██║██║╚██╔╝██║██╔══╝  
██║     ╚██████╔╝██╔╝ ██╗    ╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗
╚═╝      ╚═════╝ ╚═╝  ╚═╝     ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";

import "./IFoxGameNFTTraits.sol";
import "./IFoxGameCarrot.sol";
import "./IFoxGameNFT.sol";
import "./IFoxGame.sol";

contract FoxGameNFT is IFoxGameNFT, ERC721Enumerable, Ownable, ReentrancyGuard {
  // Presale status
  bool public presaleActive;
  bool public saleActive;

  // Rarity trait probabilities
  uint8[][21] private rarities;
  uint8[][21] private aliases;

  // Mumber of players minted
  uint16 public minted;

  // Maximum players in the game
  uint16 public constant MAX_TOKENS = 50000;

  // Number of GEN 0 tokens
  uint16 public constant MAX_GEN0_TOKENS = 10000;

  // Maximum mint per transaction (per account during whitelist)
  uint32 public maxMint = 10;

  // Time denominator for seeding randomness.
  uint32 private seedRotationSeconds = 90 days;

  // External contracts
  IFoxGameCarrot private immutable foxCarrot;
  IFoxGame private immutable foxGame;
  IFoxGameNFTTraits private foxTraits;

  // GEN 0 mint price
  uint256 public constant MINT_PRICE = 0.0649 ether;

  // Mapping of token ID to player traits
  mapping(uint16 => Traits) private tokenTraits;

  // Whitelist mint count
  mapping (address => uint32) public presaleMinted;

  // Store previous trait combinations to prevent duplicates
  mapping(uint256 => bool) private knownCombinations;

  // isApprovedForAll registry
  mapping(address => bool) private approvedWhitelist;

  // Events
  event Mint(string kind, address owner, uint16 tokenId);
  event PresaleActive(bool active);
  event SaleActive(bool active);

  // Initialize
  constructor(address carrot, address game, address traits) ERC721("FoxGame", "FOX") {
    foxCarrot = IFoxGameCarrot(carrot);
    foxGame = IFoxGame(game);
    foxTraits = IFoxGameNFTTraits(traits);

    // Precomputed rarity probabilities on chain.
    // (via walker's alias algorithm)

    // RABBIT

    // Fur
    rarities[0] = [ 153, 153, 255, 102, 77, 230 ];
    aliases[0] = [ 2, 2, 0, 2, 3, 3 ];
    // Paws
    rarities[1] = [ 61, 184, 122, 122, 61, 255, 204, 122, 224, 255, 214, 184, 235, 61, 184, 184, 184, 122, 122, 184, 153, 245, 143, 224 ];
    aliases[1] = [ 6, 8, 8, 9, 10, 0, 5, 15, 6, 8, 9, 15, 10, 20, 20, 12, 21, 22, 23, 23, 15, 20, 21, 22 ];
    // Mouth
    rarities[2] = [ 191, 77, 191, 255, 38, 115, 204, 153, 191, 38, 64, 115, 77, 115, 128 ];
    aliases[2] = [ 3, 3, 3, 0, 7, 7, 3, 6, 7, 10, 8, 13, 14, 10, 13 ];
    // Nose
    rarities[3] = [ 255, 242, 153, 204, 115, 230, 230, 115, 115 ];
    aliases[3] = [ 0, 0, 1, 2, 0, 0, 0, 2, 3 ];
    // Eyes
    rarities[4] = [ 77, 255, 128, 77, 153, 153, 153, 77, 153, 230, 77, 77, 77, 204, 179, 230, 77, 179, 128, 179, 153, 230, 77, 77, 102, 77, 153, 153, 204, 77 ];
    aliases[4] = [ 3, 0, 1, 2, 13, 13, 13, 13, 14, 14, 18, 19, 20, 3, 13, 20, 24, 14, 17, 18, 19, 20, 25, 25, 21, 24, 25, 26, 26, 28 ];
    // Ears
    rarities[5] = [ 41, 61, 102, 204, 255, 102, 204, 204 ];
    aliases[5] = [ 5, 5, 5, 5, 0, 4, 5, 5 ];
    // Head
    rarities[6] = [ 87, 255, 130, 245, 173, 173, 191, 87, 176, 128, 217, 43, 173, 217, 92, 217, 43 ];
    aliases[6] = [ 1, 0, 3, 1, 6, 6, 3, 9, 6, 8, 9, 9, 9, 9, 9, 9, 14 ];

    // FOX

    // Tail
    rarities[7] = [ 255, 153, 204, 102 ];
    aliases[7] = [ 0, 0, 0, 1 ];
    // Fur
    rarities[8] = [ 255, 204, 153, 153 ];
    aliases[8] = [ 0, 0, 1, 1 ];
    // Feet
    rarities[9] = [ 255, 255, 229, 204, 229, 204, 179, 255, 255, 128 ];
    aliases[9] = [ 0, 0, 1, 2, 3, 2, 3, 0, 0, 4 ];
    //  Neck
    rarities[10] = [ 255, 204, 204, 204, 127, 102, 51, 255, 255, 26 ];
    aliases[10] = [ 0, 0, 1, 0, 2, 0, 1, 0, 0, 4 ];
    // Mouth
    rarities[11] = [ 255, 102, 255, 255, 204, 153, 102, 255, 51, 51, 255, 204, 255, 204, 153, 204, 153, 51, 255, 51 ];
    aliases[11] = [ 0, 2, 0, 2, 3, 2, 4, 6, 6, 6, 0, 7, 11, 12, 13, 7, 11, 13, 0, 14 ];
    // Eyes
    rarities[12] = [ 56, 255, 179, 153, 158, 112, 133, 112, 112, 56, 250, 224, 199, 122, 240, 214, 189, 112, 112, 163, 112, 138 ];
    aliases[12] = [ 1, 0, 1, 2, 3, 1, 4, 3, 6, 12, 6, 10, 11, 12, 13, 14, 15, 12, 13, 16, 21, 19 ];
    // Cunning Score
    rarities[13] = [ 255, 153, 204, 102 ];
    aliases[13] = [ 0, 0, 0, 1 ];

    // HUNTER

    // Clothes
    rarities[14] = [ 128, 255, 128, 64, 255 ];
    aliases[14] = [ 2, 0, 1, 2, 0 ];
    // Weapon
    rarities[15] = [ 255, 153, 204, 102 ];
    aliases[15] = [ 0, 0, 0, 1 ];
    // Neck
    rarities[16] = [ 102, 255, 26, 153, 255 ];
    aliases[16] = [ 1, 0, 3, 1, 0 ];
    // Mouth
    rarities[17] = [ 255, 229, 179, 179, 89, 179, 217 ];
    aliases[17] = [ 0, 0, 0, 6, 6, 6, 1 ];
    // Eyes
    rarities[18] = [ 191, 255, 38, 77, 191, 77, 217, 38, 153, 191, 77, 191, 204, 77, 77 ];
    aliases[18] = [ 1, 0, 4, 4, 1, 4, 5, 5, 6, 5, 5, 6, 8, 8, 12 ];
    // Hat
    rarities[19] = [ 191, 38, 89, 255, 191 ];
    aliases[19] = [ 3, 4, 4, 0, 3 ];
    // Marksman Score
    rarities[20] = [ 255, 153, 204, 102 ];
    aliases[20] = [ 0, 0, 0, 1 ];
  }

  /**
   * Upload rarity propbabilties. Only used in emergencies.
   * @param traitTypeId trait name id (0 corresponds to "fur")
   * @param _rarities walker rarity probailities
   * @param _aliases walker aliases index
   */
  function uploadTraits(uint8 traitTypeId, uint8[] calldata _rarities, uint8[] calldata _aliases) external onlyOwner {
    rarities[traitTypeId] = _rarities;
    aliases[traitTypeId] = _aliases;
  }

  /**
   * Enable Presale.
   */
  function togglePresale() external onlyOwner {
    presaleActive = !presaleActive;
    emit PresaleActive(presaleActive);
  }

  /**
   * Enable Sale.
   */
  function toggleSale() external onlyOwner {
    saleActive = !saleActive;
    emit PresaleActive(saleActive);
  }

  /**
   * Update the ERC-721 trait contract address.
   */
  function setTraitsContract(address _address) external onlyOwner {
    foxTraits = IFoxGameNFTTraits(_address);
  }

  /**
   * Set the max mints per account during persale and per tx during public sale
   */
  function setMaxMintAmount(uint32 _maxMint) external onlyOwner {
    maxMint = _maxMint;
  }

  /**
   * Expose traits to trait contract.
   */
  function getTraits(uint16 tokenId) external view override returns (Traits memory) {
    return tokenTraits[tokenId];
  }

  /**
   * Expose maximum GEN 0 tokens.
   */
  function getMaxGEN0Players() external pure override returns (uint16) {
    return MAX_GEN0_TOKENS;
  }

  /**
   * Internal helper for minting.
   */
  function _mint(uint32 amount, bool stake, uint256 originSeed) internal {
    Kind kind;
    uint16[] memory tokenIdsToStake = stake ? new uint16[](amount) : new uint16[](0);
    uint256 carrotCost;
    uint256 seed;
    for (uint32 i = 0; i < amount; i++) {
      minted++;
      seed = _reseedWithIndex(originSeed, i);
      carrotCost += getMintCarrotCost(minted);
      kind = _generateAndStoreTraits(minted, seed, 0).kind;
      address recipient = _selectRecipient(seed);
      if (!stake || recipient != msg.sender) {
        _safeMint(recipient, minted);
      } else {
        tokenIdsToStake[i] = minted;
        _safeMint(address(foxGame), minted);
      }
      emit Mint(kind == Kind.RABBIT ? "RABBIT" : kind == Kind.FOX ? "FOX" : "HUNTER", recipient, minted);
    }
    if (carrotCost > 0) {
      foxCarrot.burn(msg.sender, carrotCost);
    }
    if (stake) {
      foxGame.stakeTokens(msg.sender, tokenIdsToStake);
    }
  }

  /**
   * Mint your players.
   * @param amount number of tokens to mint
   * @param stake mint directly to staking
   * @param membership wheather user is membership or not
   * @param seed account seed
   * @param sig signature 
   */
  function presaleMint(uint32 amount, bool stake, bool membership, uint48 expiration, uint256 seed, bytes calldata sig) external payable nonReentrant {
    require(tx.origin == msg.sender, "eos only");
    require(presaleActive, "minting is not active");
    require(minted + amount <= MAX_TOKENS, "minted out");
    require(expiration > block.timestamp, "signature has expired");
    require(membership, "only members allowed");
    require(foxGame.isValidSignature(msg.sender, membership, expiration, seed, sig), "invalid signature");

    // Require ETH for GEN 0 only
    if (minted < MAX_GEN0_TOKENS) {
      require(minted + amount <= MAX_GEN0_TOKENS, "not enough available gen0 mints");
      require(amount * MINT_PRICE == msg.value, "invalid payment amount");
    } else {
      require(msg.value == 0, "only carrots required");
    }

    // Allow only 10 per account during presale
    uint32 claimed = presaleMinted[msg.sender];
    require(amount > 0 && amount <= maxMint - claimed, "cannot exceed presale mints");
    presaleMinted[msg.sender] = claimed + amount;

    _mint(amount, stake, seed);
  }

  /**
   * Mint your players.
   * @param amount number of tokens to mint
   * @param stake mint directly to staking
   * @param seed random seed per mint
   * @param sig signature 
   */
  function mint(uint32 amount, bool stake, uint256 seed, uint48 expiration, bytes calldata sig) external payable nonReentrant {
    require(tx.origin == msg.sender, "eos only");
    require(saleActive, "minting is not active");
    require(amount > 0 && amount <= maxMint, "invalid mint amount");
    require(amount * MINT_PRICE == msg.value, "Invalid payment amount");
    require(minted + amount <= MAX_TOKENS, "minted out");
    require(expiration > block.timestamp, "signature has expired");
    require(foxGame.isValidSignature(msg.sender, false, expiration, seed, sig), "invalid signature");

    _mint(amount, stake, seed);
  }

  /**
   * Calculate the foxCarrot cost:
   * - the first 20% are paid in ETH
   * - the next 20% are 20000 $CARROT
   * - the next 40% are 40000 $CARROT
   * - the final 20% are 80000 $CARROT
   * @param tokenId the ID to check the cost of to mint
   * @return the cost of the given token ID
   */
  function getMintCarrotCost(uint16 tokenId) public pure returns (uint256) {
    if (tokenId <= MAX_GEN0_TOKENS) return 0;
    if (tokenId <= MAX_TOKENS * 2 / 5) return 20000 ether;
    if (tokenId <= MAX_TOKENS * 4 / 5) return 40000 ether;
    return 80000 ether;
  }

  /**
   * Generate and store player traits. Recursively called to ensure uniqueness.
   * Give users 3 attempts, bit shifting the seed each time (uses 5 bytes of entropy before failing)
   * @param tokenId id of the token to generate traits
   * @param seed random 256 bit seed to derive traits
   * @return t player trait struct
   */
  function _generateAndStoreTraits(uint16 tokenId, uint256 seed, uint8 attempt) internal returns (Traits memory t) {
    require(attempt < 6, "unable to generate unique traits");
    t = _selectTraits(tokenId, seed);
    if (!knownCombinations[_structToHash(t)]) {
      tokenTraits[tokenId] = t;
      knownCombinations[_structToHash(t)] = true;
      return t;
    }
    return _generateAndStoreTraits(tokenId, seed >> attempt, attempt + 1);
  }

  /**
   * uses A.J. Walker's Alias algorithm for O(1) rarity table lookup
   * ensuring O(1) instead of O(n) reduces mint cost by more than 50%
   * probability & alias tables are generated off-chain beforehand
   * @param seed portion of the 256 bit seed to remove trait correlation
   * @param traitType the trait type to select a trait for 
   * @return the ID of the randomly selected trait
   */
  function _selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) {
    uint8 trait = uint8(seed) % uint8(rarities[traitType].length);
    if (seed >> 8 < rarities[traitType][trait]) return trait;
    return aliases[traitType][trait];
  }

  /**
   * the first 20% (ETH purchases) go to the minter
   * the remaining 80% have a 10% chance to be given to a random staked fox
   * @param seed a random value to select a recipient from
   * @return the address of the recipient (either the minter or the fox thief's owner)
   */
  function _selectRecipient(uint256 seed) internal view returns (address) {
    if (minted <= MAX_GEN0_TOKENS || ((seed >> 245) % 10) != 0) {
      return msg.sender; // top 10 bits haven't been used
    }
    // 144 bits reserved for trait selection
    address thief = foxGame.randomFoxOwner(seed >> 144);
    if (thief == address(0x0)) {
      return msg.sender;
    }
    return thief;
  }

  /**
   * selects the species and all of its traits based on the seed value
   * @param seed a pseudorandom 256 bit number to derive traits from
   * @return t struct of randomly selected traits
   */
  function _selectTraits(uint16 tokenId, uint256 seed) internal view returns (Traits memory t) {
    // No Hunters until GEN 1 (RABBIT=0, FOX=1, HUNTER=2)
    if (tokenId <= MAX_GEN0_TOKENS) {
      t.kind = Kind((seed & 0xFFFF) % 10 == 0 ? 1 : 0);
    } else {
      uint mod = (seed & 0xFFFF) % 50;
      t.kind = Kind(mod == 0 ? 2 : mod < 5 ? 1 : 0);
    }
    // Use 128 bytes of seed entropy to define traits.
    uint8 offset = uint8(t.kind) * 7;                                           // RABBIT FOX     HUNTER
    seed >>= 16; t.traits[0] = _selectTrait(uint16(seed & 0xFFFF), 0 + offset); // Fur    Tail    Clothes
    seed >>= 16; t.traits[1] = _selectTrait(uint16(seed & 0xFFFF), 1 + offset); // Head   Fur     Eyes
    seed >>= 16; t.traits[2] = _selectTrait(uint16(seed & 0xFFFF), 2 + offset); // Ears   Eyes    Hat
    seed >>= 16; t.traits[3] = _selectTrait(uint16(seed & 0xFFFF), 3 + offset); // Eyes   Mouth   Mouth
    seed >>= 16; t.traits[4] = _selectTrait(uint16(seed & 0xFFFF), 4 + offset); // Nose   Neck    Neck
    seed >>= 16; t.traits[5] = _selectTrait(uint16(seed & 0xFFFF), 5 + offset); // Mouth  Feet    Weapon
    seed >>= 16; t.traits[6] = _selectTrait(uint16(seed & 0xFFFF), 6 + offset); // Paws   Cunning Marksman
    t.advantage = t.traits[6];
  }

  /**
   * converts a struct to a 256 bit hash to check for uniqueness
   * @param t the struct to pack into a hash
   * @return the 256 bit hash of the struct
   */
  function _structToHash(Traits memory t) internal pure returns (uint256) {
    return uint256(bytes32(
      abi.encodePacked(
        t.kind,
        t.advantage,
        t.traits[0],
        t.traits[1],
        t.traits[2],
        t.traits[3],
        t.traits[4],
        t.traits[5],
        t.traits[6]
      )
    ));
  }

  /**
   * Reseeds entropy with mint amount offset.
   * @param seed random seed
   * @param offset additional entropy during mint
   * @return rotated seed
   */
  function _reseedWithIndex(uint256 seed, uint32 offset) internal pure returns (uint256) {
    return uint256(keccak256(abi.encodePacked(seed, offset)));
  }

  /**
   * Allow private sales.
   */
  function mintToAddress(uint256 amount, address recipient, uint256 originSeed) external onlyOwner {
    require(minted + amount <= MAX_TOKENS, "minted out");
    require(amount > 0, "invalid mint amount");
    
    Kind kind;
    uint256 seed;
    for (uint32 i = 0; i < amount; i++) {
      minted++;
      seed = _reseedWithIndex(originSeed, i);
      kind = _generateAndStoreTraits(minted, seed, 0).kind;
      _safeMint(recipient, minted);
      emit Mint(kind == Kind.RABBIT ? "RABBIT" : kind == Kind.FOX ? "FOX" : "HUNTER", recipient, minted);
    }
  }

  /**
   * Allows owner to withdraw funds from minting.
   */
  function withdraw() external onlyOwner {
    payable(owner()).transfer(address(this).balance);
  }

  /**
   * Override transfer to avoid the approval step during staking.
   */
  function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IFoxGameNFT) {
    if (msg.sender != address(foxGame)) {
      require(_isApprovedOrOwner(msg.sender, tokenId), "transfer not owner nor approved");
    }
    _transfer(from, to, tokenId);
  }

  /**
   * Override NFT token uri. Calls into traits contract.
   */
  function tokenURI(uint256 tokenId) public view override returns (string memory) {
    require(_exists(tokenId), "nonexistent token");
    return foxTraits.tokenURI(uint16(tokenId));
  }

  /**
   * Ennumerate tokens by owner.
   */
  function tokensOf(address owner) external view returns (uint16[] memory) {
    uint32 tokenCount = uint32(balanceOf(owner));
    uint16[] memory tokensId = new uint16[](tokenCount);
    for (uint32 i = 0; i < tokenCount; i++){
      tokensId[i] = uint16(tokenOfOwnerByIndex(owner, i));
    }
    return tokensId;
  }

  /**
   * Overridden to resolve multiple inherited interfaces.
   */
  function ownerOf(uint256 tokenId) public view override(ERC721, IFoxGameNFT) returns (address) {
    return super.ownerOf(tokenId);
  }

  /**
   * Overridden to resolve multiple inherited interfaces.
   */
  function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override(ERC721, IFoxGameNFT) {
    super.safeTransferFrom(from, to, tokenId, _data);
  }
}

File 2 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 18 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

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

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 5 of 18 : IFoxGameNFTTraits.sol
/*
███████╗ ██████╗ ██╗  ██╗     ██████╗  █████╗ ███╗   ███╗███████╗
██╔════╝██╔═══██╗╚██╗██╔╝    ██╔════╝ ██╔══██╗████╗ ████║██╔════╝
█████╗  ██║   ██║ ╚███╔╝     ██║  ███╗███████║██╔████╔██║█████╗  
██╔══╝  ██║   ██║ ██╔██╗     ██║   ██║██╔══██║██║╚██╔╝██║██╔══╝  
██║     ╚██████╔╝██╔╝ ██╗    ╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗
╚═╝      ╚═════╝ ╚═╝  ╚═╝     ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

interface IFoxGameNFTTraits {
  function tokenURI(uint16 tokenId) external view returns (string memory);
}

File 6 of 18 : IFoxGameCarrot.sol
/*
███████╗ ██████╗ ██╗  ██╗     ██████╗  █████╗ ███╗   ███╗███████╗
██╔════╝██╔═══██╗╚██╗██╔╝    ██╔════╝ ██╔══██╗████╗ ████║██╔════╝
█████╗  ██║   ██║ ╚███╔╝     ██║  ███╗███████║██╔████╔██║█████╗  
██╔══╝  ██║   ██║ ██╔██╗     ██║   ██║██╔══██║██║╚██╔╝██║██╔══╝  
██║     ╚██████╔╝██╔╝ ██╗    ╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗
╚═╝      ╚═════╝ ╚═╝  ╚═╝     ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

interface IFoxGameCarrot {
  function mint(address to, uint256 amount) external;
  function burn(address from, uint256 amount) external;
}

File 7 of 18 : IFoxGameNFT.sol
/*
███████╗ ██████╗ ██╗  ██╗     ██████╗  █████╗ ███╗   ███╗███████╗
██╔════╝██╔═══██╗╚██╗██╔╝    ██╔════╝ ██╔══██╗████╗ ████║██╔════╝
█████╗  ██║   ██║ ╚███╔╝     ██║  ███╗███████║██╔████╔██║█████╗  
██╔══╝  ██║   ██║ ██╔██╗     ██║   ██║██╔══██║██║╚██╔╝██║██╔══╝  
██║     ╚██████╔╝██╔╝ ██╗    ╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗
╚═╝      ╚═════╝ ╚═╝  ╚═╝     ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

interface IFoxGameNFT {
  enum Kind { RABBIT, FOX, HUNTER }
  struct Traits { Kind kind; uint8 advantage; uint8[7] traits; }
  function getMaxGEN0Players() external pure returns (uint16);
  function getTraits(uint16) external view returns (Traits memory);
  function ownerOf(uint256) external view returns (address owner);
  function transferFrom(address, address, uint256) external;
  function safeTransferFrom(address, address, uint256, bytes memory) external;
}

File 8 of 18 : IFoxGame.sol
/*
███████╗ ██████╗ ██╗  ██╗     ██████╗  █████╗ ███╗   ███╗███████╗
██╔════╝██╔═══██╗╚██╗██╔╝    ██╔════╝ ██╔══██╗████╗ ████║██╔════╝
█████╗  ██║   ██║ ╚███╔╝     ██║  ███╗███████║██╔████╔██║█████╗  
██╔══╝  ██║   ██║ ██╔██╗     ██║   ██║██╔══██║██║╚██╔╝██║██╔══╝  
██║     ╚██████╔╝██╔╝ ██╗    ╚██████╔╝██║  ██║██║ ╚═╝ ██║███████╗
╚═╝      ╚═════╝ ╚═╝  ╚═╝     ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

interface IFoxGame {
  function stakeTokens(address, uint16[] calldata) external;
  function randomFoxOwner(uint256) external view returns (address);
  function isValidSignature(address, bool, uint48, uint256, bytes memory) external view returns (bool);
}

File 9 of 18 : Context.sol
// SPDX-License-Identifier: MIT

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 10 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT

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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 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 11 of 18 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 12 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT

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 13 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 14 of 18 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 15 of 18 : Address.sol
// SPDX-License-Identifier: MIT

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 16 of 18 : Strings.sol
// SPDX-License-Identifier: MIT

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 17 of 18 : ERC165.sol
// SPDX-License-Identifier: MIT

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 18 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT

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": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"carrot","type":"address"},{"internalType":"address","name":"game","type":"address"},{"internalType":"address","name":"traits","type":"address"}],"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":"string","name":"kind","type":"string"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"Mint","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":false,"internalType":"bool","name":"active","type":"bool"}],"name":"PresaleActive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"SaleActive","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":"MAX_GEN0_TOKENS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKENS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxGEN0Players","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"getMintCarrotCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"}],"name":"getTraits","outputs":[{"components":[{"internalType":"enum IFoxGameNFT.Kind","name":"kind","type":"uint8"},{"internalType":"uint8","name":"advantage","type":"uint8"},{"internalType":"uint8[7]","name":"traits","type":"uint8[7]"}],"internalType":"struct IFoxGameNFT.Traits","name":"","type":"tuple"}],"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":[],"name":"maxMint","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"amount","type":"uint32"},{"internalType":"bool","name":"stake","type":"bool"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"uint48","name":"expiration","type":"uint48"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"originSeed","type":"uint256"}],"name":"mintToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"amount","type":"uint32"},{"internalType":"bool","name":"stake","type":"bool"},{"internalType":"bool","name":"membership","type":"bool"},{"internalType":"uint48","name":"expiration","type":"uint48"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","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":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_maxMint","type":"uint32"}],"name":"setMaxMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setTraitsContract","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":[],"name":"togglePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOf","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint8","name":"traitTypeId","type":"uint8"},{"internalType":"uint8[]","name":"_rarities","type":"uint8[]"},{"internalType":"uint8[]","name":"_aliases","type":"uint8[]"}],"name":"uploadTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526037805462010000600160501b0319166876a7000000000a00001790553480156200002e57600080fd5b50604051620053de380380620053de8339810160408190526200005191620014e9565b6040805180820182526007815266466f7847616d6560c81b60208083019182528351808501909452600384526208c9eb60eb1b9084015281519192916200009b9160009162001383565b508051620000b190600190602084019062001383565b505050620000ce620000c86200132d60201b60201c565b62001331565b6001600b556001600160a01b03838116608090815283821660a0908152603780549385166a010000000000000000000002600160501b600160f01b0319909416939093179092556040805160c0810182526099808252602082015260ff9181019190915260666060820152604d9181019190915260e6918101919091526200015b90600d90600662001412565b506040805160c0810182526002808252602082018190526000928201839052606082015260036080820181905260a082015290602290620001a192910190600662001412565b506040805161030081018252603d80825260b860208301819052607a938301849052606083018490526080830182905260ff60a0840181905260cc60c085015260e0808501869052610100850181905261012085019190915260d6610140850152610160840182905260eb6101808501526101a08401929092526101c083018190526101e0830181905261020083018190526102208301849052610240830193909352610260820192909252609961028082015260f56102a0820152608f6102c08201526102e08101919091526200027e90600e90601862001412565b5060408051610300810182526006808252600860208301819052928201839052600960608301819052600a60808401819052600060a0850152600560c0850152600f60e08501819052610100850193909352610120840194909452610140830152610160820181905261018082019290925260146101a082018190526101c08201819052600c6101e08301526015610200830181905260166102208401819052601761024085018190526102608501526102808401949094526102a08301919091526102c08201526102e08101919091526200035f90602390601862001412565b50604080516101e08101825260bf808252604d6020830181905282840182905260ff606084015260266080808501829052607360a0860181905260cc60c0870152609960e087015261010086019490945261012085019190915261014084019490945261016083018290526101808301526101a08201526101c0810191909152620003ee90600f908162001412565b50604080516101e0810182526003808252602082018190529181018290526000606082015260076080820181905260a0820181905260c0820192909252600660e0820152610100810191909152600a61012082018190526008610140830152600d6101608301819052600e6101808401526101a08301919091526101c08201526200047e90602490600f62001412565b50604080516101208101825260ff815260f2602082015260999181019190915260cc606082015260736080820181905260e660a0830181905260c083015260e08201819052610100820152620004d990601090600962001412565b5060408051610120810182526000808252602082018190526001928201929092526002606082018190526080820183905260a0820183905260c082019290925260e081019190915260036101008201526200053990602590600962001412565b50604080516103c081018252604d80825260ff6020830152608092820183905260608201819052609983830181905260a0830181905260c0830181905260e08301829052610100830181905260e6610120840181905261014084018390526101608401839052610180840183905260cc6101a0850181905260b36101c086018190526101e086018390526102008601859052610220860181905261024086019690965261026085019590955261028084018290526102a08401526102c083018290526102e083018290526066610300840152610320830182905261034083018190526103608301526103808201929092526103a08101919091526200064390601190601e62001412565b50604080516103c08101825260038082526000602083015260019282019290925260026060820152600d6080820181905260a0820181905260c0820181905260e08201819052600e610100830181905261012083018190526012610140840181905260136101608501819052601461018086018190526101a08601969096526101c08501939093526101e084018590526018610200850181905261022085019290925260116102408501526102608401526102808301919091526102a082019290925260196102c082018190526102e082018190526015610300830152610320820192909252610340810191909152601a6103608201819052610380820152601c6103a08201526200075a90602690601e62001412565b50604080516101008101825260298152603d6020820152606691810182905260cc6060820181905260ff608083015260a082019290925260c0810182905260e0810191909152620007b090601290600862001412565b5060408051610100810182526005808252602082018190529181018290526060810182905260006080820152600460a082015260c0810182905260e08101919091526200080290602790600862001412565b506040805161022081018252605780825260ff602083015260829282019290925260f5606082015260ad608080830182905260a0830182905260bf60c084015260e083019390935260b061010083015261012082019290925260d96101408201819052602b61016083018190526101808301939093526101a08201819052605c6101c08301526101e0820152610200810191909152620008a790601390601162001412565b5060408051610220810182526001808252600060208301526003928201839052606082015260066080820181905260a0820181905260c0820192909252600960e08201819052610100820183905260086101208301526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e0820152600e610200820152906022906200094792910190601162001412565b506040805160808101825260ff81526099602082015260cc91810191909152606660608201526200097d90601490600462001412565b50604080516080810182526000808252602082018190529181019190915260016060820152620009b290602990600462001412565b506040805160808101825260ff815260cc602082015260999181018290526060810191909152620009e890601590600462001412565b5060408051608081018252600080825260208201526001918101829052606081019190915262000a1d90602a90600462001412565b50604080516101408101825260ff8082526020820181905260e592820183905260cc6060830181905260808084019490945260a083015260b360c083015260e0820181905261010082015261012081019190915262000a8190601690600a62001412565b50604080516101408101825260008082526020820181905260019282019290925260026060820181905260036080830181905260a083019190915260c082015260e08101829052610100810191909152600461012082015262000ae990602b90600a62001412565b50604080516101408101825260ff80825260cc602083018190529282018390526060820192909252607f6080820152606660a0820152603360c082015260e08101829052610100810191909152601a61012082015262000b4e90601790600a62001412565b5060408051610140810182526000808252602082018190526001928201839052606082018190526002608083015260a0820181905260c082019290925260e08101829052610100810191909152600461012082015262000bb390602c90600a62001412565b50604080516102808101825260ff8082526066602083018190529282018190526060820181905260cc60808301819052609960a0840181905260c084019490945260e083018290526033610100840181905261012084018190526101408401839052610160840182905261018084018390526101a084018290526101c084018590526101e0840191909152610200830193909352610220820183905261024082015261026081019190915262000c6e90601890601462001412565b5060408051610280810182526000808252600260208301819052928201819052606082018390526003608083015260a0820192909252600460c0820152600660e082018190526101008201819052610120820152610140810182905260076101608201819052600b6101808301819052600c6101a0840152600d6101c084018190526101e0840192909252610200830152610220820152610240810191909152600e61026082015262000d2690602d90601462001412565b50604080516102c081018252603880825260ff602083015260b39282019290925260996060820152609e6080820152607060a08201819052608560c083015260e0808301829052610100830182905261012083019390935260fa61014083015261016082019290925260c7610180820152607a6101a082015260f06101c082015260d66101e082015260bd6102008201526102208101829052610240810182905260a3610260820152610280810191909152608a6102a082015262000df090601990601662001412565b50604080516102c0810182526001808252600060208301529181018290526002606082015260036080820181905260a0820192909252600460c082015260e081019190915260066101008201819052600c6101208301819052610140830191909152600a610160830152600b6101808301526101a08201819052600d6101c08301819052600e6101e0840152600f6102008401526102208301919091526102408201526010610260820152601561028082015260136102a082015262000ebb90602e90601662001412565b506040805160808101825260ff81526099602082015260cc918101919091526066606082015262000ef190601a90600462001412565b5060408051608081018252600080825260208201819052918101919091526001606082015262000f2690602f90600462001412565b506040805160a081018252608080825260ff60208301819052828401829052606083019390935281019190915262000f6390601b90600562001412565b506040805160a08101825260028082526000602083018190526001938301939093526060820152608081019190915262000fa290603090600562001412565b506040805160808101825260ff81526099602082015260cc918101919091526066606082015262000fd890601c90600462001412565b506040805160808101825260008082526020820181905291810191909152600160608201526200100d90603190600462001412565b506040805160a0810182526066815260ff60208201819052601a928201929092526099606082015260808101919091526200104d90601d90600562001412565b506040805160a0810182526001808252600060208301819052600393830193909352606082015260808101919091526200108c90603290600562001412565b506040805160e08101825260ff815260e5602082015260b3918101829052606081018290526059608082015260a081019190915260d960c0820152620010d790601e90600762001412565b506040805160e081018252600080825260208201819052918101919091526006606082018190526080820181905260a0820152600160c08201526200112190603390600762001412565b50604080516101e08101825260bf80825260ff60208301526026928201839052604d606083018190526080830182905260a0830181905260d960c084015260e083019390935260996101008301526101208201819052610140820183905261016082015260cc6101808201526101a081018290526101c0810191909152620011ae90601f90600f62001412565b50604080516101e081018252600180825260006020830152600492820183905260608201839052608082015260a0810191909152600560c0820181905260e08201819052600661010083018190526101208301829052610140830191909152610160820152600861018082018190526101a0820152600c6101c08201526200123b90603490600f62001412565b506040805160a08101825260bf808252602660208084019190915260599383019390935260ff60608301526080820152620012799190600562001412565b506040805160a081018252600380825260046020830181905292820192909252600060608201526080810191909152620012b890603590600562001412565b506040805160808101825260ff81526099602082015260cc9181019190915260666060820152620012ee90602190600462001412565b506040805160808101825260008082526020820181905291810191909152600160608201526200132390603690600462001412565b5050505062001570565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620013919062001533565b90600052602060002090601f016020900481019282620013b5576000855562001400565b82601f10620013d057805160ff191683800117855562001400565b8280016001018555821562001400579182015b8281111562001400578251825591602001919060010190620013e3565b506200140e929150620014b5565b5090565b82805482825590600052602060002090601f01602090048101928215620014005791602002820160005b838211156200147c57835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026200143c565b8015620014ab5782816101000a81549060ff02191690556001016020816000010492830192600103026200147c565b50506200140e9291505b5b808211156200140e5760008155600101620014b6565b80516001600160a01b0381168114620014e457600080fd5b919050565b600080600060608486031215620014ff57600080fd5b6200150a84620014cc565b92506200151a60208501620014cc565b91506200152a60408501620014cc565b90509250925092565b600181811c908216806200154857607f821691505b602082108114156200156a57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051613e25620015b960003960008181610a6101528181610dc6015281816119cd015281816122740152818161242b015261282e015260006123a90152613e256000f3fe60806040526004361061023b5760003560e01c80636352211e1161012e578063ad789acb116100ab578063dab9475d1161006f578063dab9475d146106c7578063e985e9c5146106da578063eee38a7914610723578063f2fde38b14610738578063f47c84c51461075857600080fd5b8063ad789acb14610623578063b88d4fde14610639578063bc660cac14610659578063c002d23d1461068c578063c87b56dd146106a757600080fd5b80637d8966e4116100f25780637d8966e41461059b5780638da5cb5b146105b057806395d89b41146105ce578063a20a25fe146105e3578063a22cb4651461060357600080fd5b80636352211e146104ef57806368428a1b1461050f57806370a082311461052e578063715018a61461054e5780637501f7411461056357600080fd5b8063388947bb116101bc5780634f6ccce7116101805780634f6ccce71461044857806353135ca0146104685780635a3f2672146104825780635e981dfd146104af5780635eabd84a146104cf57600080fd5b8063388947bb146103985780633ccfd60b146103b857806342842e0e146103cd57806343e55e30146103ed5780634f02c4201461041a57600080fd5b806318160ddd1161020357806318160ddd1461031157806323b872dd146103305780632f745c5914610350578063304b2a6814610370578063343937431461038357600080fd5b806301ffc9a71461024057806306fdde0314610275578063081812fc14610297578063095ea7b3146102cf57806310c9600a146102f1575b600080fd5b34801561024c57600080fd5b5061026061025b3660046131ea565b61076e565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b5061028a610799565b60405161026c919061325f565b3480156102a357600080fd5b506102b76102b2366004613272565b61082b565b6040516001600160a01b03909116815260200161026c565b3480156102db57600080fd5b506102ef6102ea3660046132a0565b6108c5565b005b3480156102fd57600080fd5b506102ef61030c366004613318565b6109db565b34801561031d57600080fd5b506008545b60405190815260200161026c565b34801561033c57600080fd5b506102ef61034b3660046133a1565b610a56565b34801561035c57600080fd5b5061032261036b3660046132a0565b610ae7565b6102ef61037e366004613461565b610b7d565b34801561038f57600080fd5b506102ef610e9f565b3480156103a457600080fd5b506102ef6103b33660046134e2565b610f17565b3480156103c457600080fd5b506102ef610f65565b3480156103d957600080fd5b506102ef6103e83660046133a1565b610fcb565b3480156103f957600080fd5b5061040d6104083660046134fd565b610fe6565b60405161026c9190613537565b34801561042657600080fd5b506037546104359061ffff1681565b60405161ffff909116815260200161026c565b34801561045457600080fd5b50610322610463366004613272565b6110a2565b34801561047457600080fd5b50600c546102609060ff1681565b34801561048e57600080fd5b506104a261049d3660046135a5565b611135565b60405161026c9190613601565b3480156104bb57600080fd5b506103226104ca3660046134fd565b6111fd565b3480156104db57600080fd5b506102ef6104ea3660046135a5565b611295565b3480156104fb57600080fd5b506102b761050a366004613272565b611300565b34801561051b57600080fd5b50600c5461026090610100900460ff1681565b34801561053a57600080fd5b506103226105493660046135a5565b61130b565b34801561055a57600080fd5b506102ef611392565b34801561056f57600080fd5b506037546105869062010000900463ffffffff1681565b60405163ffffffff909116815260200161026c565b3480156105a757600080fd5b506102ef6113c8565b3480156105bc57600080fd5b50600a546001600160a01b03166102b7565b3480156105da57600080fd5b5061028a61144a565b3480156105ef57600080fd5b506102ef6105fe366004613614565b611459565b34801561060f57600080fd5b506102ef61061e36600461363b565b611661565b34801561062f57600080fd5b5061043561271081565b34801561064557600080fd5b506102ef6106543660046136e3565b611726565b34801561066557600080fd5b506105866106743660046135a5565b60396020526000908152604090205463ffffffff1681565b34801561069857600080fd5b5061032266e69234c5ec400081565b3480156106b357600080fd5b5061028a6106c2366004613272565b611738565b6102ef6106d5366004613792565b61180d565b3480156106e657600080fd5b506102606106f5366004613826565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561072f57600080fd5b50612710610435565b34801561074457600080fd5b506102ef6107533660046135a5565b611c97565b34801561076457600080fd5b5061043561c35081565b60006001600160e01b0319821663780e9d6360e01b1480610793575061079382611d2f565b92915050565b6060600080546107a890613854565b80601f01602080910402602001604051908101604052809291908181526020018280546107d490613854565b80156108215780601f106107f657610100808354040283529160200191610821565b820191906000526020600020905b81548152906001019060200180831161080457829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108a95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108d082611d7f565b9050806001600160a01b0316836001600160a01b0316141561093e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108a0565b336001600160a01b038216148061095a575061095a81336106f5565b6109cc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108a0565b6109d68383611df6565b505050565b600a546001600160a01b03163314610a055760405162461bcd60e51b81526004016108a09061388f565b8383600d8760ff1660158110610a1d57610a1d6138c4565b610a2993910191613080565b50818160228760ff1660158110610a4257610a426138c4565b610a4e93910191613080565b505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610adc57610a903382611e64565b610adc5760405162461bcd60e51b815260206004820152601f60248201527f7472616e73666572206e6f74206f776e6572206e6f7220617070726f7665640060448201526064016108a0565b6109d6838383611f5b565b6000610af28361130b565b8210610b545760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108a0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b541415610bd05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108a0565b6002600b55323314610c0f5760405162461bcd60e51b8152602060048201526008602482015267656f73206f6e6c7960c01b60448201526064016108a0565b600c54610100900460ff16610c5e5760405162461bcd60e51b81526020600482015260156024820152746d696e74696e67206973206e6f742061637469766560581b60448201526064016108a0565b60008663ffffffff16118015610c86575060375463ffffffff62010000909104811690871611155b610cc85760405162461bcd60e51b81526020600482015260136024820152721a5b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b60448201526064016108a0565b34610ce066e69234c5ec400063ffffffff89166138f0565b14610d265760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a59081c185e5b595b9d08185b5bdd5b9d60521b60448201526064016108a0565b60375461c35090610d3c90889061ffff1661390f565b63ffffffff161115610d605760405162461bcd60e51b81526004016108a090613937565b428365ffffffffffff1611610daf5760405162461bcd60e51b81526020600482015260156024820152741cda59db985d1d5c99481a185cc8195e1c1a5c9959605a1b60448201526064016108a0565b60405163eab1633f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063eab1633f90610e0690339060009088908a908990899060040161395b565b602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4791906139bb565b610e875760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016108a0565b610e92868686612106565b50506001600b5550505050565b600a546001600160a01b03163314610ec95760405162461bcd60e51b81526004016108a09061388f565b600c805460ff8082161560ff1990921682179092556040519116151581527f0c56c7e2f62fe49aadfdce1fa53a6112839d06c4cfb65eee8a68476b34e79ab6906020015b60405180910390a1565b600a546001600160a01b03163314610f415760405162461bcd60e51b81526004016108a09061388f565b6037805463ffffffff909216620100000265ffffffff000019909216919091179055565b600a546001600160a01b03163314610f8f5760405162461bcd60e51b81526004016108a09061388f565b600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610fc8573d6000803e3d6000fd5b50565b6109d683838360405180602001604052806000815250611726565b610fee613129565b61ffff8216600090815260386020526040908190208151606081019092528054829060ff16600281111561102457611024613521565b600281111561103557611035613521565b81528154610100900460ff1660208201526040805160e081018083529190920191906001840190600790826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116110645790505050505050815250509050919050565b60006110ad60085490565b82106111105760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108a0565b60088281548110611123576111236138c4565b90600052602060002001549050919050565b606060006111428361130b565b905060008163ffffffff1667ffffffffffffffff81111561116557611165613674565b60405190808252806020026020018201604052801561118e578160200160208202803683370190505b50905060005b8263ffffffff168163ffffffff1610156111f5576111b8858263ffffffff16610ae7565b828263ffffffff16815181106111d0576111d06138c4565b61ffff90921660209283029190910190910152806111ed816139d8565b915050611194565b509392505050565b600061271061ffff83161161121457506000919050565b600561122361c35060026139fc565b61122d9190613a3c565b61ffff168261ffff161161124c575069043c33c1937564800000919050565b600561125b61c35060046139fc565b6112659190613a3c565b61ffff168261ffff16116112845750690878678326eac9000000919050565b506910f0cf064dd592000000919050565b600a546001600160a01b031633146112bf5760405162461bcd60e51b81526004016108a09061388f565b603780546001600160a01b03909216600160501b027fffff0000000000000000000000000000000000000000ffffffffffffffffffff909216919091179055565b600061079382611d7f565b60006001600160a01b0382166113765760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108a0565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146113bc5760405162461bcd60e51b81526004016108a09061388f565b6113c6600061249e565b565b600a546001600160a01b031633146113f25760405162461bcd60e51b81526004016108a09061388f565b600c805460ff610100808304821615810261ff001990931692909217928390556040517f0c56c7e2f62fe49aadfdce1fa53a6112839d06c4cfb65eee8a68476b34e79ab693610f0d9390049091161515815260200190565b6060600180546107a890613854565b600a546001600160a01b031633146114835760405162461bcd60e51b81526004016108a09061388f565b60375461c3509061149990859061ffff16613a5d565b11156114b75760405162461bcd60e51b81526004016108a090613937565b600083116114fd5760405162461bcd60e51b81526020600482015260136024820152721a5b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b60448201526064016108a0565b60008060005b858163ffffffff161015610a4e576037805461ffff1690600061152583613a75565b91906101000a81548161ffff021916908361ffff1602179055505061154a84826124f0565b6037549092506115609061ffff1683600061253a565b5160375490935061157690869061ffff1661268b565b7f7b609c9f4f77457dc3fdc7b402815c96115b20d86a5539d015dc363324030da860008460028111156115ab576115ab613521565b1461160e5760018460028111156115c4576115c4613521565b146115ed5760405180604001604052806006815260200165242aa72a22a960d11b81525061162e565b6040518060400160405280600381526020016208c9eb60eb1b81525061162e565b6040518060400160405280600681526020016514905090925560d21b8152505b6037546040516116479291899161ffff90911690613a8d565b60405180910390a180611659816139d8565b915050611503565b6001600160a01b0382163314156116ba5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108a0565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611732848484846126a9565b50505050565b6000818152600260205260409020546060906001600160a01b03166117935760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016108a0565b603754604051630375f61160e61b815261ffff84166004820152600160501b9091046001600160a01b03169063dd7d844090602401600060405180830381865afa1580156117e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107939190810190613ac4565b6002600b5414156118605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108a0565b6002600b5532331461189f5760405162461bcd60e51b8152602060048201526008602482015267656f73206f6e6c7960c01b60448201526064016108a0565b600c5460ff166118e95760405162461bcd60e51b81526020600482015260156024820152746d696e74696e67206973206e6f742061637469766560581b60448201526064016108a0565b60375461c350906118ff90899061ffff1661390f565b63ffffffff1611156119235760405162461bcd60e51b81526004016108a090613937565b428465ffffffffffff16116119725760405162461bcd60e51b81526020600482015260156024820152741cda59db985d1d5c99481a185cc8195e1c1a5c9959605a1b60448201526064016108a0565b846119b65760405162461bcd60e51b81526020600482015260146024820152731bdb9b1e481b595b58995c9cc8185b1b1bddd95960621b60448201526064016108a0565b60405163eab1633f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063eab1633f90611a0c9033908990899089908990899060040161395b565b602060405180830381865afa158015611a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4d91906139bb565b611a8d5760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016108a0565b60375461271061ffff9091161015611b6c5760375461271090611ab590899061ffff1661390f565b63ffffffff161115611b095760405162461bcd60e51b815260206004820152601f60248201527f6e6f7420656e6f75676820617661696c61626c652067656e30206d696e74730060448201526064016108a0565b34611b2166e69234c5ec400063ffffffff8a166138f0565b14611b675760405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59081c185e5b595b9d08185b5bdd5b9d60521b60448201526064016108a0565b611bb2565b3415611bb25760405162461bcd60e51b81526020600482015260156024820152741bdb9b1e4818d85c9c9bdd1cc81c995c5d5a5c9959605a1b60448201526064016108a0565b3360009081526039602052604090205463ffffffff90811690881615801590611c005750603754611bf090829062010000900463ffffffff16613b3b565b63ffffffff168863ffffffff1611155b611c4c5760405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f74206578636565642070726573616c65206d696e7473000000000060448201526064016108a0565b611c56888261390f565b336000908152603960205260409020805463ffffffff191663ffffffff92909216919091179055611c88888886612106565b50506001600b55505050505050565b600a546001600160a01b03163314611cc15760405162461bcd60e51b81526004016108a09061388f565b6001600160a01b038116611d265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108a0565b610fc88161249e565b60006001600160e01b031982166380ac58cd60e01b1480611d6057506001600160e01b03198216635b5e139f60e01b145b8061079357506301ffc9a760e01b6001600160e01b0319831614610793565b6000818152600260205260408120546001600160a01b0316806107935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108a0565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e2b82611d7f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611edd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108a0565b6000611ee883611d7f565b9050806001600160a01b0316846001600160a01b03161480611f235750836001600160a01b0316611f188461082b565b6001600160a01b0316145b80611f5357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611f6e82611d7f565b6001600160a01b031614611fd65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108a0565b6001600160a01b0382166120385760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108a0565b612043838383612725565b61204e600082611df6565b6001600160a01b0383166000908152600360205260408120805460019290612077908490613b60565b90915550506001600160a01b03821660009081526003602052604081208054600192906120a5908490613a5d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080836121225760408051600081526020810190915261216c565b8463ffffffff1667ffffffffffffffff81111561214157612141613674565b60405190808252806020026020018201604052801561216a578160200160208202803683370190505b505b905060008060005b8763ffffffff168163ffffffff161015612386576037805461ffff1690600061219c83613a75565b91906101000a81548161ffff021916908361ffff160217905550506121c186826124f0565b6037549092506121d49061ffff166111fd565b6121de9084613a5d565b6037549093506121f49061ffff1683600061253a565b5194506000612202836127dd565b905087158061221a57506001600160a01b0381163314155b156122365760375461223190829061ffff1661268b565b61229a565b603754855161ffff90911690869063ffffffff851690811061225a5761225a6138c4565b61ffff928316602091820292909201015260375461229a917f0000000000000000000000000000000000000000000000000000000000000000911661268b565b7f7b609c9f4f77457dc3fdc7b402815c96115b20d86a5539d015dc363324030da860008760028111156122cf576122cf613521565b146123325760018760028111156122e8576122e8613521565b146123115760405180604001604052806006815260200165242aa72a22a960d11b815250612352565b6040518060400160405280600381526020016208c9eb60eb1b815250612352565b6040518060400160405280600681526020016514905090925560d21b8152505b60375460405161236b9291859161ffff90911690613a8d565b60405180910390a1508061237e816139d8565b915050612174565b50811561240e57604051632770a7eb60e21b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156123f557600080fd5b505af1158015612409573d6000803e3d6000fd5b505050505b851561249557604051639284937760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906392849377906124629033908790600401613b77565b600060405180830381600087803b15801561247c57600080fd5b505af1158015612490573d6000803e3d6000fd5b505050505b50505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828260405160200161251b92919091825260e01b6001600160e01b031916602082015260240190565b60408051601f1981840301815291905280516020909101209392505050565b612542613129565b60068260ff16106125955760405162461bcd60e51b815260206004820181905260248201527f756e61626c6520746f2067656e657261746520756e697175652074726169747360448201526064016108a0565b61259f84846128b9565b9050603a60006125ae83612aff565b815260208101919091526040016000205460ff166126665761ffff841660009081526038602052604090208151815483929190829060ff191660018360028111156125fb576125fb613521565b02179055506020820151815460ff9091166101000261ff0019909116178155604082015161262f906001830190600761314d565b509050506001603a600061264284612aff565b81526020810191909152604001600020805460ff1916911515919091179055612684565b6126818460ff841685901c61267c856001613b9b565b61253a565b90505b9392505050565b6126a5828260405180602001604052806000815250612b62565b5050565b6126b33383611e64565b6127195760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016108a0565b61173284848484612b95565b6001600160a01b0383166127805761277b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6127a3565b816001600160a01b0316836001600160a01b0316146127a3576127a38382612bc8565b6001600160a01b0382166127ba576109d681612c65565b826001600160a01b0316826001600160a01b0316146109d6576109d68282612d14565b60375460009061271061ffff9091161115806128065750612803600a60f584901c613bc0565b15155b15612812575033919050565b60405163267bff1560e01b8152609083901c60048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063267bff1590602401602060405180830381865afa15801561287d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a19190613bd4565b90506001600160a01b03811661079357503392915050565b6128c1613129565b61271061ffff84161161292e576128dd600a61ffff8416613bc0565b156128e95760006128ec565b60015b60ff16600281111561290057612900613521565b8190600281111561291357612913613521565b9081600281111561292657612926613521565b90525061299f565b600061293f603261ffff8516613bc0565b9050801561295d5760058110612956576000612960565b6001612960565b60025b60ff16600281111561297457612974613521565b8290600281111561298757612987613521565b9081600281111561299a5761299a613521565b905250505b805160009060028111156129b5576129b5613521565b6129c0906007613bf1565b60109390931c9290506129e161ffff84166129dc836000613b9b565b612d58565b604083015160ff91909116905260109290921c91612a0861ffff84166129dc836001613b9b565b604083015160ff9190911660209091015260109290921c91612a3361ffff84166129dc836002613b9b565b60408381015160ff9290921691015260109290921c91612a5c61ffff84166129dc836003613b9b565b604083015160ff9190911660609091015260109290921c91612a8761ffff84166129dc836004613b9b565b604083015160ff9190911660809091015260109290921c91612ab261ffff84166129dc836005613b9b565b604083015160ff9190911660a09091015260109290921c91612add61ffff84166129dc836006613b9b565b60408301805160ff92831660c091820152905101511660208301525092915050565b8051602080830151604080850151805181850151828401516060840151608085015160a086015160c090960151965160009a612b4a9a90999896979596949593949293929101613c1a565b60405160208183030381529060405261079390613ce7565b612b6c8383612e34565b612b796000848484612f82565b6109d65760405162461bcd60e51b81526004016108a090613d0b565b612ba0848484611f5b565b612bac84848484612f82565b6117325760405162461bcd60e51b81526004016108a090613d0b565b60006001612bd58461130b565b612bdf9190613b60565b600083815260076020526040902054909150808214612c32576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612c7790600190613b60565b60008381526009602052604081205460088054939450909284908110612c9f57612c9f6138c4565b906000526020600020015490508060088381548110612cc057612cc06138c4565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612cf857612cf8613d5d565b6001900381819060005260206000200160009055905550505050565b6000612d1f8361130b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600080600d8360ff1660158110612d7157612d716138c4565b0154612d7d9085613d73565b9050600d8360ff1660158110612d9557612d956138c4565b018160ff1681548110612daa57612daa6138c4565b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c9091161015612de0579050610793565b60228360ff1660158110612df657612df66138c4565b018160ff1681548110612e0b57612e0b6138c4565b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b038216612e8a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108a0565b6000818152600260205260409020546001600160a01b031615612eef5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108a0565b612efb60008383612725565b6001600160a01b0382166000908152600360205260408120805460019290612f24908490613a5d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561307557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612fc6903390899088908890600401613d95565b6020604051808303816000875af1925050508015613001575060408051601f3d908101601f19168201909252612ffe91810190613dd2565b60015b61305b573d80801561302f576040519150601f19603f3d011682016040523d82523d6000602084013e613034565b606091505b5080516130535760405162461bcd60e51b81526004016108a090613d0b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f53565b506001949350505050565b82805482825590600052602060002090601f016020900481019282156131195791602002820160005b838211156130ea57833560ff1683826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026130a9565b80156131175782816101000a81549060ff02191690556001016020816000010492830192600103026130ea565b505b506131259291506131a1565b5090565b60408051606081018252600080825260208201529081016131486131b6565b905290565b6001830191839082156131195791602002820160005b838211156130ea57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613163565b5b8082111561312557600081556001016131a2565b6040518060e001604052806007906020820280368337509192915050565b6001600160e01b031981168114610fc857600080fd5b6000602082840312156131fc57600080fd5b8135612684816131d4565b60005b8381101561322257818101518382015260200161320a565b838111156117325750506000910152565b6000815180845261324b816020860160208601613207565b601f01601f19169290920160200192915050565b6020815260006126846020830184613233565b60006020828403121561328457600080fd5b5035919050565b6001600160a01b0381168114610fc857600080fd5b600080604083850312156132b357600080fd5b82356132be8161328b565b946020939093013593505050565b60008083601f8401126132de57600080fd5b50813567ffffffffffffffff8111156132f657600080fd5b6020830191508360208260051b850101111561331157600080fd5b9250929050565b60008060008060006060868803121561333057600080fd5b853560ff8116811461334157600080fd5b9450602086013567ffffffffffffffff8082111561335e57600080fd5b61336a89838a016132cc565b9096509450604088013591508082111561338357600080fd5b50613390888289016132cc565b969995985093965092949392505050565b6000806000606084860312156133b657600080fd5b83356133c18161328b565b925060208401356133d18161328b565b929592945050506040919091013590565b803563ffffffff811681146133f657600080fd5b919050565b8015158114610fc857600080fd5b803565ffffffffffff811681146133f657600080fd5b60008083601f84011261343157600080fd5b50813567ffffffffffffffff81111561344957600080fd5b60208301915083602082850101111561331157600080fd5b60008060008060008060a0878903121561347a57600080fd5b613483876133e2565b95506020870135613493816133fb565b9450604087013593506134a860608801613409565b9250608087013567ffffffffffffffff8111156134c457600080fd5b6134d089828a0161341f565b979a9699509497509295939492505050565b6000602082840312156134f457600080fd5b612684826133e2565b60006020828403121561350f57600080fd5b813561ffff8116811461268457600080fd5b634e487b7160e01b600052602160045260246000fd5b81516101208201906003811061355d57634e487b7160e01b600052602160045260246000fd5b825260208381015160ff908116828501526040808601519190850160005b600781101561359a57835183168252928401929084019060010161357b565b505050505092915050565b6000602082840312156135b757600080fd5b81356126848161328b565b600081518084526020808501945080840160005b838110156135f657815161ffff16875295820195908201906001016135d6565b509495945050505050565b60208152600061268460208301846135c2565b60008060006060848603121561362957600080fd5b8335925060208401356133d18161328b565b6000806040838503121561364e57600080fd5b82356136598161328b565b91506020830135613669816133fb565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136b3576136b3613674565b604052919050565b600067ffffffffffffffff8211156136d5576136d5613674565b50601f01601f191660200190565b600080600080608085870312156136f957600080fd5b84356137048161328b565b935060208501356137148161328b565b925060408501359150606085013567ffffffffffffffff81111561373757600080fd5b8501601f8101871361374857600080fd5b803561375b613756826136bb565b61368a565b81815288602083850101111561377057600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080600080600080600060c0888a0312156137ad57600080fd5b6137b6886133e2565b965060208801356137c6816133fb565b955060408801356137d6816133fb565b94506137e460608901613409565b93506080880135925060a088013567ffffffffffffffff81111561380757600080fd5b6138138a828b0161341f565b989b979a50959850939692959293505050565b6000806040838503121561383957600080fd5b82356138448161328b565b915060208301356136698161328b565b600181811c9082168061386857607f821691505b6020821081141561388957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561390a5761390a6138da565b500290565b600063ffffffff80831681851680830382111561392e5761392e6138da565b01949350505050565b6020808252600a90820152691b5a5b9d1959081bdd5d60b21b604082015260600190565b6001600160a01b0387168152851515602082015265ffffffffffff851660408201526060810184905260a0608082018190528101829052818360c0830137600081830160c090810191909152601f909201601f1916010195945050505050565b6000602082840312156139cd57600080fd5b8151612684816133fb565b600063ffffffff808316818114156139f2576139f26138da565b6001019392505050565b600061ffff80831681851681830481118215151615613a1d57613a1d6138da565b02949350505050565b634e487b7160e01b600052601260045260246000fd5b600061ffff80841680613a5157613a51613a26565b92169190910492915050565b60008219821115613a7057613a706138da565b500190565b600061ffff808316818114156139f2576139f26138da565b606081526000613aa06060830186613233565b6001600160a01b039490941660208301525061ffff91909116604090910152919050565b600060208284031215613ad657600080fd5b815167ffffffffffffffff811115613aed57600080fd5b8201601f81018413613afe57600080fd5b8051613b0c613756826136bb565b818152856020838501011115613b2157600080fd5b613b32826020830160208601613207565b95945050505050565b600063ffffffff83811690831681811015613b5857613b586138da565b039392505050565b600082821015613b7257613b726138da565b500390565b6001600160a01b0383168152604060208201819052600090612681908301846135c2565b600060ff821660ff84168060ff03821115613bb857613bb86138da565b019392505050565b600082613bcf57613bcf613a26565b500690565b600060208284031215613be657600080fd5b81516126848161328b565b600060ff821660ff84168160ff0481118215151615613c1257613c126138da565b029392505050565b600060038b10613c3a57634e487b7160e01b600052602160045260246000fd5b60f88b811b83526001600160f81b03198b821b811660018501528a821b8116600285015289821b811660038501529088901b166004830152613c8b600583018760f81b6001600160f81b0319169052565b613ca4600683018660f81b6001600160f81b0319169052565b613cbd600783018560f81b6001600160f81b0319169052565b613cd6600883018460f81b6001600160f81b0319169052565b506009019998505050505050505050565b805160208083015191908110156138895760001960209190910360031b1b16919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b600060ff831680613d8657613d86613a26565b8060ff84160691505092915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613dc890830184613233565b9695505050505050565b600060208284031215613de457600080fd5b8151612684816131d456fea26469706673582212209cfb74ecd1cc0c6ee69eb5dee05f3472ad984a598c7d2d8521da8df02960a74064736f6c634300080a00330000000000000000000000002983d9c9d9702757657f02e289b2b5a3a22572b600000000000000000000000025be71572ddf57ff57de4744f27a83d15f083303000000000000000000000000159b8fe52cf781872c61273e9b8892913721aada

Deployed Bytecode

0x60806040526004361061023b5760003560e01c80636352211e1161012e578063ad789acb116100ab578063dab9475d1161006f578063dab9475d146106c7578063e985e9c5146106da578063eee38a7914610723578063f2fde38b14610738578063f47c84c51461075857600080fd5b8063ad789acb14610623578063b88d4fde14610639578063bc660cac14610659578063c002d23d1461068c578063c87b56dd146106a757600080fd5b80637d8966e4116100f25780637d8966e41461059b5780638da5cb5b146105b057806395d89b41146105ce578063a20a25fe146105e3578063a22cb4651461060357600080fd5b80636352211e146104ef57806368428a1b1461050f57806370a082311461052e578063715018a61461054e5780637501f7411461056357600080fd5b8063388947bb116101bc5780634f6ccce7116101805780634f6ccce71461044857806353135ca0146104685780635a3f2672146104825780635e981dfd146104af5780635eabd84a146104cf57600080fd5b8063388947bb146103985780633ccfd60b146103b857806342842e0e146103cd57806343e55e30146103ed5780634f02c4201461041a57600080fd5b806318160ddd1161020357806318160ddd1461031157806323b872dd146103305780632f745c5914610350578063304b2a6814610370578063343937431461038357600080fd5b806301ffc9a71461024057806306fdde0314610275578063081812fc14610297578063095ea7b3146102cf57806310c9600a146102f1575b600080fd5b34801561024c57600080fd5b5061026061025b3660046131ea565b61076e565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b5061028a610799565b60405161026c919061325f565b3480156102a357600080fd5b506102b76102b2366004613272565b61082b565b6040516001600160a01b03909116815260200161026c565b3480156102db57600080fd5b506102ef6102ea3660046132a0565b6108c5565b005b3480156102fd57600080fd5b506102ef61030c366004613318565b6109db565b34801561031d57600080fd5b506008545b60405190815260200161026c565b34801561033c57600080fd5b506102ef61034b3660046133a1565b610a56565b34801561035c57600080fd5b5061032261036b3660046132a0565b610ae7565b6102ef61037e366004613461565b610b7d565b34801561038f57600080fd5b506102ef610e9f565b3480156103a457600080fd5b506102ef6103b33660046134e2565b610f17565b3480156103c457600080fd5b506102ef610f65565b3480156103d957600080fd5b506102ef6103e83660046133a1565b610fcb565b3480156103f957600080fd5b5061040d6104083660046134fd565b610fe6565b60405161026c9190613537565b34801561042657600080fd5b506037546104359061ffff1681565b60405161ffff909116815260200161026c565b34801561045457600080fd5b50610322610463366004613272565b6110a2565b34801561047457600080fd5b50600c546102609060ff1681565b34801561048e57600080fd5b506104a261049d3660046135a5565b611135565b60405161026c9190613601565b3480156104bb57600080fd5b506103226104ca3660046134fd565b6111fd565b3480156104db57600080fd5b506102ef6104ea3660046135a5565b611295565b3480156104fb57600080fd5b506102b761050a366004613272565b611300565b34801561051b57600080fd5b50600c5461026090610100900460ff1681565b34801561053a57600080fd5b506103226105493660046135a5565b61130b565b34801561055a57600080fd5b506102ef611392565b34801561056f57600080fd5b506037546105869062010000900463ffffffff1681565b60405163ffffffff909116815260200161026c565b3480156105a757600080fd5b506102ef6113c8565b3480156105bc57600080fd5b50600a546001600160a01b03166102b7565b3480156105da57600080fd5b5061028a61144a565b3480156105ef57600080fd5b506102ef6105fe366004613614565b611459565b34801561060f57600080fd5b506102ef61061e36600461363b565b611661565b34801561062f57600080fd5b5061043561271081565b34801561064557600080fd5b506102ef6106543660046136e3565b611726565b34801561066557600080fd5b506105866106743660046135a5565b60396020526000908152604090205463ffffffff1681565b34801561069857600080fd5b5061032266e69234c5ec400081565b3480156106b357600080fd5b5061028a6106c2366004613272565b611738565b6102ef6106d5366004613792565b61180d565b3480156106e657600080fd5b506102606106f5366004613826565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561072f57600080fd5b50612710610435565b34801561074457600080fd5b506102ef6107533660046135a5565b611c97565b34801561076457600080fd5b5061043561c35081565b60006001600160e01b0319821663780e9d6360e01b1480610793575061079382611d2f565b92915050565b6060600080546107a890613854565b80601f01602080910402602001604051908101604052809291908181526020018280546107d490613854565b80156108215780601f106107f657610100808354040283529160200191610821565b820191906000526020600020905b81548152906001019060200180831161080457829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108a95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108d082611d7f565b9050806001600160a01b0316836001600160a01b0316141561093e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108a0565b336001600160a01b038216148061095a575061095a81336106f5565b6109cc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108a0565b6109d68383611df6565b505050565b600a546001600160a01b03163314610a055760405162461bcd60e51b81526004016108a09061388f565b8383600d8760ff1660158110610a1d57610a1d6138c4565b610a2993910191613080565b50818160228760ff1660158110610a4257610a426138c4565b610a4e93910191613080565b505050505050565b336001600160a01b037f00000000000000000000000025be71572ddf57ff57de4744f27a83d15f0833031614610adc57610a903382611e64565b610adc5760405162461bcd60e51b815260206004820152601f60248201527f7472616e73666572206e6f74206f776e6572206e6f7220617070726f7665640060448201526064016108a0565b6109d6838383611f5b565b6000610af28361130b565b8210610b545760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108a0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b541415610bd05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108a0565b6002600b55323314610c0f5760405162461bcd60e51b8152602060048201526008602482015267656f73206f6e6c7960c01b60448201526064016108a0565b600c54610100900460ff16610c5e5760405162461bcd60e51b81526020600482015260156024820152746d696e74696e67206973206e6f742061637469766560581b60448201526064016108a0565b60008663ffffffff16118015610c86575060375463ffffffff62010000909104811690871611155b610cc85760405162461bcd60e51b81526020600482015260136024820152721a5b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b60448201526064016108a0565b34610ce066e69234c5ec400063ffffffff89166138f0565b14610d265760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a59081c185e5b595b9d08185b5bdd5b9d60521b60448201526064016108a0565b60375461c35090610d3c90889061ffff1661390f565b63ffffffff161115610d605760405162461bcd60e51b81526004016108a090613937565b428365ffffffffffff1611610daf5760405162461bcd60e51b81526020600482015260156024820152741cda59db985d1d5c99481a185cc8195e1c1a5c9959605a1b60448201526064016108a0565b60405163eab1633f60e01b81526001600160a01b037f00000000000000000000000025be71572ddf57ff57de4744f27a83d15f083303169063eab1633f90610e0690339060009088908a908990899060040161395b565b602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4791906139bb565b610e875760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016108a0565b610e92868686612106565b50506001600b5550505050565b600a546001600160a01b03163314610ec95760405162461bcd60e51b81526004016108a09061388f565b600c805460ff8082161560ff1990921682179092556040519116151581527f0c56c7e2f62fe49aadfdce1fa53a6112839d06c4cfb65eee8a68476b34e79ab6906020015b60405180910390a1565b600a546001600160a01b03163314610f415760405162461bcd60e51b81526004016108a09061388f565b6037805463ffffffff909216620100000265ffffffff000019909216919091179055565b600a546001600160a01b03163314610f8f5760405162461bcd60e51b81526004016108a09061388f565b600a546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610fc8573d6000803e3d6000fd5b50565b6109d683838360405180602001604052806000815250611726565b610fee613129565b61ffff8216600090815260386020526040908190208151606081019092528054829060ff16600281111561102457611024613521565b600281111561103557611035613521565b81528154610100900460ff1660208201526040805160e081018083529190920191906001840190600790826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116110645790505050505050815250509050919050565b60006110ad60085490565b82106111105760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108a0565b60088281548110611123576111236138c4565b90600052602060002001549050919050565b606060006111428361130b565b905060008163ffffffff1667ffffffffffffffff81111561116557611165613674565b60405190808252806020026020018201604052801561118e578160200160208202803683370190505b50905060005b8263ffffffff168163ffffffff1610156111f5576111b8858263ffffffff16610ae7565b828263ffffffff16815181106111d0576111d06138c4565b61ffff90921660209283029190910190910152806111ed816139d8565b915050611194565b509392505050565b600061271061ffff83161161121457506000919050565b600561122361c35060026139fc565b61122d9190613a3c565b61ffff168261ffff161161124c575069043c33c1937564800000919050565b600561125b61c35060046139fc565b6112659190613a3c565b61ffff168261ffff16116112845750690878678326eac9000000919050565b506910f0cf064dd592000000919050565b600a546001600160a01b031633146112bf5760405162461bcd60e51b81526004016108a09061388f565b603780546001600160a01b03909216600160501b027fffff0000000000000000000000000000000000000000ffffffffffffffffffff909216919091179055565b600061079382611d7f565b60006001600160a01b0382166113765760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108a0565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146113bc5760405162461bcd60e51b81526004016108a09061388f565b6113c6600061249e565b565b600a546001600160a01b031633146113f25760405162461bcd60e51b81526004016108a09061388f565b600c805460ff610100808304821615810261ff001990931692909217928390556040517f0c56c7e2f62fe49aadfdce1fa53a6112839d06c4cfb65eee8a68476b34e79ab693610f0d9390049091161515815260200190565b6060600180546107a890613854565b600a546001600160a01b031633146114835760405162461bcd60e51b81526004016108a09061388f565b60375461c3509061149990859061ffff16613a5d565b11156114b75760405162461bcd60e51b81526004016108a090613937565b600083116114fd5760405162461bcd60e51b81526020600482015260136024820152721a5b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b60448201526064016108a0565b60008060005b858163ffffffff161015610a4e576037805461ffff1690600061152583613a75565b91906101000a81548161ffff021916908361ffff1602179055505061154a84826124f0565b6037549092506115609061ffff1683600061253a565b5160375490935061157690869061ffff1661268b565b7f7b609c9f4f77457dc3fdc7b402815c96115b20d86a5539d015dc363324030da860008460028111156115ab576115ab613521565b1461160e5760018460028111156115c4576115c4613521565b146115ed5760405180604001604052806006815260200165242aa72a22a960d11b81525061162e565b6040518060400160405280600381526020016208c9eb60eb1b81525061162e565b6040518060400160405280600681526020016514905090925560d21b8152505b6037546040516116479291899161ffff90911690613a8d565b60405180910390a180611659816139d8565b915050611503565b6001600160a01b0382163314156116ba5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108a0565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611732848484846126a9565b50505050565b6000818152600260205260409020546060906001600160a01b03166117935760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016108a0565b603754604051630375f61160e61b815261ffff84166004820152600160501b9091046001600160a01b03169063dd7d844090602401600060405180830381865afa1580156117e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107939190810190613ac4565b6002600b5414156118605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108a0565b6002600b5532331461189f5760405162461bcd60e51b8152602060048201526008602482015267656f73206f6e6c7960c01b60448201526064016108a0565b600c5460ff166118e95760405162461bcd60e51b81526020600482015260156024820152746d696e74696e67206973206e6f742061637469766560581b60448201526064016108a0565b60375461c350906118ff90899061ffff1661390f565b63ffffffff1611156119235760405162461bcd60e51b81526004016108a090613937565b428465ffffffffffff16116119725760405162461bcd60e51b81526020600482015260156024820152741cda59db985d1d5c99481a185cc8195e1c1a5c9959605a1b60448201526064016108a0565b846119b65760405162461bcd60e51b81526020600482015260146024820152731bdb9b1e481b595b58995c9cc8185b1b1bddd95960621b60448201526064016108a0565b60405163eab1633f60e01b81526001600160a01b037f00000000000000000000000025be71572ddf57ff57de4744f27a83d15f083303169063eab1633f90611a0c9033908990899089908990899060040161395b565b602060405180830381865afa158015611a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4d91906139bb565b611a8d5760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016108a0565b60375461271061ffff9091161015611b6c5760375461271090611ab590899061ffff1661390f565b63ffffffff161115611b095760405162461bcd60e51b815260206004820152601f60248201527f6e6f7420656e6f75676820617661696c61626c652067656e30206d696e74730060448201526064016108a0565b34611b2166e69234c5ec400063ffffffff8a166138f0565b14611b675760405162461bcd60e51b81526020600482015260166024820152751a5b9d985b1a59081c185e5b595b9d08185b5bdd5b9d60521b60448201526064016108a0565b611bb2565b3415611bb25760405162461bcd60e51b81526020600482015260156024820152741bdb9b1e4818d85c9c9bdd1cc81c995c5d5a5c9959605a1b60448201526064016108a0565b3360009081526039602052604090205463ffffffff90811690881615801590611c005750603754611bf090829062010000900463ffffffff16613b3b565b63ffffffff168863ffffffff1611155b611c4c5760405162461bcd60e51b815260206004820152601b60248201527f63616e6e6f74206578636565642070726573616c65206d696e7473000000000060448201526064016108a0565b611c56888261390f565b336000908152603960205260409020805463ffffffff191663ffffffff92909216919091179055611c88888886612106565b50506001600b55505050505050565b600a546001600160a01b03163314611cc15760405162461bcd60e51b81526004016108a09061388f565b6001600160a01b038116611d265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108a0565b610fc88161249e565b60006001600160e01b031982166380ac58cd60e01b1480611d6057506001600160e01b03198216635b5e139f60e01b145b8061079357506301ffc9a760e01b6001600160e01b0319831614610793565b6000818152600260205260408120546001600160a01b0316806107935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108a0565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e2b82611d7f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611edd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108a0565b6000611ee883611d7f565b9050806001600160a01b0316846001600160a01b03161480611f235750836001600160a01b0316611f188461082b565b6001600160a01b0316145b80611f5357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611f6e82611d7f565b6001600160a01b031614611fd65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108a0565b6001600160a01b0382166120385760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108a0565b612043838383612725565b61204e600082611df6565b6001600160a01b0383166000908152600360205260408120805460019290612077908490613b60565b90915550506001600160a01b03821660009081526003602052604081208054600192906120a5908490613a5d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080836121225760408051600081526020810190915261216c565b8463ffffffff1667ffffffffffffffff81111561214157612141613674565b60405190808252806020026020018201604052801561216a578160200160208202803683370190505b505b905060008060005b8763ffffffff168163ffffffff161015612386576037805461ffff1690600061219c83613a75565b91906101000a81548161ffff021916908361ffff160217905550506121c186826124f0565b6037549092506121d49061ffff166111fd565b6121de9084613a5d565b6037549093506121f49061ffff1683600061253a565b5194506000612202836127dd565b905087158061221a57506001600160a01b0381163314155b156122365760375461223190829061ffff1661268b565b61229a565b603754855161ffff90911690869063ffffffff851690811061225a5761225a6138c4565b61ffff928316602091820292909201015260375461229a917f00000000000000000000000025be71572ddf57ff57de4744f27a83d15f083303911661268b565b7f7b609c9f4f77457dc3fdc7b402815c96115b20d86a5539d015dc363324030da860008760028111156122cf576122cf613521565b146123325760018760028111156122e8576122e8613521565b146123115760405180604001604052806006815260200165242aa72a22a960d11b815250612352565b6040518060400160405280600381526020016208c9eb60eb1b815250612352565b6040518060400160405280600681526020016514905090925560d21b8152505b60375460405161236b9291859161ffff90911690613a8d565b60405180910390a1508061237e816139d8565b915050612174565b50811561240e57604051632770a7eb60e21b8152336004820152602481018390527f0000000000000000000000002983d9c9d9702757657f02e289b2b5a3a22572b66001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156123f557600080fd5b505af1158015612409573d6000803e3d6000fd5b505050505b851561249557604051639284937760e01b81526001600160a01b037f00000000000000000000000025be71572ddf57ff57de4744f27a83d15f08330316906392849377906124629033908790600401613b77565b600060405180830381600087803b15801561247c57600080fd5b505af1158015612490573d6000803e3d6000fd5b505050505b50505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828260405160200161251b92919091825260e01b6001600160e01b031916602082015260240190565b60408051601f1981840301815291905280516020909101209392505050565b612542613129565b60068260ff16106125955760405162461bcd60e51b815260206004820181905260248201527f756e61626c6520746f2067656e657261746520756e697175652074726169747360448201526064016108a0565b61259f84846128b9565b9050603a60006125ae83612aff565b815260208101919091526040016000205460ff166126665761ffff841660009081526038602052604090208151815483929190829060ff191660018360028111156125fb576125fb613521565b02179055506020820151815460ff9091166101000261ff0019909116178155604082015161262f906001830190600761314d565b509050506001603a600061264284612aff565b81526020810191909152604001600020805460ff1916911515919091179055612684565b6126818460ff841685901c61267c856001613b9b565b61253a565b90505b9392505050565b6126a5828260405180602001604052806000815250612b62565b5050565b6126b33383611e64565b6127195760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016108a0565b61173284848484612b95565b6001600160a01b0383166127805761277b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6127a3565b816001600160a01b0316836001600160a01b0316146127a3576127a38382612bc8565b6001600160a01b0382166127ba576109d681612c65565b826001600160a01b0316826001600160a01b0316146109d6576109d68282612d14565b60375460009061271061ffff9091161115806128065750612803600a60f584901c613bc0565b15155b15612812575033919050565b60405163267bff1560e01b8152609083901c60048201526000907f00000000000000000000000025be71572ddf57ff57de4744f27a83d15f0833036001600160a01b03169063267bff1590602401602060405180830381865afa15801561287d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a19190613bd4565b90506001600160a01b03811661079357503392915050565b6128c1613129565b61271061ffff84161161292e576128dd600a61ffff8416613bc0565b156128e95760006128ec565b60015b60ff16600281111561290057612900613521565b8190600281111561291357612913613521565b9081600281111561292657612926613521565b90525061299f565b600061293f603261ffff8516613bc0565b9050801561295d5760058110612956576000612960565b6001612960565b60025b60ff16600281111561297457612974613521565b8290600281111561298757612987613521565b9081600281111561299a5761299a613521565b905250505b805160009060028111156129b5576129b5613521565b6129c0906007613bf1565b60109390931c9290506129e161ffff84166129dc836000613b9b565b612d58565b604083015160ff91909116905260109290921c91612a0861ffff84166129dc836001613b9b565b604083015160ff9190911660209091015260109290921c91612a3361ffff84166129dc836002613b9b565b60408381015160ff9290921691015260109290921c91612a5c61ffff84166129dc836003613b9b565b604083015160ff9190911660609091015260109290921c91612a8761ffff84166129dc836004613b9b565b604083015160ff9190911660809091015260109290921c91612ab261ffff84166129dc836005613b9b565b604083015160ff9190911660a09091015260109290921c91612add61ffff84166129dc836006613b9b565b60408301805160ff92831660c091820152905101511660208301525092915050565b8051602080830151604080850151805181850151828401516060840151608085015160a086015160c090960151965160009a612b4a9a90999896979596949593949293929101613c1a565b60405160208183030381529060405261079390613ce7565b612b6c8383612e34565b612b796000848484612f82565b6109d65760405162461bcd60e51b81526004016108a090613d0b565b612ba0848484611f5b565b612bac84848484612f82565b6117325760405162461bcd60e51b81526004016108a090613d0b565b60006001612bd58461130b565b612bdf9190613b60565b600083815260076020526040902054909150808214612c32576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612c7790600190613b60565b60008381526009602052604081205460088054939450909284908110612c9f57612c9f6138c4565b906000526020600020015490508060088381548110612cc057612cc06138c4565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612cf857612cf8613d5d565b6001900381819060005260206000200160009055905550505050565b6000612d1f8361130b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600080600d8360ff1660158110612d7157612d716138c4565b0154612d7d9085613d73565b9050600d8360ff1660158110612d9557612d956138c4565b018160ff1681548110612daa57612daa6138c4565b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c9091161015612de0579050610793565b60228360ff1660158110612df657612df66138c4565b018160ff1681548110612e0b57612e0b6138c4565b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b038216612e8a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108a0565b6000818152600260205260409020546001600160a01b031615612eef5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108a0565b612efb60008383612725565b6001600160a01b0382166000908152600360205260408120805460019290612f24908490613a5d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561307557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612fc6903390899088908890600401613d95565b6020604051808303816000875af1925050508015613001575060408051601f3d908101601f19168201909252612ffe91810190613dd2565b60015b61305b573d80801561302f576040519150601f19603f3d011682016040523d82523d6000602084013e613034565b606091505b5080516130535760405162461bcd60e51b81526004016108a090613d0b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f53565b506001949350505050565b82805482825590600052602060002090601f016020900481019282156131195791602002820160005b838211156130ea57833560ff1683826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026130a9565b80156131175782816101000a81549060ff02191690556001016020816000010492830192600103026130ea565b505b506131259291506131a1565b5090565b60408051606081018252600080825260208201529081016131486131b6565b905290565b6001830191839082156131195791602002820160005b838211156130ea57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613163565b5b8082111561312557600081556001016131a2565b6040518060e001604052806007906020820280368337509192915050565b6001600160e01b031981168114610fc857600080fd5b6000602082840312156131fc57600080fd5b8135612684816131d4565b60005b8381101561322257818101518382015260200161320a565b838111156117325750506000910152565b6000815180845261324b816020860160208601613207565b601f01601f19169290920160200192915050565b6020815260006126846020830184613233565b60006020828403121561328457600080fd5b5035919050565b6001600160a01b0381168114610fc857600080fd5b600080604083850312156132b357600080fd5b82356132be8161328b565b946020939093013593505050565b60008083601f8401126132de57600080fd5b50813567ffffffffffffffff8111156132f657600080fd5b6020830191508360208260051b850101111561331157600080fd5b9250929050565b60008060008060006060868803121561333057600080fd5b853560ff8116811461334157600080fd5b9450602086013567ffffffffffffffff8082111561335e57600080fd5b61336a89838a016132cc565b9096509450604088013591508082111561338357600080fd5b50613390888289016132cc565b969995985093965092949392505050565b6000806000606084860312156133b657600080fd5b83356133c18161328b565b925060208401356133d18161328b565b929592945050506040919091013590565b803563ffffffff811681146133f657600080fd5b919050565b8015158114610fc857600080fd5b803565ffffffffffff811681146133f657600080fd5b60008083601f84011261343157600080fd5b50813567ffffffffffffffff81111561344957600080fd5b60208301915083602082850101111561331157600080fd5b60008060008060008060a0878903121561347a57600080fd5b613483876133e2565b95506020870135613493816133fb565b9450604087013593506134a860608801613409565b9250608087013567ffffffffffffffff8111156134c457600080fd5b6134d089828a0161341f565b979a9699509497509295939492505050565b6000602082840312156134f457600080fd5b612684826133e2565b60006020828403121561350f57600080fd5b813561ffff8116811461268457600080fd5b634e487b7160e01b600052602160045260246000fd5b81516101208201906003811061355d57634e487b7160e01b600052602160045260246000fd5b825260208381015160ff908116828501526040808601519190850160005b600781101561359a57835183168252928401929084019060010161357b565b505050505092915050565b6000602082840312156135b757600080fd5b81356126848161328b565b600081518084526020808501945080840160005b838110156135f657815161ffff16875295820195908201906001016135d6565b509495945050505050565b60208152600061268460208301846135c2565b60008060006060848603121561362957600080fd5b8335925060208401356133d18161328b565b6000806040838503121561364e57600080fd5b82356136598161328b565b91506020830135613669816133fb565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136b3576136b3613674565b604052919050565b600067ffffffffffffffff8211156136d5576136d5613674565b50601f01601f191660200190565b600080600080608085870312156136f957600080fd5b84356137048161328b565b935060208501356137148161328b565b925060408501359150606085013567ffffffffffffffff81111561373757600080fd5b8501601f8101871361374857600080fd5b803561375b613756826136bb565b61368a565b81815288602083850101111561377057600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080600080600080600060c0888a0312156137ad57600080fd5b6137b6886133e2565b965060208801356137c6816133fb565b955060408801356137d6816133fb565b94506137e460608901613409565b93506080880135925060a088013567ffffffffffffffff81111561380757600080fd5b6138138a828b0161341f565b989b979a50959850939692959293505050565b6000806040838503121561383957600080fd5b82356138448161328b565b915060208301356136698161328b565b600181811c9082168061386857607f821691505b6020821081141561388957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561390a5761390a6138da565b500290565b600063ffffffff80831681851680830382111561392e5761392e6138da565b01949350505050565b6020808252600a90820152691b5a5b9d1959081bdd5d60b21b604082015260600190565b6001600160a01b0387168152851515602082015265ffffffffffff851660408201526060810184905260a0608082018190528101829052818360c0830137600081830160c090810191909152601f909201601f1916010195945050505050565b6000602082840312156139cd57600080fd5b8151612684816133fb565b600063ffffffff808316818114156139f2576139f26138da565b6001019392505050565b600061ffff80831681851681830481118215151615613a1d57613a1d6138da565b02949350505050565b634e487b7160e01b600052601260045260246000fd5b600061ffff80841680613a5157613a51613a26565b92169190910492915050565b60008219821115613a7057613a706138da565b500190565b600061ffff808316818114156139f2576139f26138da565b606081526000613aa06060830186613233565b6001600160a01b039490941660208301525061ffff91909116604090910152919050565b600060208284031215613ad657600080fd5b815167ffffffffffffffff811115613aed57600080fd5b8201601f81018413613afe57600080fd5b8051613b0c613756826136bb565b818152856020838501011115613b2157600080fd5b613b32826020830160208601613207565b95945050505050565b600063ffffffff83811690831681811015613b5857613b586138da565b039392505050565b600082821015613b7257613b726138da565b500390565b6001600160a01b0383168152604060208201819052600090612681908301846135c2565b600060ff821660ff84168060ff03821115613bb857613bb86138da565b019392505050565b600082613bcf57613bcf613a26565b500690565b600060208284031215613be657600080fd5b81516126848161328b565b600060ff821660ff84168160ff0481118215151615613c1257613c126138da565b029392505050565b600060038b10613c3a57634e487b7160e01b600052602160045260246000fd5b60f88b811b83526001600160f81b03198b821b811660018501528a821b8116600285015289821b811660038501529088901b166004830152613c8b600583018760f81b6001600160f81b0319169052565b613ca4600683018660f81b6001600160f81b0319169052565b613cbd600783018560f81b6001600160f81b0319169052565b613cd6600883018460f81b6001600160f81b0319169052565b506009019998505050505050505050565b805160208083015191908110156138895760001960209190910360031b1b16919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b600060ff831680613d8657613d86613a26565b8060ff84160691505092915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613dc890830184613233565b9695505050505050565b600060208284031215613de457600080fd5b8151612684816131d456fea26469706673582212209cfb74ecd1cc0c6ee69eb5dee05f3472ad984a598c7d2d8521da8df02960a74064736f6c634300080a0033

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

0000000000000000000000002983d9c9d9702757657f02e289b2b5a3a22572b600000000000000000000000025be71572ddf57ff57de4744f27a83d15f083303000000000000000000000000159b8fe52cf781872c61273e9b8892913721aada

-----Decoded View---------------
Arg [0] : carrot (address): 0x2983D9C9d9702757657F02E289b2b5a3a22572b6
Arg [1] : game (address): 0x25Be71572dDf57FF57de4744F27a83D15f083303
Arg [2] : traits (address): 0x159B8fe52CF781872C61273E9b8892913721Aada

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000002983d9c9d9702757657f02e289b2b5a3a22572b6
Arg [1] : 00000000000000000000000025be71572ddf57ff57de4744f27a83d15f083303
Arg [2] : 000000000000000000000000159b8fe52cf781872c61273e9b8892913721aada


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.