ETH Price: $3,393.75 (+1.63%)

Token

LootItems (ITEMS)
 

Overview

Max Total Supply

832 ITEMS

Holders

63

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
24 ITEMS
0xba379a9fe55b1ec5ab90434084f44ed61b8d35b0
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
LootItems

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 13 : LootItems.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

abstract contract LootContract {
  function ownerOf(uint256 tokenId) public view virtual returns (address);
}

abstract contract MLootContract {
  function ownerOf(uint256 tokenId) public view virtual returns (address);
}

contract LootItems is Ownable, ERC721, ReentrancyGuard {
  using Counters for Counters.Counter;
  using Strings for uint256;

  Counters.Counter private _tokenIdTracker;
  LootContract private loot;
  MLootContract private mLoot;

  enum Category {
    weapon,
    chest,
    head,
    waist,
    foot,
    hand,
    neck,
    ring
  }

  struct LootAvailable {
    uint256 lootTokenId;
    bool available;
  }

  mapping(uint256 => uint256) public lootIdToLastRedeemed;
  mapping(uint256 => uint256) public lootIdToNumberTimesRedeemed;
  mapping(uint256 => uint256) public itemIdToCategory;
  mapping(uint256 => uint256) public itemIdToLootId;

  uint256 public a;
  uint256 public b;
  uint256 public x;
  uint256 public y;

  uint256 public totalSupply;
  bool public isMLootUnbundleSupported = true;

  /**
   * @dev We are bringing in the logic from ERC721Enumerable that
   * we want in order to optimize gas usage.
   */
  // 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;

  constructor(address lootAddress, address mLootAddress)
    ERC721("LootItems", "ITEMS")
  {
    loot = LootContract(lootAddress);
    mLoot = MLootContract(mLootAddress);
    _tokenIdTracker.increment();
    a = 0;
    b = 4032000;
    x = 0;
    y = 40320;
    totalSupply = 0;
  }

  function getAllLootAvailability(uint256[] memory lootTokenIds)
    public
    view
    returns (LootAvailable[] memory)
  {
    LootAvailable[] memory availability = new LootAvailable[](
      lootTokenIds.length
    );
    uint256 blockNumber = block.number;
    for (uint256 i = 0; i < lootTokenIds.length; i++) {
      uint256 lootTokenId = lootTokenIds[i];
      uint256 lastRedeemedBlock = lootIdToLastRedeemed[lootTokenId];
      uint256 numberTimesRedeemed = lootIdToNumberTimesRedeemed[lootTokenId];
      bool available = true;

      if (lastRedeemedBlock != 0) {
        // check whether it's off cooldown
        uint256 cooldown = getCooldown(
          numberTimesRedeemed,
          isOriginalLoot(lootTokenId)
        );
        if (blockNumber - lastRedeemedBlock < cooldown) {
          available = false;
        }
      }
      availability[i] = LootAvailable(lootTokenId, available);
    }
    return availability;
  }

  function getAllLootItems(uint256[] memory lootTokenIds) public nonReentrant {
    for (uint256 i = 0; i < lootTokenIds.length; i++) {
      getLootItems(lootTokenIds[i]);
    }
  }

  function isOriginalLoot(uint256 lootId) internal pure returns (bool) {
    return lootId > 0 && lootId < 8001;
  }

  function getLootItems(uint256 lootTokenId) public nonReentrant {
    require(lootTokenId > 0, "Token ID invalid");
    if (isOriginalLoot(lootTokenId)) {
      require(loot.ownerOf(lootTokenId) == msg.sender, "Must own loot");
    } else {
      require(isMLootUnbundleSupported, "MLoot unbundle not yet supported.");
      require(mLoot.ownerOf(lootTokenId) == msg.sender, "Must own loot");
    }
    uint256 lastRedeemedBlock = lootIdToLastRedeemed[lootTokenId];
    uint256 blockNumber = block.number;
    uint256 numberTimesRedeemed = lootIdToNumberTimesRedeemed[lootTokenId];
    if (lastRedeemedBlock != 0) {
      // check whether it's off cooldown
      uint256 cooldown = getCooldown(
        numberTimesRedeemed,
        isOriginalLoot(lootTokenId)
      );
      require(
        blockNumber - lastRedeemedBlock >= cooldown,
        "Loot not off cooldown"
      );
    }

    uint256 newTokenId = _tokenIdTracker.current();
    _safeMintBatch(8, msg.sender, newTokenId);

    unbundle(Category.weapon, lootTokenId);
    unbundle(Category.chest, lootTokenId);
    unbundle(Category.head, lootTokenId);
    unbundle(Category.waist, lootTokenId);
    unbundle(Category.foot, lootTokenId);
    unbundle(Category.hand, lootTokenId);
    unbundle(Category.neck, lootTokenId);
    unbundle(Category.ring, lootTokenId);

    lootIdToNumberTimesRedeemed[lootTokenId] = numberTimesRedeemed + 1;
    lootIdToLastRedeemed[lootTokenId] = blockNumber;
    totalSupply = totalSupply + 8;
  }

  function unbundle(Category category, uint256 lootTokenId) internal {
    uint256 newTokenId = _tokenIdTracker.current();
    // _safeMint(msg.sender, newTokenId);
    _tokenIdTracker.increment();

    itemIdToCategory[newTokenId] = uint256(category);
    itemIdToLootId[newTokenId] = lootTokenId;
  }

  function getCooldown(uint256 numberTimesRedeemed, bool isSourceOriginalRoot)
    public
    view
    returns (uint256)
  {
    if (isSourceOriginalRoot) {
      return x * numberTimesRedeemed + y;
    }
    return a * numberTimesRedeemed + b;
  }

  function modifyCooldown(
    uint256 updatedA,
    uint256 updatedB,
    uint256 updatedX,
    uint256 updatedY
  ) external onlyOwner {
    a = updatedA;
    b = updatedB;
    x = updatedX;
    y = updatedY;
  }

  // loot logic
  string[] private weapons = [
    "Warhammer",
    "Quarterstaff",
    "Maul",
    "Mace",
    "Club",
    "Katana",
    "Falchion",
    "Scimitar",
    "Long Sword",
    "Short Sword",
    "Ghost Wand",
    "Grave Wand",
    "Bone Wand",
    "Wand",
    "Grimoire",
    "Chronicle",
    "Tome",
    "Book"
  ];

  string[] private chestArmor = [
    "Divine Robe",
    "Silk Robe",
    "Linen Robe",
    "Robe",
    "Shirt",
    "Demon Husk",
    "Dragonskin Armor",
    "Studded Leather Armor",
    "Hard Leather Armor",
    "Leather Armor",
    "Holy Chestplate",
    "Ornate Chestplate",
    "Plate Mail",
    "Chain Mail",
    "Ring Mail"
  ];

  string[] private headArmor = [
    "Ancient Helm",
    "Ornate Helm",
    "Great Helm",
    "Full Helm",
    "Helm",
    "Demon Crown",
    "Dragon's Crown",
    "War Cap",
    "Leather Cap",
    "Cap",
    "Crown",
    "Divine Hood",
    "Silk Hood",
    "Linen Hood",
    "Hood"
  ];

  string[] private waistArmor = [
    "Ornate Belt",
    "War Belt",
    "Plated Belt",
    "Mesh Belt",
    "Heavy Belt",
    "Demonhide Belt",
    "Dragonskin Belt",
    "Studded Leather Belt",
    "Hard Leather Belt",
    "Leather Belt",
    "Brightsilk Sash",
    "Silk Sash",
    "Wool Sash",
    "Linen Sash",
    "Sash"
  ];

  string[] private footArmor = [
    "Holy Greaves",
    "Ornate Greaves",
    "Greaves",
    "Chain Boots",
    "Heavy Boots",
    "Demonhide Boots",
    "Dragonskin Boots",
    "Studded Leather Boots",
    "Hard Leather Boots",
    "Leather Boots",
    "Divine Slippers",
    "Silk Slippers",
    "Wool Shoes",
    "Linen Shoes",
    "Shoes"
  ];

  string[] private handArmor = [
    "Holy Gauntlets",
    "Ornate Gauntlets",
    "Gauntlets",
    "Chain Gloves",
    "Heavy Gloves",
    "Demon's Hands",
    "Dragonskin Gloves",
    "Studded Leather Gloves",
    "Hard Leather Gloves",
    "Leather Gloves",
    "Divine Gloves",
    "Silk Gloves",
    "Wool Gloves",
    "Linen Gloves",
    "Gloves"
  ];

  string[] private necklaces = ["Necklace", "Amulet", "Pendant"];

  string[] private rings = [
    "Gold Ring",
    "Silver Ring",
    "Bronze Ring",
    "Platinum Ring",
    "Titanium Ring"
  ];

  string[] private suffixes = [
    "of Power",
    "of Giants",
    "of Titans",
    "of Skill",
    "of Perfection",
    "of Brilliance",
    "of Enlightenment",
    "of Protection",
    "of Anger",
    "of Rage",
    "of Fury",
    "of Vitriol",
    "of the Fox",
    "of Detection",
    "of Reflection",
    "of the Twins"
  ];

  string[] private namePrefixes = [
    "Agony",
    "Apocalypse",
    "Armageddon",
    "Beast",
    "Behemoth",
    "Blight",
    "Blood",
    "Bramble",
    "Brimstone",
    "Brood",
    "Carrion",
    "Cataclysm",
    "Chimeric",
    "Corpse",
    "Corruption",
    "Damnation",
    "Death",
    "Demon",
    "Dire",
    "Dragon",
    "Dread",
    "Doom",
    "Dusk",
    "Eagle",
    "Empyrean",
    "Fate",
    "Foe",
    "Gale",
    "Ghoul",
    "Gloom",
    "Glyph",
    "Golem",
    "Grim",
    "Hate",
    "Havoc",
    "Honour",
    "Horror",
    "Hypnotic",
    "Kraken",
    "Loath",
    "Maelstrom",
    "Mind",
    "Miracle",
    "Morbid",
    "Oblivion",
    "Onslaught",
    "Pain",
    "Pandemonium",
    "Phoenix",
    "Plague",
    "Rage",
    "Rapture",
    "Rune",
    "Skull",
    "Sol",
    "Soul",
    "Sorrow",
    "Spirit",
    "Storm",
    "Tempest",
    "Torment",
    "Vengeance",
    "Victory",
    "Viper",
    "Vortex",
    "Woe",
    "Wrath",
    "Light's",
    "Shimmering"
  ];

  string[] private nameSuffixes = [
    "Bane",
    "Root",
    "Bite",
    "Song",
    "Roar",
    "Grasp",
    "Instrument",
    "Glow",
    "Bender",
    "Shadow",
    "Whisper",
    "Shout",
    "Growl",
    "Tear",
    "Peak",
    "Form",
    "Sun",
    "Moon"
  ];

  function random(string memory input) internal pure returns (uint256) {
    return uint256(keccak256(abi.encodePacked(input)));
  }

  function getWeapon(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "WEAPON", weapons, greatnessSeparator);
  }

  function getChest(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "CHEST", chestArmor, greatnessSeparator);
  }

  function getHead(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "HEAD", headArmor, greatnessSeparator);
  }

  function getWaist(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "WAIST", waistArmor, greatnessSeparator);
  }

  function getFoot(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "FOOT", footArmor, greatnessSeparator);
  }

  function getHand(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "HAND", handArmor, greatnessSeparator);
  }

  function getNeck(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "NECK", necklaces, greatnessSeparator);
  }

  function getRing(uint256 tokenId, string memory greatnessSeparator) internal view returns (string memory) {
    return pluck(tokenId, "RING", rings, greatnessSeparator);
  }

  function pluck(
    uint256 tokenId,
    string memory keyPrefix,
    string[] memory sourceArray,
    string memory greatnessSeparator
  ) internal view returns (string memory) {
    uint256 rand = random(
      string(abi.encodePacked(keyPrefix, Strings.toString(tokenId)))
    );
    string memory output = sourceArray[rand % sourceArray.length];
    uint256 greatness = rand % 21;
    if (greatness > 14) {
      output = string(
        abi.encodePacked(output, " ", suffixes[rand % suffixes.length])
      );
    }
    if (greatness >= 19) {
      string[2] memory name;
      name[0] = namePrefixes[rand % namePrefixes.length];
      name[1] = nameSuffixes[rand % nameSuffixes.length];
      if (greatness == 19) {
        output = string(
          abi.encodePacked(greatnessSeparator, name[0], " ", name[1], greatnessSeparator, ' ', output)
        );
      } else {
        output = string(
          abi.encodePacked(greatnessSeparator, name[0], " ", name[1], greatnessSeparator, ' ', output, " +1")
        );
      }
    }
    return output;
  }

  // // metadata URI
  string private _baseTokenURI;

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

  function getName(uint256 category, uint256 lootTokenId, string memory greatnessSeparator)
    internal
    view
    returns (string memory)
  {
    if (category == 0) {
      return getWeapon(lootTokenId, greatnessSeparator);
    } else if (category == 1) {
      return getChest(lootTokenId, greatnessSeparator);
    } else if (category == 2) {
      return getHead(lootTokenId, greatnessSeparator);
    } else if (category == 3) {
      return getWaist(lootTokenId, greatnessSeparator);
    } else if (category == 4) {
      return getFoot(lootTokenId, greatnessSeparator);
    } else if (category == 5) {
      return getHand(lootTokenId, greatnessSeparator);
    } else if (category == 6) {
      return getNeck(lootTokenId, greatnessSeparator);
    } else {
      return getRing(lootTokenId, greatnessSeparator);
    }
  }

  function convertToCategoryName(uint256 category)
    internal
    pure
    returns (string memory)
  {
    if (category == 0) {
      return "Weapon";
    } else if (category == 1) {
      return "Chest";
    } else if (category == 2) {
      return "Head";
    } else if (category == 3) {
      return "Waist";
    } else if (category == 4) {
      return "Foot";
    } else if (category == 5) {
      return "Hand";
    } else if (category == 6) {
      return "Neck";
    } else {
      return "Ring";
    }
  }

  function enableMLootUnbundle() public onlyOwner {
    isMLootUnbundleSupported = true;
  }

  function disableMLootUnbundle() public onlyOwner {
    isMLootUnbundleSupported = false;
  }

  function tokenURI(uint256 tokenId)
    public
    view
    override
    returns (string memory)
  {
    if (tokenId == 0 || tokenId > totalSupply) {
      return "";
    }
    uint256 category = itemIdToCategory[tokenId];
    uint256 lootId = itemIdToLootId[tokenId];
    string memory name = getName(category, lootId, '"');
    bool originalLoot = isOriginalLoot(lootId);

    string memory attribute = string(
      abi.encodePacked(
        '{"trait_type": "',
        convertToCategoryName(category),
        '", "value": "',
        getName(category, lootId, "'"),
        '"}'
      )
    );

    string[17] memory parts;
    parts[
      0
    ] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">';
    parts[1] = name;
    parts[2] = "</text></svg>";
    string memory output = string(
      abi.encodePacked(parts[0], parts[1], parts[2])
    );
    string memory json = Base64.encode(
      bytes(
        string(
          abi.encodePacked(
            '{"name": "',
            getName(category, lootId, "'"),
            '", "description": "Loot Items are individual items from a Loot Bag represented as ERC721 tokens. Stats, images, and other functionality are intentionally omitted for others to interpret. Feel free to use Loot Items in any way you want.", "attributes": [',
            attribute,
            '], "image": "data:image/svg+xml;base64,',
            Base64.encode(bytes(output)),
            '"}'
          )
        )
      )
    );

    if (originalLoot) {
      json = Base64.encode(
        bytes(
          string(
            abi.encodePacked(
              '{"name": "',
              getName(category, lootId, "'"),
              '", "description": "Loot Items are individual items from a Loot Bag or mLoot Bag represented as ERC721 tokens. Stats, images, and other functionality are intentionally omitted for others to interpret. Feel free to use Loot Items in any way you want.", "attributes": [',
              attribute,
              ",",
              '{"trait_type": "Edition", "value": "Original"}',
              '], "image": "data:image/svg+xml;base64,',
              Base64.encode(bytes(output)),
              '"}'
            )
          )
        )
      );
    }

    output = string(abi.encodePacked("data:application/json;base64,", json));
    return output;
  }

  function setBaseURI(string calldata baseURI) external onlyOwner {
    _baseTokenURI = baseURI;
  }

  function withdrawMoney() public payable onlyOwner {
    (bool success, ) = msg.sender.call{value: address(this).balance}("");
    require(success, "Transfer failed.");
  }

  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual override(ERC721) {
    super._beforeTokenTransfer(from, to, tokenId);

    if (from != address(0) && from != to) {
      _removeTokenFromOwnerEnumeration(from, tokenId);
    }
    if (to != address(0) && to != from) {
      _addTokenToOwnerEnumeration(to, tokenId, 1);
    }
  }

  function _batchBeforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId,
    uint256 numTokens
  ) internal virtual override(ERC721) {
    for (uint256 i = 0; i < numTokens; i++) {
      super._beforeTokenTransfer(from, to, tokenId + i);

      if (from != address(0) && from != to) {
        _removeTokenFromOwnerEnumeration(from, tokenId + i);
      }
    }

    if (to != address(0) && to != from) {
      _addTokenToOwnerEnumeration(to, tokenId, numTokens);
    }
  }

  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(ERC721)
    returns (bool)
  {
    return super.supportsInterface(interfaceId);
  }

  /**
   * @dev We are bringing in the logic from ERC721Enumerable that
   * we want in order to optimize gas usage.
   */

  function tokenOfOwnerByIndex(address owner, uint256 index)
    public
    view
    returns (uint256)
  {
    require(
      index < balanceOf(owner),
      "ERC721Enumerable: owner index out of bounds"
    );
    return _ownedTokens[owner][index];
  }

  /**
   * @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 add a token to this extension's ownership-tracking data structures.
   * @param to address representing the new owner of the given token ID
   * @param startTokenId uint256 ID of the token to be added to the tokens list of the given address
   */
  function _addTokenToOwnerEnumeration(
    address to,
    uint256 startTokenId,
    uint256 numOfTokens
  ) private {
    uint256 length = ERC721.balanceOf(to);

    for (uint256 i = 0; i < numOfTokens; i++) {
      _ownedTokens[to][length + i] = startTokenId + i;
      _ownedTokensIndex[startTokenId + i] = length + i;
    }
  }

  /**
   * @dev We are bringing in the logic from ERC721Burnable.
   */
  function burn(uint256 tokenId) public virtual {
    //solhint-disable-next-line max-line-length
    require(
      _isApprovedOrOwner(_msgSender(), tokenId),
      "ERC721Burnable: caller is not owner nor approved"
    );
    _burn(tokenId);
  }
}

