ETH Price: $2,678.32 (+0.36%)

Contract

0xc9b1ADA6AE402b7a1199de485F01E7900AF77f22
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040154051862022-08-24 21:08:26797 days ago1661375306IN
 Create: PropsERC721AUltraPass
0 ETH0.2442433245.58817167

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PropsERC721AUltraPass

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 32 : PropsERC721AUltraPass.sol
// SPDX-License-Identifier: Apache 2.0
pragma solidity ^0.8.4;

import 'erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol';
import 'erc721a-upgradeable/contracts/extensions/ERC721ABurnableUpgradeable.sol';
import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";

import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";

import "@thirdweb-dev/contracts/openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol";
import "@thirdweb-dev/contracts/feature/interface/IOwnable.sol";
import "@thirdweb-dev/contracts/lib/MerkleProof.sol";

import "../utils/Base64.sol";
import "../interfaces/IAllowlist.sol";
import "../interfaces/IConfig.sol";
import "../interfaces/IPropsContract.sol";
import "../interfaces/IPropsAccessRegistry.sol";

contract PropsERC721AUltraPass is
  Initializable,
  IOwnable,
  IAllowlist,
  IConfig,
  IPropsContract,
  ReentrancyGuardUpgradeable,
  PausableUpgradeable,
  ERC2771ContextUpgradeable,
  AccessControlEnumerableUpgradeable,
  ERC721ABurnableUpgradeable,
  ERC721AQueryableUpgradeable
{

  using StringsUpgradeable for uint256;

  bytes32 private constant MODULE_TYPE = bytes32("PropsERC721AUltraPass");
  uint256 private constant VERSION = 1;

  uint256 private nextTokenId;
  mapping(address => uint256) public minted;
  mapping(address => mapping(uint256 => uint256)) public mintedByAllowlist;

  bytes32 private constant CONTRACT_ADMIN_ROLE = keccak256("CONTRACT_ADMIN_ROLE");
  bytes32 private constant PRODUCER_ROLE = keccak256("PRODUCER_ROLE");

  bytes32[32] private __gap;

  string private baseURI_;
  string public contractURI;
  address private _owner;
  address private accessRegistry;
  address public project;
  address public receivingWallet;
  address public stakingERC20Address;
  address[] private trustedForwarders;

  Allowlists public allowlists;
  Config public config;

  struct MembershipPass {
        string name;
        string description;
        string image;
        string imageExt;
        string url;
  }

  mapping(uint256 => MembershipPass) public tokens;
  mapping(uint256 => uint256) internal tokenTypes;

  uint256 public totalStaked;

  struct StakingTier {
        uint tierLevel;
        uint256 periodToAchieve;
  }

  struct StakedToken {
    uint lockedTier;
    uint256 timer;
    bool isStaked;
    bool isUltimate;
  }

  mapping(uint256 => StakedToken) internal stakedTokens;
  mapping(uint256 => StakingTier) public stakingTiers;
  uint256 public numStakingTiers;

  error AllowlistInactive();
  error MintQuantityInvalid();
  error MerkleProofInvalid();
  error MintClosed();
  error InsufficientFunds();

  event Minted(address indexed account, string tokens);
  event Staked(address indexed account, uint256[] id);
  event Unstaked(address indexed account, uint256[] id);

  bool public reveal;

  function initialize(
    address _defaultAdmin,
    string memory _name,
    string memory _symbol,
    string memory _baseURI,
    address[] memory _trustedForwarders,
    address _receivingWallet,
    address _accessRegistry
  ) initializer public {
    __ReentrancyGuard_init();
    __ERC2771Context_init(_trustedForwarders);
    __ERC721A_init(_name, _symbol);

    receivingWallet = _receivingWallet;
    _owner = _defaultAdmin;
    accessRegistry = _accessRegistry;
    baseURI_ = _baseURI;

    reveal = false;

    _setupRole(DEFAULT_ADMIN_ROLE, _defaultAdmin);
    _setRoleAdmin(CONTRACT_ADMIN_ROLE, DEFAULT_ADMIN_ROLE);
    _setRoleAdmin(PRODUCER_ROLE, CONTRACT_ADMIN_ROLE);

    nextTokenId = 1;

    IPropsAccessRegistry(accessRegistry).add(_defaultAdmin, address(this));
  }

  function contractType() external pure returns (bytes32) {
      return MODULE_TYPE;
  }

  function contractVersion() external pure returns (uint8) {
      return uint8(VERSION);
  }

  function owner() public view returns (address) {
      return hasRole(DEFAULT_ADMIN_ROLE, _owner) ? _owner : address(0);
  }

  function _startTokenId() internal view virtual override returns (uint256){
    return 1;
  }

  function getStakingLevel(uint256 _tokenId) public view returns (uint) {
    unchecked {
     if(stakedTokens[_tokenId].isStaked) return calcTier(_tokenId, calcTimeDelta(_tokenId));
     return stakedTokens[_tokenId].lockedTier > 1 ? stakedTokens[_tokenId].lockedTier : 1;
    }
  }

  function calcPreviousTiersTimeElapse(uint256 _tokenId) internal view returns (uint256){
    unchecked {
      uint256 elapsed = 0;
      uint stakingLevel = getStakingLevel(_tokenId);

      for(uint256 i = 0; i < numStakingTiers; i++){
        if(stakingTiers[i].tierLevel == stakingLevel) elapsed += (stakingTiers[i].periodToAchieve * 86400);
      }
      return elapsed;
    }

  }

  function calcTier(uint256 _tokenId, uint256 _timeDelta) public view returns (uint) {
      uint tier = 1;
      unchecked {
        for(uint256 i = 0; i < numStakingTiers; i++){
          if(_timeDelta >= stakingTiers[i].periodToAchieve * 86400) tier = stakingTiers[i].tierLevel;
        }
      }
    return tier;
  }

  function calcTimeDelta(uint256 _tokenId) public view returns (uint256) {
      if(stakedTokens[_tokenId].timer == 0) return 0;
      unchecked {
        return block.timestamp - stakedTokens[_tokenId].timer;
      }
  }

  function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override (ERC721AUpgradeable, IERC721MetadataUpgradeable)
        returns (string memory)
    {
        require(
            _exists(tokenId),
            "No Token"
        );

        if(!reveal) return baseURI_;

        MembershipPass storage token = tokens[tokenTypes[tokenId]];

        bytes memory json;
        json = concatString(json, '{"name": "ULTRAPASS #');
        json = concatString(json, StringsUpgradeable.toString(tokenId));
        json = concatString(json, '", "description": "');
        json = concatString(json, token.description);
        json = concatString(json, '", "image": "');
        json = concatString(json, token.image);
        json = concatString(json, StringsUpgradeable.toString(getStakingLevel(tokenId)));
        json = concatString(json, (stakedTokens[tokenId].isUltimate ? "_ultimate" : "" ));
        json = concatString(json, token.imageExt);
        json = concatString(json, '", "external_url": "');
        json = concatString(json, token.url);
        json = concatString(json, '", "attributes": [{"trait_type": "Segmint","value": "');
        json = concatString(json, token.name);
        json = concatString(json, '"}, {"trait_type": "Staking Level","value": "');
        json = concatString(json, StringsUpgradeable.toString(getStakingLevel(tokenId)));
        json = concatString(json, '"}, {"trait_type": "Ultimate","value": "');
        json = concatString(json, (stakedTokens[tokenId].isUltimate ? "Yes" : "No" ));
        json = concatString(json, '"}]}');

        return string(concatString("data:application/json;base64,", Base64.encode(
            bytes(
                string(json)
                )
        )));

    }

  function concatString(bytes memory _input, string memory _append) internal view returns(bytes memory){
    unchecked {
      return abi.encodePacked(_input, _append);
    }

  }

  function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerableUpgradeable, ERC721AUpgradeable, IERC165Upgradeable) returns (bool) {
      return super.supportsInterface(interfaceId) || type(IERC2981Upgradeable).interfaceId == interfaceId;
  }

  struct AllocationCheck{
    address _address;
    uint256 _allowlistId;
    uint256 _minted;
    uint256 _quantity;
    uint256 _alloted;
    bytes32[] _proof;
  }

  struct MintCart{
    uint256 _cost;
    uint256 _quantity;
    string _tokensMinted;
  }

  function mint(
    uint256[] calldata _quantities,
    bytes32[][] calldata _proofs,
    uint256[] calldata _allotments,
    uint256[] calldata _allowlistIds,
    uint256[] calldata _traits,
    bool _autostake
  ) external payable nonReentrant {
    require(isTrustedForwarder(msg.sender) || _msgSender() == tx.origin, "BOT");

    MintCart memory cart;

    cart._cost = 0;
    cart._quantity = 0;
    cart._tokensMinted = "";

    unchecked {
      for(uint256 i = 0; i < _quantities.length; i++) {
        cart._quantity += _quantities[i];

        revertOnInactiveList(_allowlistIds[i]);

        revertOnAllocationCheckFailure(
          AllocationCheck(
            msg.sender,
            _allowlistIds[i],
            mintedByAllowlist[msg.sender][_allowlistIds[i]],
            _quantities[i],
            _allotments[i],
            _proofs[i]
          )
        );

        cart._cost += allowlists.lists[_allowlistIds[i]].price * _quantities[i];
      }
    }

    require(nextTokenId + cart._quantity - 1 <= config.mintConfig.maxSupply, "Exceeded max supply.");

    if(cart._cost > msg.value) revert InsufficientFunds();
    (bool sent, bytes memory data) = receivingWallet.call{value: msg.value}("");


    unchecked {
        for (uint i = 0; i < _quantities.length; i++) {
          mintedByAllowlist[address(msg.sender)][_allowlistIds[i]] += _quantities[i];

             for (uint t = nextTokenId; t < nextTokenId + _quantities[i]; t++) {
                cart._tokensMinted = string(concatString(concatString(bytes(cart._tokensMinted), t.toString()), ","));
                tokenTypes[t] = _traits[i];
                uint256 ra = 0;
                for(uint r = 0; r < 5; r++) ra += uint256(keccak256(abi.encodePacked(block.timestamp, msg.sender, r))) % 2;
                if(ra >= 5) stakedTokens[t].isUltimate = true;

                if(_autostake) _stake(t);

               }
            nextTokenId += _quantities[i];
        }
        minted[address(msg.sender)] += cart._quantity;

        _safeMint(msg.sender, cart._quantity);
    }
    emit Minted(msg.sender, cart._tokensMinted);
  }

  function revertOnInactiveList(uint256 _allowlistId) internal view{
      if(paused() || block.timestamp < allowlists.lists[_allowlistId].startTime || block.timestamp > allowlists.lists[_allowlistId].endTime || !allowlists.lists[_allowlistId].isActive) revert AllowlistInactive();
  }


  function revertOnAllocationCheckFailure(
    AllocationCheck memory _allocationCheck
  ) internal view{
    unchecked {
      Allowlist storage allowlist = allowlists.lists[_allocationCheck._allowlistId];
      if(_allocationCheck._quantity + _allocationCheck._minted > allowlist.maxMintPerWallet) revert MintQuantityInvalid();
      if(allowlist.typedata != bytes32(0)){
        if (_allocationCheck._quantity > _allocationCheck._alloted || ((_allocationCheck._quantity + _allocationCheck._minted) > _allocationCheck._alloted)) revert MintQuantityInvalid();
        (bool validMerkleProof, ) = MerkleProof.verify(
          _allocationCheck._proof,
          allowlist.typedata,
          keccak256(abi.encodePacked(_allocationCheck._address, _allocationCheck._alloted))
        );
        if (!validMerkleProof) revert MerkleProofInvalid();
      }
    }
  }

  /**
     * @notice Update token metadata
     */
    function updateTokenMetadata(
        uint256 tokenId,
        string memory name,
        string memory description,
        string memory image,
        string memory imageExt,
        string memory url
    ) external onlyRole(CONTRACT_ADMIN_ROLE) {
        MembershipPass storage token = tokens[tokenId];
        token.name = name;
        token.description = description;
        token.image = image;
        token.imageExt = imageExt;
        token.url = url;
    }

  function toggleReveal()
      public
  {
     require(hasMinRole(PRODUCER_ROLE), "Auth");
     reveal = true;
  }

  function updateIndividualToken(uint256 id, uint256 tokenType, bool isUltimate)
      external
  {
    require(hasMinRole(PRODUCER_ROLE), "Auth");
     tokenTypes[id] = tokenType;
     stakedTokens[id].isUltimate = isUltimate;
  }

  function upsertStakingTier(uint256 _i, uint _tierLevel, uint256 _periodToAchieve)
      public
  {
      require(hasMinRole(PRODUCER_ROLE), "Auth");
      if(stakingTiers[_i].tierLevel == 0 ) numStakingTiers++;
      stakingTiers[_i].tierLevel = _tierLevel;
      stakingTiers[_i].periodToAchieve = _periodToAchieve;
  }

  function _stake(uint256 id) internal{
    StakedToken storage stakedToken = stakedTokens[id];
    stakedToken.timer = block.timestamp - calcPreviousTiersTimeElapse(id);
    stakedToken.isStaked = true;
    totalStaked++;
  }

  function stake(uint256[] calldata id) public {
    for(uint256 i = 0; i < id.length; i++){
      require(ownerOf(id[i]) == _msgSender(), "Not Owner");
      _stake(id[i]);
    }

    emit Staked(_msgSender(), id);
  }


  function unstake(uint256[] calldata id) public {
    unchecked {
      for(uint256 i = 0; i < id.length; i++){
        require(ownerOf(id[i]) == _msgSender(), "Not Owner");
        StakedToken storage stakedToken = stakedTokens[id[i]];
        uint stakingLevel = getStakingLevel(id[i]);
        stakedToken.lockedTier = stakingLevel == 1 ? 1 : stakingLevel - 1;
        stakedToken.isStaked = false;
        stakedToken.timer = 0;
        totalStaked--;
      }
    }
    emit Unstaked(_msgSender(), id);
  }

  function getStakedToken(uint256 id) public view returns (StakedToken memory){
    if(reveal) return stakedTokens[id];
  }

  function updateAllowlistByIndex(Allowlist calldata _allowlist, uint256 i)
      public
  {
      require(hasMinRole(PRODUCER_ROLE), "Auth");
      allowlists.lists[i] = _allowlist;
  }

  function addAllowlist(Allowlist calldata _allowlist)
      external
  {
      updateAllowlistByIndex(_allowlist, allowlists.count);
      allowlists.count++;
  }

  function getAllowlistById(uint256 _allowlistId) external view returns (Allowlist memory allowlist) {
      allowlist = allowlists.lists[_allowlistId];
  }

  function getMintedByAllowlist(uint256 _allowlistId) external view returns (uint256 mintedBy) {
      mintedBy = mintedByAllowlist[msg.sender][_allowlistId];
  }

  function setReceivingWallet(address _address)
      external

  {
    require(hasMinRole(CONTRACT_ADMIN_ROLE), "Auth");
    receivingWallet = _address;
  }


  function setConfig(Config calldata _config)
      external
  {
    require(hasMinRole(PRODUCER_ROLE), "Auth");
    config = _config;
  }

  function setOwner(address _newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) {
      require(hasRole(DEFAULT_ADMIN_ROLE, _newOwner), "!ADMIN");
      address _prevOwner = _owner;
      _owner = _newOwner;

      emit OwnerUpdated(_prevOwner, _newOwner);
  }

  function setContractURI(string calldata _uri) external {
    require(hasMinRole(CONTRACT_ADMIN_ROLE), "Auth");
      contractURI = _uri;
  }

  function setBaseURI(string calldata _baseURI) external {
    require(hasMinRole(CONTRACT_ADMIN_ROLE), "Auth");
      baseURI_ = _baseURI;
  }

  function setAccessRegistry(address _accessRegistry) external {
    require(hasMinRole(CONTRACT_ADMIN_ROLE), "Auth");
      accessRegistry = _accessRegistry;
  }

  function setProject(address _project) external{
      require(hasMinRole(PRODUCER_ROLE), "Auth");
      project = _project;
  }

  function togglePause(bool isPaused) external{
    require(hasMinRole(PRODUCER_ROLE), "Auth");
    isPaused ? _pause() : _unpause();
  }

  function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {
    require(hasMinRole(CONTRACT_ADMIN_ROLE), "Auth");
    if(!hasRole(role, account)){
      super._grantRole(role,account);
      IPropsAccessRegistry(accessRegistry).add(account, address(this));
    }
  }

  function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) {
    require(hasMinRole(CONTRACT_ADMIN_ROLE), "Auth");
    if(hasRole(role, account)){
      if(role == DEFAULT_ADMIN_ROLE && account == owner()) revert();
      super._revokeRole(role,account);
      IPropsAccessRegistry(accessRegistry).remove(account, address(this));
    }
  }

  function hasMinRole(bytes32 _role) public view virtual returns (bool){
     if(hasRole(_role, _msgSender())) return true;
      if(_role == DEFAULT_ADMIN_ROLE) return false;
      return hasMinRole(getRoleAdmin(_role));
  }

  function _beforeTokenTransfers(
      address from,
      address to,
      uint256 startTokenId,
      uint256 quantity
  ) internal override(ERC721AUpgradeable) {

      super._beforeTokenTransfers(from, to, startTokenId, quantity);
       for(uint i = 0; i < quantity; i++ ){
         if(from != address(0x0) && to != address(0x0)) require(stakedTokens[startTokenId + i].isStaked == false, "ULTRAPASS must be unstaked before sale or transfer");
        }
  }


  function _msgSender()
      internal
      view
      virtual
      override(ContextUpgradeable, ERC2771ContextUpgradeable)
      returns (address sender)
  {
      return ERC2771ContextUpgradeable._msgSender();
  }

  function _msgData()
      internal
      view
      virtual
      override(ContextUpgradeable, ERC2771ContextUpgradeable)
      returns (bytes calldata)
  {
      return ERC2771ContextUpgradeable._msgData();
  }

  uint256[49] private ___gap;
}