/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
  bytes internal constant TABLE =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

  /// @notice Encodes some bytes to the base64 representation
  function encode(bytes memory data) internal pure returns (string memory) {
    uint256 len = data.length;
    if (len == 0) return "";

    // multiply by 4/3 rounded up
    uint256 encodedLen = 4 * ((len + 2) / 3);

    // Add some extra buffer at the end
    bytes memory result = new bytes(encodedLen + 32);

    bytes memory table = TABLE;

    assembly {
      let tablePtr := add(table, 1)
      let resultPtr := add(result, 32)

      for {
        let i := 0
      } lt(i, len) {

      } {
        i := add(i, 3)
        let input := and(mload(add(data, i)), 0xffffff)

        let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
        out := shl(8, out)
        out := add(
          out,
          and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)
        )
        out := shl(8, out)
        out := add(
          out,
          and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)
        )
        out := shl(8, out)
        out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
        out := shl(224, out)

        mstore(resultPtr, out)

        resultPtr := add(resultPtr, 4)
      }

      switch mod(len, 3)
      case 1 {
        mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
      }
      case 2 {
        mstore(sub(resultPtr, 1), shl(248, 0x3d))
      }

      mstore(result, encodedLen)
    }

    return string(result);
  }
}

File 2 of 13 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

/**
 * @dev Fork of OpenZeppelin's ERC721 but with added bulk safe mint functionality
 */
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));
  }

  function _safeMintBatch(
    uint256 numTokens,
    address to,
    uint256 startTokenId
  ) internal virtual {
    require(numTokens > 0, "numTokens must be greater than 0");
    require(to != address(0), "ERC721: mint to the zero address");
    _batchBeforeTokenTransfer(address(0), to, startTokenId, numTokens);
    for (uint256 i = 0; i < numTokens; i++) {
      uint256 tokenId = startTokenId + i;
      require(!_exists(tokenId), "ERC721: token already minted");
      _owners[tokenId] = to;
      emit Transfer(address(0), to, tokenId);
      require(
        _checkOnERC721Received(address(0), to, tokenId, ""),
        "ERC721: transfer to non ERC721Receiver implementer"
      );
    }
    _balances[to] += numTokens;
  }

  /**
   * @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(to).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 {}

  function _batchBeforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId,
    uint256 numTokens
  ) internal virtual {}
}

File 3 of 13 : 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 4 of 13 : 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 5 of 13 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 6 of 13 : 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 7 of 13 : 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 8 of 13 : 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 9 of 13 : 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 10 of 13 : 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);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private 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 11 of 13 : 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 12 of 13 : 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 13 of 13 : 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": 500
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"lootAddress","type":"address"},{"internalType":"address","name":"mLootAddress","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"a","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":[],"name":"b","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableMLootUnbundle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMLootUnbundle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"lootTokenIds","type":"uint256[]"}],"name":"getAllLootAvailability","outputs":[{"components":[{"internalType":"uint256","name":"lootTokenId","type":"uint256"},{"internalType":"bool","name":"available","type":"bool"}],"internalType":"struct LootItems.LootAvailable[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"lootTokenIds","type":"uint256[]"}],"name":"getAllLootItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberTimesRedeemed","type":"uint256"},{"internalType":"bool","name":"isSourceOriginalRoot","type":"bool"}],"name":"getCooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lootTokenId","type":"uint256"}],"name":"getLootItems","outputs":[],"stateMutability":"nonpayable","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":"isMLootUnbundleSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemIdToCategory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemIdToLootId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lootIdToLastRedeemed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lootIdToNumberTimesRedeemed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"updatedA","type":"uint256"},{"internalType":"uint256","name":"updatedB","type":"uint256"},{"internalType":"uint256","name":"updatedX","type":"uint256"},{"internalType":"uint256","name":"updatedY","type":"uint256"}],"name":"modifyCooldown","outputs":[],"stateMutability":"nonpayable","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":[],"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":[],"name":"withdrawMoney","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"x","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"y","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6014805460ff1916600117905560096102c0818152682bb0b93430b6b6b2b960b91b6102e0526080908152600c6103009081526b28bab0b93a32b939ba30b33360a11b6103205260a05260046103408181526313585d5b60e21b6103605260c052610380818152634d61636560e01b6103a05260e0526103c08181526321b63ab160e11b6103e052610100526006610400908152654b6174616e6160d01b61042052610120526008610440818152672330b631b434b7b760c11b61046052610140526104808181526729b1b4b6b4ba30b960c11b6104a05261016052600a6104c081815269131bdb99c814dddbdc9960b21b6104e05261018052600b6105009081526a14da1bdc9d0814dddbdc9960aa1b610520526101a0526105408181526911da1bdcdd0815d85b9960b21b610560526101c0526105809081526911dc985d994815d85b9960b21b6105a0526101e0526105c084815268109bdb994815d85b9960ba1b6105e052610200526106008281526315d85b9960e21b6106205261022052610640908152674772696d6f69726560c01b6106605261024052610680928352684368726f6e69636c6560b81b6106a052610260929092526106c082815263546f6d6560e01b6106e0526102805261074060405261070091825263426f6f6b60e01b610720526102a091909152620001fe90601790601262001d97565b506040805161022081018252600b6101e082019081526a446976696e6520526f626560a81b61020083015281528151808301835260098082526853696c6b20526f626560b81b6020838101919091528084019290925283518085018552600a808252694c696e656e20526f626560b01b8285015284860191909152845180860186526004815263526f626560e01b81850152606085015284518086018652600581526414da1a5c9d60da1b818501526080850152845180860186528181526944656d6f6e204875736b60b01b8185015260a085015284518086018652601081526f223930b3b7b739b5b4b71020b936b7b960811b8185015260c085015284518086018652601581527f53747564646564204c6561746865722041726d6f7200000000000000000000008185015260e08501528451808601865260128152712430b932102632b0ba3432b91020b936b7b960711b8185015261010085015284518086018652600d81526c2632b0ba3432b91020b936b7b960991b8185015261012085015284518086018652600f8082526e486f6c79204368657374706c61746560881b828601526101408601919091528551808701875260118152704f726e617465204368657374706c61746560781b818601526101608601528551808701875282815269141b185d194813585a5b60b21b81860152610180860152855180870187529182526910da185a5b8813585a5b60b21b828501526101a0850191909152845180860190955290845268149a5b99c813585a5b60ba1b918401919091526101c082019290925262000455916018919062001dfb565b506040805161022081018252600c6101e082019081526b416e6369656e742048656c6d60a01b610200830152815281518083018352600b8082526a4f726e6174652048656c6d60a81b6020838101919091528084019290925283518085018552600a8082526947726561742048656c6d60b01b82850152848601919091528451808601865260098082526846756c6c2048656c6d60b81b8286015260608601919091528551808701875260048082526348656c6d60e01b828701526080870191909152865180880188528481526a2232b6b7b71021b937bbb760a91b8187015260a087015286518088018852600e81526d223930b3b7b713b99021b937bbb760911b8187015260c08701528651808801885260078152660576172204361760cc1b8187015260e0870152865180880188528481526a04c656174686572204361760ac1b8187015261010087015286518088018852600381526204361760ec1b8187015261012087015286518088018852600581526421b937bbb760d91b81870152610140870152865180880188529384526a111a5d9a5b9948121bdbd960aa1b84860152610160860193909352855180870187529081526814da5b1ac8121bdbd960ba1b818501526101808501528451808601865290815269131a5b995b88121bdbd960b21b818401526101a08401528351808501909452835263121bdbd960e21b908301526101c08101919091526200067490601990600f62001dfb565b506040805161022081018252600b6101e082018181526a13dc9b985d194810995b1d60aa1b610200840152825282518084018452600881526715d85c8810995b1d60c21b60208281019190915280840191909152835180850185529182526a141b185d19590810995b1d60aa1b82820152828401919091528251808401845260098082526813595cda0810995b1d60ba1b82840152606084019190915283518085018552600a808252691219585d9e4810995b1d60b21b82850152608085019190915284518086018652600e81526d11195b5bdb9a1a59194810995b1d60921b8185015260a085015284518086018652600f8082526e111c9859dbdb9cdada5b8810995b1d608a1b8286015260c086019190915285518087018752601481527f53747564646564204c6561746865722042656c740000000000000000000000008186015260e086015285518087018752601181527012185c99081319585d1a195c8810995b1d607a1b8186015261010086015285518087018752600c81526b1319585d1a195c8810995b1d60a21b81860152610120860152855180870187528181526e084e4d2ced0e8e6d2d8d640a6c2e6d608b1b8186015261014086015285518087018752838152680a6d2d8d640a6c2e6d60bb1b8186015261016086015285518087018752928352680aededed840a6c2e6d60bb1b838501526101808501929092528451808601865290815269098d2dccadc40a6c2e6d60b31b818401526101a0840152835180850190945260048452630a6c2e6d60e31b918401919091526101c0820192909252620008cd91601a919062001dfb565b506040805161022081018252600c6101e082019081526b486f6c79204772656176657360a01b610200830152815281518083018352600e81526d4f726e617465204772656176657360901b602082810191909152808301919091528251808401845260078152664772656176657360c81b818301528284015282518084018452600b8082526a436861696e20426f6f747360a81b828401526060840191909152835180850185528181526a486561767920426f6f747360a81b81840152608084015283518085018552600f8082526e44656d6f6e6869646520426f6f747360881b8285015260a085019190915284518086018652601081526f447261676f6e736b696e20426f6f747360801b8185015260c085015284518086018652601581527f53747564646564204c65617468657220426f6f747300000000000000000000008185015260e085015284518086018652601281527148617264204c65617468657220426f6f747360701b8185015261010085015284518086018652600d8082526c4c65617468657220426f6f747360981b82860152610120860191909152855180870187528281526e446976696e6520536c69707065727360881b81860152610140860152855180870187529081526c53696c6b20536c69707065727360981b8185015261016085015284518086018652600a815269576f6f6c2053686f657360b01b81850152610180850152845180860186529182526a4c696e656e2053686f657360a81b828401526101a08401919091528351808501909452600584526453686f657360d81b918401919091526101c082019290925262000b3591601b919062001dfb565b506040805161022081018252600e6101e082018181526d486f6c79204761756e746c65747360901b610200840152825282518084018452601081526f4f726e617465204761756e746c65747360801b602082810191909152808401919091528351808501855260098152684761756e746c65747360b81b818301528385015283518085018552600c8082526b436861696e20476c6f76657360a01b828401526060850191909152845180860186528181526b486561767920476c6f76657360a01b81840152608085015284518086018652600d8082526c44656d6f6e27732048616e647360981b8285015260a0860191909152855180870187526011815270447261676f6e736b696e20476c6f76657360781b8185015260c086015285518087018752601681527f53747564646564204c65617468657220476c6f766573000000000000000000008185015260e086015285518087018752601381527f48617264204c65617468657220476c6f7665730000000000000000000000000081850152610100860152855180870187529384526d4c65617468657220476c6f76657360901b84840152610120850193909352845180860186529283526c446976696e6520476c6f76657360981b8383015261014084019290925283518085018552600b8082526a53696c6b20476c6f76657360a81b82840152610160850191909152845180860186529081526a576f6f6c20476c6f76657360a81b81830152610180840152835180850185529182526b4c696e656e20476c6f76657360a01b828201526101a083019190915282518084019093526006835265476c6f76657360d01b908301526101c081019190915262000db290601c90600f62001dfb565b506040518060600160405280604051806040016040528060088152602001674e65636b6c61636560c01b815250815260200160405180604001604052806006815260200165105b5d5b195d60d21b81525081526020016040518060400160405280600781526020016614195b99185b9d60ca1b815250815250601d90600362000e3d92919062001e4d565b506040805160e081018252600960a0820190815268476f6c642052696e6760b81b60c0830152815281518083018352600b8082526a53696c7665722052696e6760a81b60208381019190915280840192909252835180850185529081526a42726f6e7a652052696e6760a81b818301528284015282518084018452600d8082526c506c6174696e756d2052696e6760981b828401526060840191909152835180850190945283526c546974616e69756d2052696e6760981b90830152608081019190915262000f1190601e90600562001e9f565b506040805161024081018252600861020082018181526737b3102837bbb2b960c11b6102208401528252825180840184526009808252686f66204769616e747360b81b6020838101919091528085019290925284518086018652908152686f6620546974616e7360b81b818301528385015283518085018552828152671bd98814dada5b1b60c21b81830152606084015283518085018552600d8082526c37b3102832b93332b1ba34b7b760991b828401526080850191909152845180860186528181526c6f66204272696c6c69616e636560981b8184015260a08501528451808601865260108082526f1bd988115b9b1a59da1d195b9b595b9d60821b8285015260c0860191909152855180870187528281526c37b310283937ba32b1ba34b7b760991b8185015260e0860152855180870187529384526737b31020b733b2b960c11b84840152610100850193909352845180860186526007808252666f66205261676560c81b8285015261012086019190915285518087018752908152666f66204675727960c81b8184015261014085015284518086018652600a808252691bd988159a5d1c9a5bdb60b21b8285015261016086019190915285518087018752908152690decc40e8d0ca408cdef60b31b8184015261018085015284518086018652600c8082526b37b3102232ba32b1ba34b7b760a11b828501526101a0860191909152855180870187529182526c37b3102932b33632b1ba34b7b760991b828401526101c0850191909152845180860190955284526b6f6620746865205477696e7360a01b908401526101e08201929092526200117591601f919062001ef1565b50604080516108e08101825260056108a082018181526441676f6e7960d81b6108c0840152825282518084018452600a8082526941706f63616c7970736560b01b60208381019190915280850192909252845180860186528181526920b936b0b3b2b23237b760b11b818401528486015284518086018652838152641099585cdd60da1b81840152606085015284518086018652600880825267084cad0cadadee8d60c31b82850152608086019190915285518087018752600680825265109b1a59da1d60d21b8286015260a08701919091528651808801885285815264109b1bdbd960da1b8186015260c0870152865180880188526007808252664272616d626c6560c81b8287015260e0880191909152875180890189526009808252684272696d73746f6e6560b81b828801526101008901919091528851808a018a5287815264109c9bdbd960da1b818801526101208901528851808a018a528281526621b0b93934b7b760c91b818801526101408901528851808a018a528181526843617461636c79736d60b81b818801526101608901528851808a018a52848152674368696d6572696360c01b818801526101808901528851808a018a5283815265436f7270736560d01b818801526101a08901528851808a018a528581526921b7b9393ab83a34b7b760b11b818801526101c08901528851808a018a52818152682230b6b730ba34b7b760b91b818801526101e08901528851808a018a5287815264088cac2e8d60db1b818801526102008901528851808a018a52878152642232b6b7b760d91b818801526102208901528851808a018a526004808252634469726560e01b828901526102408a01919091528951808b018b5284815265223930b3b7b760d11b818901526102608a01528951808b018b5288815264111c99585960da1b818901526102808a01528951808b018b5281815263446f6f6d60e01b818901526102a08a01528951808b018b52818152634475736b60e01b818901526102c08a01528951808b018b52888152644561676c6560d81b818901526102e08a01528951808b018b528581526722b6b83cb932b0b760c11b818901526103008a01528951808b018b52818152634661746560e01b818901526103208a01528951808b018b52600380825262466f6560e81b828a01526103408b01919091528a51808c018c528281526347616c6560e01b818a01526103608b01528a51808c018c528981526411da1bdd5b60da1b818a01526103808b01528a51808c018c5289815264476c6f6f6d60d81b818a01526103a08b01528a51808c018c528981526408ed8f2e0d60db1b818a01526103c08b01528a51808c018c5289815264476f6c656d60d81b818a01526103e08b01528a51808c018c52828152634772696d60e01b818a01526104008b01528a51808c018c52828152634861746560e01b818a01526104208b01528a51808c018c52898152644861766f6360d81b818a01526104408b01528a51808c018c52858152652437b737bab960d11b818a01526104608b01528a51808c018c52858152652437b93937b960d11b818a01526104808b01528a51808c018c52868152674879706e6f74696360c01b818a01526104a08b01528a51808c018c528581526525b930b5b2b760d11b818a01526104c08b01528a51808c018c5289815264098dec2e8d60db1b818a01526104e08b01528a51808c018c52838152684d61656c7374726f6d60b81b818a01526105008b01528a51808c018c5282815263135a5b9960e21b818a01526105208b01528a51808c018c52848152664d697261636c6560c81b818a01526105408b01528a51808c018c5285815265135bdc989a5960d21b818a01526105608b01528a51808c018c529586526727b13634bb34b7b760c11b868901526105808a01959095528951808b018b528281526813db9cdb185d59da1d60ba1b818901526105a08a01528951808b018b52818152632830b4b760e11b818901526105c08a01528951808b018b52600b81526a50616e64656d6f6e69756d60a81b818901526105e08a01528951808b018b52838152660a0d0decadcd2f60cb1b818901526106008a01528951808b018b5284815265506c6167756560d01b818901526106208a01528951808b018b52818152635261676560e01b818901526106408a01528951808b018b52838152665261707475726560c81b818901526106608a01528951808b018b528181526352756e6560e01b818901526106808a01528951808b018b528881526414dadd5b1b60da1b818901526106a08a01528951808b018b528581526214dbdb60ea1b818901526106c08a01528951808b018b529081526314dbdd5b60e21b818801526106e08901528851808a018a5283815265536f72726f7760d01b818801526107008901528851808a018a528381526514dc1a5c9a5d60d21b818801526107208901528851808a018a528781526453746f726d60d81b818801526107408901528851808a018a528281526615195b5c195cdd60ca1b818801526107608901528851808a018a5282815266151bdc9b595b9d60ca1b818801526107808901528851808a018a529081526856656e6765616e636560b81b818701526107a08801528751808901895281815266566963746f727960c81b818701526107c088015287518089018952868152642b34b832b960d91b818701526107e088015287518089018952918252650acdee4e8caf60d31b828601526108008701919091528651808801885291825262576f6560e81b8285015261082086019190915285518087018752938452640aee4c2e8d60db1b8484015261084085019390935284518086018652928352664c69676874277360c81b838301526108608401929092528351808501909452908352695368696d6d6572696e6760b01b83820152610880820192909252620019dd9190604562001f43565b506040805161028081018252600461024082018181526342616e6560e01b61026084015282528251808401845281815263149bdbdd60e21b6020828101919091528084019190915283518085018552828152634269746560e01b81830152838501528351808501855282815263536f6e6760e01b81830152606084015283518085018552828152632937b0b960e11b81830152608084015283518085018552600580825264047726173760dc1b8284015260a085019190915284518086018652600a815269125b9cdd1c9d5b595b9d60b21b8184015260c08501528451808601865283815263476c6f7760e01b8184015260e0850152845180860186526006808252652132b73232b960d11b828501526101008601919091528551808701875290815265536861646f7760d01b818401526101208501528451808601865260078152662bb434b9b832b960c91b81840152610140850152845180860186528181526414da1bdd5d60da1b81840152610160850152845180860186529081526411dc9bdddb60da1b8183015261018084015283518085018552828152632a32b0b960e11b818301526101a084015283518085018552828152635065616b60e01b818301526101c08401528351808501855282815263466f726d60e01b818301526101e084015283518085018552600381526229bab760e91b8183015261020084015283518085019094529083526326b7b7b760e11b9083015261022081019190915262001c0e90602190601262001d97565b5034801562001c1c57600080fd5b506040516200642c3803806200642c83398101604081905262001c3f91620020b7565b604051806040016040528060098152602001684c6f6f744974656d7360b81b815250604051806040016040528060058152602001644954454d5360d81b81525062001c9962001c9362001d3a60201b60201c565b62001d3e565b815162001cae90600190602085019062001f95565b50805162001cc490600290602084019062001f95565b5050600160075550600980546001600160a01b03199081166001600160a01b0385811691909117909255600a805490911691831691909117905562001d16600862001d8e602090811b620018d317901c565b50506000600f819055623d86006010556011819055619d806012556013556200212b565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80546001019055565b82805482825590600052602060002090810192821562001de9579160200282015b8281111562001de9578251805162001dd891849160209091019062001f95565b509160200191906001019062001db8565b5062001df792915062002020565b5090565b82805482825590600052602060002090810192821562001de9579160200282015b8281111562001de9578251805162001e3c91849160209091019062001f95565b509160200191906001019062001e1c565b82805482825590600052602060002090810192821562001de9579160200282015b8281111562001de9578251805162001e8e91849160209091019062001f95565b509160200191906001019062001e6e565b82805482825590600052602060002090810192821562001de9579160200282015b8281111562001de9578251805162001ee091849160209091019062001f95565b509160200191906001019062001ec0565b82805482825590600052602060002090810192821562001de9579160200282015b8281111562001de9578251805162001f3291849160209091019062001f95565b509160200191906001019062001f12565b82805482825590600052602060002090810192821562001de9579160200282015b8281111562001de9578251805162001f8491849160209091019062001f95565b509160200191906001019062001f64565b82805462001fa390620020ee565b90600052602060002090601f01602090048101928262001fc7576000855562002012565b82601f1062001fe257805160ff191683800117855562002012565b8280016001018555821562002012579182015b828111156200201257825182559160200191906001019062001ff5565b5062001df792915062002041565b8082111562001df757600062002037828262002058565b5060010162002020565b5b8082111562001df7576000815560010162002042565b5080546200206690620020ee565b6000825580601f1062002077575050565b601f01602090049060005260206000209081019062002097919062002041565b50565b80516001600160a01b0381168114620020b257600080fd5b919050565b60008060408385031215620020ca578182fd5b620020d5836200209a565b9150620020e5602084016200209a565b90509250929050565b600181811c908216806200210357607f821691505b602082108114156200212557634e487b7160e01b600052602260045260246000fd5b50919050565b6142f1806200213b6000396000f3fe6080604052600436106102185760003560e01c806346d973581161012357806395d89b41116100ab578063ac4460021161006f578063ac44600214610637578063b88d4fde1461063f578063c87b56dd1461065f578063e985e9c51461067f578063f2fde38b146106c857600080fd5b806395d89b41146105b75780639cd09370146105cc578063a22cb465146105e1578063a56dfe4a14610601578063a6bc9f811461061757600080fd5b806356ac15da116100f257806356ac15da146105175780636352211e1461054457806370a0823114610564578063715018a6146105845780638da5cb5b1461059957600080fd5b806346d97358146104945780634c157a8a146104b45780634df7e3d0146104e157806355f804b3146104f757600080fd5b806318160ddd116101a657806330f496571161017557806330f49657146103da57806335c8863e146103fa5780633950d6531461042757806342842e0e1461045457806342966c681461047457600080fd5b806318160ddd1461036a57806319c57e8e1461038057806323b872dd1461039a5780632f745c59146103ba57600080fd5b8063095ea7b3116101ed578063095ea7b3146102da5780630c55699c146102fc5780630dbe671f146103125780630ec43abe14610328578063112b01841461033d57600080fd5b806123d01461021d57806301ffc9a71461025057806306fdde0314610280578063081812fc146102a2575b600080fd5b34801561022957600080fd5b5061023d6102383660046137bb565b6106e8565b6040519081526020015b60405180910390f35b34801561025c57600080fd5b5061027061026b3660046136fe565b610736565b6040519015158152602001610247565b34801561028c57600080fd5b50610295610741565b6040516102479190613fb5565b3480156102ae57600080fd5b506102c26102bd3660046137a3565b6107d3565b6040516001600160a01b039091168152602001610247565b3480156102e657600080fd5b506102fa6102f536600461362b565b61086d565b005b34801561030857600080fd5b5061023d60115481565b34801561031e57600080fd5b5061023d600f5481565b34801561033457600080fd5b506102fa610983565b34801561034957600080fd5b5061023d6103583660046137a3565b600e6020526000908152604090205481565b34801561037657600080fd5b5061023d60135481565b34801561038c57600080fd5b506014546102709060ff1681565b3480156103a657600080fd5b506102fa6103b53660046134fb565b6109da565b3480156103c657600080fd5b5061023d6103d536600461362b565b610a56565b3480156103e657600080fd5b506102fa6103f53660046137a3565b610aec565b34801561040657600080fd5b5061023d6104153660046137a3565b600b6020526000908152604090205481565b34801561043357600080fd5b5061023d6104423660046137a3565b600d6020526000908152604090205481565b34801561046057600080fd5b506102fa61046f3660046134fb565b610ec9565b34801561048057600080fd5b506102fa61048f3660046137a3565b610ee4565b3480156104a057600080fd5b506102fa6104af3660046137dd565b610f6b565b3480156104c057600080fd5b506104d46104cf366004613656565b610fc7565b6040516102479190613f64565b3480156104ed57600080fd5b5061023d60105481565b34801561050357600080fd5b506102fa610512366004613736565b611123565b34801561052357600080fd5b5061023d6105323660046137a3565b600c6020526000908152604090205481565b34801561055057600080fd5b506102c261055f3660046137a3565b611177565b34801561057057600080fd5b5061023d61057f36600461348b565b6111ee565b34801561059057600080fd5b506102fa611275565b3480156105a557600080fd5b506000546001600160a01b03166102c2565b3480156105c357600080fd5b506102956112c9565b3480156105d857600080fd5b506102fa6112d8565b3480156105ed57600080fd5b506102fa6105fc3660046135f7565b61132c565b34801561060d57600080fd5b5061023d60125481565b34801561062357600080fd5b506102fa610632366004613656565b6113f1565b6102fa6114a0565b34801561064b57600080fd5b506102fa61065a36600461353b565b611580565b34801561066b57600080fd5b5061029561067a3660046137a3565b611602565b34801561068b57600080fd5b5061027061069a3660046134c3565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156106d457600080fd5b506102fa6106e336600461348b565b61181d565b6000811561071257601254836011546107019190614025565b61070b9190613ff9565b9050610730565b60105483600f546107239190614025565b61072d9190613ff9565b90505b92915050565b6000610730826118dc565b60606001805461075090614087565b80601f016020809104026020016040519081016040528092919081815260200182805461077c90614087565b80156107c95780601f1061079e576101008083540402835291602001916107c9565b820191906000526020600020905b8154815290600101906020018083116107ac57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166108515760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061087882611177565b9050806001600160a01b0316836001600160a01b031614156108e65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610848565b336001600160a01b03821614806109025750610902813361069a565b6109745760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610848565b61097e838361192c565b505050565b6000546001600160a01b031633146109cb5760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6014805460ff19166001179055565b6109e5335b8261199a565b610a4b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610848565b61097e838383611a91565b6000610a61836111ee565b8210610ac35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610848565b506001600160a01b03919091166000908152601560209081526040808320938352929052205490565b60026007541415610b3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610848565b600260075580610b915760405162461bcd60e51b815260206004820152601060248201527f546f6b656e20494420696e76616c6964000000000000000000000000000000006044820152606401610848565b610b9a81611c3c565b15610c66576009546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610be357600080fd5b505afa158015610bf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1b91906134a7565b6001600160a01b031614610c615760405162461bcd60e51b815260206004820152600d60248201526c135d5cdd081bdddb881b1bdbdd609a1b6044820152606401610848565b610d84565b60145460ff16610cc25760405162461bcd60e51b815260206004820152602160248201527f4d4c6f6f7420756e62756e646c65206e6f742079657420737570706f727465646044820152601760f91b6064820152608401610848565b600a546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610d0657600080fd5b505afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e91906134a7565b6001600160a01b031614610d845760405162461bcd60e51b815260206004820152600d60248201526c135d5cdd081bdddb881b1bdbdd609a1b6044820152606401610848565b6000818152600b6020908152604080832054600c9092529091205443908215610e13576000610db68261023887611c3c565b905080610dc38585614044565b1015610e115760405162461bcd60e51b815260206004820152601560248201527f4c6f6f74206e6f74206f666620636f6f6c646f776e00000000000000000000006044820152606401610848565b505b6000610e1e60085490565b9050610e2c60083383611c50565b610e37600086611ea0565b610e42600186611ea0565b610e4d600286611ea0565b610e58600386611ea0565b610e63600486611ea0565b610e6e600586611ea0565b610e79600686611ea0565b610e84600786611ea0565b610e8f826001613ff9565b6000868152600c6020908152604080832093909355600b905220839055601354610eba906008613ff9565b60135550506001600755505050565b61097e83838360405180602001604052806000815250611580565b610eed336109df565b610f5f5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610848565b610f6881611efa565b50565b6000546001600160a01b03163314610fb35760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b600f93909355601091909155601155601255565b60606000825167ffffffffffffffff811115610ff357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561103857816020015b60408051808201909152600080825260208201528152602001906001900390816110115790505b5090504360005b845181101561111a57600085828151811061106a57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000818152600b8352604080822054600c909452902054909250600182156110c15760006110a78361023887611c3c565b9050806110b48589614044565b10156110bf57600091505b505b60405180604001604052808581526020018215158152508786815181106110f857634e487b7160e01b600052603260045260246000fd5b6020026020010181905250505050508080611112906140c2565b91505061103f565b50909392505050565b6000546001600160a01b0316331461116b5760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b61097e602283836133a1565b6000818152600360205260408120546001600160a01b0316806107305760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610848565b60006001600160a01b0382166112595760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610848565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146112bd5760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6112c76000611fa1565b565b60606002805461075090614087565b6000546001600160a01b031633146113205760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6014805460ff19169055565b6001600160a01b0382163314156113855760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610848565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600260075414156114445760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610848565b600260075560005b81518110156114975761148582828151811061147857634e487b7160e01b600052603260045260246000fd5b6020026020010151610aec565b8061148f816140c2565b91505061144c565b50506001600755565b6000546001600160a01b031633146114e85760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b604051600090339047908381818185875af1925050503d806000811461152a576040519150601f19603f3d011682016040523d82523d6000602084013e61152f565b606091505b5050905080610f685760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610848565b61158a338361199a565b6115f05760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610848565b6115fc84848484611ff1565b50505050565b6060811580611612575060135482115b1561162b57505060408051602081019091526000815290565b6000828152600d6020908152604080832054600e835281842054825180840190935260018352601160f91b93830193909352929061166c908490849061206f565b9050600061167983611c3c565b905060006116868561210a565b6116aa8686604051806040016040528060018152602001602760f81b81525061206f565b6040516020016116bb929190613abe565b60405160208183030381529060405290506116d4613425565b60405180610120016040528060fd815260200161415f60fd913981526020808201858152604080518082018252600d81526c1e17ba32bc3a1f1e17b9bb339f60991b8185015281850181905284519251915160009461173694939291016138a1565b604051602081830303815290604052905060006117a06117708989604051806040016040528060018152602001602760f81b81525061206f565b8561177a85612250565b60405160200161178c93929190613d7c565b604051602081830303815290604052612250565b905084156117ee576117eb6117cf8989604051806040016040528060018152602001602760f81b81525061206f565b856117d985612250565b60405160200161178c93929190613b3e565b90505b806040516020016117ff9190613eed565b60408051601f198184030181529190529a9950505050505050505050565b6000546001600160a01b031633146118655760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6001600160a01b0381166118ca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610848565b610f6881611fa1565b80546001019055565b60006001600160e01b031982166380ac58cd60e01b148061190d57506001600160e01b03198216635b5e139f60e01b145b8061073057506301ffc9a760e01b6001600160e01b0319831614610730565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061196182611177565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b0316611a135760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610848565b6000611a1e83611177565b9050806001600160a01b0316846001600160a01b03161480611a595750836001600160a01b0316611a4e846107d3565b6001600160a01b0316145b80611a8957506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611aa482611177565b6001600160a01b031614611b0c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610848565b6001600160a01b038216611b6e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610848565b611b798383836123c4565b611b8460008261192c565b6001600160a01b0383166000908152600460205260408120805460019290611bad908490614044565b90915550506001600160a01b0382166000908152600460205260408120805460019290611bdb908490613ff9565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008082118015610730575050611f411190565b60008311611ca05760405162461bcd60e51b815260206004820181905260248201527f6e756d546f6b656e73206d7573742062652067726561746572207468616e20306044820152606401610848565b6001600160a01b038216611cf65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610848565b611d036000838386612438565b60005b83811015611e6d576000611d1a8284613ff9565b6000818152600360205260409020549091506001600160a01b031615611d825760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610848565b60008181526003602052604080822080546001600160a01b0319166001600160a01b03881690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611df360008583604051806020016040528060008152506124e1565b611e5a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610848565b5080611e65816140c2565b915050611d06565b506001600160a01b03821660009081526004602052604081208054859290611e96908490613ff9565b9091555050505050565b6000611eab60085490565b9050611ebb600880546001019055565b826007811115611edb57634e487b7160e01b600052602160045260246000fd5b6000918252600d6020908152604080842092909255600e905290205550565b6000611f0582611177565b9050611f13816000846123c4565b611f1e60008361192c565b6001600160a01b0381166000908152600460205260408120805460019290611f47908490614044565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611ffc848484611a91565b612008848484846124e1565b6115fc5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610848565b606083612087576120808383612639565b9050612103565b836001141561209a576120808383612736565b83600214156120ad576120808383612828565b83600314156120c0576120808383612919565b83600414156120d3576120808383612a0b565b83600514156120e6576120808383612afc565b83600614156120f9576120808383612bed565b6120808383612cde565b9392505050565b6060816121335750506040805180820190915260068152652bb2b0b837b760d11b602082015290565b816001141561215d57505060408051808201909152600581526410da195cdd60da1b602082015290565b81600214156121865750506040805180820190915260048152631219585960e21b602082015290565b81600314156121b057505060408051808201909152600581526415d85a5cdd60da1b602082015290565b81600414156121d9575050604080518082019091526004815263119bdbdd60e21b602082015290565b816005141561220257505060408051808201909152600481526312185b9960e21b602082015290565b816006141561222b5750506040805180820190915260048152634e65636b60e01b602082015290565b505060408051808201909152600481526352696e6760e01b602082015290565b919050565b805160609080612270575050604080516020810190915260008152919050565b6000600361227f836002613ff9565b6122899190614011565b612294906004614025565b905060006122a3826020613ff9565b67ffffffffffffffff8111156122c957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156122f3576020820181803683370190505b509050600060405180606001604052806040815260200161425c604091399050600181016020830160005b8681101561237f576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161231e565b50600386066001811461239957600281146123aa576123b6565b613d3d60f01b6001198301526123b6565b603d60f81b6000198301525b505050918152949350505050565b6001600160a01b038316158015906123ee5750816001600160a01b0316836001600160a01b031614155b156123fd576123fd8382612dcf565b6001600160a01b038216158015906124275750826001600160a01b0316826001600160a01b031614155b1561097e5761097e82826001612e6c565b60005b818110156124a657612452858561097e8487613ff9565b6001600160a01b0385161580159061247c5750836001600160a01b0316856001600160a01b031614155b15612494576124948561248f8386613ff9565b612dcf565b8061249e816140c2565b91505061243b565b506001600160a01b038316158015906124d15750836001600160a01b0316836001600160a01b031614155b156115fc576115fc838383612e6c565b60006001600160a01b0384163b1561262e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612525903390899088908890600401613f32565b602060405180830381600087803b15801561253f57600080fd5b505af192505050801561256f575060408051601f3d908101601f1916820190925261256c9181019061371a565b60015b612614573d80801561259d576040519150601f19603f3d011682016040523d82523d6000602084013e6125a2565b606091505b50805161260c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610848565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a89565b506001949350505050565b606061072d83604051806040016040528060068152602001652ba2a0a827a760d11b8152506017805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461269f90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546126cb90614087565b80156127185780601f106126ed57610100808354040283529160200191612718565b820191906000526020600020905b8154815290600101906020018083116126fb57829003601f168201915b505050505081526020019060010190612680565b5050505085612f04565b606061072d836040518060400160405280600581526020016410d21154d560da1b8152506018805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461279b90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546127c790614087565b80156128145780601f106127e957610100808354040283529160200191612814565b820191906000526020600020905b8154815290600101906020018083116127f757829003601f168201915b50505050508152602001906001019061277c565b606061072d83604051806040016040528060048152602001631211505160e21b8152506019805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461288c90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546128b890614087565b80156129055780601f106128da57610100808354040283529160200191612905565b820191906000526020600020905b8154815290600101906020018083116128e857829003601f168201915b50505050508152602001906001019061286d565b606061072d836040518060400160405280600581526020016415d05254d560da1b815250601a805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461297e90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546129aa90614087565b80156129f75780601f106129cc576101008083540402835291602001916129f7565b820191906000526020600020905b8154815290600101906020018083116129da57829003601f168201915b50505050508152602001906001019061295f565b606061072d83604051806040016040528060048152602001631193d3d560e21b815250601b805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612a6f90614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612a9b90614087565b8015612ae85780601f10612abd57610100808354040283529160200191612ae8565b820191906000526020600020905b815481529060010190602001808311612acb57829003601f168201915b505050505081526020019060010190612a50565b606061072d83604051806040016040528060048152602001631210539160e21b815250601c805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612b6090614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612b8c90614087565b8015612bd95780601f10612bae57610100808354040283529160200191612bd9565b820191906000526020600020905b815481529060010190602001808311612bbc57829003601f168201915b505050505081526020019060010190612b41565b606061072d83604051806040016040528060048152602001634e45434b60e01b815250601d805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612c5190614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612c7d90614087565b8015612cca5780601f10612c9f57610100808354040283529160200191612cca565b820191906000526020600020905b815481529060010190602001808311612cad57829003601f168201915b505050505081526020019060010190612c32565b606061072d836040518060400160405280600481526020016352494e4760e01b815250601e805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612d4290614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612d6e90614087565b8015612dbb5780601f10612d9057610100808354040283529160200191612dbb565b820191906000526020600020905b815481529060010190602001808311612d9e57829003601f168201915b505050505081526020019060010190612d23565b60006001612ddc846111ee565b612de69190614044565b600083815260166020526040902054909150808214612e39576001600160a01b03841660009081526015602090815260408083208584528252808320548484528184208190558352601690915290208190555b5060009182526016602090815260408084208490556001600160a01b039094168352601581528383209183525290812055565b6000612e77846111ee565b905060005b82811015612efd57612e8e8185613ff9565b6001600160a01b038616600090815260156020526040812090612eb18486613ff9565b8152602081019190915260400160002055612ecc8183613ff9565b60166000612eda8488613ff9565b815260208101919091526040016000205580612ef5816140c2565b915050612e7c565b5050505050565b60606000612f3a85612f158861323e565b604051602001612f26929190613872565b604051602081830303815290604052613370565b9050600084855183612f4c91906140dd565b81518110612f6a57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000601583612f8391906140dd565b9050600e811115612fea57601f8054839190612f9f90866140dd565b81548110612fbd57634e487b7160e01b600052603260045260246000fd5b90600052602060002001604051602001612fd8929190613a00565b60405160208183030381529060405291505b6013811061323357612ffa61344d565b6020805461300890866140dd565b8154811061302657634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461303b90614087565b80601f016020809104026020016040519081016040528092919081815260200182805461306790614087565b80156130b45780601f10613089576101008083540402835291602001916130b4565b820191906000526020600020905b81548152906001019060200180831161309757829003601f168201915b5050505050816000600281106130da57634e487b7160e01b600052603260045260246000fd5b6020020152602180546130ed90866140dd565b8154811061310b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461312090614087565b80601f016020809104026020016040519081016040528092919081815260200182805461314c90614087565b80156131995780601f1061316e57610100808354040283529160200191613199565b820191906000526020600020905b81548152906001019060200180831161317c57829003601f168201915b5050505050816001600281106131bf57634e487b7160e01b600052603260045260246000fd5b602002015260138214156132015780516020808301516040516131eb938a9390929184918991016138e4565b6040516020818303038152906040529250613231565b805160208083015160405161321f938a93909291849189910161396a565b60405160208183030381529060405292505b505b509695505050505050565b6060816132625750506040805180820190915260018152600360fc1b602082015290565b8160005b811561328c5780613276816140c2565b91506132859050600a83614011565b9150613266565b60008167ffffffffffffffff8111156132b557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156132df576020820181803683370190505b5090505b8415611a89576132f4600183614044565b9150613301600a866140dd565b61330c906030613ff9565b60f81b81838151811061332f57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613369600a86614011565b94506132e3565b6000816040516020016133839190613856565b60408051601f19818403018152919052805160209091012092915050565b8280546133ad90614087565b90600052602060002090601f0160209004810192826133cf5760008555613415565b82601f106133e85782800160ff19823516178555613415565b82800160010185558215613415579182015b828111156134155782358255916020019190600101906133fa565b50613421929150613466565b5090565b6040518061022001604052806011905b60608152602001906001900390816134355790505090565b6040805180820190915260608152600160208201613435565b5b808211156134215760008155600101613467565b8035801515811461224b57600080fd5b60006020828403121561349c578081fd5b813561210381614133565b6000602082840312156134b8578081fd5b815161210381614133565b600080604083850312156134d5578081fd5b82356134e081614133565b915060208301356134f081614133565b809150509250929050565b60008060006060848603121561350f578081fd5b833561351a81614133565b9250602084013561352a81614133565b929592945050506040919091013590565b60008060008060808587031215613550578081fd5b843561355b81614133565b935060208581013561356c81614133565b935060408601359250606086013567ffffffffffffffff8082111561358f578384fd5b818801915088601f8301126135a2578384fd5b8135818111156135b4576135b461411d565b6135c6601f8201601f19168501613fc8565b915080825289848285010111156135db578485fd5b8084840185840137810190920192909252939692955090935050565b60008060408385031215613609578182fd5b823561361481614133565b91506136226020840161347b565b90509250929050565b6000806040838503121561363d578182fd5b823561364881614133565b946020939093013593505050565b60006020808385031215613668578182fd5b823567ffffffffffffffff8082111561367f578384fd5b818501915085601f830112613692578384fd5b8135818111156136a4576136a461411d565b8060051b91506136b5848301613fc8565b8181528481019084860184860187018a10156136cf578788fd5b8795505b838610156136f15780358352600195909501949186019186016136d3565b5098975050505050505050565b60006020828403121561370f578081fd5b813561210381614148565b60006020828403121561372b578081fd5b815161210381614148565b60008060208385031215613748578182fd5b823567ffffffffffffffff8082111561375f578384fd5b818501915085601f830112613772578384fd5b813581811115613780578485fd5b866020828501011115613791578485fd5b60209290920196919550909350505050565b6000602082840312156137b4578081fd5b5035919050565b600080604083850312156137cd578182fd5b823591506136226020840161347b565b600080600080608085870312156137f2578182fd5b5050823594602084013594506040840135936060013592509050565b6000815180845261382681602086016020860161405b565b601f01601f19169290920160200192915050565b6000815161384c81856020860161405b565b9290920192915050565b6000825161386881846020870161405b565b9190910192915050565b6000835161388481846020880161405b565b83519083019061389881836020880161405b565b01949350505050565b600084516138b381846020890161405b565b8451908301906138c781836020890161405b565b84519101906138da81836020880161405b565b0195945050505050565b600086516138f6818460208b0161405b565b86519083019061390a818360208b0161405b565b600160fd1b9101818152865190919061392a816001850160208b0161405b565b8651920191613940816001850160208a0161405b565b6001920191820152835161395b81600284016020880161405b565b01600201979650505050505050565b6000865161397c818460208b0161405b565b865190830190613990818360208b0161405b565b600160fd1b910181815286519091906139b0816001850160208b0161405b565b86519201916139c6816001850160208a0161405b565b600192019182015283516139e181600284016020880161405b565b62202b3160e81b60029290910191820152600501979650505050505050565b600083516020613a13828583890161405b565b600160fd1b9184019182528454600190849080831c81841680613a3757607f821691505b858210811415613a5557634e487b7160e01b88526022600452602488fd5b808015613a695760018114613a7e57613aae565b60ff1984168887015282880186019450613aae565b60008b815260209020895b84811015613aa45781548a8201890152908701908801613a89565b5050858389010194505b50929a9950505050505050505050565b7f7b2274726169745f74797065223a202200000000000000000000000000000000815260008351613af681601085016020880161405b565b6c111610113b30b63ab2911d101160991b6010918401918201528351613b2381601d84016020880161405b565b61227d60f01b601d9290910191820152601f01949350505050565b693d913730b6b2911d101160b11b81528351600090613b6481600a85016020890161405b565b7f222c20226465736372697074696f6e223a20224c6f6f74204974656d73206172600a918401918201527f6520696e646976696475616c206974656d732066726f6d2061204c6f6f742042602a8201527f6167206f72206d4c6f6f742042616720726570726573656e7465642061732045604a8201527f524337323120746f6b656e732e2053746174732c20696d616765732c20616e64606a8201527f206f746865722066756e6374696f6e616c6974792061726520696e74656e7469608a8201527f6f6e616c6c79206f6d697474656420666f72206f746865727320746f20696e7460aa8201527f6572707265742e204665656c206672656520746f20757365204c6f6f7420497460ca8201527f656d7320696e20616e792077617920796f752077616e742e222c20226174747260ea82015269696275746573223a205b60b01b61010a820152613d72613d64613d5e613d25613cd6613cc961011487018b61383a565b600b60fa1b815260010190565b7f7b2274726169745f74797065223a202245646974696f6e222c202276616c756581527f223a20224f726967696e616c227d0000000000000000000000000000000000006020820152602e0190565b7f5d2c2022696d616765223a2022646174613a696d6167652f7376672b786d6c3b81526618985cd94d8d0b60ca1b602082015260270190565b8661383a565b61227d60f01b815260020190565b9695505050505050565b693d913730b6b2911d101160b11b81528351600090613da281600a85016020890161405b565b7f222c20226465736372697074696f6e223a20224c6f6f74204974656d73206172600a918401918201527f6520696e646976696475616c206974656d732066726f6d2061204c6f6f742042602a8201527f616720726570726573656e7465642061732045524337323120746f6b656e732e604a8201527f2053746174732c20696d616765732c20616e64206f746865722066756e637469606a8201527f6f6e616c6974792061726520696e74656e74696f6e616c6c79206f6d69747465608a8201527f6420666f72206f746865727320746f20696e746572707265742e204665656c2060aa8201527f6672656520746f20757365204c6f6f74204974656d7320696e20616e7920776160ca8201527f7920796f752077616e742e222c202261747472696275746573223a205b00000060ea820152613d72613d64613d5e613d2561010785018961383a565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613f2581601d85016020870161405b565b91909101601d0192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d72608083018461380e565b602080825282518282018190526000919060409081850190868401855b82811015613fa8578151805185528601511515868501529284019290850190600101613f81565b5091979650505050505050565b60208152600061072d602083018461380e565b604051601f8201601f1916810167ffffffffffffffff81118282101715613ff157613ff161411d565b604052919050565b6000821982111561400c5761400c6140f1565b500190565b60008261402057614020614107565b500490565b600081600019048311821515161561403f5761403f6140f1565b500290565b600082821015614056576140566140f1565b500390565b60005b8381101561407657818101518382015260200161405e565b838111156115fc5750506000910152565b600181811c9082168061409b57607f821691505b602082108114156140bc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156140d6576140d66140f1565b5060010190565b6000826140ec576140ec614107565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610f6857600080fd5b6001600160e01b031981168114610f6857600080fdfe3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220399487d49667905afe0b78d1ad52b97042eb5cc7b173584bbfae373db12221f064736f6c63430008040033000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d70000000000000000000000001dfe7ca09e99d10835bf73044a23b73fc20623df

Deployed Bytecode

0x6080604052600436106102185760003560e01c806346d973581161012357806395d89b41116100ab578063ac4460021161006f578063ac44600214610637578063b88d4fde1461063f578063c87b56dd1461065f578063e985e9c51461067f578063f2fde38b146106c857600080fd5b806395d89b41146105b75780639cd09370146105cc578063a22cb465146105e1578063a56dfe4a14610601578063a6bc9f811461061757600080fd5b806356ac15da116100f257806356ac15da146105175780636352211e1461054457806370a0823114610564578063715018a6146105845780638da5cb5b1461059957600080fd5b806346d97358146104945780634c157a8a146104b45780634df7e3d0146104e157806355f804b3146104f757600080fd5b806318160ddd116101a657806330f496571161017557806330f49657146103da57806335c8863e146103fa5780633950d6531461042757806342842e0e1461045457806342966c681461047457600080fd5b806318160ddd1461036a57806319c57e8e1461038057806323b872dd1461039a5780632f745c59146103ba57600080fd5b8063095ea7b3116101ed578063095ea7b3146102da5780630c55699c146102fc5780630dbe671f146103125780630ec43abe14610328578063112b01841461033d57600080fd5b806123d01461021d57806301ffc9a71461025057806306fdde0314610280578063081812fc146102a2575b600080fd5b34801561022957600080fd5b5061023d6102383660046137bb565b6106e8565b6040519081526020015b60405180910390f35b34801561025c57600080fd5b5061027061026b3660046136fe565b610736565b6040519015158152602001610247565b34801561028c57600080fd5b50610295610741565b6040516102479190613fb5565b3480156102ae57600080fd5b506102c26102bd3660046137a3565b6107d3565b6040516001600160a01b039091168152602001610247565b3480156102e657600080fd5b506102fa6102f536600461362b565b61086d565b005b34801561030857600080fd5b5061023d60115481565b34801561031e57600080fd5b5061023d600f5481565b34801561033457600080fd5b506102fa610983565b34801561034957600080fd5b5061023d6103583660046137a3565b600e6020526000908152604090205481565b34801561037657600080fd5b5061023d60135481565b34801561038c57600080fd5b506014546102709060ff1681565b3480156103a657600080fd5b506102fa6103b53660046134fb565b6109da565b3480156103c657600080fd5b5061023d6103d536600461362b565b610a56565b3480156103e657600080fd5b506102fa6103f53660046137a3565b610aec565b34801561040657600080fd5b5061023d6104153660046137a3565b600b6020526000908152604090205481565b34801561043357600080fd5b5061023d6104423660046137a3565b600d6020526000908152604090205481565b34801561046057600080fd5b506102fa61046f3660046134fb565b610ec9565b34801561048057600080fd5b506102fa61048f3660046137a3565b610ee4565b3480156104a057600080fd5b506102fa6104af3660046137dd565b610f6b565b3480156104c057600080fd5b506104d46104cf366004613656565b610fc7565b6040516102479190613f64565b3480156104ed57600080fd5b5061023d60105481565b34801561050357600080fd5b506102fa610512366004613736565b611123565b34801561052357600080fd5b5061023d6105323660046137a3565b600c6020526000908152604090205481565b34801561055057600080fd5b506102c261055f3660046137a3565b611177565b34801561057057600080fd5b5061023d61057f36600461348b565b6111ee565b34801561059057600080fd5b506102fa611275565b3480156105a557600080fd5b506000546001600160a01b03166102c2565b3480156105c357600080fd5b506102956112c9565b3480156105d857600080fd5b506102fa6112d8565b3480156105ed57600080fd5b506102fa6105fc3660046135f7565b61132c565b34801561060d57600080fd5b5061023d60125481565b34801561062357600080fd5b506102fa610632366004613656565b6113f1565b6102fa6114a0565b34801561064b57600080fd5b506102fa61065a36600461353b565b611580565b34801561066b57600080fd5b5061029561067a3660046137a3565b611602565b34801561068b57600080fd5b5061027061069a3660046134c3565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156106d457600080fd5b506102fa6106e336600461348b565b61181d565b6000811561071257601254836011546107019190614025565b61070b9190613ff9565b9050610730565b60105483600f546107239190614025565b61072d9190613ff9565b90505b92915050565b6000610730826118dc565b60606001805461075090614087565b80601f016020809104026020016040519081016040528092919081815260200182805461077c90614087565b80156107c95780601f1061079e576101008083540402835291602001916107c9565b820191906000526020600020905b8154815290600101906020018083116107ac57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166108515760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061087882611177565b9050806001600160a01b0316836001600160a01b031614156108e65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610848565b336001600160a01b03821614806109025750610902813361069a565b6109745760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610848565b61097e838361192c565b505050565b6000546001600160a01b031633146109cb5760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6014805460ff19166001179055565b6109e5335b8261199a565b610a4b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610848565b61097e838383611a91565b6000610a61836111ee565b8210610ac35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610848565b506001600160a01b03919091166000908152601560209081526040808320938352929052205490565b60026007541415610b3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610848565b600260075580610b915760405162461bcd60e51b815260206004820152601060248201527f546f6b656e20494420696e76616c6964000000000000000000000000000000006044820152606401610848565b610b9a81611c3c565b15610c66576009546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610be357600080fd5b505afa158015610bf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1b91906134a7565b6001600160a01b031614610c615760405162461bcd60e51b815260206004820152600d60248201526c135d5cdd081bdddb881b1bdbdd609a1b6044820152606401610848565b610d84565b60145460ff16610cc25760405162461bcd60e51b815260206004820152602160248201527f4d4c6f6f7420756e62756e646c65206e6f742079657420737570706f727465646044820152601760f91b6064820152608401610848565b600a546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610d0657600080fd5b505afa158015610d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3e91906134a7565b6001600160a01b031614610d845760405162461bcd60e51b815260206004820152600d60248201526c135d5cdd081bdddb881b1bdbdd609a1b6044820152606401610848565b6000818152600b6020908152604080832054600c9092529091205443908215610e13576000610db68261023887611c3c565b905080610dc38585614044565b1015610e115760405162461bcd60e51b815260206004820152601560248201527f4c6f6f74206e6f74206f666620636f6f6c646f776e00000000000000000000006044820152606401610848565b505b6000610e1e60085490565b9050610e2c60083383611c50565b610e37600086611ea0565b610e42600186611ea0565b610e4d600286611ea0565b610e58600386611ea0565b610e63600486611ea0565b610e6e600586611ea0565b610e79600686611ea0565b610e84600786611ea0565b610e8f826001613ff9565b6000868152600c6020908152604080832093909355600b905220839055601354610eba906008613ff9565b60135550506001600755505050565b61097e83838360405180602001604052806000815250611580565b610eed336109df565b610f5f5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610848565b610f6881611efa565b50565b6000546001600160a01b03163314610fb35760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b600f93909355601091909155601155601255565b60606000825167ffffffffffffffff811115610ff357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561103857816020015b60408051808201909152600080825260208201528152602001906001900390816110115790505b5090504360005b845181101561111a57600085828151811061106a57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000818152600b8352604080822054600c909452902054909250600182156110c15760006110a78361023887611c3c565b9050806110b48589614044565b10156110bf57600091505b505b60405180604001604052808581526020018215158152508786815181106110f857634e487b7160e01b600052603260045260246000fd5b6020026020010181905250505050508080611112906140c2565b91505061103f565b50909392505050565b6000546001600160a01b0316331461116b5760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b61097e602283836133a1565b6000818152600360205260408120546001600160a01b0316806107305760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610848565b60006001600160a01b0382166112595760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610848565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146112bd5760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6112c76000611fa1565b565b60606002805461075090614087565b6000546001600160a01b031633146113205760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6014805460ff19169055565b6001600160a01b0382163314156113855760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610848565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600260075414156114445760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610848565b600260075560005b81518110156114975761148582828151811061147857634e487b7160e01b600052603260045260246000fd5b6020026020010151610aec565b8061148f816140c2565b91505061144c565b50506001600755565b6000546001600160a01b031633146114e85760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b604051600090339047908381818185875af1925050503d806000811461152a576040519150601f19603f3d011682016040523d82523d6000602084013e61152f565b606091505b5050905080610f685760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610848565b61158a338361199a565b6115f05760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608401610848565b6115fc84848484611ff1565b50505050565b6060811580611612575060135482115b1561162b57505060408051602081019091526000815290565b6000828152600d6020908152604080832054600e835281842054825180840190935260018352601160f91b93830193909352929061166c908490849061206f565b9050600061167983611c3c565b905060006116868561210a565b6116aa8686604051806040016040528060018152602001602760f81b81525061206f565b6040516020016116bb929190613abe565b60405160208183030381529060405290506116d4613425565b60405180610120016040528060fd815260200161415f60fd913981526020808201858152604080518082018252600d81526c1e17ba32bc3a1f1e17b9bb339f60991b8185015281850181905284519251915160009461173694939291016138a1565b604051602081830303815290604052905060006117a06117708989604051806040016040528060018152602001602760f81b81525061206f565b8561177a85612250565b60405160200161178c93929190613d7c565b604051602081830303815290604052612250565b905084156117ee576117eb6117cf8989604051806040016040528060018152602001602760f81b81525061206f565b856117d985612250565b60405160200161178c93929190613b3e565b90505b806040516020016117ff9190613eed565b60408051601f198184030181529190529a9950505050505050505050565b6000546001600160a01b031633146118655760405162461bcd60e51b8152602060048201819052602482015260008051602061429c8339815191526044820152606401610848565b6001600160a01b0381166118ca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610848565b610f6881611fa1565b80546001019055565b60006001600160e01b031982166380ac58cd60e01b148061190d57506001600160e01b03198216635b5e139f60e01b145b8061073057506301ffc9a760e01b6001600160e01b0319831614610730565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061196182611177565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b0316611a135760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610848565b6000611a1e83611177565b9050806001600160a01b0316846001600160a01b03161480611a595750836001600160a01b0316611a4e846107d3565b6001600160a01b0316145b80611a8957506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611aa482611177565b6001600160a01b031614611b0c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610848565b6001600160a01b038216611b6e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610848565b611b798383836123c4565b611b8460008261192c565b6001600160a01b0383166000908152600460205260408120805460019290611bad908490614044565b90915550506001600160a01b0382166000908152600460205260408120805460019290611bdb908490613ff9565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008082118015610730575050611f411190565b60008311611ca05760405162461bcd60e51b815260206004820181905260248201527f6e756d546f6b656e73206d7573742062652067726561746572207468616e20306044820152606401610848565b6001600160a01b038216611cf65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610848565b611d036000838386612438565b60005b83811015611e6d576000611d1a8284613ff9565b6000818152600360205260409020549091506001600160a01b031615611d825760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610848565b60008181526003602052604080822080546001600160a01b0319166001600160a01b03881690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611df360008583604051806020016040528060008152506124e1565b611e5a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610848565b5080611e65816140c2565b915050611d06565b506001600160a01b03821660009081526004602052604081208054859290611e96908490613ff9565b9091555050505050565b6000611eab60085490565b9050611ebb600880546001019055565b826007811115611edb57634e487b7160e01b600052602160045260246000fd5b6000918252600d6020908152604080842092909255600e905290205550565b6000611f0582611177565b9050611f13816000846123c4565b611f1e60008361192c565b6001600160a01b0381166000908152600460205260408120805460019290611f47908490614044565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611ffc848484611a91565b612008848484846124e1565b6115fc5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610848565b606083612087576120808383612639565b9050612103565b836001141561209a576120808383612736565b83600214156120ad576120808383612828565b83600314156120c0576120808383612919565b83600414156120d3576120808383612a0b565b83600514156120e6576120808383612afc565b83600614156120f9576120808383612bed565b6120808383612cde565b9392505050565b6060816121335750506040805180820190915260068152652bb2b0b837b760d11b602082015290565b816001141561215d57505060408051808201909152600581526410da195cdd60da1b602082015290565b81600214156121865750506040805180820190915260048152631219585960e21b602082015290565b81600314156121b057505060408051808201909152600581526415d85a5cdd60da1b602082015290565b81600414156121d9575050604080518082019091526004815263119bdbdd60e21b602082015290565b816005141561220257505060408051808201909152600481526312185b9960e21b602082015290565b816006141561222b5750506040805180820190915260048152634e65636b60e01b602082015290565b505060408051808201909152600481526352696e6760e01b602082015290565b919050565b805160609080612270575050604080516020810190915260008152919050565b6000600361227f836002613ff9565b6122899190614011565b612294906004614025565b905060006122a3826020613ff9565b67ffffffffffffffff8111156122c957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156122f3576020820181803683370190505b509050600060405180606001604052806040815260200161425c604091399050600181016020830160005b8681101561237f576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161231e565b50600386066001811461239957600281146123aa576123b6565b613d3d60f01b6001198301526123b6565b603d60f81b6000198301525b505050918152949350505050565b6001600160a01b038316158015906123ee5750816001600160a01b0316836001600160a01b031614155b156123fd576123fd8382612dcf565b6001600160a01b038216158015906124275750826001600160a01b0316826001600160a01b031614155b1561097e5761097e82826001612e6c565b60005b818110156124a657612452858561097e8487613ff9565b6001600160a01b0385161580159061247c5750836001600160a01b0316856001600160a01b031614155b15612494576124948561248f8386613ff9565b612dcf565b8061249e816140c2565b91505061243b565b506001600160a01b038316158015906124d15750836001600160a01b0316836001600160a01b031614155b156115fc576115fc838383612e6c565b60006001600160a01b0384163b1561262e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612525903390899088908890600401613f32565b602060405180830381600087803b15801561253f57600080fd5b505af192505050801561256f575060408051601f3d908101601f1916820190925261256c9181019061371a565b60015b612614573d80801561259d576040519150601f19603f3d011682016040523d82523d6000602084013e6125a2565b606091505b50805161260c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610848565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a89565b506001949350505050565b606061072d83604051806040016040528060068152602001652ba2a0a827a760d11b8152506017805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461269f90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546126cb90614087565b80156127185780601f106126ed57610100808354040283529160200191612718565b820191906000526020600020905b8154815290600101906020018083116126fb57829003601f168201915b505050505081526020019060010190612680565b5050505085612f04565b606061072d836040518060400160405280600581526020016410d21154d560da1b8152506018805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461279b90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546127c790614087565b80156128145780601f106127e957610100808354040283529160200191612814565b820191906000526020600020905b8154815290600101906020018083116127f757829003601f168201915b50505050508152602001906001019061277c565b606061072d83604051806040016040528060048152602001631211505160e21b8152506019805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461288c90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546128b890614087565b80156129055780601f106128da57610100808354040283529160200191612905565b820191906000526020600020905b8154815290600101906020018083116128e857829003601f168201915b50505050508152602001906001019061286d565b606061072d836040518060400160405280600581526020016415d05254d560da1b815250601a805480602002602001604051908101604052809291908181526020016000905b8282101561272c57838290600052602060002001805461297e90614087565b80601f01602080910402602001604051908101604052809291908181526020018280546129aa90614087565b80156129f75780601f106129cc576101008083540402835291602001916129f7565b820191906000526020600020905b8154815290600101906020018083116129da57829003601f168201915b50505050508152602001906001019061295f565b606061072d83604051806040016040528060048152602001631193d3d560e21b815250601b805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612a6f90614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612a9b90614087565b8015612ae85780601f10612abd57610100808354040283529160200191612ae8565b820191906000526020600020905b815481529060010190602001808311612acb57829003601f168201915b505050505081526020019060010190612a50565b606061072d83604051806040016040528060048152602001631210539160e21b815250601c805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612b6090614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612b8c90614087565b8015612bd95780601f10612bae57610100808354040283529160200191612bd9565b820191906000526020600020905b815481529060010190602001808311612bbc57829003601f168201915b505050505081526020019060010190612b41565b606061072d83604051806040016040528060048152602001634e45434b60e01b815250601d805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612c5190614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612c7d90614087565b8015612cca5780601f10612c9f57610100808354040283529160200191612cca565b820191906000526020600020905b815481529060010190602001808311612cad57829003601f168201915b505050505081526020019060010190612c32565b606061072d836040518060400160405280600481526020016352494e4760e01b815250601e805480602002602001604051908101604052809291908181526020016000905b8282101561272c578382906000526020600020018054612d4290614087565b80601f0160208091040260200160405190810160405280929190818152602001828054612d6e90614087565b8015612dbb5780601f10612d9057610100808354040283529160200191612dbb565b820191906000526020600020905b815481529060010190602001808311612d9e57829003601f168201915b505050505081526020019060010190612d23565b60006001612ddc846111ee565b612de69190614044565b600083815260166020526040902054909150808214612e39576001600160a01b03841660009081526015602090815260408083208584528252808320548484528184208190558352601690915290208190555b5060009182526016602090815260408084208490556001600160a01b039094168352601581528383209183525290812055565b6000612e77846111ee565b905060005b82811015612efd57612e8e8185613ff9565b6001600160a01b038616600090815260156020526040812090612eb18486613ff9565b8152602081019190915260400160002055612ecc8183613ff9565b60166000612eda8488613ff9565b815260208101919091526040016000205580612ef5816140c2565b915050612e7c565b5050505050565b60606000612f3a85612f158861323e565b604051602001612f26929190613872565b604051602081830303815290604052613370565b9050600084855183612f4c91906140dd565b81518110612f6a57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000601583612f8391906140dd565b9050600e811115612fea57601f8054839190612f9f90866140dd565b81548110612fbd57634e487b7160e01b600052603260045260246000fd5b90600052602060002001604051602001612fd8929190613a00565b60405160208183030381529060405291505b6013811061323357612ffa61344d565b6020805461300890866140dd565b8154811061302657634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461303b90614087565b80601f016020809104026020016040519081016040528092919081815260200182805461306790614087565b80156130b45780601f10613089576101008083540402835291602001916130b4565b820191906000526020600020905b81548152906001019060200180831161309757829003601f168201915b5050505050816000600281106130da57634e487b7160e01b600052603260045260246000fd5b6020020152602180546130ed90866140dd565b8154811061310b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461312090614087565b80601f016020809104026020016040519081016040528092919081815260200182805461314c90614087565b80156131995780601f1061316e57610100808354040283529160200191613199565b820191906000526020600020905b81548152906001019060200180831161317c57829003601f168201915b5050505050816001600281106131bf57634e487b7160e01b600052603260045260246000fd5b602002015260138214156132015780516020808301516040516131eb938a9390929184918991016138e4565b6040516020818303038152906040529250613231565b805160208083015160405161321f938a93909291849189910161396a565b60405160208183030381529060405292505b505b509695505050505050565b6060816132625750506040805180820190915260018152600360fc1b602082015290565b8160005b811561328c5780613276816140c2565b91506132859050600a83614011565b9150613266565b60008167ffffffffffffffff8111156132b557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156132df576020820181803683370190505b5090505b8415611a89576132f4600183614044565b9150613301600a866140dd565b61330c906030613ff9565b60f81b81838151811061332f57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613369600a86614011565b94506132e3565b6000816040516020016133839190613856565b60408051601f19818403018152919052805160209091012092915050565b8280546133ad90614087565b90600052602060002090601f0160209004810192826133cf5760008555613415565b82601f106133e85782800160ff19823516178555613415565b82800160010185558215613415579182015b828111156134155782358255916020019190600101906133fa565b50613421929150613466565b5090565b6040518061022001604052806011905b60608152602001906001900390816134355790505090565b6040805180820190915260608152600160208201613435565b5b808211156134215760008155600101613467565b8035801515811461224b57600080fd5b60006020828403121561349c578081fd5b813561210381614133565b6000602082840312156134b8578081fd5b815161210381614133565b600080604083850312156134d5578081fd5b82356134e081614133565b915060208301356134f081614133565b809150509250929050565b60008060006060848603121561350f578081fd5b833561351a81614133565b9250602084013561352a81614133565b929592945050506040919091013590565b60008060008060808587031215613550578081fd5b843561355b81614133565b935060208581013561356c81614133565b935060408601359250606086013567ffffffffffffffff8082111561358f578384fd5b818801915088601f8301126135a2578384fd5b8135818111156135b4576135b461411d565b6135c6601f8201601f19168501613fc8565b915080825289848285010111156135db578485fd5b8084840185840137810190920192909252939692955090935050565b60008060408385031215613609578182fd5b823561361481614133565b91506136226020840161347b565b90509250929050565b6000806040838503121561363d578182fd5b823561364881614133565b946020939093013593505050565b60006020808385031215613668578182fd5b823567ffffffffffffffff8082111561367f578384fd5b818501915085601f830112613692578384fd5b8135818111156136a4576136a461411d565b8060051b91506136b5848301613fc8565b8181528481019084860184860187018a10156136cf578788fd5b8795505b838610156136f15780358352600195909501949186019186016136d3565b5098975050505050505050565b60006020828403121561370f578081fd5b813561210381614148565b60006020828403121561372b578081fd5b815161210381614148565b60008060208385031215613748578182fd5b823567ffffffffffffffff8082111561375f578384fd5b818501915085601f830112613772578384fd5b813581811115613780578485fd5b866020828501011115613791578485fd5b60209290920196919550909350505050565b6000602082840312156137b4578081fd5b5035919050565b600080604083850312156137cd578182fd5b823591506136226020840161347b565b600080600080608085870312156137f2578182fd5b5050823594602084013594506040840135936060013592509050565b6000815180845261382681602086016020860161405b565b601f01601f19169290920160200192915050565b6000815161384c81856020860161405b565b9290920192915050565b6000825161386881846020870161405b565b9190910192915050565b6000835161388481846020880161405b565b83519083019061389881836020880161405b565b01949350505050565b600084516138b381846020890161405b565b8451908301906138c781836020890161405b565b84519101906138da81836020880161405b565b0195945050505050565b600086516138f6818460208b0161405b565b86519083019061390a818360208b0161405b565b600160fd1b9101818152865190919061392a816001850160208b0161405b565b8651920191613940816001850160208a0161405b565b6001920191820152835161395b81600284016020880161405b565b01600201979650505050505050565b6000865161397c818460208b0161405b565b865190830190613990818360208b0161405b565b600160fd1b910181815286519091906139b0816001850160208b0161405b565b86519201916139c6816001850160208a0161405b565b600192019182015283516139e181600284016020880161405b565b62202b3160e81b60029290910191820152600501979650505050505050565b600083516020613a13828583890161405b565b600160fd1b9184019182528454600190849080831c81841680613a3757607f821691505b858210811415613a5557634e487b7160e01b88526022600452602488fd5b808015613a695760018114613a7e57613aae565b60ff1984168887015282880186019450613aae565b60008b815260209020895b84811015613aa45781548a8201890152908701908801613a89565b5050858389010194505b50929a9950505050505050505050565b7f7b2274726169745f74797065223a202200000000000000000000000000000000815260008351613af681601085016020880161405b565b6c111610113b30b63ab2911d101160991b6010918401918201528351613b2381601d84016020880161405b565b61227d60f01b601d9290910191820152601f01949350505050565b693d913730b6b2911d101160b11b81528351600090613b6481600a85016020890161405b565b7f222c20226465736372697074696f6e223a20224c6f6f74204974656d73206172600a918401918201527f6520696e646976696475616c206974656d732066726f6d2061204c6f6f742042602a8201527f6167206f72206d4c6f6f742042616720726570726573656e7465642061732045604a8201527f524337323120746f6b656e732e2053746174732c20696d616765732c20616e64606a8201527f206f746865722066756e6374696f6e616c6974792061726520696e74656e7469608a8201527f6f6e616c6c79206f6d697474656420666f72206f746865727320746f20696e7460aa8201527f6572707265742e204665656c206672656520746f20757365204c6f6f7420497460ca8201527f656d7320696e20616e792077617920796f752077616e742e222c20226174747260ea82015269696275746573223a205b60b01b61010a820152613d72613d64613d5e613d25613cd6613cc961011487018b61383a565b600b60fa1b815260010190565b7f7b2274726169745f74797065223a202245646974696f6e222c202276616c756581527f223a20224f726967696e616c227d0000000000000000000000000000000000006020820152602e0190565b7f5d2c2022696d616765223a2022646174613a696d6167652f7376672b786d6c3b81526618985cd94d8d0b60ca1b602082015260270190565b8661383a565b61227d60f01b815260020190565b9695505050505050565b693d913730b6b2911d101160b11b81528351600090613da281600a85016020890161405b565b7f222c20226465736372697074696f6e223a20224c6f6f74204974656d73206172600a918401918201527f6520696e646976696475616c206974656d732066726f6d2061204c6f6f742042602a8201527f616720726570726573656e7465642061732045524337323120746f6b656e732e604a8201527f2053746174732c20696d616765732c20616e64206f746865722066756e637469606a8201527f6f6e616c6974792061726520696e74656e74696f6e616c6c79206f6d69747465608a8201527f6420666f72206f746865727320746f20696e746572707265742e204665656c2060aa8201527f6672656520746f20757365204c6f6f74204974656d7320696e20616e7920776160ca8201527f7920796f752077616e742e222c202261747472696275746573223a205b00000060ea820152613d72613d64613d5e613d2561010785018961383a565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613f2581601d85016020870161405b565b91909101601d0192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d72608083018461380e565b602080825282518282018190526000919060409081850190868401855b82811015613fa8578151805185528601511515868501529284019290850190600101613f81565b5091979650505050505050565b60208152600061072d602083018461380e565b604051601f8201601f1916810167ffffffffffffffff81118282101715613ff157613ff161411d565b604052919050565b6000821982111561400c5761400c6140f1565b500190565b60008261402057614020614107565b500490565b600081600019048311821515161561403f5761403f6140f1565b500290565b600082821015614056576140566140f1565b500390565b60005b8381101561407657818101518382015260200161405e565b838111156115fc5750506000910152565b600181811c9082168061409b57607f821691505b602082108114156140bc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156140d6576140d66140f1565b5060010190565b6000826140ec576140ec614107565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610f6857600080fd5b6001600160e01b031981168114610f6857600080fdfe3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220399487d49667905afe0b78d1ad52b97042eb5cc7b173584bbfae373db12221f064736f6c63430008040033

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

000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d70000000000000000000000001dfe7ca09e99d10835bf73044a23b73fc20623df

-----Decoded View---------------
Arg [0] : lootAddress (address): 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7
Arg [1] : mLootAddress (address): 0x1dfe7Ca09e99d10835Bf73044a23B73Fc20623DF

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d7
Arg [1] : 0000000000000000000000001dfe7ca09e99d10835bf73044a23b73fc20623df


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.