File 2 of 32 : ERC721AQueryableUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "./IERC721AQueryableUpgradeable.sol";
import "../ERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title ERC721A Queryable
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryableUpgradeable is Initializable, ERC721AUpgradeable, IERC721AQueryableUpgradeable {
    function __ERC721AQueryable_init() internal onlyInitializing {
    }

    function __ERC721AQueryable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _currentIndex) {
            return ownership;
        }
        ownership = _ownerships[tokenId];
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _currentIndex;
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, _currentIndex)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 3 of 32 : ERC721ABurnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "./IERC721ABurnableUpgradeable.sol";
import "../ERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title ERC721A Burnable Token
 * @dev ERC721A Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721ABurnableUpgradeable is Initializable, ERC721AUpgradeable, IERC721ABurnableUpgradeable {
    function __ERC721ABurnable_init() internal onlyInitializing {
    }

    function __ERC721ABurnable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual override {
        _burn(tokenId, true);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 4 of 32 : AccessControlEnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerableUpgradeable.sol";
import "./AccessControlUpgradeable.sol";
import "../utils/structs/EnumerableSetUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {
    function __AccessControlEnumerable_init() internal onlyInitializing {
    }

    function __AccessControlEnumerable_init_unchained() internal onlyInitializing {
    }
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 5 of 32 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _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 making 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;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 6 of 32 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 7 of 32 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    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 8 of 32 : IERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981Upgradeable is IERC165Upgradeable {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 9 of 32 : ERC2771ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (metatx/ERC2771Context.sol)

pragma solidity ^0.8.11;

import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @dev Context variant with ERC2771 support.
 */
abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable {
    mapping(address => bool) private _trustedForwarder;

    function __ERC2771Context_init(address[] memory trustedForwarder) internal onlyInitializing {
        __Context_init_unchained();
        __ERC2771Context_init_unchained(trustedForwarder);
    }

    function __ERC2771Context_init_unchained(address[] memory trustedForwarder) internal onlyInitializing {
        for (uint256 i = 0; i < trustedForwarder.length; i++) {
            _trustedForwarder[trustedForwarder[i]] = true;
        }
    }

    function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
        return _trustedForwarder[forwarder];
    }

    function _msgSender() internal view virtual override returns (address sender) {
        if (isTrustedForwarder(msg.sender)) {
            // The assembly code is more direct than the Solidity version using `abi.decode`.
            assembly {
                sender := shr(96, calldataload(sub(calldatasize(), 20)))
            }
        } else {
            return super._msgSender();
        }
    }

    function _msgData() internal view virtual override returns (bytes calldata) {
        if (isTrustedForwarder(msg.sender)) {
            return msg.data[:msg.data.length - 20];
        } else {
            return super._msgData();
        }
    }

    uint256[49] private __gap;
}

File 10 of 32 : IOwnable.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

interface IOwnable {
    /// @dev Returns the owner of the contract.
    function owner() external view returns (address);

    /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin.
    function setOwner(address _newOwner) external;

    /// @dev Emitted when a new Owner is set.
    event OwnerUpdated(address prevOwner, address newOwner);
}

File 11 of 32 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.3.0/contracts/utils/cryptography/MerkleProof.sol
// Copied from https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol

pragma solidity ^0.8.11;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * Source: https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool, uint256) {
        bytes32 computedHash = leaf;
        uint256 index = 0;

        for (uint256 i = 0; i < proof.length; i++) {
            index *= 2;
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
                index += 1;
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return (computedHash == root, index);
    }
}

File 12 of 32 : Base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

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

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 13 of 32 : IAllowlist.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface IAllowlist {

    struct Allowlist {
       bytes32 typedata;
       bool isActive;
       string metadataUri;
       string name;
       uint256 price;
       uint256 maxMintPerWallet;
       uint256 tokenPool;
       uint256 startTime;
       uint256 endTime;
   }

   struct Allowlists {
     uint256 currentStartId;
     uint256 count;
     mapping(uint256 => Allowlist) lists;
   }

}

File 14 of 32 : IConfig.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

/// @author: @props

/**
 * @dev
 */
interface IConfig {

    /**
    * @dev Retool that - legacy
    */
    // enum Extensions {
    //     Allowlist,
    //     Royalty,
    //     Split
    // }

    /**
    * @dev
    */
    struct Config {
        Mint mintConfig;
        Token tokenConfig;
    }

    /**
    * @dev
    */
    struct Mint {
        bool isActive;
        uint256 startTime;
        uint256 endTime;
        uint256 maxSupply;
        uint256 maxPerWallet;
        uint256 maxPerTxn;
        uint256 price;
    }

    /**
    * @dev
    */
    struct Token {
        string metadataUri;
    }


    /**
    * @dev
    */
    struct Token1155 {
        uint256 tokenId;
        uint256 redeemStart;
        uint256 redeemEnd;
        uint256[] tokensToIssueOnRedeem;
        bool isRedeemable;
        string baseURI;
        string name;
    }

}

File 15 of 32 : IPropsContract.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;

interface IPropsContract {
    /// @dev Returns the module type of the contract.
    function contractType() external pure returns (bytes32);

    /// @dev Returns the version of the contract.
    function contractVersion() external pure returns (uint8);

    /// @dev Returns the metadata URI of the contract.
    function contractURI() external view returns (string memory);

    /**
     *  @dev Sets contract URI for the storefront-level metadata of the contract.
     *       Only module admin can call this function.
     */
    function setContractURI(string calldata _uri) external;
}

File 16 of 32 : IPropsAccessRegistry.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;

interface IPropsAccessRegistry {
    /// @dev Adds role access entry in access registry.
    function add(address _account, address _deployment) external;

    /// @dev Reduces/Removes role access entry in access registry.
    function remove(address _account, address _deployment) external;
}

File 17 of 32 : IERC721AQueryableUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "../IERC721AUpgradeable.sol";

/**
 * @dev Interface of an ERC721AQueryable compliant contract.
 */
interface IERC721AQueryableUpgradeable is IERC721AUpgradeable {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 18 of 32 : ERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "./IERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721AUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721AUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

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

    function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721A_init_unchained(name_, symbol_);
    }

    function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        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 override {
        address owner = ERC721AUpgradeable.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

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

        _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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721ReceiverUpgradeable(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[42] private __gap;
}

File 19 of 32 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = _setInitializedVersion(1);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        bool isTopLevelCall = _setInitializedVersion(version);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(version);
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        _setInitializedVersion(type(uint8).max);
    }

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !AddressUpgradeable.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

File 20 of 32 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol";

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721AUpgradeable is IERC721Upgradeable, IERC721MetadataUpgradeable {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     * 
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);
}

File 21 of 32 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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`.
     *
     * 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;

    /**
     * @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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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);
}

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

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @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 23 of 32 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @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);
}

File 24 of 32 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721ReceiverUpgradeable {
    /**
     * @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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 25 of 32 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

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

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

File 26 of 32 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 28 of 32 : IERC721ABurnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "../IERC721AUpgradeable.sol";

/**
 * @dev Interface of an ERC721ABurnable compliant contract.
 */
interface IERC721ABurnableUpgradeable is IERC721AUpgradeable {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) external;
}

File 29 of 32 : IAccessControlEnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 30 of 32 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        StringsUpgradeable.toHexString(uint160(account), 20),
                        " is missing role ",
                        StringsUpgradeable.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 31 of 32 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 32 of 32 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"AllowlistInactive","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MerkleProofInvalid","type":"error"},{"inputs":[],"name":"MintClosed","type":"error"},{"inputs":[],"name":"MintQuantityInvalid","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"tokens","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"id","type":"uint256[]"}],"name":"Staked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"id","type":"uint256[]"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"typedata","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxMintPerWallet","type":"uint256"},{"internalType":"uint256","name":"tokenPool","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IAllowlist.Allowlist","name":"_allowlist","type":"tuple"}],"name":"addAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowlists","outputs":[{"internalType":"uint256","name":"currentStartId","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_timeDelta","type":"uint256"}],"name":"calcTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"calcTimeDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"components":[{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"uint256","name":"maxPerTxn","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct IConfig.Mint","name":"mintConfig","type":"tuple"},{"components":[{"internalType":"string","name":"metadataUri","type":"string"}],"internalType":"struct IConfig.Token","name":"tokenConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlistId","type":"uint256"}],"name":"getAllowlistById","outputs":[{"components":[{"internalType":"bytes32","name":"typedata","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxMintPerWallet","type":"uint256"},{"internalType":"uint256","name":"tokenPool","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IAllowlist.Allowlist","name":"allowlist","type":"tuple"}],"stateMutability":"view","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":"_allowlistId","type":"uint256"}],"name":"getMintedByAllowlist","outputs":[{"internalType":"uint256","name":"mintedBy","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getStakedToken","outputs":[{"components":[{"internalType":"uint256","name":"lockedTier","type":"uint256"},{"internalType":"uint256","name":"timer","type":"uint256"},{"internalType":"bool","name":"isStaked","type":"bool"},{"internalType":"bool","name":"isUltimate","type":"bool"}],"internalType":"struct PropsERC721AUltraPass.StakedToken","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getStakingLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_role","type":"bytes32"}],"name":"hasMinRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_defaultAdmin","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseURI","type":"string"},{"internalType":"address[]","name":"_trustedForwarders","type":"address[]"},{"internalType":"address","name":"_receivingWallet","type":"address"},{"internalType":"address","name":"_accessRegistry","type":"address"}],"name":"initialize","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":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_proofs","type":"bytes32[][]"},{"internalType":"uint256[]","name":"_allotments","type":"uint256[]"},{"internalType":"uint256[]","name":"_allowlistIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_traits","type":"uint256[]"},{"internalType":"bool","name":"_autostake","type":"bool"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedByAllowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numStakingTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"project","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receivingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":"_accessRegistry","type":"address"}],"name":"setAccessRegistry","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":[{"components":[{"components":[{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"uint256","name":"maxPerTxn","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct IConfig.Mint","name":"mintConfig","type":"tuple"},{"components":[{"internalType":"string","name":"metadataUri","type":"string"}],"internalType":"struct IConfig.Token","name":"tokenConfig","type":"tuple"}],"internalType":"struct IConfig.Config","name":"_config","type":"tuple"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_project","type":"address"}],"name":"setProject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setReceivingWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"id","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingERC20Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakingTiers","outputs":[{"internalType":"uint256","name":"tierLevel","type":"uint256"},{"internalType":"uint256","name":"periodToAchieve","type":"uint256"}],"stateMutability":"view","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":"bool","name":"isPaused","type":"bool"}],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"imageExt","type":"string"},{"internalType":"string","name":"url","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256[]","name":"id","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"typedata","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxMintPerWallet","type":"uint256"},{"internalType":"uint256","name":"tokenPool","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct IAllowlist.Allowlist","name":"_allowlist","type":"tuple"},{"internalType":"uint256","name":"i","type":"uint256"}],"name":"updateAllowlistByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"tokenType","type":"uint256"},{"internalType":"bool","name":"isUltimate","type":"bool"}],"name":"updateIndividualToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"imageExt","type":"string"},{"internalType":"string","name":"url","type":"string"}],"name":"updateTokenMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_i","type":"uint256"},{"internalType":"uint256","name":"_tierLevel","type":"uint256"},{"internalType":"uint256","name":"_periodToAchieve","type":"uint256"}],"name":"upsertStakingTier","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50615ff180620000216000396000f3fe6080604052600436106103155760003560e01c806301ffc9a71461031a57806306fdde031461034f578063081812fc14610371578063095ea7b31461039e5780630fbf0a93146103c057806313af4035146103e057806318160ddd146104005780631e7269c51461042957806323b872dd14610457578063248a9ca3146104775780632f2ff15d1461049757806336568abe146104b75780633b6fda59146104d757806342842e0e1461051057806342966c681461053057806344861f5f146105505780634f64b2be1461057057806355f804b3146105a1578063572b6c05146105c157806357d159c6146105e15780635b8ad429146106015780635bbb2177146106165780635c975abb146106435780636182ff531461065b5780636352211e1461068857806363906d0d146106a857806364274fef146106da578063666f8ca4146106fa57806370a082311461071a578063738170a41461073a57806379502c551461075b578063817b1cd21461077e57806383de187b146107955780638462151c146107b557806387b63e3a146107e25780638a90be691461081b5780638b81a7ee1461083b5780638da5cb5b1461085b5780639010d07c1461087057806391d1485414610890578063931e28e9146108b0578063938e3d7b146108d157806395d89b41146108f157806398987b6e1461090657806399a2557a146109265780639ef44ead14610946578063a0a8e46014610966578063a217fddf14610982578063a22cb46514610997578063a475b5dd146109b7578063b3738dfc146109d2578063b506282a146109f2578063b522ecff14610a05578063b88d4fde14610a25578063c23dc68f14610a45578063c430683314610a72578063c87b56dd14610a92578063ca15c87314610ab2578063cb2ef6f714610ad2578063cf6355d814610afd578063d50267ee14610b1d578063d547741f14610b52578063e3caafed14610b72578063e449f34114610b92578063e8a3d48514610bb2578063e985e9c514610bc7578063ee4f1c4d14610c11578063f60ca60d14610c28578063fb108ea614610c49578063feedc5e614610c69575b600080fd5b34801561032657600080fd5b5061033a610335366004614c08565b610cc0565b60405190151581526020015b60405180910390f35b34801561035b57600080fd5b50610364610cec565b6040516103469190614c7d565b34801561037d57600080fd5b5061039161038c366004614c90565b610d7f565b6040516103469190614ca9565b3480156103aa57600080fd5b506103be6103b9366004614cd4565b610dc4565b005b3480156103cc57600080fd5b506103be6103db366004614d49565b610e5d565b3480156103ec57600080fd5b506103be6103fb366004614d8a565b610f4b565b34801561040c57600080fd5b506101605461015f5403600019015b604051908152602001610346565b34801561043557600080fd5b5061041b610444366004614d8a565b6101f66020526000908152604090205481565b34801561046357600080fd5b506103be610472366004614da5565b610ff7565b34801561048357600080fd5b5061041b610492366004614c90565b611002565b3480156104a357600080fd5b506103be6104b2366004614de1565b611017565b3480156104c357600080fd5b506103be6104d2366004614de1565b6110cc565b3480156104e357600080fd5b5061041b6104f2366004614cd4565b6101f760209081526000928352604080842090915290825290205481565b34801561051c57600080fd5b506103be61052b366004614da5565b611156565b34801561053c57600080fd5b506103be61054b366004614c90565b611171565b34801561055c57600080fd5b5061041b61056b366004614c90565b61117f565b34801561057c57600080fd5b5061059061058b366004614c90565b6111b7565b604051610346959493929190614e0d565b3480156105ad57600080fd5b506103be6105bc366004614e7a565b61148e565b3480156105cd57600080fd5b5061033a6105dc366004614d8a565b6114ce565b3480156105ed57600080fd5b506103be6105fc366004614f04565b6114ec565b34801561060d57600080fd5b506103be611534565b34801561062257600080fd5b50610636610631366004614f8a565b611577565b604051610346919061504c565b34801561064f57600080fd5b5060655460ff1661033a565b34801561066757600080fd5b5061067b610676366004614c90565b61162b565b604051610346919061508e565b34801561069457600080fd5b506103916106a3366004614c90565b611814565b3480156106b457600080fd5b5061022054610221546106c5919082565b60408051928352602083019190915201610346565b3480156106e657600080fd5b506103be6106f5366004615144565b611826565b34801561070657600080fd5b506103be610715366004614d8a565b61187a565b34801561072657600080fd5b5061041b610735366004614d8a565b6118d0565b34801561074657600080fd5b5061021d54610391906001600160a01b031681565b34801561076757600080fd5b5061077061191f565b604051610346929190615188565b34801561078a57600080fd5b5061041b61022d5481565b3480156107a157600080fd5b506103be6107b03660046151f5565b611a13565b3480156107c157600080fd5b506107d56107d0366004614d8a565b611a54565b6040516103469190615230565b3480156107ee57600080fd5b5061041b6107fd366004614c90565b3360009081526101f760209081526040808320938352929052205490565b34801561082757600080fd5b5061041b610836366004614c90565b611b87565b34801561084757600080fd5b506103be610856366004615268565b611be1565b34801561086757600080fd5b50610391611c0a565b34801561087c57600080fd5b5061039161088b36600461529c565b611c42565b34801561089c57600080fd5b5061033a6108ab366004614de1565b611c62565b3480156108bc57600080fd5b5061021e54610391906001600160a01b031681565b3480156108dd57600080fd5b506103be6108ec366004614e7a565b611c8d565b3480156108fd57600080fd5b50610364611ccd565b34801561091257600080fd5b506103be6109213660046152be565b611cdd565b34801561093257600080fd5b506107d56109413660046152f7565b611d48565b34801561095257600080fd5b506103be61096136600461540e565b611f10565b34801561097257600080fd5b5060405160018152602001610346565b34801561098e57600080fd5b5061041b600081565b3480156109a357600080fd5b506103be6109b23660046154ec565b6120b4565b3480156109c357600080fd5b506102315461033a9060ff1681565b3480156109de57600080fd5b5061033a6109ed366004614c90565b612188565b6103be610a00366004615523565b6121bc565b348015610a1157600080fd5b506103be610a20366004614d8a565b6127c8565b348015610a3157600080fd5b506103be610a40366004615623565b61281e565b348015610a5157600080fd5b50610a65610a60366004614c90565b612869565b604051610346919061569e565b348015610a7e57600080fd5b5061041b610a8d36600461529c565b612900565b348015610a9e57600080fd5b50610364610aad366004614c90565b61294a565b348015610abe57600080fd5b5061041b610acd366004614c90565b612df4565b348015610ade57600080fd5b507450726f707345524337323141556c7472615061737360581b61041b565b348015610b0957600080fd5b506103be610b183660046156ac565b612e0c565b348015610b2957600080fd5b506106c5610b38366004614c90565b61022f602052600090815260409020805460019091015482565b348015610b5e57600080fd5b506103be610b6d366004614de1565b612e83565b348015610b7e57600080fd5b506103be610b8d3660046156d8565b612f32565b348015610b9e57600080fd5b506103be610bad366004614d49565b612fd1565b348015610bbe57600080fd5b506103646130fc565b348015610bd357600080fd5b5061033a610be23660046157b1565b6001600160a01b0391821660009081526101666020908152604080832093909416825291909152205460ff1690565b348015610c1d57600080fd5b5061041b6102305481565b348015610c3457600080fd5b5061021c54610391906001600160a01b031681565b348015610c5557600080fd5b506103be610c64366004614d8a565b61318b565b348015610c7557600080fd5b50610c89610c84366004614c90565b6131e1565b6040516103469190815181526020808301519082015260408083015115159082015260609182015115159181019190915260800190565b6000610ccb82613266565b80610ce6575063152a902d60e11b6001600160e01b03198316145b92915050565b60606101618054610cfc906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054610d28906157db565b8015610d755780601f10610d4a57610100808354040283529160200191610d75565b820191906000526020600020905b815481529060010190602001808311610d5857829003601f168201915b5050505050905090565b6000610d8a826132a6565b610da7576040516333d1c03960e21b815260040160405180910390fd5b50600090815261016560205260409020546001600160a01b031690565b6000610dcf82611814565b9050806001600160a01b0316836001600160a01b03161415610e045760405163250fdee360e21b815260040160405180910390fd5b806001600160a01b0316610e166132e1565b6001600160a01b031614610e4d57610e3081610be26132e1565b610e4d576040516367d9dca160e11b815260040160405180910390fd5b610e588383836132eb565b505050565b60005b81811015610efc57610e706132e1565b6001600160a01b0316610e9a848484818110610e8e57610e8e615810565b90506020020135611814565b6001600160a01b031614610ec95760405162461bcd60e51b8152600401610ec090615826565b60405180910390fd5b610eea838383818110610ede57610ede615810565b90506020020135613348565b80610ef48161585f565b915050610e60565b50610f056132e1565b6001600160a01b03167f134b166c6094cc1ccbf1e3353ce5c3cd9fd29869051bdb999895854d77cc5ef68383604051610f3f92919061587a565b60405180910390a25050565b6000610f568161339c565b610f61600083611c62565b610f965760405162461bcd60e51b815260206004820152600660248201526510a0a226a4a760d11b6044820152606401610ec0565b61021a80546001600160a01b038481166001600160a01b03198316179092556040519116907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690610fea90839086906158b6565b60405180910390a1505050565b610e588383836133ad565b600090815260fb602052604090206001015490565b61102e600080516020615f9d833981519152612188565b61104a5760405162461bcd60e51b8152600401610ec0906158d0565b6110548282611c62565b6110c85761106282826135ba565b61021b546040516352c28fab60e01b81526001600160a01b03909116906352c28fab9061109590849030906004016158b6565b600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b505050505b5050565b6110d46132e1565b6001600160a01b0316816001600160a01b03161461114c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ec0565b6110c882826135dd565b610e588383836040518060200160405280600081525061281e565b61117c816001613600565b50565b600081815261022e602052604081206001015461119e57506000919050565b50600090815261022e6020526040902060010154420390565b61022b602052600090815260409020805481906111d3906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546111ff906157db565b801561124c5780601f106112215761010080835404028352916020019161124c565b820191906000526020600020905b81548152906001019060200180831161122f57829003601f168201915b505050505090806001018054611261906157db565b80601f016020809104026020016040519081016040528092919081815260200182805461128d906157db565b80156112da5780601f106112af576101008083540402835291602001916112da565b820191906000526020600020905b8154815290600101906020018083116112bd57829003601f168201915b5050505050908060020180546112ef906157db565b80601f016020809104026020016040519081016040528092919081815260200182805461131b906157db565b80156113685780601f1061133d57610100808354040283529160200191611368565b820191906000526020600020905b81548152906001019060200180831161134b57829003601f168201915b50505050509080600301805461137d906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546113a9906157db565b80156113f65780601f106113cb576101008083540402835291602001916113f6565b820191906000526020600020905b8154815290600101906020018083116113d957829003601f168201915b50505050509080600401805461140b906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054611437906157db565b80156114845780601f1061145957610100808354040283529160200191611484565b820191906000526020600020905b81548152906001019060200180831161146757829003601f168201915b5050505050905085565b6114a5600080516020615f9d833981519152612188565b6114c15760405162461bcd60e51b8152600401610ec0906158d0565b610e586102188383614ac5565b6001600160a01b031660009081526097602052604090205460ff1690565b611503600080516020615ee8833981519152612188565b61151f5760405162461bcd60e51b8152600401610ec0906158d0565b8061152c5761117c6137e2565b61117c613875565b61154b600080516020615ee8833981519152612188565b6115675760405162461bcd60e51b8152600401610ec0906158d0565b610231805460ff19166001179055565b80516060906000816001600160401b0381111561159657611596614f21565b6040519080825280602002602001820160405280156115cf57816020015b6115bc614b49565b8152602001906001900390816115b45790505b50905060005b828114611623576115fe8582815181106115f1576115f1615810565b6020026020010151612869565b82828151811061161057611610615810565b60209081029190910101526001016115d5565b509392505050565b61167f60405180610120016040528060008019168152602001600015158152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000828152610222602090815260409182902082516101208101845281548152600182015460ff1615159281019290925260028101805492939192918401916116c7906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546116f3906157db565b80156117405780601f1061171557610100808354040283529160200191611740565b820191906000526020600020905b81548152906001019060200180831161172357829003601f168201915b50505050508152602001600382018054611759906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054611785906157db565b80156117d25780601f106117a7576101008083540402835291602001916117d2565b820191906000526020600020905b8154815290600101906020018083116117b557829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b600061181f826138f1565b5192915050565b61183d600080516020615ee8833981519152612188565b6118595760405162461bcd60e51b8152600401610ec0906158d0565b60008181526102226020526040902082906118748282615a6a565b50505050565b611891600080516020615f9d833981519152612188565b6118ad5760405162461bcd60e51b8152600401610ec0906158d0565b61021b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166118f9576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b0316600090815261016460205260409020546001600160401b031690565b6040805160e081018252610223805460ff16151582526102245460208084019190915261022554838501526102265460608401526102275460808401526102285460a08401526102295460c0840152835190810190935261022a8054929391928290829061198c906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546119b8906157db565b8015611a055780601f106119da57610100808354040283529160200191611a05565b820191906000526020600020905b8154815290600101906020018083116119e857829003601f168201915b505050505081525050905082565b611a2a600080516020615ee8833981519152612188565b611a465760405162461bcd60e51b8152600401610ec0906158d0565b80610223610e588282615bb9565b60606000806000611a64856118d0565b90506000816001600160401b03811115611a8057611a80614f21565b604051908082528060200260200182016040528015611aa9578160200160208202803683370190505b509050611ab4614b49565b60015b838614611b7b5760008181526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529250611b1e57611b73565b81516001600160a01b031615611b3357815194505b876001600160a01b0316856001600160a01b03161415611b735780838780600101985081518110611b6657611b66615810565b6020026020010181815250505b600101611ab7565b50909695505050505050565b600081815261022e602052604081206002015460ff1615611baf57610ce682610a8d8461117f565b600082815261022e6020526040902054600110611bcd576001610ce6565b50600090815261022e602052604090205490565b611bf18161022060010154611826565b6102218054906000611c028361585f565b919050555050565b61021a54600090611c259082906001600160a01b0316611c62565b611c2f5750600090565b61021a546001600160a01b03165b905090565b600082815261012d60205260408120611c5b9083613a01565b9392505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611ca4600080516020615f9d833981519152612188565b611cc05760405162461bcd60e51b8152600401610ec0906158d0565b610e586102198383614ac5565b60606101628054610cfc906157db565b611cf4600080516020615ee8833981519152612188565b611d105760405162461bcd60e51b8152600401610ec0906158d0565b600092835261022c602090815260408085209390935561022e9052912060020180549115156101000261ff0019909216919091179055565b6060818310611d6a57604051631960ccad60e11b815260040160405180910390fd5b61015f546000906001851015611d7f57600194505b80841115611d8b578093505b6000611d96876118d0565b905084861015611db55785850381811015611daf578091505b50611db9565b5060005b6000816001600160401b03811115611dd357611dd3614f21565b604051908082528060200260200182016040528015611dfc578160200160208202803683370190505b50905081611e0f579350611c5b92505050565b6000611e1a88612869565b905060008160400151611e2b575080515b885b888114158015611e3d5750848714155b15611eff5760008181526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529350611ea257611ef7565b82516001600160a01b031615611eb757825191505b8a6001600160a01b0316826001600160a01b03161415611ef75780848880600101995081518110611eea57611eea615810565b6020026020010181815250505b600101611e2d565b505050928352509095945050505050565b6000611f1c6001613a0d565b90508015611f34576000805461ff0019166101001790555b611f3c613a9c565b611f4584613acd565b611f4f8787613b05565b61021d80546001600160a01b038086166001600160a01b03199283161790925561021a80548b841690831617905561021b8054928516929091169190911790558451611fa390610218906020880190614b69565b50610231805460ff19169055611fba600089613b36565b611fd3600080516020615f9d8339815191526000613b40565b611ff9600080516020615ee8833981519152600080516020615f9d833981519152613b40565b60016101f55561021b546040516352c28fab60e01b81526001600160a01b03909116906352c28fab90612032908b9030906004016158b6565b600060405180830381600087803b15801561204c57600080fd5b505af1158015612060573d6000803e3d6000fd5b5050505080156120aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6120bc6132e1565b6001600160a01b0316826001600160a01b031614156120ee5760405163b06307db60e01b815260040160405180910390fd5b8061016660006120fc6132e1565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556121406132e1565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161217c911515815260200190565b60405180910390a35050565b6000612196826108ab6132e1565b156121a357506001919050565b816121b057506000919050565b610ce66109ed83611002565b6002600154141561220f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ec0565b600260015561221d336114ce565b8061223757503261222c6132e1565b6001600160a01b0316145b6122695760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610ec0565b61228d60405180606001604052806000815260200160008152602001606081525090565b600080825260208083018290526040805191820181528282528301525b8b811015612482578c8c828181106122c4576122c4615810565b905060200201358260200181815101915081815250506122fb8787838181106122ef576122ef615810565b90506020020135613b93565b6124236040518060c00160405280336001600160a01b0316815260200189898581811061232a5761232a615810565b9050602002013581526020016101f76000336001600160a01b03166001600160a01b0316815260200190815260200160002060008b8b8781811061237057612370615810565b9050602002013581526020019081526020016000205481526020018f8f8581811061239d5761239d615810565b9050602002013581526020018b8b858181106123bb576123bb615810565b9050602002013581526020018d8d858181106123d9576123d9615810565b90506020028101906123eb9190615c31565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250613c0d565b8c8c8281811061243557612435615810565b90506020020135610220600201600089898581811061245657612456615810565b6020908102929092013583525081019190915260400160002060040154835191020182526001016122aa565b506102265460208201516101f55460019161249c91615c7a565b6124a69190615c92565b11156124eb5760405162461bcd60e51b815260206004820152601460248201527322bc31b2b2b232b21036b0bc1039bab838363c9760611b6044820152606401610ec0565b805134101561250d5760405163356680b760e01b815260040160405180910390fd5b61021d5460405160009182916001600160a01b039091169034908381818185875af1925050503d806000811461255f576040519150601f19603f3d011682016040523d82523d6000602084013e612564565b606091505b509150915060005b8d811015612744578e8e8281811061258657612586615810565b3360009081526101f760209081526040822092029390930135929091508b8b858181106125b5576125b5615810565b60209081029290920135835250810191909152604001600020805490910190556101f5545b8f8f838181106125ec576125ec615810565b905060200201356101f5540181101561271557612637612618866040015161261384613d10565b613e0d565b604051806040016040528060018152602001600b60fa1b815250613e0d565b604086015287878381811061264e5761264e615810565b600084815261022c60209081526040822092029390930135905550805b60058110156126d457604080514260208201526001600160601b03193360601b1691810191909152605481018290526002906074016040516020818303038152906040528051906020012060001c816126c6576126c6615ca9565b06919091019060010161266b565b50600581106126fd57600082815261022e60205260409020600201805461ff0019166101001790555b861561270c5761270c82613348565b506001016125da565b508e8e8281811061272857612728615810565b6101f5805460209092029390930135019091555060010161256c565b50602080840180513360008181526101f69094526040909320805490910190555161276f9190613e39565b336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f9284604001516040516127ac9190614c7d565b60405180910390a2505060018055505050505050505050505050565b6127df600080516020615f9d833981519152612188565b6127fb5760405162461bcd60e51b8152600401610ec0906158d0565b61021d80546001600160a01b0319166001600160a01b0392909216919091179055565b6128298484846133ad565b61283b836001600160a01b0316613e53565b156118745761284c84848484613e62565b611874576040516368d2bf6b60e11b815260040160405180910390fd5b612871614b49565b612879614b49565b600183108061288b575061015f548310155b156128965792915050565b5060008281526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615801592820192909252906128f75792915050565b611c5b836138f1565b60006001815b6102305481101561162357600081815261022f60205260409020600101546201518002841061294257600081815261022f602052604090205491505b600101612906565b6060612955826132a6565b61298c5760405162461bcd60e51b81526020600482015260086024820152672737902a37b5b2b760c11b6044820152606401610ec0565b6102315460ff16612a2a5761021880546129a5906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546129d1906157db565b8015612a1e5780601f106129f357610100808354040283529160200191612a1e565b820191906000526020600020905b815481529060010190602001808311612a0157829003601f168201915b50505050509050919050565b600082815261022c6020908152604080832054835261022b825291829020825180840190935260158352747b226e616d65223a2022554c54524150415353202360581b9183019190915290606090612a83908290613e0d565b9050612a928161261386613d10565b9050612ac98160405180604001604052806013815260200172111610113232b9b1b934b83a34b7b7111d101160691b815250613e0d565b9050612b6181836001018054612ade906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054612b0a906157db565b8015612b575780601f10612b2c57610100808354040283529160200191612b57565b820191906000526020600020905b815481529060010190602001808311612b3a57829003601f168201915b5050505050613e0d565b9050612b92816040518060400160405280600d81526020016c1116101134b6b0b3b2911d101160991b815250613e0d565b9050612ba781836002018054612ade906157db565b9050612bbe81612613612bb987611b87565b613d10565b600085815261022e6020526040902060020154909150612c22908290610100900460ff16612bfb5760405180602001604052806000815250613e0d565b604051806040016040528060098152602001685f756c74696d61746560b81b815250613e0d565b9050612c3781836003018054612ade906157db565b9050612c6f81604051806040016040528060148152602001731116101132bc3a32b93730b62fbab936111d101160611b815250613e0d565b9050612c8481836004018054612ade906157db565b9050612ca881604051806060016040528060358152602001615f4860359139613e0d565b9050612cbd81836000018054612ade906157db565b9050612ce1816040518060600160405280602d8152602001615ebb602d9139613e0d565b9050612cf381612613612bb987611b87565b9050612d1781604051806060016040528060288152602001615fbd60289139613e0d565b600085815261022e6020526040902060020154909150612d80908290610100900460ff16612d5f57604051806040016040528060028152602001614e6f60f01b815250613e0d565b6040518060400160405280600381526020016259657360e81b815250613e0d565b9050612da88160405180604001604052806004815260200163227d5d7d60e01b815250613e0d565b9050612dec6040518060400160405280601d81526020017f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081525061261383613f50565b949350505050565b600081815261012d60205260408120610ce6906140b5565b612e23600080516020615ee8833981519152612188565b612e3f5760405162461bcd60e51b8152600401610ec0906158d0565b600083815261022f6020526040902054612e6a576102308054906000612e648361585f565b91905055505b600092835261022f602052604090922090815560010155565b612e9a600080516020615f9d833981519152612188565b612eb65760405162461bcd60e51b8152600401610ec0906158d0565b612ec08282611c62565b156110c85781158015612eeb5750612ed6611c0a565b6001600160a01b0316816001600160a01b0316145b15612ef557600080fd5b612eff82826135dd565b61021b54604051637f7c149160e01b81526001600160a01b0390911690637f7c14919061109590849030906004016158b6565b600080516020615f9d833981519152612f4a8161339c565b600087815261022b6020908152604090912087519091612f6e9183918a0190614b69565b508551612f849060018301906020890190614b69565b508451612f9a9060028301906020880190614b69565b508351612fb09060038301906020870190614b69565b508251612fc69060048301906020860190614b69565b505050505050505050565b60005b818110156130b957612fe46132e1565b6001600160a01b0316613002848484818110610e8e57610e8e615810565b6001600160a01b0316146130285760405162461bcd60e51b8152600401610ec090615826565b600061022e600085858581811061304157613041615810565b9050602002013581526020019081526020016000209050600061307b85858581811061306f5761306f615810565b90506020020135611b87565b90508060011461308e5760018103613091565b60015b82555060028101805460ff19169055600060019182015561022d805460001901905501612fd4565b506130c26132e1565b6001600160a01b03167f20748b935fd9f21155c2e98cb2bd5df6fe86f21b193cebaae8d9ad7db0ba54168383604051610f3f92919061587a565b610219805461310a906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054613136906157db565b80156131835780601f1061315857610100808354040283529160200191613183565b820191906000526020600020905b81548152906001019060200180831161316657829003601f168201915b505050505081565b6131a2600080516020615ee8833981519152612188565b6131be5760405162461bcd60e51b8152600401610ec0906158d0565b61021c80546001600160a01b0319166001600160a01b0392909216919091179055565b6040805160808101825260008082526020820181905291810182905260608101919091526102315460ff16156132615750600090815261022e60209081526040918290208251608081018452815481526001820154928101929092526002015460ff80821615159383019390935261010090049091161515606082015290565b919050565b60006001600160e01b031982166380ac58cd60e01b148061329757506001600160e01b03198216635b5e139f60e01b145b80610ce65750610ce6826140bf565b6000816001111580156132bb575061015f5482105b8015610ce657505060009081526101636020526040902054600160e01b900460ff161590565b6000611c3d6140e4565b6000828152610165602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600081815261022e6020526040902061336082614106565b61336a9042615c92565b60018083019190915560028201805460ff1916909117905561022d80549060006133938361585f565b91905055505050565b61117c816133a86132e1565b614169565b60006133b8826138f1565b9050836001600160a01b031681600001516001600160a01b0316146133ef5760405162a1148160e81b815260040160405180910390fd5b6000846001600160a01b03166134036132e1565b6001600160a01b0316148061341f575061341f85610be26132e1565b8061344a575061342d6132e1565b6001600160a01b031661343f84610d7f565b6001600160a01b0316145b90508061346a57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661349157604051633a954ecd60e21b815260040160405180910390fd5b61349e85858560016141cd565b6134aa600084876132eb565b6001600160a01b0385811660009081526101646020908152604080832080546001600160401b03198082166001600160401b039283166000190183161790925589861680865283862080549384169383166001908101841694909417905589865261016390945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166135805761015f54821461358057805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b0316600080516020615f7d83398151915260405160405180910390a45b5050505050565b6135c4828261429d565b600082815261012d60205260409020610e589082614324565b6135e78282614339565b600082815261012d60205260409020610e5890826143be565b600061360b836138f1565b80519091508215613693576000816001600160a01b031661362a6132e1565b6001600160a01b03161480613646575061364682610be26132e1565b8061367157506136546132e1565b6001600160a01b031661366686610d7f565b6001600160a01b0316145b90508061369157604051632ce44b5f60e11b815260040160405180910390fd5b505b6136a18160008660016141cd565b6136ad600085836132eb565b6001600160a01b038082166000818152610164602090815260408083208054600160801b6000196001600160401b038084169190910181166001600160401b0319841681178390048216600190810183169093026001600160401b03600160801b03600160c01b0319909416179290921783558b8652610163909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166137a85761015f5482146137a857805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b03841690600080516020615f7d833981519152908390a45050610160805460010190555050565b60655460ff1661382b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ec0565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61385e6132e1565b60405161386b9190614ca9565b60405180910390a1565b60655460ff16156138bb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ec0565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861385e6132e1565b6138f9614b49565b81806001116139e85761015f548110156139e85760008181526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906139e65780516001600160a01b03161561397c579392505050565b506000190160008181526101636020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156139e1579392505050565b61397c565b505b604051636f96cda160e11b815260040160405180910390fd5b6000611c5b83836143d3565b60008054610100900460ff1615613a5b578160ff166001148015613a375750613a3530613e53565b155b613a535760405162461bcd60e51b8152600401610ec090615cbf565b506000919050565b60005460ff808416911610613a825760405162461bcd60e51b8152600401610ec090615cbf565b506000805460ff191660ff92909216919091179055600190565b600054610100900460ff16613ac35760405162461bcd60e51b8152600401610ec090615d0d565b613acb6143fd565b565b600054610100900460ff16613af45760405162461bcd60e51b8152600401610ec090615d0d565b613afc61442a565b61117c81614451565b600054610100900460ff16613b2c5760405162461bcd60e51b8152600401610ec090615d0d565b6110c882826144e0565b6110c882826135ba565b6000613b4b83611002565b600084815260fb6020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60655460ff1680613bb557506000818152610222602052604090206007015442105b80613bd157506000818152610222602052604090206008015442115b80613bef57506000818152610222602052604090206001015460ff16155b1561117c576040516347cc82cd60e01b815260040160405180910390fd5b60208082015160009081526102229091526040908190206005810154918301516060840151919291011115613c5557604051631f43edc360e11b815260040160405180910390fd5b8054156110c857816080015182606001511180613c7f575081608001518260400151836060015101115b15613c9d57604051631f43edc360e11b815260040160405180910390fd5b60a082015181548351608085015160405160609290921b6001600160601b03191660208301526034820152600092613cef9290916054016040516020818303038152906040528051906020012061453b565b50905080610e585760405163c8ac23c360e01b815260040160405180910390fd5b606081613d345750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613d5e5780613d488161585f565b9150613d579050600a83615d58565b9150613d38565b6000816001600160401b03811115613d7857613d78614f21565b6040519080825280601f01601f191660200182016040528015613da2576020820181803683370190505b5090505b8415612dec57613db7600183615c92565b9150613dc4600a86615d6c565b613dcf906030615c7a565b60f81b818381518110613de457613de4615810565b60200101906001600160f81b031916908160001a905350613e06600a86615d58565b9450613da6565b60608282604051602001613e22929190615d80565b604051602081830303815290604052905092915050565b6110c8828260405180602001604052806000815250614609565b6001600160a01b03163b151590565b6000836001600160a01b031663150b7a02613e7b6132e1565b8786866040518563ffffffff1660e01b8152600401613e9d9493929190615daf565b6020604051808303816000875af1925050508015613ed8575060408051601f3d908101601f19168201909252613ed591810190615de2565b60015b613f33573d808015613f06576040519150601f19603f3d011682016040523d82523d6000602084013e613f0b565b606091505b508051613f2b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060815160001415613f7057505060408051602081019091526000815290565b6000604051806060016040528060408152602001615f086040913990506000600384516002613f9f9190615c7a565b613fa99190615d58565b613fb4906004615dff565b90506000613fc3826020615c7a565b6001600160401b03811115613fda57613fda614f21565b6040519080825280601f01601f191660200182016040528015614004576020820181803683370190505b509050818152600183018586518101602084015b81831015614070576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101614018565b60038951066001811461408a576002811461409b576140a7565b613d3d60f01b6001198301526140a7565b603d60f81b6000198301525b509398975050505050505050565b6000610ce6825490565b60006001600160e01b03198216635a05180f60e01b1480610ce65750610ce6826147b3565b60006140ef336114ce565b15614101575060131936013560601c90565b503390565b6000808061411384611b87565b905060005b6102305481101561416057600081815261022f602052604090205482141561415857600081815261022f6020526040902060010154620151800292909201915b600101614118565b50909392505050565b6141738282611c62565b6110c85761418b816001600160a01b031660146147e8565b6141968360206147e8565b6040516020016141a7929190615e1e565b60408051601f198184030181529082905262461bcd60e51b8252610ec091600401614c7d565b60005b818110156135b3576001600160a01b038516158015906141f857506001600160a01b03841615155b1561428b5761022e600061420c8386615c7a565b815260208101919091526040016000206002015460ff161561428b5760405162461bcd60e51b815260206004820152603260248201527f554c54524150415353206d75737420626520756e7374616b6564206265666f72604482015271329039b0b6329037b9103a3930b739b332b960711b6064820152608401610ec0565b806142958161585f565b9150506141d0565b6142a78282611c62565b6110c857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556142e06132e1565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611c5b836001600160a01b038416614983565b6143438282611c62565b156110c857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff1916905561437a6132e1565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611c5b836001600160a01b0384166149d2565b60008260000182815481106143ea576143ea615810565b9060005260206000200154905092915050565b600054610100900460ff166144245760405162461bcd60e51b8152600401610ec090615d0d565b60018055565b600054610100900460ff16613acb5760405162461bcd60e51b8152600401610ec090615d0d565b600054610100900460ff166144785760405162461bcd60e51b8152600401610ec090615d0d565b60005b81518110156110c85760016097600084848151811061449c5761449c615810565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806144d88161585f565b91505061447b565b600054610100900460ff166145075760405162461bcd60e51b8152600401610ec090615d0d565b815161451b90610161906020850190614b69565b50805161453090610162906020840190614b69565b50600161015f555050565b6000808281805b87518110156145fd57614556600283615dff565b9150600088828151811061456c5761456c615810565b602002602001015190508084116145ae5760408051602081018690529081018290526060016040516020818303038152906040528051906020012093506145ea565b60408051602081018390529081018590526060016040516020818303038152906040528051906020012093506001836145e79190615c7a565b92505b50806145f58161585f565b915050614542565b50941495939450505050565b61015f546001600160a01b03841661463357604051622e076360e81b815260040160405180910390fd5b826146515760405163b562e8dd60e01b815260040160405180910390fd5b61465e60008583866141cd565b6001600160a01b03841660008181526101646020908152604080832080546001600160801b031981166001600160401b038083168b018116918217600160401b6001600160401b031990941690921783900481168b0181169092021790915585845261016390925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501906146f990613e53565b15614770575b60405182906001600160a01b03881690600090600080516020615f7d833981519152908290a46147386000878480600101955087613e62565b614755576040516368d2bf6b60e11b815260040160405180910390fd5b8082106146ff578261015f541461476b57600080fd5b6147a3565b5b6040516001830192906001600160a01b03881690600090600080516020615f7d833981519152908290a4808210614771575b5061015f55611874600085838684565b60006001600160e01b03198216637965db0b60e01b1480610ce657506301ffc9a760e01b6001600160e01b0319831614610ce6565b606060006147f7836002615dff565b614802906002615c7a565b6001600160401b0381111561481957614819614f21565b6040519080825280601f01601f191660200182016040528015614843576020820181803683370190505b509050600360fc1b8160008151811061485e5761485e615810565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061488d5761488d615810565b60200101906001600160f81b031916908160001a90535060006148b1846002615dff565b6148bc906001615c7a565b90505b6001811115614934576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106148f0576148f0615810565b1a60f81b82828151811061490657614906615810565b60200101906001600160f81b031916908160001a90535060049490941c9361492d81615e8d565b90506148bf565b508315611c5b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ec0565b60008181526001830160205260408120546149ca57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ce6565b506000610ce6565b60008181526001830160205260408120548015614abb5760006149f6600183615c92565b8554909150600090614a0a90600190615c92565b9050818114614a6f576000866000018281548110614a2a57614a2a615810565b9060005260206000200154905080876000018481548110614a4d57614a4d615810565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a8057614a80615ea4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ce6565b6000915050610ce6565b828054614ad1906157db565b90600052602060002090601f016020900481019282614af35760008555614b39565b82601f10614b0c5782800160ff19823516178555614b39565b82800160010185558215614b39579182015b82811115614b39578235825591602001919060010190614b1e565b50614b45929150614bdd565b5090565b604080516060810182526000808252602082018190529181019190915290565b828054614b75906157db565b90600052602060002090601f016020900481019282614b975760008555614b39565b82601f10614bb057805160ff1916838001178555614b39565b82800160010185558215614b39579182015b82811115614b39578251825591602001919060010190614bc2565b5b80821115614b455760008155600101614bde565b6001600160e01b03198116811461117c57600080fd5b600060208284031215614c1a57600080fd5b8135611c5b81614bf2565b60005b83811015614c40578181015183820152602001614c28565b838111156118745750506000910152565b60008151808452614c69816020860160208601614c25565b601f01601f19169290920160200192915050565b602081526000611c5b6020830184614c51565b600060208284031215614ca257600080fd5b5035919050565b6001600160a01b0391909116815260200190565b80356001600160a01b038116811461326157600080fd5b60008060408385031215614ce757600080fd5b614cf083614cbd565b946020939093013593505050565b60008083601f840112614d1057600080fd5b5081356001600160401b03811115614d2757600080fd5b6020830191508360208260051b8501011115614d4257600080fd5b9250929050565b60008060208385031215614d5c57600080fd5b82356001600160401b03811115614d7257600080fd5b614d7e85828601614cfe565b90969095509350505050565b600060208284031215614d9c57600080fd5b611c5b82614cbd565b600080600060608486031215614dba57600080fd5b614dc384614cbd565b9250614dd160208501614cbd565b9150604084013590509250925092565b60008060408385031215614df457600080fd5b82359150614e0460208401614cbd565b90509250929050565b60a081526000614e2060a0830188614c51565b8281036020840152614e328188614c51565b90508281036040840152614e468187614c51565b90508281036060840152614e5a8186614c51565b90508281036080840152614e6e8185614c51565b98975050505050505050565b60008060208385031215614e8d57600080fd5b82356001600160401b0380821115614ea457600080fd5b818501915085601f830112614eb857600080fd5b813581811115614ec757600080fd5b866020828501011115614ed957600080fd5b60209290920196919550909350505050565b801515811461117c57600080fd5b803561326181614eeb565b600060208284031215614f1657600080fd5b8135611c5b81614eeb565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f5f57614f5f614f21565b604052919050565b60006001600160401b03821115614f8057614f80614f21565b5060051b60200190565b60006020808385031215614f9d57600080fd5b82356001600160401b03811115614fb357600080fd5b8301601f81018513614fc457600080fd5b8035614fd7614fd282614f67565b614f37565b81815260059190911b82018301908381019087831115614ff657600080fd5b928401925b8284101561501457833582529284019290840190614ffb565b979650505050505050565b80516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b6020808252825182820181905260009190848201906040850190845b81811015611b7b5761507b83855161501f565b9284019260609290920191600101615068565b6020815281516020820152600060208301516150ae604084018215159052565b5060408301516101208060608501526150cb610140850183614c51565b91506060850151601f198584030160808601526150e88382614c51565b925050608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100818187015280870151838701525050508091505092915050565b6000610120828403121561513e57600080fd5b50919050565b6000806040838503121561515757600080fd5b82356001600160401b0381111561516d57600080fd5b6151798582860161512b565b95602094909401359450505050565b60006101008451151583526020850151602084015260408501516040840152606085015160608401526080850151608084015260a085015160a084015260c085015160c08401528060e084015283516020828501526151eb610120850182614c51565b9695505050505050565b60006020828403121561520757600080fd5b81356001600160401b0381111561521d57600080fd5b82016101008185031215611c5b57600080fd5b6020808252825182820181905260009190848201906040850190845b81811015611b7b5783518352928401929184019160010161524c565b60006020828403121561527a57600080fd5b81356001600160401b0381111561529057600080fd5b612dec8482850161512b565b600080604083850312156152af57600080fd5b50508035926020909101359150565b6000806000606084860312156152d357600080fd5b833592506020840135915060408401356152ec81614eeb565b809150509250925092565b60008060006060848603121561530c57600080fd5b61531584614cbd565b95602085013595506040909401359392505050565b60006001600160401b0383111561534357615343614f21565b615356601f8401601f1916602001614f37565b905082815283838301111561536a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261539257600080fd5b611c5b8383356020850161532a565b600082601f8301126153b257600080fd5b813560206153c2614fd283614f67565b82815260059290921b840181019181810190868411156153e157600080fd5b8286015b84811015615403576153f681614cbd565b83529183019183016153e5565b509695505050505050565b600080600080600080600060e0888a03121561542957600080fd5b61543288614cbd565b965060208801356001600160401b038082111561544e57600080fd5b61545a8b838c01615381565b975060408a013591508082111561547057600080fd5b61547c8b838c01615381565b965060608a013591508082111561549257600080fd5b61549e8b838c01615381565b955060808a01359150808211156154b457600080fd5b506154c18a828b016153a1565b9350506154d060a08901614cbd565b91506154de60c08901614cbd565b905092959891949750929550565b600080604083850312156154ff57600080fd5b61550883614cbd565b9150602083013561551881614eeb565b809150509250929050565b600080600080600080600080600080600060c08c8e03121561554457600080fd5b6001600160401b038c3581101561555a57600080fd5b6155678e8e358f01614cfe565b909c509a5060208d013581101561557d57600080fd5b61558d8e60208f01358f01614cfe565b909a50985060408d01358110156155a357600080fd5b6155b38e60408f01358f01614cfe565b909850965060608d01358110156155c957600080fd5b6155d98e60608f01358f01614cfe565b909650945060808d01358110156155ef57600080fd5b506156008d60808e01358e01614cfe565b909350915061561160a08d01614ef9565b90509295989b509295989b9093969950565b6000806000806080858703121561563957600080fd5b61564285614cbd565b935061565060208601614cbd565b92506040850135915060608501356001600160401b0381111561567257600080fd5b8501601f8101871361568357600080fd5b6156928782356020840161532a565b91505092959194509250565b60608101610ce6828461501f565b6000806000606084860312156156c157600080fd5b505081359360208301359350604090920135919050565b60008060008060008060c087890312156156f157600080fd5b8635955060208701356001600160401b038082111561570f57600080fd5b61571b8a838b01615381565b9650604089013591508082111561573157600080fd5b61573d8a838b01615381565b9550606089013591508082111561575357600080fd5b61575f8a838b01615381565b9450608089013591508082111561577557600080fd5b6157818a838b01615381565b935060a089013591508082111561579757600080fd5b506157a489828a01615381565b9150509295509295509295565b600080604083850312156157c457600080fd5b6157cd83614cbd565b9150614e0460208401614cbd565b600181811c908216806157ef57607f821691505b6020821081141561513e57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060001982141561587357615873615849565b5060010190565b6020808252810182905260006001600160fb1b0383111561589a57600080fd5b8260051b80856040850137600092016040019182525092915050565b6001600160a01b0392831681529116602082015260400190565b602080825260049082015263082eae8d60e31b604082015260600190565b60008135610ce681614eeb565b60ff1981541660ff8315151681178255505050565b6000808335601e1984360301811261592757600080fd5b8301803591506001600160401b0382111561594157600080fd5b602001915036819003821315614d4257600080fd5b601f821115610e5857600081815260208120601f850160051c8101602086101561597d5750805b601f850160051c820191505b818110156110c357828155600101615989565b600019600383901b1c191660019190911b1790565b6001600160401b038311156159c8576159c8614f21565b6159dc836159d683546157db565b83615956565b6000601f841160018114615a0a57600085156159f85750838201355b615a02868261599c565b8455506135b3565b600083815260209020601f19861690835b82811015615a3b5786850135825560209485019460019092019101615a1b565b5086821015615a585760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81358155615a86615a7d602084016158ee565b600183016158fb565b615a936040830183615910565b615aa18183600286016159b1565b5050615ab06060830183615910565b615abe8183600386016159b1565b50506080820135600482015560a0820135600582015560c0820135600682015560e0820135600782015561010082013560088201555050565b615b018283615910565b6001600160401b03811115615b1857615b18614f21565b615b2c81615b2685546157db565b85615956565b6000601f821160018114615b5a5760008315615b485750838201355b615b52848261599c565b8655506110c3565b600085815260209020601f19841690835b82811015615b8b5786850135825560209485019460019092019101615b6b565b5084821015615ba85760001960f88660031b161c19848701351681555b50505050600190811b019091555050565b8135615bc481614eeb565b615bce81836158fb565b506020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c0820135600682015560e0820135601e19833603018112615c2257600080fd5b610e5881840160078401615af7565b6000808335601e19843603018112615c4857600080fd5b8301803591506001600160401b03821115615c6257600080fd5b6020019150600581901b3603821315614d4257600080fd5b60008219821115615c8d57615c8d615849565b500190565b600082821015615ca457615ca4615849565b500390565b634e487b7160e01b600052601260045260246000fd5b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082615d6757615d67615ca9565b500490565b600082615d7b57615d7b615ca9565b500690565b60008351615d92818460208801614c25565b835190830190615da6818360208801614c25565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151eb90830184614c51565b600060208284031215615df457600080fd5b8151611c5b81614bf2565b6000816000190483118215151615615e1957615e19615849565b500290565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615e50816017850160208801614c25565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615e81816028840160208801614c25565b01602801949350505050565b600081615e9c57615e9c615849565b506000190190565b634e487b7160e01b600052603160045260246000fdfe227d2c207b2274726169745f74797065223a20225374616b696e67204c6576656c222c2276616c7565223a20228eb467f061ca67f42a2d2ca4a346fc9fb645efc0ba75056ee9f71c3a0ccc10a84142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f222c202261747472696275746573223a205b7b2274726169745f74797065223a20225365676d696e74222c2276616c7565223a2022ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef2ce8d04a9c35987429af538825cd2438cc5c5bb5dc427955f84daaa3ea105016227d2c207b2274726169745f74797065223a2022556c74696d617465222c2276616c7565223a2022a164736f6c634300080c000a

Deployed Bytecode

0x6080604052600436106103155760003560e01c806301ffc9a71461031a57806306fdde031461034f578063081812fc14610371578063095ea7b31461039e5780630fbf0a93146103c057806313af4035146103e057806318160ddd146104005780631e7269c51461042957806323b872dd14610457578063248a9ca3146104775780632f2ff15d1461049757806336568abe146104b75780633b6fda59146104d757806342842e0e1461051057806342966c681461053057806344861f5f146105505780634f64b2be1461057057806355f804b3146105a1578063572b6c05146105c157806357d159c6146105e15780635b8ad429146106015780635bbb2177146106165780635c975abb146106435780636182ff531461065b5780636352211e1461068857806363906d0d146106a857806364274fef146106da578063666f8ca4146106fa57806370a082311461071a578063738170a41461073a57806379502c551461075b578063817b1cd21461077e57806383de187b146107955780638462151c146107b557806387b63e3a146107e25780638a90be691461081b5780638b81a7ee1461083b5780638da5cb5b1461085b5780639010d07c1461087057806391d1485414610890578063931e28e9146108b0578063938e3d7b146108d157806395d89b41146108f157806398987b6e1461090657806399a2557a146109265780639ef44ead14610946578063a0a8e46014610966578063a217fddf14610982578063a22cb46514610997578063a475b5dd146109b7578063b3738dfc146109d2578063b506282a146109f2578063b522ecff14610a05578063b88d4fde14610a25578063c23dc68f14610a45578063c430683314610a72578063c87b56dd14610a92578063ca15c87314610ab2578063cb2ef6f714610ad2578063cf6355d814610afd578063d50267ee14610b1d578063d547741f14610b52578063e3caafed14610b72578063e449f34114610b92578063e8a3d48514610bb2578063e985e9c514610bc7578063ee4f1c4d14610c11578063f60ca60d14610c28578063fb108ea614610c49578063feedc5e614610c69575b600080fd5b34801561032657600080fd5b5061033a610335366004614c08565b610cc0565b60405190151581526020015b60405180910390f35b34801561035b57600080fd5b50610364610cec565b6040516103469190614c7d565b34801561037d57600080fd5b5061039161038c366004614c90565b610d7f565b6040516103469190614ca9565b3480156103aa57600080fd5b506103be6103b9366004614cd4565b610dc4565b005b3480156103cc57600080fd5b506103be6103db366004614d49565b610e5d565b3480156103ec57600080fd5b506103be6103fb366004614d8a565b610f4b565b34801561040c57600080fd5b506101605461015f5403600019015b604051908152602001610346565b34801561043557600080fd5b5061041b610444366004614d8a565b6101f66020526000908152604090205481565b34801561046357600080fd5b506103be610472366004614da5565b610ff7565b34801561048357600080fd5b5061041b610492366004614c90565b611002565b3480156104a357600080fd5b506103be6104b2366004614de1565b611017565b3480156104c357600080fd5b506103be6104d2366004614de1565b6110cc565b3480156104e357600080fd5b5061041b6104f2366004614cd4565b6101f760209081526000928352604080842090915290825290205481565b34801561051c57600080fd5b506103be61052b366004614da5565b611156565b34801561053c57600080fd5b506103be61054b366004614c90565b611171565b34801561055c57600080fd5b5061041b61056b366004614c90565b61117f565b34801561057c57600080fd5b5061059061058b366004614c90565b6111b7565b604051610346959493929190614e0d565b3480156105ad57600080fd5b506103be6105bc366004614e7a565b61148e565b3480156105cd57600080fd5b5061033a6105dc366004614d8a565b6114ce565b3480156105ed57600080fd5b506103be6105fc366004614f04565b6114ec565b34801561060d57600080fd5b506103be611534565b34801561062257600080fd5b50610636610631366004614f8a565b611577565b604051610346919061504c565b34801561064f57600080fd5b5060655460ff1661033a565b34801561066757600080fd5b5061067b610676366004614c90565b61162b565b604051610346919061508e565b34801561069457600080fd5b506103916106a3366004614c90565b611814565b3480156106b457600080fd5b5061022054610221546106c5919082565b60408051928352602083019190915201610346565b3480156106e657600080fd5b506103be6106f5366004615144565b611826565b34801561070657600080fd5b506103be610715366004614d8a565b61187a565b34801561072657600080fd5b5061041b610735366004614d8a565b6118d0565b34801561074657600080fd5b5061021d54610391906001600160a01b031681565b34801561076757600080fd5b5061077061191f565b604051610346929190615188565b34801561078a57600080fd5b5061041b61022d5481565b3480156107a157600080fd5b506103be6107b03660046151f5565b611a13565b3480156107c157600080fd5b506107d56107d0366004614d8a565b611a54565b6040516103469190615230565b3480156107ee57600080fd5b5061041b6107fd366004614c90565b3360009081526101f760209081526040808320938352929052205490565b34801561082757600080fd5b5061041b610836366004614c90565b611b87565b34801561084757600080fd5b506103be610856366004615268565b611be1565b34801561086757600080fd5b50610391611c0a565b34801561087c57600080fd5b5061039161088b36600461529c565b611c42565b34801561089c57600080fd5b5061033a6108ab366004614de1565b611c62565b3480156108bc57600080fd5b5061021e54610391906001600160a01b031681565b3480156108dd57600080fd5b506103be6108ec366004614e7a565b611c8d565b3480156108fd57600080fd5b50610364611ccd565b34801561091257600080fd5b506103be6109213660046152be565b611cdd565b34801561093257600080fd5b506107d56109413660046152f7565b611d48565b34801561095257600080fd5b506103be61096136600461540e565b611f10565b34801561097257600080fd5b5060405160018152602001610346565b34801561098e57600080fd5b5061041b600081565b3480156109a357600080fd5b506103be6109b23660046154ec565b6120b4565b3480156109c357600080fd5b506102315461033a9060ff1681565b3480156109de57600080fd5b5061033a6109ed366004614c90565b612188565b6103be610a00366004615523565b6121bc565b348015610a1157600080fd5b506103be610a20366004614d8a565b6127c8565b348015610a3157600080fd5b506103be610a40366004615623565b61281e565b348015610a5157600080fd5b50610a65610a60366004614c90565b612869565b604051610346919061569e565b348015610a7e57600080fd5b5061041b610a8d36600461529c565b612900565b348015610a9e57600080fd5b50610364610aad366004614c90565b61294a565b348015610abe57600080fd5b5061041b610acd366004614c90565b612df4565b348015610ade57600080fd5b507450726f707345524337323141556c7472615061737360581b61041b565b348015610b0957600080fd5b506103be610b183660046156ac565b612e0c565b348015610b2957600080fd5b506106c5610b38366004614c90565b61022f602052600090815260409020805460019091015482565b348015610b5e57600080fd5b506103be610b6d366004614de1565b612e83565b348015610b7e57600080fd5b506103be610b8d3660046156d8565b612f32565b348015610b9e57600080fd5b506103be610bad366004614d49565b612fd1565b348015610bbe57600080fd5b506103646130fc565b348015610bd357600080fd5b5061033a610be23660046157b1565b6001600160a01b0391821660009081526101666020908152604080832093909416825291909152205460ff1690565b348015610c1d57600080fd5b5061041b6102305481565b348015610c3457600080fd5b5061021c54610391906001600160a01b031681565b348015610c5557600080fd5b506103be610c64366004614d8a565b61318b565b348015610c7557600080fd5b50610c89610c84366004614c90565b6131e1565b6040516103469190815181526020808301519082015260408083015115159082015260609182015115159181019190915260800190565b6000610ccb82613266565b80610ce6575063152a902d60e11b6001600160e01b03198316145b92915050565b60606101618054610cfc906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054610d28906157db565b8015610d755780601f10610d4a57610100808354040283529160200191610d75565b820191906000526020600020905b815481529060010190602001808311610d5857829003601f168201915b5050505050905090565b6000610d8a826132a6565b610da7576040516333d1c03960e21b815260040160405180910390fd5b50600090815261016560205260409020546001600160a01b031690565b6000610dcf82611814565b9050806001600160a01b0316836001600160a01b03161415610e045760405163250fdee360e21b815260040160405180910390fd5b806001600160a01b0316610e166132e1565b6001600160a01b031614610e4d57610e3081610be26132e1565b610e4d576040516367d9dca160e11b815260040160405180910390fd5b610e588383836132eb565b505050565b60005b81811015610efc57610e706132e1565b6001600160a01b0316610e9a848484818110610e8e57610e8e615810565b90506020020135611814565b6001600160a01b031614610ec95760405162461bcd60e51b8152600401610ec090615826565b60405180910390fd5b610eea838383818110610ede57610ede615810565b90506020020135613348565b80610ef48161585f565b915050610e60565b50610f056132e1565b6001600160a01b03167f134b166c6094cc1ccbf1e3353ce5c3cd9fd29869051bdb999895854d77cc5ef68383604051610f3f92919061587a565b60405180910390a25050565b6000610f568161339c565b610f61600083611c62565b610f965760405162461bcd60e51b815260206004820152600660248201526510a0a226a4a760d11b6044820152606401610ec0565b61021a80546001600160a01b038481166001600160a01b03198316179092556040519116907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690610fea90839086906158b6565b60405180910390a1505050565b610e588383836133ad565b600090815260fb602052604090206001015490565b61102e600080516020615f9d833981519152612188565b61104a5760405162461bcd60e51b8152600401610ec0906158d0565b6110548282611c62565b6110c85761106282826135ba565b61021b546040516352c28fab60e01b81526001600160a01b03909116906352c28fab9061109590849030906004016158b6565b600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b505050505b5050565b6110d46132e1565b6001600160a01b0316816001600160a01b03161461114c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ec0565b6110c882826135dd565b610e588383836040518060200160405280600081525061281e565b61117c816001613600565b50565b600081815261022e602052604081206001015461119e57506000919050565b50600090815261022e6020526040902060010154420390565b61022b602052600090815260409020805481906111d3906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546111ff906157db565b801561124c5780601f106112215761010080835404028352916020019161124c565b820191906000526020600020905b81548152906001019060200180831161122f57829003601f168201915b505050505090806001018054611261906157db565b80601f016020809104026020016040519081016040528092919081815260200182805461128d906157db565b80156112da5780601f106112af576101008083540402835291602001916112da565b820191906000526020600020905b8154815290600101906020018083116112bd57829003601f168201915b5050505050908060020180546112ef906157db565b80601f016020809104026020016040519081016040528092919081815260200182805461131b906157db565b80156113685780601f1061133d57610100808354040283529160200191611368565b820191906000526020600020905b81548152906001019060200180831161134b57829003601f168201915b50505050509080600301805461137d906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546113a9906157db565b80156113f65780601f106113cb576101008083540402835291602001916113f6565b820191906000526020600020905b8154815290600101906020018083116113d957829003601f168201915b50505050509080600401805461140b906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054611437906157db565b80156114845780601f1061145957610100808354040283529160200191611484565b820191906000526020600020905b81548152906001019060200180831161146757829003601f168201915b5050505050905085565b6114a5600080516020615f9d833981519152612188565b6114c15760405162461bcd60e51b8152600401610ec0906158d0565b610e586102188383614ac5565b6001600160a01b031660009081526097602052604090205460ff1690565b611503600080516020615ee8833981519152612188565b61151f5760405162461bcd60e51b8152600401610ec0906158d0565b8061152c5761117c6137e2565b61117c613875565b61154b600080516020615ee8833981519152612188565b6115675760405162461bcd60e51b8152600401610ec0906158d0565b610231805460ff19166001179055565b80516060906000816001600160401b0381111561159657611596614f21565b6040519080825280602002602001820160405280156115cf57816020015b6115bc614b49565b8152602001906001900390816115b45790505b50905060005b828114611623576115fe8582815181106115f1576115f1615810565b6020026020010151612869565b82828151811061161057611610615810565b60209081029190910101526001016115d5565b509392505050565b61167f60405180610120016040528060008019168152602001600015158152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000828152610222602090815260409182902082516101208101845281548152600182015460ff1615159281019290925260028101805492939192918401916116c7906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546116f3906157db565b80156117405780601f1061171557610100808354040283529160200191611740565b820191906000526020600020905b81548152906001019060200180831161172357829003601f168201915b50505050508152602001600382018054611759906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054611785906157db565b80156117d25780601f106117a7576101008083540402835291602001916117d2565b820191906000526020600020905b8154815290600101906020018083116117b557829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b600061181f826138f1565b5192915050565b61183d600080516020615ee8833981519152612188565b6118595760405162461bcd60e51b8152600401610ec0906158d0565b60008181526102226020526040902082906118748282615a6a565b50505050565b611891600080516020615f9d833981519152612188565b6118ad5760405162461bcd60e51b8152600401610ec0906158d0565b61021b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166118f9576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b0316600090815261016460205260409020546001600160401b031690565b6040805160e081018252610223805460ff16151582526102245460208084019190915261022554838501526102265460608401526102275460808401526102285460a08401526102295460c0840152835190810190935261022a8054929391928290829061198c906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546119b8906157db565b8015611a055780601f106119da57610100808354040283529160200191611a05565b820191906000526020600020905b8154815290600101906020018083116119e857829003601f168201915b505050505081525050905082565b611a2a600080516020615ee8833981519152612188565b611a465760405162461bcd60e51b8152600401610ec0906158d0565b80610223610e588282615bb9565b60606000806000611a64856118d0565b90506000816001600160401b03811115611a8057611a80614f21565b604051908082528060200260200182016040528015611aa9578160200160208202803683370190505b509050611ab4614b49565b60015b838614611b7b5760008181526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529250611b1e57611b73565b81516001600160a01b031615611b3357815194505b876001600160a01b0316856001600160a01b03161415611b735780838780600101985081518110611b6657611b66615810565b6020026020010181815250505b600101611ab7565b50909695505050505050565b600081815261022e602052604081206002015460ff1615611baf57610ce682610a8d8461117f565b600082815261022e6020526040902054600110611bcd576001610ce6565b50600090815261022e602052604090205490565b611bf18161022060010154611826565b6102218054906000611c028361585f565b919050555050565b61021a54600090611c259082906001600160a01b0316611c62565b611c2f5750600090565b61021a546001600160a01b03165b905090565b600082815261012d60205260408120611c5b9083613a01565b9392505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611ca4600080516020615f9d833981519152612188565b611cc05760405162461bcd60e51b8152600401610ec0906158d0565b610e586102198383614ac5565b60606101628054610cfc906157db565b611cf4600080516020615ee8833981519152612188565b611d105760405162461bcd60e51b8152600401610ec0906158d0565b600092835261022c602090815260408085209390935561022e9052912060020180549115156101000261ff0019909216919091179055565b6060818310611d6a57604051631960ccad60e11b815260040160405180910390fd5b61015f546000906001851015611d7f57600194505b80841115611d8b578093505b6000611d96876118d0565b905084861015611db55785850381811015611daf578091505b50611db9565b5060005b6000816001600160401b03811115611dd357611dd3614f21565b604051908082528060200260200182016040528015611dfc578160200160208202803683370190505b50905081611e0f579350611c5b92505050565b6000611e1a88612869565b905060008160400151611e2b575080515b885b888114158015611e3d5750848714155b15611eff5760008181526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529350611ea257611ef7565b82516001600160a01b031615611eb757825191505b8a6001600160a01b0316826001600160a01b03161415611ef75780848880600101995081518110611eea57611eea615810565b6020026020010181815250505b600101611e2d565b505050928352509095945050505050565b6000611f1c6001613a0d565b90508015611f34576000805461ff0019166101001790555b611f3c613a9c565b611f4584613acd565b611f4f8787613b05565b61021d80546001600160a01b038086166001600160a01b03199283161790925561021a80548b841690831617905561021b8054928516929091169190911790558451611fa390610218906020880190614b69565b50610231805460ff19169055611fba600089613b36565b611fd3600080516020615f9d8339815191526000613b40565b611ff9600080516020615ee8833981519152600080516020615f9d833981519152613b40565b60016101f55561021b546040516352c28fab60e01b81526001600160a01b03909116906352c28fab90612032908b9030906004016158b6565b600060405180830381600087803b15801561204c57600080fd5b505af1158015612060573d6000803e3d6000fd5b5050505080156120aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6120bc6132e1565b6001600160a01b0316826001600160a01b031614156120ee5760405163b06307db60e01b815260040160405180910390fd5b8061016660006120fc6132e1565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556121406132e1565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161217c911515815260200190565b60405180910390a35050565b6000612196826108ab6132e1565b156121a357506001919050565b816121b057506000919050565b610ce66109ed83611002565b6002600154141561220f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ec0565b600260015561221d336114ce565b8061223757503261222c6132e1565b6001600160a01b0316145b6122695760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610ec0565b61228d60405180606001604052806000815260200160008152602001606081525090565b600080825260208083018290526040805191820181528282528301525b8b811015612482578c8c828181106122c4576122c4615810565b905060200201358260200181815101915081815250506122fb8787838181106122ef576122ef615810565b90506020020135613b93565b6124236040518060c00160405280336001600160a01b0316815260200189898581811061232a5761232a615810565b9050602002013581526020016101f76000336001600160a01b03166001600160a01b0316815260200190815260200160002060008b8b8781811061237057612370615810565b9050602002013581526020019081526020016000205481526020018f8f8581811061239d5761239d615810565b9050602002013581526020018b8b858181106123bb576123bb615810565b9050602002013581526020018d8d858181106123d9576123d9615810565b90506020028101906123eb9190615c31565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050915250613c0d565b8c8c8281811061243557612435615810565b90506020020135610220600201600089898581811061245657612456615810565b6020908102929092013583525081019190915260400160002060040154835191020182526001016122aa565b506102265460208201516101f55460019161249c91615c7a565b6124a69190615c92565b11156124eb5760405162461bcd60e51b815260206004820152601460248201527322bc31b2b2b232b21036b0bc1039bab838363c9760611b6044820152606401610ec0565b805134101561250d5760405163356680b760e01b815260040160405180910390fd5b61021d5460405160009182916001600160a01b039091169034908381818185875af1925050503d806000811461255f576040519150601f19603f3d011682016040523d82523d6000602084013e612564565b606091505b509150915060005b8d811015612744578e8e8281811061258657612586615810565b3360009081526101f760209081526040822092029390930135929091508b8b858181106125b5576125b5615810565b60209081029290920135835250810191909152604001600020805490910190556101f5545b8f8f838181106125ec576125ec615810565b905060200201356101f5540181101561271557612637612618866040015161261384613d10565b613e0d565b604051806040016040528060018152602001600b60fa1b815250613e0d565b604086015287878381811061264e5761264e615810565b600084815261022c60209081526040822092029390930135905550805b60058110156126d457604080514260208201526001600160601b03193360601b1691810191909152605481018290526002906074016040516020818303038152906040528051906020012060001c816126c6576126c6615ca9565b06919091019060010161266b565b50600581106126fd57600082815261022e60205260409020600201805461ff0019166101001790555b861561270c5761270c82613348565b506001016125da565b508e8e8281811061272857612728615810565b6101f5805460209092029390930135019091555060010161256c565b50602080840180513360008181526101f69094526040909320805490910190555161276f9190613e39565b336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f9284604001516040516127ac9190614c7d565b60405180910390a2505060018055505050505050505050505050565b6127df600080516020615f9d833981519152612188565b6127fb5760405162461bcd60e51b8152600401610ec0906158d0565b61021d80546001600160a01b0319166001600160a01b0392909216919091179055565b6128298484846133ad565b61283b836001600160a01b0316613e53565b156118745761284c84848484613e62565b611874576040516368d2bf6b60e11b815260040160405180910390fd5b612871614b49565b612879614b49565b600183108061288b575061015f548310155b156128965792915050565b5060008281526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615801592820192909252906128f75792915050565b611c5b836138f1565b60006001815b6102305481101561162357600081815261022f60205260409020600101546201518002841061294257600081815261022f602052604090205491505b600101612906565b6060612955826132a6565b61298c5760405162461bcd60e51b81526020600482015260086024820152672737902a37b5b2b760c11b6044820152606401610ec0565b6102315460ff16612a2a5761021880546129a5906157db565b80601f01602080910402602001604051908101604052809291908181526020018280546129d1906157db565b8015612a1e5780601f106129f357610100808354040283529160200191612a1e565b820191906000526020600020905b815481529060010190602001808311612a0157829003601f168201915b50505050509050919050565b600082815261022c6020908152604080832054835261022b825291829020825180840190935260158352747b226e616d65223a2022554c54524150415353202360581b9183019190915290606090612a83908290613e0d565b9050612a928161261386613d10565b9050612ac98160405180604001604052806013815260200172111610113232b9b1b934b83a34b7b7111d101160691b815250613e0d565b9050612b6181836001018054612ade906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054612b0a906157db565b8015612b575780601f10612b2c57610100808354040283529160200191612b57565b820191906000526020600020905b815481529060010190602001808311612b3a57829003601f168201915b5050505050613e0d565b9050612b92816040518060400160405280600d81526020016c1116101134b6b0b3b2911d101160991b815250613e0d565b9050612ba781836002018054612ade906157db565b9050612bbe81612613612bb987611b87565b613d10565b600085815261022e6020526040902060020154909150612c22908290610100900460ff16612bfb5760405180602001604052806000815250613e0d565b604051806040016040528060098152602001685f756c74696d61746560b81b815250613e0d565b9050612c3781836003018054612ade906157db565b9050612c6f81604051806040016040528060148152602001731116101132bc3a32b93730b62fbab936111d101160611b815250613e0d565b9050612c8481836004018054612ade906157db565b9050612ca881604051806060016040528060358152602001615f4860359139613e0d565b9050612cbd81836000018054612ade906157db565b9050612ce1816040518060600160405280602d8152602001615ebb602d9139613e0d565b9050612cf381612613612bb987611b87565b9050612d1781604051806060016040528060288152602001615fbd60289139613e0d565b600085815261022e6020526040902060020154909150612d80908290610100900460ff16612d5f57604051806040016040528060028152602001614e6f60f01b815250613e0d565b6040518060400160405280600381526020016259657360e81b815250613e0d565b9050612da88160405180604001604052806004815260200163227d5d7d60e01b815250613e0d565b9050612dec6040518060400160405280601d81526020017f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081525061261383613f50565b949350505050565b600081815261012d60205260408120610ce6906140b5565b612e23600080516020615ee8833981519152612188565b612e3f5760405162461bcd60e51b8152600401610ec0906158d0565b600083815261022f6020526040902054612e6a576102308054906000612e648361585f565b91905055505b600092835261022f602052604090922090815560010155565b612e9a600080516020615f9d833981519152612188565b612eb65760405162461bcd60e51b8152600401610ec0906158d0565b612ec08282611c62565b156110c85781158015612eeb5750612ed6611c0a565b6001600160a01b0316816001600160a01b0316145b15612ef557600080fd5b612eff82826135dd565b61021b54604051637f7c149160e01b81526001600160a01b0390911690637f7c14919061109590849030906004016158b6565b600080516020615f9d833981519152612f4a8161339c565b600087815261022b6020908152604090912087519091612f6e9183918a0190614b69565b508551612f849060018301906020890190614b69565b508451612f9a9060028301906020880190614b69565b508351612fb09060038301906020870190614b69565b508251612fc69060048301906020860190614b69565b505050505050505050565b60005b818110156130b957612fe46132e1565b6001600160a01b0316613002848484818110610e8e57610e8e615810565b6001600160a01b0316146130285760405162461bcd60e51b8152600401610ec090615826565b600061022e600085858581811061304157613041615810565b9050602002013581526020019081526020016000209050600061307b85858581811061306f5761306f615810565b90506020020135611b87565b90508060011461308e5760018103613091565b60015b82555060028101805460ff19169055600060019182015561022d805460001901905501612fd4565b506130c26132e1565b6001600160a01b03167f20748b935fd9f21155c2e98cb2bd5df6fe86f21b193cebaae8d9ad7db0ba54168383604051610f3f92919061587a565b610219805461310a906157db565b80601f0160208091040260200160405190810160405280929190818152602001828054613136906157db565b80156131835780601f1061315857610100808354040283529160200191613183565b820191906000526020600020905b81548152906001019060200180831161316657829003601f168201915b505050505081565b6131a2600080516020615ee8833981519152612188565b6131be5760405162461bcd60e51b8152600401610ec0906158d0565b61021c80546001600160a01b0319166001600160a01b0392909216919091179055565b6040805160808101825260008082526020820181905291810182905260608101919091526102315460ff16156132615750600090815261022e60209081526040918290208251608081018452815481526001820154928101929092526002015460ff80821615159383019390935261010090049091161515606082015290565b919050565b60006001600160e01b031982166380ac58cd60e01b148061329757506001600160e01b03198216635b5e139f60e01b145b80610ce65750610ce6826140bf565b6000816001111580156132bb575061015f5482105b8015610ce657505060009081526101636020526040902054600160e01b900460ff161590565b6000611c3d6140e4565b6000828152610165602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600081815261022e6020526040902061336082614106565b61336a9042615c92565b60018083019190915560028201805460ff1916909117905561022d80549060006133938361585f565b91905055505050565b61117c816133a86132e1565b614169565b60006133b8826138f1565b9050836001600160a01b031681600001516001600160a01b0316146133ef5760405162a1148160e81b815260040160405180910390fd5b6000846001600160a01b03166134036132e1565b6001600160a01b0316148061341f575061341f85610be26132e1565b8061344a575061342d6132e1565b6001600160a01b031661343f84610d7f565b6001600160a01b0316145b90508061346a57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661349157604051633a954ecd60e21b815260040160405180910390fd5b61349e85858560016141cd565b6134aa600084876132eb565b6001600160a01b0385811660009081526101646020908152604080832080546001600160401b03198082166001600160401b039283166000190183161790925589861680865283862080549384169383166001908101841694909417905589865261016390945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166135805761015f54821461358057805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b0316600080516020615f7d83398151915260405160405180910390a45b5050505050565b6135c4828261429d565b600082815261012d60205260409020610e589082614324565b6135e78282614339565b600082815261012d60205260409020610e5890826143be565b600061360b836138f1565b80519091508215613693576000816001600160a01b031661362a6132e1565b6001600160a01b03161480613646575061364682610be26132e1565b8061367157506136546132e1565b6001600160a01b031661366686610d7f565b6001600160a01b0316145b90508061369157604051632ce44b5f60e11b815260040160405180910390fd5b505b6136a18160008660016141cd565b6136ad600085836132eb565b6001600160a01b038082166000818152610164602090815260408083208054600160801b6000196001600160401b038084169190910181166001600160401b0319841681178390048216600190810183169093026001600160401b03600160801b03600160c01b0319909416179290921783558b8652610163909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166137a85761015f5482146137a857805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b03841690600080516020615f7d833981519152908390a45050610160805460010190555050565b60655460ff1661382b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ec0565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61385e6132e1565b60405161386b9190614ca9565b60405180910390a1565b60655460ff16156138bb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ec0565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861385e6132e1565b6138f9614b49565b81806001116139e85761015f548110156139e85760008181526101636020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906139e65780516001600160a01b03161561397c579392505050565b506000190160008181526101636020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156139e1579392505050565b61397c565b505b604051636f96cda160e11b815260040160405180910390fd5b6000611c5b83836143d3565b60008054610100900460ff1615613a5b578160ff166001148015613a375750613a3530613e53565b155b613a535760405162461bcd60e51b8152600401610ec090615cbf565b506000919050565b60005460ff808416911610613a825760405162461bcd60e51b8152600401610ec090615cbf565b506000805460ff191660ff92909216919091179055600190565b600054610100900460ff16613ac35760405162461bcd60e51b8152600401610ec090615d0d565b613acb6143fd565b565b600054610100900460ff16613af45760405162461bcd60e51b8152600401610ec090615d0d565b613afc61442a565b61117c81614451565b600054610100900460ff16613b2c5760405162461bcd60e51b8152600401610ec090615d0d565b6110c882826144e0565b6110c882826135ba565b6000613b4b83611002565b600084815260fb6020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60655460ff1680613bb557506000818152610222602052604090206007015442105b80613bd157506000818152610222602052604090206008015442115b80613bef57506000818152610222602052604090206001015460ff16155b1561117c576040516347cc82cd60e01b815260040160405180910390fd5b60208082015160009081526102229091526040908190206005810154918301516060840151919291011115613c5557604051631f43edc360e11b815260040160405180910390fd5b8054156110c857816080015182606001511180613c7f575081608001518260400151836060015101115b15613c9d57604051631f43edc360e11b815260040160405180910390fd5b60a082015181548351608085015160405160609290921b6001600160601b03191660208301526034820152600092613cef9290916054016040516020818303038152906040528051906020012061453b565b50905080610e585760405163c8ac23c360e01b815260040160405180910390fd5b606081613d345750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613d5e5780613d488161585f565b9150613d579050600a83615d58565b9150613d38565b6000816001600160401b03811115613d7857613d78614f21565b6040519080825280601f01601f191660200182016040528015613da2576020820181803683370190505b5090505b8415612dec57613db7600183615c92565b9150613dc4600a86615d6c565b613dcf906030615c7a565b60f81b818381518110613de457613de4615810565b60200101906001600160f81b031916908160001a905350613e06600a86615d58565b9450613da6565b60608282604051602001613e22929190615d80565b604051602081830303815290604052905092915050565b6110c8828260405180602001604052806000815250614609565b6001600160a01b03163b151590565b6000836001600160a01b031663150b7a02613e7b6132e1565b8786866040518563ffffffff1660e01b8152600401613e9d9493929190615daf565b6020604051808303816000875af1925050508015613ed8575060408051601f3d908101601f19168201909252613ed591810190615de2565b60015b613f33573d808015613f06576040519150601f19603f3d011682016040523d82523d6000602084013e613f0b565b606091505b508051613f2b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060815160001415613f7057505060408051602081019091526000815290565b6000604051806060016040528060408152602001615f086040913990506000600384516002613f9f9190615c7a565b613fa99190615d58565b613fb4906004615dff565b90506000613fc3826020615c7a565b6001600160401b03811115613fda57613fda614f21565b6040519080825280601f01601f191660200182016040528015614004576020820181803683370190505b509050818152600183018586518101602084015b81831015614070576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101614018565b60038951066001811461408a576002811461409b576140a7565b613d3d60f01b6001198301526140a7565b603d60f81b6000198301525b509398975050505050505050565b6000610ce6825490565b60006001600160e01b03198216635a05180f60e01b1480610ce65750610ce6826147b3565b60006140ef336114ce565b15614101575060131936013560601c90565b503390565b6000808061411384611b87565b905060005b6102305481101561416057600081815261022f602052604090205482141561415857600081815261022f6020526040902060010154620151800292909201915b600101614118565b50909392505050565b6141738282611c62565b6110c85761418b816001600160a01b031660146147e8565b6141968360206147e8565b6040516020016141a7929190615e1e565b60408051601f198184030181529082905262461bcd60e51b8252610ec091600401614c7d565b60005b818110156135b3576001600160a01b038516158015906141f857506001600160a01b03841615155b1561428b5761022e600061420c8386615c7a565b815260208101919091526040016000206002015460ff161561428b5760405162461bcd60e51b815260206004820152603260248201527f554c54524150415353206d75737420626520756e7374616b6564206265666f72604482015271329039b0b6329037b9103a3930b739b332b960711b6064820152608401610ec0565b806142958161585f565b9150506141d0565b6142a78282611c62565b6110c857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556142e06132e1565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611c5b836001600160a01b038416614983565b6143438282611c62565b156110c857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff1916905561437a6132e1565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611c5b836001600160a01b0384166149d2565b60008260000182815481106143ea576143ea615810565b9060005260206000200154905092915050565b600054610100900460ff166144245760405162461bcd60e51b8152600401610ec090615d0d565b60018055565b600054610100900460ff16613acb5760405162461bcd60e51b8152600401610ec090615d0d565b600054610100900460ff166144785760405162461bcd60e51b8152600401610ec090615d0d565b60005b81518110156110c85760016097600084848151811061449c5761449c615810565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806144d88161585f565b91505061447b565b600054610100900460ff166145075760405162461bcd60e51b8152600401610ec090615d0d565b815161451b90610161906020850190614b69565b50805161453090610162906020840190614b69565b50600161015f555050565b6000808281805b87518110156145fd57614556600283615dff565b9150600088828151811061456c5761456c615810565b602002602001015190508084116145ae5760408051602081018690529081018290526060016040516020818303038152906040528051906020012093506145ea565b60408051602081018390529081018590526060016040516020818303038152906040528051906020012093506001836145e79190615c7a565b92505b50806145f58161585f565b915050614542565b50941495939450505050565b61015f546001600160a01b03841661463357604051622e076360e81b815260040160405180910390fd5b826146515760405163b562e8dd60e01b815260040160405180910390fd5b61465e60008583866141cd565b6001600160a01b03841660008181526101646020908152604080832080546001600160801b031981166001600160401b038083168b018116918217600160401b6001600160401b031990941690921783900481168b0181169092021790915585845261016390925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501906146f990613e53565b15614770575b60405182906001600160a01b03881690600090600080516020615f7d833981519152908290a46147386000878480600101955087613e62565b614755576040516368d2bf6b60e11b815260040160405180910390fd5b8082106146ff578261015f541461476b57600080fd5b6147a3565b5b6040516001830192906001600160a01b03881690600090600080516020615f7d833981519152908290a4808210614771575b5061015f55611874600085838684565b60006001600160e01b03198216637965db0b60e01b1480610ce657506301ffc9a760e01b6001600160e01b0319831614610ce6565b606060006147f7836002615dff565b614802906002615c7a565b6001600160401b0381111561481957614819614f21565b6040519080825280601f01601f191660200182016040528015614843576020820181803683370190505b509050600360fc1b8160008151811061485e5761485e615810565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061488d5761488d615810565b60200101906001600160f81b031916908160001a90535060006148b1846002615dff565b6148bc906001615c7a565b90505b6001811115614934576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106148f0576148f0615810565b1a60f81b82828151811061490657614906615810565b60200101906001600160f81b031916908160001a90535060049490941c9361492d81615e8d565b90506148bf565b508315611c5b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ec0565b60008181526001830160205260408120546149ca57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ce6565b506000610ce6565b60008181526001830160205260408120548015614abb5760006149f6600183615c92565b8554909150600090614a0a90600190615c92565b9050818114614a6f576000866000018281548110614a2a57614a2a615810565b9060005260206000200154905080876000018481548110614a4d57614a4d615810565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614a8057614a80615ea4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ce6565b6000915050610ce6565b828054614ad1906157db565b90600052602060002090601f016020900481019282614af35760008555614b39565b82601f10614b0c5782800160ff19823516178555614b39565b82800160010185558215614b39579182015b82811115614b39578235825591602001919060010190614b1e565b50614b45929150614bdd565b5090565b604080516060810182526000808252602082018190529181019190915290565b828054614b75906157db565b90600052602060002090601f016020900481019282614b975760008555614b39565b82601f10614bb057805160ff1916838001178555614b39565b82800160010185558215614b39579182015b82811115614b39578251825591602001919060010190614bc2565b5b80821115614b455760008155600101614bde565b6001600160e01b03198116811461117c57600080fd5b600060208284031215614c1a57600080fd5b8135611c5b81614bf2565b60005b83811015614c40578181015183820152602001614c28565b838111156118745750506000910152565b60008151808452614c69816020860160208601614c25565b601f01601f19169290920160200192915050565b602081526000611c5b6020830184614c51565b600060208284031215614ca257600080fd5b5035919050565b6001600160a01b0391909116815260200190565b80356001600160a01b038116811461326157600080fd5b60008060408385031215614ce757600080fd5b614cf083614cbd565b946020939093013593505050565b60008083601f840112614d1057600080fd5b5081356001600160401b03811115614d2757600080fd5b6020830191508360208260051b8501011115614d4257600080fd5b9250929050565b60008060208385031215614d5c57600080fd5b82356001600160401b03811115614d7257600080fd5b614d7e85828601614cfe565b90969095509350505050565b600060208284031215614d9c57600080fd5b611c5b82614cbd565b600080600060608486031215614dba57600080fd5b614dc384614cbd565b9250614dd160208501614cbd565b9150604084013590509250925092565b60008060408385031215614df457600080fd5b82359150614e0460208401614cbd565b90509250929050565b60a081526000614e2060a0830188614c51565b8281036020840152614e328188614c51565b90508281036040840152614e468187614c51565b90508281036060840152614e5a8186614c51565b90508281036080840152614e6e8185614c51565b98975050505050505050565b60008060208385031215614e8d57600080fd5b82356001600160401b0380821115614ea457600080fd5b818501915085601f830112614eb857600080fd5b813581811115614ec757600080fd5b866020828501011115614ed957600080fd5b60209290920196919550909350505050565b801515811461117c57600080fd5b803561326181614eeb565b600060208284031215614f1657600080fd5b8135611c5b81614eeb565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f5f57614f5f614f21565b604052919050565b60006001600160401b03821115614f8057614f80614f21565b5060051b60200190565b60006020808385031215614f9d57600080fd5b82356001600160401b03811115614fb357600080fd5b8301601f81018513614fc457600080fd5b8035614fd7614fd282614f67565b614f37565b81815260059190911b82018301908381019087831115614ff657600080fd5b928401925b8284101561501457833582529284019290840190614ffb565b979650505050505050565b80516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b6020808252825182820181905260009190848201906040850190845b81811015611b7b5761507b83855161501f565b9284019260609290920191600101615068565b6020815281516020820152600060208301516150ae604084018215159052565b5060408301516101208060608501526150cb610140850183614c51565b91506060850151601f198584030160808601526150e88382614c51565b925050608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100818187015280870151838701525050508091505092915050565b6000610120828403121561513e57600080fd5b50919050565b6000806040838503121561515757600080fd5b82356001600160401b0381111561516d57600080fd5b6151798582860161512b565b95602094909401359450505050565b60006101008451151583526020850151602084015260408501516040840152606085015160608401526080850151608084015260a085015160a084015260c085015160c08401528060e084015283516020828501526151eb610120850182614c51565b9695505050505050565b60006020828403121561520757600080fd5b81356001600160401b0381111561521d57600080fd5b82016101008185031215611c5b57600080fd5b6020808252825182820181905260009190848201906040850190845b81811015611b7b5783518352928401929184019160010161524c565b60006020828403121561527a57600080fd5b81356001600160401b0381111561529057600080fd5b612dec8482850161512b565b600080604083850312156152af57600080fd5b50508035926020909101359150565b6000806000606084860312156152d357600080fd5b833592506020840135915060408401356152ec81614eeb565b809150509250925092565b60008060006060848603121561530c57600080fd5b61531584614cbd565b95602085013595506040909401359392505050565b60006001600160401b0383111561534357615343614f21565b615356601f8401601f1916602001614f37565b905082815283838301111561536a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261539257600080fd5b611c5b8383356020850161532a565b600082601f8301126153b257600080fd5b813560206153c2614fd283614f67565b82815260059290921b840181019181810190868411156153e157600080fd5b8286015b84811015615403576153f681614cbd565b83529183019183016153e5565b509695505050505050565b600080600080600080600060e0888a03121561542957600080fd5b61543288614cbd565b965060208801356001600160401b038082111561544e57600080fd5b61545a8b838c01615381565b975060408a013591508082111561547057600080fd5b61547c8b838c01615381565b965060608a013591508082111561549257600080fd5b61549e8b838c01615381565b955060808a01359150808211156154b457600080fd5b506154c18a828b016153a1565b9350506154d060a08901614cbd565b91506154de60c08901614cbd565b905092959891949750929550565b600080604083850312156154ff57600080fd5b61550883614cbd565b9150602083013561551881614eeb565b809150509250929050565b600080600080600080600080600080600060c08c8e03121561554457600080fd5b6001600160401b038c3581101561555a57600080fd5b6155678e8e358f01614cfe565b909c509a5060208d013581101561557d57600080fd5b61558d8e60208f01358f01614cfe565b909a50985060408d01358110156155a357600080fd5b6155b38e60408f01358f01614cfe565b909850965060608d01358110156155c957600080fd5b6155d98e60608f01358f01614cfe565b909650945060808d01358110156155ef57600080fd5b506156008d60808e01358e01614cfe565b909350915061561160a08d01614ef9565b90509295989b509295989b9093969950565b6000806000806080858703121561563957600080fd5b61564285614cbd565b935061565060208601614cbd565b92506040850135915060608501356001600160401b0381111561567257600080fd5b8501601f8101871361568357600080fd5b6156928782356020840161532a565b91505092959194509250565b60608101610ce6828461501f565b6000806000606084860312156156c157600080fd5b505081359360208301359350604090920135919050565b60008060008060008060c087890312156156f157600080fd5b8635955060208701356001600160401b038082111561570f57600080fd5b61571b8a838b01615381565b9650604089013591508082111561573157600080fd5b61573d8a838b01615381565b9550606089013591508082111561575357600080fd5b61575f8a838b01615381565b9450608089013591508082111561577557600080fd5b6157818a838b01615381565b935060a089013591508082111561579757600080fd5b506157a489828a01615381565b9150509295509295509295565b600080604083850312156157c457600080fd5b6157cd83614cbd565b9150614e0460208401614cbd565b600181811c908216806157ef57607f821691505b6020821081141561513e57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060001982141561587357615873615849565b5060010190565b6020808252810182905260006001600160fb1b0383111561589a57600080fd5b8260051b80856040850137600092016040019182525092915050565b6001600160a01b0392831681529116602082015260400190565b602080825260049082015263082eae8d60e31b604082015260600190565b60008135610ce681614eeb565b60ff1981541660ff8315151681178255505050565b6000808335601e1984360301811261592757600080fd5b8301803591506001600160401b0382111561594157600080fd5b602001915036819003821315614d4257600080fd5b601f821115610e5857600081815260208120601f850160051c8101602086101561597d5750805b601f850160051c820191505b818110156110c357828155600101615989565b600019600383901b1c191660019190911b1790565b6001600160401b038311156159c8576159c8614f21565b6159dc836159d683546157db565b83615956565b6000601f841160018114615a0a57600085156159f85750838201355b615a02868261599c565b8455506135b3565b600083815260209020601f19861690835b82811015615a3b5786850135825560209485019460019092019101615a1b565b5086821015615a585760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81358155615a86615a7d602084016158ee565b600183016158fb565b615a936040830183615910565b615aa18183600286016159b1565b5050615ab06060830183615910565b615abe8183600386016159b1565b50506080820135600482015560a0820135600582015560c0820135600682015560e0820135600782015561010082013560088201555050565b615b018283615910565b6001600160401b03811115615b1857615b18614f21565b615b2c81615b2685546157db565b85615956565b6000601f821160018114615b5a5760008315615b485750838201355b615b52848261599c565b8655506110c3565b600085815260209020601f19841690835b82811015615b8b5786850135825560209485019460019092019101615b6b565b5084821015615ba85760001960f88660031b161c19848701351681555b50505050600190811b019091555050565b8135615bc481614eeb565b615bce81836158fb565b506020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c0820135600682015560e0820135601e19833603018112615c2257600080fd5b610e5881840160078401615af7565b6000808335601e19843603018112615c4857600080fd5b8301803591506001600160401b03821115615c6257600080fd5b6020019150600581901b3603821315614d4257600080fd5b60008219821115615c8d57615c8d615849565b500190565b600082821015615ca457615ca4615849565b500390565b634e487b7160e01b600052601260045260246000fd5b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082615d6757615d67615ca9565b500490565b600082615d7b57615d7b615ca9565b500690565b60008351615d92818460208801614c25565b835190830190615da6818360208801614c25565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151eb90830184614c51565b600060208284031215615df457600080fd5b8151611c5b81614bf2565b6000816000190483118215151615615e1957615e19615849565b500290565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615e50816017850160208801614c25565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615e81816028840160208801614c25565b01602801949350505050565b600081615e9c57615e9c615849565b506000190190565b634e487b7160e01b600052603160045260246000fdfe227d2c207b2274726169745f74797065223a20225374616b696e67204c6576656c222c2276616c7565223a20228eb467f061ca67f42a2d2ca4a346fc9fb645efc0ba75056ee9f71c3a0ccc10a84142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f222c202261747472696275746573223a205b7b2274726169745f74797065223a20225365676d696e74222c2276616c7565223a2022ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef2ce8d04a9c35987429af538825cd2438cc5c5bb5dc427955f84daaa3ea105016227d2c207b2274726169745f74797065223a2022556c74696d617465222c2276616c7565223a2022a164736f6c634300080c000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.