ETH Price: $2,896.44 (-10.63%)
Gas: 36 Gwei

Contract

0x2686BFa46F4249033f7d4EBBC46eFB0687A903a1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040160917132022-12-01 18:21:59581 days ago1669918919IN
 Create: PropsERC721AUpgradeableAccess
0 ETH0.0901144419.58817167

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PropsERC721AUpgradeableAccess

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1 runs

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

//  ==========  External imports    ==========

import 'erc721a-upgradeable/contracts/ERC721AUpgradeable.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/MulticallUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.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";

//  ==========  Internal imports    ==========

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

import {DefaultOperatorFiltererUpgradeable} from "./opensea/DefaultOperatorFiltererUpgradeable.sol";

contract PropsERC721AUpgradeableAccess is
  Initializable,
  IOwnable,
  IAllowlist,
  IConfig,
  IPropsContract,
  ReentrancyGuardUpgradeable,
  PausableUpgradeable,
  ERC2771ContextUpgradeable,
  DefaultOperatorFiltererUpgradeable,
  MulticallUpgradeable,
  AccessControlEnumerableUpgradeable,
  ERC721AUpgradeable,
  ERC2981
{

  using StringsUpgradeable for uint256;
  using EnumerableSetUpgradeable for EnumerableSetUpgradeable.Bytes32Set;

  //////////////////////////////////////////////
  // State Vars
  /////////////////////////////////////////////

  bytes32 private constant MODULE_TYPE = bytes32("PropsERC721AU");
  uint256 private constant VERSION = 8;

  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 MINTER_ROLE = keccak256("MINTER_ROLE");
  bytes32 private constant PRODUCER_ROLE = keccak256("PRODUCER_ROLE");
  // @dev reserving space for 10 more roles
  bytes32[32] private __gap;

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

  Allowlists public allowlists;
  Config public config;

  //////////////////////////////////////////////
  // Errors
  /////////////////////////////////////////////

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

  //////////////////////////////////////////////
  // Events
  /////////////////////////////////////////////

  event Minted(address indexed account, string tokens);

  //////////////////////////////////////////////
  // Init
  /////////////////////////////////////////////

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

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

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

    nextTokenId = 1;

    // call registry add here
    // add default admin entry to registry
    IPropsAccessRegistry(accessRegistry).add(_defaultAdmin, address(this));
  }

  /*///////////////////////////////////////////////////////////////
                      Generic contract logic
  //////////////////////////////////////////////////////////////*/

  /// @dev Returns the type of the contract.
  function contractType() external pure returns (bytes32) {
      return MODULE_TYPE;
  }

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

  /**
   * @dev Returns the address of the current owner.
   */
  function owner() public view returns (address) {
      return hasRole(DEFAULT_ADMIN_ROLE, _owner) ? _owner : address(0);
  }

  /*///////////////////////////////////////////////////////////////
                      ERC 165 / 721A logic
  //////////////////////////////////////////////////////////////*/

  /**
   * @dev see {ERC721AUpgradeable}
   */
  function _startTokenId() internal view virtual override returns (uint256){
    return 1;
  }

  /**
   * @dev see {IERC721Metadata}
   */
  function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
      require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token");
      return string(abi.encodePacked(baseURI_, _tokenId.toString(), ".json"));
  }

  /**
   * @dev see {IERC165-supportsInterface}
   */
  function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerableUpgradeable, ERC721AUpgradeable, ERC2981) returns (bool) {
      return ERC721AUpgradeable.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId) || interfaceId == 0x01ffc9a7 || interfaceId == 0x80ac58cd || interfaceId == 0x5b5e139f || interfaceId == 0x2a55205a;
  }

  function mint(
    uint256[] calldata _quantities,
    bytes32[][] calldata _proofs,
    uint256[] calldata _allotments,
    uint256[] calldata _allowlistIds
  ) external payable nonReentrant {
    require(isTrustedForwarder(msg.sender) || _msgSender() == tx.origin, "BOT");
    require(isUniqueArray(_allowlistIds), "boo");
    uint256 _cost = 0;
    uint256 _quantity = 0;

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

      // @dev Require could save .029kb
      revertOnInactiveList(_allowlistIds[i]);
      revertOnAllocationCheckFailure(
        msg.sender,
        _allowlistIds[i],
        mintedByAllowlist[msg.sender][_allowlistIds[i]],
        _quantities[i],
        _allotments[i],
        _proofs[i]
      );
      _cost += allowlists.lists[_allowlistIds[i]].price * _quantities[i];
    }

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

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

    // mint _quantity tokens
    string memory tokensMinted = "";
    unchecked {
        for (uint i = nextTokenId; i < nextTokenId + _quantity; i++) {
            tokensMinted = string(abi.encodePacked(tokensMinted, i.toString(), ","));
        }
        for (uint i = 0; i < _quantities.length; i++) {
          mintedByAllowlist[address(msg.sender)][_allowlistIds[i]] += _quantities[i];
        }
        minted[address(msg.sender)] += _quantity;
        nextTokenId += _quantity;
        _safeMint(msg.sender, _quantity);
    }
    emit Minted(msg.sender, tokensMinted);
  }

   function airdrop(address[] calldata __to, uint256[] calldata __quantities) external minRole(MINTER_ROLE){
     for (uint i = 0; i < __to.length; i++) {
       nextTokenId += __quantities[i];
       _safeMint(__to[i], __quantities[i]);
     }
    }

  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();
  }

  // @dev +~0.695kb
  function revertOnAllocationCheckFailure(
    address _address,
    uint256 _allowlistId,
    uint256 _minted,
    uint256 _quantity,
    uint256 _alloted,
    bytes32[] calldata _proof
  ) internal view{
    Allowlist storage allowlist = allowlists.lists[_allowlistId];
    if(_quantity + _minted > allowlist.maxMintPerWallet) revert MintQuantityInvalid();
    if(allowlist.typedata != bytes32(0)){
      if (_quantity > _alloted || ((_quantity + _minted) > _alloted)) revert MintQuantityInvalid();
      (bool validMerkleProof, ) = MerkleProof.verify(
        _proof,
        allowlist.typedata,
        keccak256(abi.encodePacked(_address, _alloted))
      );
      if (!validMerkleProof) revert MerkleProofInvalid();
    }
  }

  /*///////////////////////////////////////////////////////////////
                      Allowlist Logic
  //////////////////////////////////////////////////////////////*/

  function setAllowlists(Allowlist[] calldata _allowlists)
      external
      minRole(PRODUCER_ROLE)
  {
    allowlists.count = _allowlists.length;
    for (uint256 i = 0; i < _allowlists.length; i++) {
      allowlists.lists[i] = _allowlists[i];
    }
  }

  function updateAllowlistByIndex(Allowlist calldata _allowlist, uint256 i)
      external
      minRole(PRODUCER_ROLE)
  {
      allowlists.lists[i] = _allowlist;
  }

  function addAllowlist(Allowlist calldata _allowlist)
      external
      minRole(PRODUCER_ROLE)
  {
      allowlists.lists[allowlists.count] = _allowlist;
      allowlists.count++;
  }

  /*///////////////////////////////////////////////////////////////
                      Getters
  //////////////////////////////////////////////////////////////*/

  /// @dev Returns the allowlist at the given uid.
  function getAllowlistById(uint256 _allowlistId) external view returns (Allowlist memory allowlist) {
      allowlist = allowlists.lists[_allowlistId];
  }

  /// @dev Returns the number of minted tokens for sender by allowlist.
  function getMintedByAllowlist(uint256 _allowlistId) external view returns (uint256 mintedBy) {
      mintedBy = mintedByAllowlist[msg.sender][_allowlistId];
  }

  /*///////////////////////////////////////////////////////////////
                      Setters
  //////////////////////////////////////////////////////////////*/

  function setRoyalty(uint96 _royalty) external minRole(PRODUCER_ROLE) {
        _setDefaultRoyalty(rWallet, _royalty);
  }

  function setRoyaltyWallet(address _address)
      external
      minRole(CONTRACT_ADMIN_ROLE)
    {
        rWallet = _address;
    }

  function setReceivingWallet(address _address)
      external
      minRole(CONTRACT_ADMIN_ROLE)
  {
    receivingWallet = _address;
  }

  function setConfig(Config calldata _config)
      external
      minRole(PRODUCER_ROLE)
  {
    config = _config;
  }

  /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin.
  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);
  }

  /// @dev Lets a contract admin set the URI for contract-level metadata.
  function setContractURI(string calldata _uri) external minRole(CONTRACT_ADMIN_ROLE) {
      contractURI = _uri;
  }

  /// @dev Lets a contract admin set the URI for the baseURI.
  function setBaseURI(string calldata _baseURI) external minRole(CONTRACT_ADMIN_ROLE) {
      baseURI_ = _baseURI;
  }

  /// @dev Lets a contract admin set the address for the access registry.
  function setAccessRegistry(address _accessRegistry) external minRole(CONTRACT_ADMIN_ROLE) {
      accessRegistry = _accessRegistry;
  }

  /// @dev Lets a contract admin set the address for the parent project.
  function setProject(address _project) external minRole(PRODUCER_ROLE) {
      project = _project;
  }


  /*///////////////////////////////////////////////////////////////
                      Miscellaneous / Overrides
  //////////////////////////////////////////////////////////////*/

  function pause() external minRole(MINTER_ROLE){
    _pause();
  }

  function unpause() external minRole(MINTER_ROLE){
    _unpause();
  }

  function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) minRole(CONTRACT_ADMIN_ROLE) {
    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) minRole(CONTRACT_ADMIN_ROLE) {
    if(hasRole(role, account)){
      // @dev ya'll can't take your own admin role, fool.
      if(role == DEFAULT_ADMIN_ROLE && account == owner()) revert();
      // #TODO check if it still adds roles (enumerable)!
      super._revokeRole(role,account);
      IPropsAccessRegistry(accessRegistry).remove(account, address(this));
    }
  }

  /**
   * @dev Check if minimum role for function is required.
   */
  modifier minRole(bytes32 _role) {
      require(_hasMinRole(_role), "Not authorized");
      _;
  }

  function hasMinRole(bytes32 _role) public view virtual returns (bool){
    return _hasMinRole(_role);
  }

  function _hasMinRole(bytes32 _role) internal view returns (bool) {
      // @dev does account have role?
      if(hasRole(_role, _msgSender())) return true;
      // @dev are we checking against default admin?
      if(_role == DEFAULT_ADMIN_ROLE) return false;
      // @dev walk up tree to check if user has role admin role
      return _hasMinRole(getRoleAdmin(_role));
  }

  /// @dev Burns `tokenId`. See {ERC721-_burn}.
  function burn(uint256 tokenId) public virtual {
      _burn(tokenId, true);
  }
 function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId) public payable override(ERC721AUpgradeable) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
        public
        payable
        override
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }

  function isUniqueArray(uint256[] calldata _array)
        internal
        pure
        returns (bool)
    {
        for (uint256 i = 0; i < _array.length; i++) {
            for (uint256 j = 0; j < _array.length; j++) {
                if (_array[i] == _array[j] && i != j) return false;
            }
        }
        return true;
    }

  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 36 : ERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721ReceiverUpgradeable {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
    using ERC721AStorage for ERC721AStorage.Layout;

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

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

    function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        ERC721AStorage.layout()._name = name_;
        ERC721AStorage.layout()._symbol = symbol_;
        ERC721AStorage.layout()._currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

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

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return ERC721AStorage.layout()._currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId();
        }
    }

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

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return ERC721AStorage.layout()._burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return
            (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return
            (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary 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 virtual {
        uint256 packed = ERC721AStorage.layout()._packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        ERC721AStorage.layout()._packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    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, _toString(tokenId))) : '';
    }

    /**
     * @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, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(ERC721AStorage.layout()._packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (ERC721AStorage.layout()._packedOwnerships[index] == 0) {
            ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
        if (_startTokenId() <= tokenId) {
            packed = ERC721AStorage.layout()._packedOwnerships[tokenId];
            // If not burned.
            if (packed & _BITMASK_BURNED == 0) {
                // If the data at the starting slot does not exist, start the scan.
                if (packed == 0) {
                    if (tokenId >= ERC721AStorage.layout()._currentIndex) revert OwnerQueryForNonexistentToken();
                    // Invariant:
                    // There will always be an initialized ownership slot
                    // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                    // before an unintialized ownership slot
                    // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                    // Hence, `tokenId` will not underflow.
                    //
                    // We can directly compare the packed value.
                    // If the address is zero, packed will be zero.
                    for (;;) {
                        unchecked {
                            packed = ERC721AStorage.layout()._packedOwnerships[--tokenId];
                        }
                        if (packed == 0) continue;
                        return packed;
                    }
                }
                // Otherwise, the data exists and is not burned. We can skip the scan.
                // This is possible because we have already achieved the target condition.
                // This saves 2143 gas on transfers of initialized tokens.
                return packed;
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        _approve(to, tokenId, true);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return ERC721AStorage.layout()._tokenApprovals[tokenId].value;
    }

    /**
     * @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) public virtual override {
        ERC721AStorage.layout()._operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return ERC721AStorage.layout()._operatorApprovals[owner][operator];
    }

    /**
     * @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. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < ERC721AStorage.layout()._currentIndex && // If within bounds,
            ERC721AStorage.layout()._packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // 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 {
            // We can directly increment and decrement the balances.
            --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`.
            ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @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 memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @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 Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try
            ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)
        returns (bytes4 retval) {
            return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @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 for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = ERC721AStorage.layout()._currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            ERC721AStorage.layout()._currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = ERC721AStorage.layout()._currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            ERC721AStorage.layout()._currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, 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.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = ERC721AStorage.layout()._currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (ERC721AStorage.layout()._currentIndex != end) revert();
            }
        }
    }

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

    // =============================================================
    //                       APPROVAL OPERATIONS
    // =============================================================

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

    /**
     * @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:
     *
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        bool approvalCheck
    ) internal virtual {
        address owner = ownerOf(tokenId);

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

        ERC721AStorage.layout()._tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @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 {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // 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 {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            ERC721AStorage.layout()._packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

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

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = ERC721AStorage.layout()._packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        ERC721AStorage.layout()._packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * 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 _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 3 of 36 : 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 4 of 36 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

    function _nonReentrantAfter() private {
        // 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 5 of 36 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        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 6 of 36 : MulticallUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * _Available since v4.1._
 */
abstract contract MulticallUpgradeable is Initializable {
    function __Multicall_init() internal onlyInitializing {
    }

    function __Multicall_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Receives and executes a batch of function calls on this contract.
     */
    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            results[i] = _functionDelegateCall(address(this), data[i]);
        }
        return results;
    }

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
    }

    /**
     * @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 7 of 36 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/MathUpgradeable.sol";

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = MathUpgradeable.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, MathUpgradeable.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 8 of 36 : 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 36 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

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.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
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) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

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

        /// @solidity memory-safe-assembly
        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 in 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;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 10 of 36 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 11 of 36 : 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 12 of 36 : 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 13 of 36 : 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 14 of 36 : 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 15 of 36 : 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 16 of 36 : 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 17 of 36 : 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 18 of 36 : DefaultOperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFiltererUpgradeable} from "./OperatorFiltererUpgradeable.sol";

abstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    function __DefaultOperatorFilterer_init() internal onlyInitializing {
        OperatorFiltererUpgradeable.__OperatorFilterer_init(DEFAULT_SUBSCRIPTION, true);
    }
}

File 19 of 36 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` 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 payable;

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 20 of 36 : ERC721AStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library ERC721AStorage {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    struct Layout {
        // =============================================================
        //                            STORAGE
        // =============================================================

        // The next token ID to be minted.
        uint256 _currentIndex;
        // The number of tokens burned.
        uint256 _burnCounter;
        // Token name
        string _name;
        // Token symbol
        string _symbol;
        // Mapping from token ID to ownership details
        // An empty struct value does not necessarily mean the token is unowned.
        // See {_packedOwnershipOf} implementation for details.
        //
        // Bits Layout:
        // - [0..159]   `addr`
        // - [160..223] `startTimestamp`
        // - [224]      `burned`
        // - [225]      `nextInitialized`
        // - [232..255] `extraData`
        mapping(uint256 => uint256) _packedOwnerships;
        // Mapping owner address to address data.
        //
        // Bits Layout:
        // - [0..63]    `balance`
        // - [64..127]  `numberMinted`
        // - [128..191] `numberBurned`
        // - [192..255] `aux`
        mapping(address => uint256) _packedAddressData;
        // Mapping from token ID to approved address.
        mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals;
        // Mapping from owner to operator approvals
        mapping(address => mapping(address => bool)) _operatorApprovals;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 21 of 36 : ERC721A__Initializable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable diamond facet 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.
 *
 * 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.
 */

import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';

abstract contract ERC721A__Initializable {
    using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializerERC721A() {
        // 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, because in other contexts the
        // contract may have been reentered.
        require(
            ERC721A__InitializableStorage.layout()._initializing
                ? _isConstructor()
                : !ERC721A__InitializableStorage.layout()._initialized,
            'ERC721A__Initializable: contract is already initialized'
        );

        bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = true;
            ERC721A__InitializableStorage.layout()._initialized = true;
        }

        _;

        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializingERC721A() {
        require(
            ERC721A__InitializableStorage.layout()._initializing,
            'ERC721A__Initializable: contract is not initializing'
        );
        _;
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        assembly {
            cs := extcodesize(self)
        }
        return cs == 0;
    }
}

File 22 of 36 : ERC721A__InitializableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base storage for the  initialization function for upgradeable diamond facet contracts
 **/

library ERC721A__InitializableStorage {
    struct Layout {
        /*
         * Indicates that the contract has been initialized.
         */
        bool _initialized;
        /*
         * Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 23 of 36 : 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 24 of 36 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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(account),
                        " 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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    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`.
     *
     * May emit a {RoleRevoked} event.
     */
    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.
     *
     * May emit a {RoleGranted} event.
     *
     * [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.
     *
     * May emit a {RoleGranted} event.
     */
    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.
     *
     * May emit a {RoleRevoked} event.
     */
    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 25 of 36 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 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.
     *
     * 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.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * 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.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _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.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Internal function that returns the initialized version. Returns `_initialized`
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Internal function that returns the initialized version. Returns `_initializing`
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 26 of 36 : 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;
}

File 27 of 36 : 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 28 of 36 : 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 29 of 36 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 30 of 36 : MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUpgradeable {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 31 of 36 : 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 32 of 36 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.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 IERC2981 is IERC165 {
    /**
     * @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 33 of 36 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 35 of 36 : OperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

abstract contract OperatorFiltererUpgradeable is Initializable {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant operatorFilterRegistry =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        onlyInitializing
    {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(operatorFilterRegistry).code.length > 0) {
            if (!operatorFilterRegistry.isRegistered(address(this))) {
                if (subscribe) {
                    operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    if (subscriptionOrRegistrantToCopy != address(0)) {
                        operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                    } else {
                        operatorFilterRegistry.register(address(this));
                    }
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(operatorFilterRegistry).code.length > 0) {
            // Allow spending tokens from addresses with balance
            // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
            // from an EOA.
            if (from == msg.sender) {
                _;
                return;
            }
            if (!operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(operatorFilterRegistry).code.length > 0) {
            if (!operatorFilterRegistry.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
        _;
    }
}

File 36 of 36 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

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":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"MerkleProofInvalid","type":"error"},{"inputs":[],"name":"MintClosed","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintQuantityInvalid","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","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":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":"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"},{"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":[{"internalType":"address[]","name":"__to","type":"address[]"},{"internalType":"uint256[]","name":"__quantities","type":"uint256[]"}],"name":"airdrop","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":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"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":"_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":"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[]"}],"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":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","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":"rWallet","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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_accessRegistry","type":"address"}],"name":"setAccessRegistry","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":"_allowlists","type":"tuple[]"}],"name":"setAllowlists","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":"uint96","name":"_royalty","type":"uint96"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setRoyaltyWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"unpause","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"}]

608060405234801561001057600080fd5b50615240806100206000396000f3fe6080604052600436106102915760003560e01c806301ffc9a71461029657806306fdde03146102cb578063081812fc146102ed578063095ea7b31461031a57806313af40351461032f57806318160ddd1461034f5780631e7269c51461037257806323b872dd146103a0578063248a9ca3146103b35780632a55205a146103d35780632f2ff15d1461041257806336568abe146104325780633b6fda59146104525780633dc3df7d1461048b5780633f4ba83a146104ac57806342842e0e146104c157806342966c68146104d457806355f804b3146104f4578063572b6c05146105145780635c975abb146105345780636182ff531461054c5780636352211e1461057957806363906d0d1461059957806364274fef146105cb578063666f8ca4146105eb578063672434821461060b57806370a082311461062b578063738170a41461064b57806379502c551461066c578063806feae31461068f57806383de187b146106af5780638456cb59146106cf57806387b63e3a146106e45780638b81a7ee1461071d5780638da5cb5b1461073d5780639010d07c1461075257806391d1485414610772578063938e3d7b1461079257806394259399146107b257806395d89b41146107c55780639ef44ead146107da578063a0a8e460146107fa578063a217fddf14610816578063a22cb4651461082b578063ac9650d81461084b578063b3738dfc14610878578063b522ecff14610898578063b88d4fde146108b8578063c87b56dd146108cb578063ca15c873146108eb578063cac926691461090b578063cb2ef6f71461092b578063cdeee6371461094e578063d547741f1461096e578063e8a3d4851461098e578063e985e9c5146109a3578063f60ca60d146109c3578063fb108ea6146109e4575b600080fd5b3480156102a257600080fd5b506102b66102b13660046140f3565b610a04565b60405190151581526020015b60405180910390f35b3480156102d757600080fd5b506102e0610a90565b6040516102c29190614168565b3480156102f957600080fd5b5061030d61030836600461417b565b610b2b565b6040516102c29190614194565b61032d6103283660046141bf565b610b78565b005b34801561033b57600080fd5b5061032d61034a3660046141e9565b610c39565b34801561035b57600080fd5b50610364610ce5565b6040519081526020016102c2565b34801561037e57600080fd5b5061036461038d3660046141e9565b6101946020526000908152604090205481565b61032d6103ae366004614204565b610d05565b3480156103bf57600080fd5b506103646103ce36600461417b565b610ddf565b3480156103df57600080fd5b506103f36103ee366004614240565b610df5565b604080516001600160a01b0390931683526020830191909152016102c2565b34801561041e57600080fd5b5061032d61042d366004614262565b610ea5565b34801561043e57600080fd5b5061032d61044d366004614262565b610f5b565b34801561045e57600080fd5b5061036461046d3660046141bf565b61019560209081526000928352604080842090915290825290205481565b34801561049757600080fd5b506101bc5461030d906001600160a01b031681565b3480156104b857600080fd5b5061032d610fe9565b61032d6104cf366004614204565b611028565b3480156104e057600080fd5b5061032d6104ef36600461417b565b6110f7565b34801561050057600080fd5b5061032d61050f36600461428e565b611102565b34801561052057600080fd5b506102b661052f3660046141e9565b611143565b34801561054057600080fd5b5060655460ff166102b6565b34801561055857600080fd5b5061056c61056736600461417b565b611161565b6040516102c291906142ff565b34801561058557600080fd5b5061030d61059436600461417b565b61134a565b3480156105a557600080fd5b506101be546101bf546105b6919082565b604080519283526020830191909152016102c2565b3480156105d757600080fd5b5061032d6105e63660046143b5565b611355565b3480156105f757600080fd5b5061032d6106063660046141e9565b6113ab565b34801561061757600080fd5b5061032d61062636600461443d565b611403565b34801561063757600080fd5b506103646106463660046141e9565b6114d5565b34801561065757600080fd5b506101bb5461030d906001600160a01b031681565b34801561067857600080fd5b5061068161153d565b6040516102c29291906144a8565b34801561069b57600080fd5b5061032d6106aa366004614515565b611631565b3480156106bb57600080fd5b5061032d6106ca366004614556565b6116c8565b3480156106db57600080fd5b5061032d61170a565b3480156106f057600080fd5b506103646106ff36600461417b565b33600090815261019560209081526040808320938352929052205490565b34801561072957600080fd5b5061032d610738366004614591565b611746565b34801561074957600080fd5b5061030d6117b5565b34801561075e57600080fd5b5061030d61076d366004614240565b6117ed565b34801561077e57600080fd5b506102b661078d366004614262565b61180d565b34801561079e57600080fd5b5061032d6107ad36600461428e565b611839565b61032d6107c03660046145c5565b61187a565b3480156107d157600080fd5b506102e0611cc6565b3480156107e657600080fd5b5061032d6107f53660046147cb565b611cde565b34801561080657600080fd5b50604051600881526020016102c2565b34801561082257600080fd5b50610364600081565b34801561083757600080fd5b5061032d6108463660046148b7565b61204e565b34801561085757600080fd5b5061086b610866366004614515565b612101565b6040516102c291906148ee565b34801561088457600080fd5b506102b661089336600461417b565b6121f5565b3480156108a457600080fd5b5061032d6108b33660046141e9565b612200565b61032d6108c6366004614950565b612258565b3480156108d757600080fd5b506102e06108e636600461417b565b61232e565b3480156108f757600080fd5b5061036461090636600461417b565b6123d0565b34801561091757600080fd5b5061032d6109263660046149cb565b6123e8565b34801561093757600080fd5b506c50726f7073455243373231415560981b610364565b34801561095a57600080fd5b5061032d6109693660046141e9565b612433565b34801561097a57600080fd5b5061032d610989366004614262565b61248b565b34801561099a57600080fd5b506102e061253b565b3480156109af57600080fd5b506102b66109be3660046149f4565b6125ca565b3480156109cf57600080fd5b506101ba5461030d906001600160a01b031681565b3480156109f057600080fd5b5061032d6109ff3660046141e9565b612607565b6000610a0f8261265f565b80610a1e5750610a1e826126ad565b80610a3957506301ffc9a760e01b6001600160e01b03198316145b80610a5457506380ac58cd60e01b6001600160e01b03198316145b80610a6f5750635b5e139f60e01b6001600160e01b03198316145b80610a8a575063152a902d60e11b6001600160e01b03198316145b92915050565b6060610a9a6126e2565b6002018054610aa890614a1e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad490614a1e565b8015610b215780601f10610af657610100808354040283529160200191610b21565b820191906000526020600020905b815481529060010190602001808311610b0457829003601f168201915b5050505050905090565b6000610b3682612706565b610b53576040516333d1c03960e21b815260040160405180910390fd5b610b5b6126e2565b60009283526006016020525060409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b15610c2a57604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490610bc19030908590600401614a52565b602060405180830381865afa158015610bde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c029190614a6c565b610c2a5780604051633b79c77360e21b8152600401610c219190614194565b60405180910390fd5b610c34838361274f565b505050565b6000610c448161275b565b610c4f60008361180d565b610c845760405162461bcd60e51b815260206004820152600660248201526510a0a226a4a760d11b6044820152606401610c21565b6101b880546001600160a01b038481166001600160a01b03198316179092556040519116907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690610cd89083908690614a52565b60405180910390a1505050565b60006001610cf16126e2565b60010154610cfd6126e2565b540303919050565b826daaeb6d7670e522a718067333cd4e3b15610dce57336001600160a01b03821603610d3b57610d3684848461276c565b610dd9565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490610d6e9030903390600401614a52565b602060405180830381865afa158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf9190614a6c565b610dce5733604051633b79c77360e21b8152600401610c219190614194565b610dd984848461276c565b50505050565b600090815261012d602052604090206001015490565b6000828152610192602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610e6c575060408051808201909152610191546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610e8b906001600160601b031687614a9f565b610e959190614abe565b91519350909150505b9250929050565b600080516020615214833981519152610ebd8161294f565b610ed95760405162461bcd60e51b8152600401610c2190614ae0565b610ee3838361180d565b610c3457610ef18383612988565b6101b9546040516352c28fab60e01b81526001600160a01b03909116906352c28fab90610f249085903090600401614a52565b600060405180830381600087803b158015610f3e57600080fd5b505af1158015610f52573d6000803e3d6000fd5b50505050505050565b610f636129ab565b6001600160a01b0316816001600160a01b031614610fdb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c21565b610fe582826129b5565b5050565b6000805160206151d48339815191526110018161294f565b61101d5760405162461bcd60e51b8152600401610c2190614ae0565b6110256129d8565b50565b826daaeb6d7670e522a718067333cd4e3b156110ec57336001600160a01b0382160361105957610d36848484612a2a565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061108c9030903390600401614a52565b602060405180830381865afa1580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190614a6c565b6110ec5733604051633b79c77360e21b8152600401610c219190614194565b610dd9848484612a2a565b611025816001612a45565b60008051602061521483398151915261111a8161294f565b6111365760405162461bcd60e51b8152600401610c2190614ae0565b610dd96101b68484613fd0565b6001600160a01b031660009081526097602052604090205460ff1690565b6111b560405180610120016040528060008019168152602001600015158152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008281526101c0602090815260409182902082516101208101845281548152600182015460ff1615159281019290925260028101805492939192918401916111fd90614a1e565b80601f016020809104026020016040519081016040528092919081815260200182805461122990614a1e565b80156112765780601f1061124b57610100808354040283529160200191611276565b820191906000526020600020905b81548152906001019060200180831161125957829003601f168201915b5050505050815260200160038201805461128f90614a1e565b80601f01602080910402602001604051908101604052809291908181526020018280546112bb90614a1e565b80156113085780601f106112dd57610100808354040283529160200191611308565b820191906000526020600020905b8154815290600101906020018083116112eb57829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b6000610a8a82612bac565b60008051602061518d83398151915261136d8161294f565b6113895760405162461bcd60e51b8152600401610c2190614ae0565b60008281526101c06020526040902083906113a48282614c84565b5050505050565b6000805160206152148339815191526113c38161294f565b6113df5760405162461bcd60e51b8152600401610c2190614ae0565b506101b980546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206151d483398151915261141b8161294f565b6114375760405162461bcd60e51b8152600401610c2190614ae0565b60005b848110156114cd5783838281811061145457611454614d11565b90506020020135610193600082825461146d9190614d27565b909155506114bb905086868381811061148857611488614d11565b905060200201602081019061149d91906141e9565b8585848181106114af576114af614d11565b90506020020135612c59565b806114c581614d3f565b91505061143a565b505050505050565b60006001600160a01b0382166114fe576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b0361150e6126e2565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b6040805160e0810182526101c1805460ff16151582526101c2546020808401919091526101c354838501526101c45460608401526101c55460808401526101c65460a08401526101c75460c084015283519081019093526101c8805492939192829082906115aa90614a1e565b80601f01602080910402602001604051908101604052809291908181526020018280546115d690614a1e565b80156116235780601f106115f857610100808354040283529160200191611623565b820191906000526020600020905b81548152906001019060200180831161160657829003601f168201915b505050505081525050905082565b60008051602061518d8339815191526116498161294f565b6116655760405162461bcd60e51b8152600401610c2190614ae0565b6101bf82905560005b82811015610dd95783838281811061168857611688614d11565b905060200281019061169a9190614d58565b60008281526101c0602052604090206116b38282614c84565b508190506116c081614d3f565b91505061166e565b60008051602061518d8339815191526116e08161294f565b6116fc5760405162461bcd60e51b8152600401610c2190614ae0565b816101c1610dd98282614e3b565b6000805160206151d48339815191526117228161294f565b61173e5760405162461bcd60e51b8152600401610c2190614ae0565b611025612c73565b60008051602061518d83398151915261175e8161294f565b61177a5760405162461bcd60e51b8152600401610c2190614ae0565b6101bf5460009081526101c06020526040902082906117998282614c84565b50506101bf80549060006117ac83614d3f565b91905055505050565b6101b8546000906117d09082906001600160a01b031661180d565b6117da5750600090565b6101b8546001600160a01b03165b905090565b600082815261015f602052604081206118069083612cb1565b9392505050565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206152148339815191526118518161294f565b61186d5760405162461bcd60e51b8152600401610c2190614ae0565b610dd96101b78484613fd0565b611882612cbd565b61188b33611143565b806118a557503261189a6129ab565b6001600160a01b0316145b6118d75760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610c21565b6118e18282612d16565b6119135760405162461bcd60e51b8152602060048201526003602482015262626f6f60e81b6044820152606401610c21565b60008060005b89811015611a92578a8a8281811061193357611933614d11565b90506020020135826119459190614d27565b915061196885858381811061195c5761195c614d11565b90506020020135612dab565b611a1e3386868481811061197e5761197e614d11565b33600090815261019560209081526040822092029390930135929091508989878181106119ad576119ad614d11565b905060200201358152602001908152602001600020548e8e868181106119d5576119d5614d11565b905060200201358b8b878181106119ee576119ee614d11565b905060200201358e8e88818110611a0757611a07614d11565b9050602002810190611a199190614eb3565b612e25565b8a8a82818110611a3057611a30614d11565b905060200201356101be6002016000878785818110611a5157611a51614d11565b90506020020135815260200190815260200160002060040154611a749190614a9f565b611a7e9084614d27565b925080611a8a81614d3f565b915050611919565b506101c45461019354600190611aa9908490614d27565b611ab39190614efc565b1115611af85760405162461bcd60e51b815260206004820152601460248201527322bc31b2b2b232b21036b0bc1039bab838363c9760611b6044820152606401610c21565b34821115611b195760405163356680b760e01b815260040160405180910390fd5b6101bb5460405160009182916001600160a01b039091169034908381818185875af1925050503d8060008114611b6b576040519150601f19603f3d011682016040523d82523d6000602084013e611b70565b606091505b5060408051602081019091526000815261019354929450909250905b846101935401811015611bce5781611ba382612f4b565b604051602001611bb4929190614f13565b60408051601f198184030181529190529150600101611b8c565b5060005b8c811015611c43578d8d82818110611bec57611bec614d11565b33600090815261019560209081526040822092029390930135929091508a8a85818110611c1b57611c1b614d11565b6020908102929092013583525081019190915260400160002080549091019055600101611bd2565b5033600081815261019460205260409020805486019055610193805486019055611c6d9085612c59565b336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f9282604051611ca69190614168565b60405180910390a25050505050611cbc60018055565b5050505050505050565b6060611cd06126e2565b6003018054610aa890614a1e565b611ce6612fe3565b54610100900460ff16611d0557611cfb612fe3565b5460ff1615611d09565b303b155b611d635760405162461bcd60e51b8152602060048201526037602482015260008051602061516d833981519152604482015276081a5cc8185b1c9958591e481a5b9a5d1a585b1a5e9959604a1b6064820152608401610c21565b6000611d6d612fe3565b54610100900460ff161590508015611db9576001611d89612fe3565b80549115156101000261ff00199092169190911790556001611da9612fe3565b805460ff19169115159190911790555b600054610100900460ff1615808015611dd95750600054600160ff909116105b80611dfa5750611de830613007565b158015611dfa575060005460ff166001145b611e5d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c21565b6000805460ff191660011790558015611e80576000805461ff0019166101001790555b611e88613016565b611e9185613047565b611e9b888861307f565b6101bb80546001600160a01b03199081166001600160a01b038781169182179093556101bc8054831690911790556101b8805482168c84161790556101b980549091169185169190911790558551611efb906101b6906020890190614054565b50611f0760008a6130b6565b611f2060008051602061521483398151915260006130c0565b611f4660008051602061518d8339815191526000805160206152148339815191526130c0565b611f6c6000805160206151d483398151915260008051602061518d8339815191526130c0565b6001610193556101b9546040516352c28fab60e01b81526001600160a01b03909116906352c28fab90611fa5908c903090600401614a52565b600060405180830381600087803b158015611fbf57600080fd5b505af1158015611fd3573d6000803e3d6000fd5b50505050801561201d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015611cbc57600061202e612fe3565b80549115156101000261ff00199092169190911790555050505050505050565b816daaeb6d7670e522a718067333cd4e3b156120f757604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906120979030908590600401614a52565b602060405180830381865afa1580156120b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d89190614a6c565b6120f75780604051633b79c77360e21b8152600401610c219190614194565b610c348383613114565b6060816001600160401b0381111561211b5761211b614688565b60405190808252806020026020018201604052801561214e57816020015b60608152602001906001900390816121395790505b50905060005b828110156121ee576121be3085858481811061217257612172614d11565b90506020028101906121849190614b2a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061319192505050565b8282815181106121d0576121d0614d11565b602002602001018190525080806121e690614d3f565b915050612154565b5092915050565b6000610a8a8261294f565b6000805160206152148339815191526122188161294f565b6122345760405162461bcd60e51b8152600401610c2190614ae0565b506101bb80546001600160a01b0319166001600160a01b0392909216919091179055565b836daaeb6d7670e522a718067333cd4e3b1561232257336001600160a01b0382160361228f5761228a85858585613283565b6113a4565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906122c29030903390600401614a52565b602060405180830381865afa1580156122df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123039190614a6c565b6123225733604051633b79c77360e21b8152600401610c219190614194565b6113a485858585613283565b606061233982612706565b61239d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c21565b6101b66123a983612f4b565b6040516020016123ba929190614f4e565b6040516020818303038152906040529050919050565b600081815261015f60205260408120610a8a906132c7565b60008051602061518d8339815191526124008161294f565b61241c5760405162461bcd60e51b8152600401610c2190614ae0565b6101bc54610fe5906001600160a01b0316836132d1565b60008051602061521483398151915261244b8161294f565b6124675760405162461bcd60e51b8152600401610c2190614ae0565b506101bc80546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206152148339815191526124a38161294f565b6124bf5760405162461bcd60e51b8152600401610c2190614ae0565b6124c9838361180d565b15610c3457821580156124f457506124df6117b5565b6001600160a01b0316826001600160a01b0316145b156124fe57600080fd5b61250883836129b5565b6101b954604051637f7c149160e01b81526001600160a01b0390911690637f7c149190610f249085903090600401614a52565b6101b7805461254990614a1e565b80601f016020809104026020016040519081016040528092919081815260200182805461257590614a1e565b80156125c25780601f10612597576101008083540402835291602001916125c2565b820191906000526020600020905b8154815290600101906020018083116125a557829003601f168201915b505050505081565b60006125d46126e2565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b60008051602061518d83398151915261261f8161294f565b61263b5760405162461bcd60e51b8152600401610c2190614ae0565b506101ba80546001600160a01b0319166001600160a01b0392909216919091179055565b60006301ffc9a760e01b6001600160e01b03198316148061269057506380ac58cd60e01b6001600160e01b03198316145b80610a8a5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b1480610a8a57506301ffc9a760e01b6001600160e01b0319831614610a8a565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b600081600111158015612720575061271c6126e2565b5482105b8015610a8a5750600160e01b6127346126e2565b60008481526004919091016020526040902054161592915050565b610fe5828260016133cb565b611025816127676129ab565b613480565b600061277782612bac565b9050836001600160a01b0316816001600160a01b0316146127aa5760405162a1148160e81b815260040160405180910390fd5b6000806127b6846134d9565b915091506127db81876127c63390565b6001600160a01b039081169116811491141790565b612806576127e986336125ca565b61280657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661282d57604051633a954ecd60e21b815260040160405180910390fd5b801561283857600082555b6128406126e2565b6001600160a01b038716600090815260059190910160205260409020805460001901905561286c6126e2565b6001600160a01b0386166000908152600591909101602052604090208054600101905561289d85600160e11b613501565b6128a56126e2565b60008681526004919091016020526040812091909155600160e11b8416900361291b57600184016128d46126e2565b600082815260049190910160205260408120549003612919576128f56126e2565b54811461291957836129056126e2565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03166000805160206151f483398151915260405160405180910390a46114cd565b600061295d8261078d6129ab565b1561296a57506001919050565b8161297757506000919050565b610a8a61298383610ddf565b61294f565b6129928282613516565b600082815261015f60205260409020610c34908261359e565b60006117e86135b3565b6129bf82826135d5565b600082815261015f60205260409020610c34908261365b565b6129e0613670565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612a136129ab565b604051612a209190614194565b60405180910390a1565b610c3483838360405180602001604052806000815250612258565b6000612a5083612bac565b905080600080612a5f866134d9565b915091508415612a9f57612a748184336127c6565b612a9f57612a8283336125ca565b612a9f57604051632ce44b5f60e11b815260040160405180910390fd5b8015612aaa57600082555b6001600160801b03612aba6126e2565b6001600160a01b0385166000908152600591909101602052604090208054919091019055612aec83600360e01b613501565b612af46126e2565b60008881526004919091016020526040812091909155600160e11b85169003612b6a5760018601612b236126e2565b600082815260049190910160205260408120549003612b6857612b446126e2565b548114612b685784612b546126e2565b600083815260049190910160205260409020555b505b60405186906000906001600160a01b038616906000805160206151f4833981519152908390a4612b986126e2565b600190810180549091019055505050505050565b600081600111612c4057612bbe6126e2565b600083815260049190910160205260408120549150600160e01b82169003612c405780600003612c3b57612bf06126e2565b548210612c1057604051636f96cda160e11b815260040160405180910390fd5b612c186126e2565b600019909201600081815260049390930160205260409092205490508015612c10575b919050565b604051636f96cda160e11b815260040160405180910390fd5b610fe58282604051806020016040528060008152506136b9565b612c7b61372f565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a136129ab565b60006118068383613775565b600260015403612d0f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c21565b6002600155565b6000805b82811015612da15760005b83811015612d8e57848482818110612d3f57612d3f614d11565b90506020020135858584818110612d5857612d58614d11565b90506020020135148015612d6c5750808214155b15612d7c57600092505050610a8a565b80612d8681614d3f565b915050612d25565b5080612d9981614d3f565b915050612d1a565b5060019392505050565b60655460ff1680612dcd575060008181526101c0602052604090206007015442105b80612de9575060008181526101c0602052604090206008015442115b80612e07575060008181526101c0602052604090206001015460ff16155b15611025576040516347cc82cd60e01b815260040160405180910390fd5b60008681526101c0602052604090206005810154612e438787614d27565b1115612e6257604051631f43edc360e11b815260040160405180910390fd5b805415611cbc5783851180612e7f575083612e7d8787614d27565b115b15612e9d57604051631f43edc360e11b815260040160405180910390fd5b6000612f1f848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250508554604051909250612f0491508d908a9060200160609290921b6001600160601b0319168252601482015260340190565b6040516020818303038152906040528051906020012061379f565b50905080612f405760405163c8ac23c360e01b815260040160405180910390fd5b505050505050505050565b60606000612f588361386d565b60010190506000816001600160401b03811115612f7757612f77614688565b6040519080825280601f01601f191660200182016040528015612fa1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612fab57509392505050565b60018055565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90565b6001600160a01b03163b151590565b600054610100900460ff1661303d5760405162461bcd60e51b8152600401610c2190614fe1565b613045613943565b565b600054610100900460ff1661306e5760405162461bcd60e51b8152600401610c2190614fe1565b61307661396a565b61102581613991565b613087612fe3565b54610100900460ff166130ac5760405162461bcd60e51b8152600401610c219061502c565b610fe58282613a20565b610fe58282612988565b60006130cb83610ddf565b600084815261012d6020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b8061311d6126e2565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b606061319c83613007565b6131f75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c21565b600080846001600160a01b031684604051613212919061506e565b600060405180830381855af49150503d806000811461324d576040519150601f19603f3d011682016040523d82523d6000602084013e613252565b606091505b509150915061327a82826040518060600160405280602781526020016151ad60279139613a9c565b95945050505050565b61328e848484610d05565b6001600160a01b0383163b15610dd9576132aa84848484613ab5565b610dd9576040516368d2bf6b60e11b815260040160405180910390fd5b6000610a8a825490565b6127106001600160601b038216111561333f5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610c21565b6001600160a01b0382166133915760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606401610c21565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b9091021761019155565b60006133d68361134a565b9050811561341557336001600160a01b03821614613415576133f881336125ca565b613415576040516367d9dca160e11b815260040160405180910390fd5b8361341e6126e2565b6000858152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551859287811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a450505050565b61348a828261180d565b610fe55761349781613ba1565b6134a2836020613bb3565b6040516020016134b3929190615080565b60408051601f198184030181529082905262461bcd60e51b8252610c2191600401614168565b60008060006134e66126e2565b60009485526006016020525050604090912080549092909150565b4260a01b176001600160a01b03919091161790565b613520828261180d565b610fe557600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561355a6129ab565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611806836001600160a01b038416613d4e565b60006135be33611143565b156135d0575060131936013560601c90565b503390565b6135df828261180d565b15610fe557600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff191690556136176129ab565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611806836001600160a01b038416613d9d565b60655460ff166130455760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c21565b6136c38383613e90565b6001600160a01b0383163b15610c345760006136dd6126e2565b5490508281035b6136f76000868380600101945086613ab5565b613714576040516368d2bf6b60e11b815260040160405180910390fd5b8181106136e457816137246126e2565b54146113a457600080fd5b60655460ff16156130455760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c21565b600082600001828154811061378c5761378c614d11565b9060005260206000200154905092915050565b6000808281805b8751811015613861576137ba600283614a9f565b915060008882815181106137d0576137d0614d11565b6020026020010151905080841161381257604080516020810186905290810182905260600160405160208183030381529060405280519060200120935061384e565b604080516020810183905290810185905260600160405160208183030381529060405280519060200120935060018361384b9190614d27565b92505b508061385981614d3f565b9150506137a6565b50941495939450505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106138ac5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b83106138d6576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106138f457662386f26fc10000830492506010015b6305f5e100831061390c576305f5e100830492506008015b612710831061392057612710830492506004015b60648310613932576064830492506002015b600a8310610a8a5760010192915050565b600054610100900460ff16612fdd5760405162461bcd60e51b8152600401610c2190614fe1565b600054610100900460ff166130455760405162461bcd60e51b8152600401610c2190614fe1565b600054610100900460ff166139b85760405162461bcd60e51b8152600401610c2190614fe1565b60005b8151811015610fe5576001609760008484815181106139dc576139dc614d11565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580613a1881614d3f565b9150506139bb565b613a28612fe3565b54610100900460ff16613a4d5760405162461bcd60e51b8152600401610c219061502c565b81613a566126e2565b6002019080519060200190613a6c929190614054565b5080613a766126e2565b6003019080519060200190613a8c929190614054565b506001613a976126e2565b555050565b60608315613aab575081611806565b6118068383613fa6565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613aea9033908990889088906004016150ef565b6020604051808303816000875af1925050508015613b25575060408051601f3d908101601f19168201909252613b2291810190615122565b60015b613b83573d808015613b53576040519150601f19603f3d011682016040523d82523d6000602084013e613b58565b606091505b508051600003613b7b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060610a8a6001600160a01b03831660145b60606000613bc2836002614a9f565b613bcd906002614d27565b6001600160401b03811115613be457613be4614688565b6040519080825280601f01601f191660200182016040528015613c0e576020820181803683370190505b509050600360fc1b81600081518110613c2957613c29614d11565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613c5857613c58614d11565b60200101906001600160f81b031916908160001a9053506000613c7c846002614a9f565b613c87906001614d27565b90505b6001811115613cff576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613cbb57613cbb614d11565b1a60f81b828281518110613cd157613cd1614d11565b60200101906001600160f81b031916908160001a90535060049490941c93613cf88161513f565b9050613c8a565b5083156118065760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c21565b6000818152600183016020526040812054613d9557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a8a565b506000610a8a565b60008181526001830160205260408120548015613e86576000613dc1600183614efc565b8554909150600090613dd590600190614efc565b9050818114613e3a576000866000018281548110613df557613df5614d11565b9060005260206000200154905080876000018481548110613e1857613e18614d11565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e4b57613e4b615156565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a8a565b6000915050610a8a565b6000613e9a6126e2565b5490506000829003613ebf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160401b018202613ed16126e2565b6001600160a01b0385166000908152600591909101602052604090208054919091019055613f05836001841460e11b613501565b613f0d6126e2565b600083815260049190910160205260408120919091556001600160a01b0384169083830190839083906000805160206151f48339815191528180a4600183015b818114613f7357808360006000805160206151f4833981519152600080a4600101613f4d565b5081600003613f9457604051622e076360e81b815260040160405180910390fd5b80613f9d6126e2565b5550610c349050565b815115613fb65781518083602001fd5b8060405162461bcd60e51b8152600401610c219190614168565b828054613fdc90614a1e565b90600052602060002090601f016020900481019282613ffe5760008555614044565b82601f106140175782800160ff19823516178555614044565b82800160010185558215614044579182015b82811115614044578235825591602001919060010190614029565b506140509291506140c8565b5090565b82805461406090614a1e565b90600052602060002090601f0160209004810192826140825760008555614044565b82601f1061409b57805160ff1916838001178555614044565b82800160010185558215614044579182015b828111156140445782518255916020019190600101906140ad565b5b8082111561405057600081556001016140c9565b6001600160e01b03198116811461102557600080fd5b60006020828403121561410557600080fd5b8135611806816140dd565b60005b8381101561412b578181015183820152602001614113565b83811115610dd95750506000910152565b60008151808452614154816020860160208601614110565b601f01601f19169290920160200192915050565b602081526000611806602083018461413c565b60006020828403121561418d57600080fd5b5035919050565b6001600160a01b0391909116815260200190565b80356001600160a01b0381168114612c3b57600080fd5b600080604083850312156141d257600080fd5b6141db836141a8565b946020939093013593505050565b6000602082840312156141fb57600080fd5b611806826141a8565b60008060006060848603121561421957600080fd5b614222846141a8565b9250614230602085016141a8565b9150604084013590509250925092565b6000806040838503121561425357600080fd5b50508035926020909101359150565b6000806040838503121561427557600080fd5b82359150614285602084016141a8565b90509250929050565b600080602083850312156142a157600080fd5b82356001600160401b03808211156142b857600080fd5b818501915085601f8301126142cc57600080fd5b8135818111156142db57600080fd5b8660208285010111156142ed57600080fd5b60209290920196919550909350505050565b60208152815160208201526000602083015161431f604084018215159052565b50604083015161012080606085015261433c61014085018361413c565b91506060850151601f19858403016080860152614359838261413c565b925050608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100818187015280870151838701525050508091505092915050565b600061012082840312156143af57600080fd5b50919050565b600080604083850312156143c857600080fd5b82356001600160401b038111156143de57600080fd5b6143ea8582860161439c565b95602094909401359450505050565b60008083601f84011261440b57600080fd5b5081356001600160401b0381111561442257600080fd5b6020830191508360208260051b8501011115610e9e57600080fd5b6000806000806040858703121561445357600080fd5b84356001600160401b038082111561446a57600080fd5b614476888389016143f9565b9096509450602087013591508082111561448f57600080fd5b5061449c878288016143f9565b95989497509550505050565b60006101008451151583526020850151602084015260408501516040840152606085015160608401526080850151608084015260a085015160a084015260c085015160c08401528060e0840152835160208285015261450b61012085018261413c565b9695505050505050565b6000806020838503121561452857600080fd5b82356001600160401b0381111561453e57600080fd5b61454a858286016143f9565b90969095509350505050565b60006020828403121561456857600080fd5b81356001600160401b0381111561457e57600080fd5b8201610100818503121561180657600080fd5b6000602082840312156145a357600080fd5b81356001600160401b038111156145b957600080fd5b613b998482850161439c565b6000806000806000806000806080898b0312156145e157600080fd5b88356001600160401b03808211156145f857600080fd5b6146048c838d016143f9565b909a50985060208b013591508082111561461d57600080fd5b6146298c838d016143f9565b909850965060408b013591508082111561464257600080fd5b61464e8c838d016143f9565b909650945060608b013591508082111561466757600080fd5b506146748b828c016143f9565b999c989b5096995094979396929594505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156146c6576146c6614688565b604052919050565b60006001600160401b038311156146e7576146e7614688565b6146fa601f8401601f191660200161469e565b905082815283838301111561470e57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261473657600080fd5b611806838335602085016146ce565b600082601f83011261475657600080fd5b813560206001600160401b0382111561477157614771614688565b8160051b61478082820161469e565b928352848101820192828101908785111561479a57600080fd5b83870192505b848310156147c0576147b1836141a8565b825291830191908301906147a0565b979650505050505050565b600080600080600080600060e0888a0312156147e657600080fd5b6147ef886141a8565b965060208801356001600160401b038082111561480b57600080fd5b6148178b838c01614725565b975060408a013591508082111561482d57600080fd5b6148398b838c01614725565b965060608a013591508082111561484f57600080fd5b61485b8b838c01614725565b955060808a013591508082111561487157600080fd5b5061487e8a828b01614745565b93505061488d60a089016141a8565b915061489b60c089016141a8565b905092959891949750929550565b801515811461102557600080fd5b600080604083850312156148ca57600080fd5b6148d3836141a8565b915060208301356148e3816148a9565b809150509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561494357603f1988860301845261493185835161413c565b94509285019290850190600101614915565b5092979650505050505050565b6000806000806080858703121561496657600080fd5b61496f856141a8565b935061497d602086016141a8565b92506040850135915060608501356001600160401b0381111561499f57600080fd5b8501601f810187136149b057600080fd5b6149bf878235602084016146ce565b91505092959194509250565b6000602082840312156149dd57600080fd5b81356001600160601b038116811461180657600080fd5b60008060408385031215614a0757600080fd5b614a10836141a8565b9150614285602084016141a8565b600181811c90821680614a3257607f821691505b6020821081036143af57634e487b7160e01b600052602260045260246000fd5b6001600160a01b0392831681529116602082015260400190565b600060208284031215614a7e57600080fd5b8151611806816148a9565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614ab957614ab9614a89565b500290565b600082614adb57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60008135610a8a816148a9565b60ff1981541660ff8315151681178255505050565b6000808335601e19843603018112614b4157600080fd5b8301803591506001600160401b03821115614b5b57600080fd5b602001915036819003821315610e9e57600080fd5b601f821115610c3457600081815260208120601f850160051c81016020861015614b975750805b601f850160051c820191505b818110156114cd57828155600101614ba3565b600019600383901b1c191660019190911b1790565b6001600160401b03831115614be257614be2614688565b614bf683614bf08354614a1e565b83614b70565b6000601f841160018114614c245760008515614c125750838201355b614c1c8682614bb6565b8455506113a4565b600083815260209020601f19861690835b82811015614c555786850135825560209485019460019092019101614c35565b5086821015614c725760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81358155614ca0614c9760208401614b08565b60018301614b15565b614cad6040830183614b2a565b614cbb818360028601614bcb565b5050614cca6060830183614b2a565b614cd8818360038601614bcb565b50506080820135600482015560a0820135600582015560c0820135600682015560e0820135600782015561010082013560088201555050565b634e487b7160e01b600052603260045260246000fd5b60008219821115614d3a57614d3a614a89565b500190565b600060018201614d5157614d51614a89565b5060010190565b6000823561011e19833603018112614d6f57600080fd5b9190910192915050565b614d838283614b2a565b6001600160401b03811115614d9a57614d9a614688565b614dae81614da88554614a1e565b85614b70565b6000601f821160018114614ddc5760008315614dca5750838201355b614dd48482614bb6565b8655506114cd565b600085815260209020601f19841690835b82811015614e0d5786850135825560209485019460019092019101614ded565b5084821015614e2a5760001960f88660031b161c19848701351681555b50505050600190811b019091555050565b8135614e46816148a9565b614e508183614b15565b506020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c0820135600682015560e0820135601e19833603018112614ea457600080fd5b610c3481840160078401614d79565b6000808335601e19843603018112614eca57600080fd5b8301803591506001600160401b03821115614ee457600080fd5b6020019150600581901b3603821315610e9e57600080fd5b600082821015614f0e57614f0e614a89565b500390565b60008351614f25818460208801614110565b835190830190614f39818360208801614110565b600b60fa1b9101908152600101949350505050565b6000808454614f5c81614a1e565b60018281168015614f745760018114614f8557614fb4565b60ff19841687528287019450614fb4565b8860005260208060002060005b85811015614fab5781548a820152908401908201614f92565b50505082870194505b505050508351614fc8818360208801614110565b64173539b7b760d91b9101908152600501949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b602080825260349082015260008051602061516d833981519152604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b60008251614d6f818460208701614110565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516150b2816017850160208801614110565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150e3816028840160208801614110565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061450b9083018461413c565b60006020828403121561513457600080fd5b8151611806816140dd565b60008161514e5761514e614a89565b506000190190565b634e487b7160e01b600052603160045260246000fdfe455243373231415f5f496e697469616c697a61626c653a20636f6e74726163748eb467f061ca67f42a2d2ca4a346fc9fb645efc0ba75056ee9f71c3a0ccc10a8416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef2ce8d04a9c35987429af538825cd2438cc5c5bb5dc427955f84daaa3ea105016a164736f6c634300080d000a

Deployed Bytecode

0x6080604052600436106102915760003560e01c806301ffc9a71461029657806306fdde03146102cb578063081812fc146102ed578063095ea7b31461031a57806313af40351461032f57806318160ddd1461034f5780631e7269c51461037257806323b872dd146103a0578063248a9ca3146103b35780632a55205a146103d35780632f2ff15d1461041257806336568abe146104325780633b6fda59146104525780633dc3df7d1461048b5780633f4ba83a146104ac57806342842e0e146104c157806342966c68146104d457806355f804b3146104f4578063572b6c05146105145780635c975abb146105345780636182ff531461054c5780636352211e1461057957806363906d0d1461059957806364274fef146105cb578063666f8ca4146105eb578063672434821461060b57806370a082311461062b578063738170a41461064b57806379502c551461066c578063806feae31461068f57806383de187b146106af5780638456cb59146106cf57806387b63e3a146106e45780638b81a7ee1461071d5780638da5cb5b1461073d5780639010d07c1461075257806391d1485414610772578063938e3d7b1461079257806394259399146107b257806395d89b41146107c55780639ef44ead146107da578063a0a8e460146107fa578063a217fddf14610816578063a22cb4651461082b578063ac9650d81461084b578063b3738dfc14610878578063b522ecff14610898578063b88d4fde146108b8578063c87b56dd146108cb578063ca15c873146108eb578063cac926691461090b578063cb2ef6f71461092b578063cdeee6371461094e578063d547741f1461096e578063e8a3d4851461098e578063e985e9c5146109a3578063f60ca60d146109c3578063fb108ea6146109e4575b600080fd5b3480156102a257600080fd5b506102b66102b13660046140f3565b610a04565b60405190151581526020015b60405180910390f35b3480156102d757600080fd5b506102e0610a90565b6040516102c29190614168565b3480156102f957600080fd5b5061030d61030836600461417b565b610b2b565b6040516102c29190614194565b61032d6103283660046141bf565b610b78565b005b34801561033b57600080fd5b5061032d61034a3660046141e9565b610c39565b34801561035b57600080fd5b50610364610ce5565b6040519081526020016102c2565b34801561037e57600080fd5b5061036461038d3660046141e9565b6101946020526000908152604090205481565b61032d6103ae366004614204565b610d05565b3480156103bf57600080fd5b506103646103ce36600461417b565b610ddf565b3480156103df57600080fd5b506103f36103ee366004614240565b610df5565b604080516001600160a01b0390931683526020830191909152016102c2565b34801561041e57600080fd5b5061032d61042d366004614262565b610ea5565b34801561043e57600080fd5b5061032d61044d366004614262565b610f5b565b34801561045e57600080fd5b5061036461046d3660046141bf565b61019560209081526000928352604080842090915290825290205481565b34801561049757600080fd5b506101bc5461030d906001600160a01b031681565b3480156104b857600080fd5b5061032d610fe9565b61032d6104cf366004614204565b611028565b3480156104e057600080fd5b5061032d6104ef36600461417b565b6110f7565b34801561050057600080fd5b5061032d61050f36600461428e565b611102565b34801561052057600080fd5b506102b661052f3660046141e9565b611143565b34801561054057600080fd5b5060655460ff166102b6565b34801561055857600080fd5b5061056c61056736600461417b565b611161565b6040516102c291906142ff565b34801561058557600080fd5b5061030d61059436600461417b565b61134a565b3480156105a557600080fd5b506101be546101bf546105b6919082565b604080519283526020830191909152016102c2565b3480156105d757600080fd5b5061032d6105e63660046143b5565b611355565b3480156105f757600080fd5b5061032d6106063660046141e9565b6113ab565b34801561061757600080fd5b5061032d61062636600461443d565b611403565b34801561063757600080fd5b506103646106463660046141e9565b6114d5565b34801561065757600080fd5b506101bb5461030d906001600160a01b031681565b34801561067857600080fd5b5061068161153d565b6040516102c29291906144a8565b34801561069b57600080fd5b5061032d6106aa366004614515565b611631565b3480156106bb57600080fd5b5061032d6106ca366004614556565b6116c8565b3480156106db57600080fd5b5061032d61170a565b3480156106f057600080fd5b506103646106ff36600461417b565b33600090815261019560209081526040808320938352929052205490565b34801561072957600080fd5b5061032d610738366004614591565b611746565b34801561074957600080fd5b5061030d6117b5565b34801561075e57600080fd5b5061030d61076d366004614240565b6117ed565b34801561077e57600080fd5b506102b661078d366004614262565b61180d565b34801561079e57600080fd5b5061032d6107ad36600461428e565b611839565b61032d6107c03660046145c5565b61187a565b3480156107d157600080fd5b506102e0611cc6565b3480156107e657600080fd5b5061032d6107f53660046147cb565b611cde565b34801561080657600080fd5b50604051600881526020016102c2565b34801561082257600080fd5b50610364600081565b34801561083757600080fd5b5061032d6108463660046148b7565b61204e565b34801561085757600080fd5b5061086b610866366004614515565b612101565b6040516102c291906148ee565b34801561088457600080fd5b506102b661089336600461417b565b6121f5565b3480156108a457600080fd5b5061032d6108b33660046141e9565b612200565b61032d6108c6366004614950565b612258565b3480156108d757600080fd5b506102e06108e636600461417b565b61232e565b3480156108f757600080fd5b5061036461090636600461417b565b6123d0565b34801561091757600080fd5b5061032d6109263660046149cb565b6123e8565b34801561093757600080fd5b506c50726f7073455243373231415560981b610364565b34801561095a57600080fd5b5061032d6109693660046141e9565b612433565b34801561097a57600080fd5b5061032d610989366004614262565b61248b565b34801561099a57600080fd5b506102e061253b565b3480156109af57600080fd5b506102b66109be3660046149f4565b6125ca565b3480156109cf57600080fd5b506101ba5461030d906001600160a01b031681565b3480156109f057600080fd5b5061032d6109ff3660046141e9565b612607565b6000610a0f8261265f565b80610a1e5750610a1e826126ad565b80610a3957506301ffc9a760e01b6001600160e01b03198316145b80610a5457506380ac58cd60e01b6001600160e01b03198316145b80610a6f5750635b5e139f60e01b6001600160e01b03198316145b80610a8a575063152a902d60e11b6001600160e01b03198316145b92915050565b6060610a9a6126e2565b6002018054610aa890614a1e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad490614a1e565b8015610b215780601f10610af657610100808354040283529160200191610b21565b820191906000526020600020905b815481529060010190602001808311610b0457829003601f168201915b5050505050905090565b6000610b3682612706565b610b53576040516333d1c03960e21b815260040160405180910390fd5b610b5b6126e2565b60009283526006016020525060409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b15610c2a57604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490610bc19030908590600401614a52565b602060405180830381865afa158015610bde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c029190614a6c565b610c2a5780604051633b79c77360e21b8152600401610c219190614194565b60405180910390fd5b610c34838361274f565b505050565b6000610c448161275b565b610c4f60008361180d565b610c845760405162461bcd60e51b815260206004820152600660248201526510a0a226a4a760d11b6044820152606401610c21565b6101b880546001600160a01b038481166001600160a01b03198316179092556040519116907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690610cd89083908690614a52565b60405180910390a1505050565b60006001610cf16126e2565b60010154610cfd6126e2565b540303919050565b826daaeb6d7670e522a718067333cd4e3b15610dce57336001600160a01b03821603610d3b57610d3684848461276c565b610dd9565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490610d6e9030903390600401614a52565b602060405180830381865afa158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf9190614a6c565b610dce5733604051633b79c77360e21b8152600401610c219190614194565b610dd984848461276c565b50505050565b600090815261012d602052604090206001015490565b6000828152610192602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610e6c575060408051808201909152610191546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610e8b906001600160601b031687614a9f565b610e959190614abe565b91519350909150505b9250929050565b600080516020615214833981519152610ebd8161294f565b610ed95760405162461bcd60e51b8152600401610c2190614ae0565b610ee3838361180d565b610c3457610ef18383612988565b6101b9546040516352c28fab60e01b81526001600160a01b03909116906352c28fab90610f249085903090600401614a52565b600060405180830381600087803b158015610f3e57600080fd5b505af1158015610f52573d6000803e3d6000fd5b50505050505050565b610f636129ab565b6001600160a01b0316816001600160a01b031614610fdb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c21565b610fe582826129b5565b5050565b6000805160206151d48339815191526110018161294f565b61101d5760405162461bcd60e51b8152600401610c2190614ae0565b6110256129d8565b50565b826daaeb6d7670e522a718067333cd4e3b156110ec57336001600160a01b0382160361105957610d36848484612a2a565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061108c9030903390600401614a52565b602060405180830381865afa1580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190614a6c565b6110ec5733604051633b79c77360e21b8152600401610c219190614194565b610dd9848484612a2a565b611025816001612a45565b60008051602061521483398151915261111a8161294f565b6111365760405162461bcd60e51b8152600401610c2190614ae0565b610dd96101b68484613fd0565b6001600160a01b031660009081526097602052604090205460ff1690565b6111b560405180610120016040528060008019168152602001600015158152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b60008281526101c0602090815260409182902082516101208101845281548152600182015460ff1615159281019290925260028101805492939192918401916111fd90614a1e565b80601f016020809104026020016040519081016040528092919081815260200182805461122990614a1e565b80156112765780601f1061124b57610100808354040283529160200191611276565b820191906000526020600020905b81548152906001019060200180831161125957829003601f168201915b5050505050815260200160038201805461128f90614a1e565b80601f01602080910402602001604051908101604052809291908181526020018280546112bb90614a1e565b80156113085780601f106112dd57610100808354040283529160200191611308565b820191906000526020600020905b8154815290600101906020018083116112eb57829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b6000610a8a82612bac565b60008051602061518d83398151915261136d8161294f565b6113895760405162461bcd60e51b8152600401610c2190614ae0565b60008281526101c06020526040902083906113a48282614c84565b5050505050565b6000805160206152148339815191526113c38161294f565b6113df5760405162461bcd60e51b8152600401610c2190614ae0565b506101b980546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206151d483398151915261141b8161294f565b6114375760405162461bcd60e51b8152600401610c2190614ae0565b60005b848110156114cd5783838281811061145457611454614d11565b90506020020135610193600082825461146d9190614d27565b909155506114bb905086868381811061148857611488614d11565b905060200201602081019061149d91906141e9565b8585848181106114af576114af614d11565b90506020020135612c59565b806114c581614d3f565b91505061143a565b505050505050565b60006001600160a01b0382166114fe576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b0361150e6126e2565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b6040805160e0810182526101c1805460ff16151582526101c2546020808401919091526101c354838501526101c45460608401526101c55460808401526101c65460a08401526101c75460c084015283519081019093526101c8805492939192829082906115aa90614a1e565b80601f01602080910402602001604051908101604052809291908181526020018280546115d690614a1e565b80156116235780601f106115f857610100808354040283529160200191611623565b820191906000526020600020905b81548152906001019060200180831161160657829003601f168201915b505050505081525050905082565b60008051602061518d8339815191526116498161294f565b6116655760405162461bcd60e51b8152600401610c2190614ae0565b6101bf82905560005b82811015610dd95783838281811061168857611688614d11565b905060200281019061169a9190614d58565b60008281526101c0602052604090206116b38282614c84565b508190506116c081614d3f565b91505061166e565b60008051602061518d8339815191526116e08161294f565b6116fc5760405162461bcd60e51b8152600401610c2190614ae0565b816101c1610dd98282614e3b565b6000805160206151d48339815191526117228161294f565b61173e5760405162461bcd60e51b8152600401610c2190614ae0565b611025612c73565b60008051602061518d83398151915261175e8161294f565b61177a5760405162461bcd60e51b8152600401610c2190614ae0565b6101bf5460009081526101c06020526040902082906117998282614c84565b50506101bf80549060006117ac83614d3f565b91905055505050565b6101b8546000906117d09082906001600160a01b031661180d565b6117da5750600090565b6101b8546001600160a01b03165b905090565b600082815261015f602052604081206118069083612cb1565b9392505050565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206152148339815191526118518161294f565b61186d5760405162461bcd60e51b8152600401610c2190614ae0565b610dd96101b78484613fd0565b611882612cbd565b61188b33611143565b806118a557503261189a6129ab565b6001600160a01b0316145b6118d75760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610c21565b6118e18282612d16565b6119135760405162461bcd60e51b8152602060048201526003602482015262626f6f60e81b6044820152606401610c21565b60008060005b89811015611a92578a8a8281811061193357611933614d11565b90506020020135826119459190614d27565b915061196885858381811061195c5761195c614d11565b90506020020135612dab565b611a1e3386868481811061197e5761197e614d11565b33600090815261019560209081526040822092029390930135929091508989878181106119ad576119ad614d11565b905060200201358152602001908152602001600020548e8e868181106119d5576119d5614d11565b905060200201358b8b878181106119ee576119ee614d11565b905060200201358e8e88818110611a0757611a07614d11565b9050602002810190611a199190614eb3565b612e25565b8a8a82818110611a3057611a30614d11565b905060200201356101be6002016000878785818110611a5157611a51614d11565b90506020020135815260200190815260200160002060040154611a749190614a9f565b611a7e9084614d27565b925080611a8a81614d3f565b915050611919565b506101c45461019354600190611aa9908490614d27565b611ab39190614efc565b1115611af85760405162461bcd60e51b815260206004820152601460248201527322bc31b2b2b232b21036b0bc1039bab838363c9760611b6044820152606401610c21565b34821115611b195760405163356680b760e01b815260040160405180910390fd5b6101bb5460405160009182916001600160a01b039091169034908381818185875af1925050503d8060008114611b6b576040519150601f19603f3d011682016040523d82523d6000602084013e611b70565b606091505b5060408051602081019091526000815261019354929450909250905b846101935401811015611bce5781611ba382612f4b565b604051602001611bb4929190614f13565b60408051601f198184030181529190529150600101611b8c565b5060005b8c811015611c43578d8d82818110611bec57611bec614d11565b33600090815261019560209081526040822092029390930135929091508a8a85818110611c1b57611c1b614d11565b6020908102929092013583525081019190915260400160002080549091019055600101611bd2565b5033600081815261019460205260409020805486019055610193805486019055611c6d9085612c59565b336001600160a01b03167f0c1b180fbb60448c5491c5ddc7c3a923854214b9ff70f90a7821333338971f9282604051611ca69190614168565b60405180910390a25050505050611cbc60018055565b5050505050505050565b6060611cd06126e2565b6003018054610aa890614a1e565b611ce6612fe3565b54610100900460ff16611d0557611cfb612fe3565b5460ff1615611d09565b303b155b611d635760405162461bcd60e51b8152602060048201526037602482015260008051602061516d833981519152604482015276081a5cc8185b1c9958591e481a5b9a5d1a585b1a5e9959604a1b6064820152608401610c21565b6000611d6d612fe3565b54610100900460ff161590508015611db9576001611d89612fe3565b80549115156101000261ff00199092169190911790556001611da9612fe3565b805460ff19169115159190911790555b600054610100900460ff1615808015611dd95750600054600160ff909116105b80611dfa5750611de830613007565b158015611dfa575060005460ff166001145b611e5d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c21565b6000805460ff191660011790558015611e80576000805461ff0019166101001790555b611e88613016565b611e9185613047565b611e9b888861307f565b6101bb80546001600160a01b03199081166001600160a01b038781169182179093556101bc8054831690911790556101b8805482168c84161790556101b980549091169185169190911790558551611efb906101b6906020890190614054565b50611f0760008a6130b6565b611f2060008051602061521483398151915260006130c0565b611f4660008051602061518d8339815191526000805160206152148339815191526130c0565b611f6c6000805160206151d483398151915260008051602061518d8339815191526130c0565b6001610193556101b9546040516352c28fab60e01b81526001600160a01b03909116906352c28fab90611fa5908c903090600401614a52565b600060405180830381600087803b158015611fbf57600080fd5b505af1158015611fd3573d6000803e3d6000fd5b50505050801561201d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015611cbc57600061202e612fe3565b80549115156101000261ff00199092169190911790555050505050505050565b816daaeb6d7670e522a718067333cd4e3b156120f757604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906120979030908590600401614a52565b602060405180830381865afa1580156120b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d89190614a6c565b6120f75780604051633b79c77360e21b8152600401610c219190614194565b610c348383613114565b6060816001600160401b0381111561211b5761211b614688565b60405190808252806020026020018201604052801561214e57816020015b60608152602001906001900390816121395790505b50905060005b828110156121ee576121be3085858481811061217257612172614d11565b90506020028101906121849190614b2a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061319192505050565b8282815181106121d0576121d0614d11565b602002602001018190525080806121e690614d3f565b915050612154565b5092915050565b6000610a8a8261294f565b6000805160206152148339815191526122188161294f565b6122345760405162461bcd60e51b8152600401610c2190614ae0565b506101bb80546001600160a01b0319166001600160a01b0392909216919091179055565b836daaeb6d7670e522a718067333cd4e3b1561232257336001600160a01b0382160361228f5761228a85858585613283565b6113a4565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906122c29030903390600401614a52565b602060405180830381865afa1580156122df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123039190614a6c565b6123225733604051633b79c77360e21b8152600401610c219190614194565b6113a485858585613283565b606061233982612706565b61239d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c21565b6101b66123a983612f4b565b6040516020016123ba929190614f4e565b6040516020818303038152906040529050919050565b600081815261015f60205260408120610a8a906132c7565b60008051602061518d8339815191526124008161294f565b61241c5760405162461bcd60e51b8152600401610c2190614ae0565b6101bc54610fe5906001600160a01b0316836132d1565b60008051602061521483398151915261244b8161294f565b6124675760405162461bcd60e51b8152600401610c2190614ae0565b506101bc80546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206152148339815191526124a38161294f565b6124bf5760405162461bcd60e51b8152600401610c2190614ae0565b6124c9838361180d565b15610c3457821580156124f457506124df6117b5565b6001600160a01b0316826001600160a01b0316145b156124fe57600080fd5b61250883836129b5565b6101b954604051637f7c149160e01b81526001600160a01b0390911690637f7c149190610f249085903090600401614a52565b6101b7805461254990614a1e565b80601f016020809104026020016040519081016040528092919081815260200182805461257590614a1e565b80156125c25780601f10612597576101008083540402835291602001916125c2565b820191906000526020600020905b8154815290600101906020018083116125a557829003601f168201915b505050505081565b60006125d46126e2565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b60008051602061518d83398151915261261f8161294f565b61263b5760405162461bcd60e51b8152600401610c2190614ae0565b506101ba80546001600160a01b0319166001600160a01b0392909216919091179055565b60006301ffc9a760e01b6001600160e01b03198316148061269057506380ac58cd60e01b6001600160e01b03198316145b80610a8a5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b1480610a8a57506301ffc9a760e01b6001600160e01b0319831614610a8a565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b600081600111158015612720575061271c6126e2565b5482105b8015610a8a5750600160e01b6127346126e2565b60008481526004919091016020526040902054161592915050565b610fe5828260016133cb565b611025816127676129ab565b613480565b600061277782612bac565b9050836001600160a01b0316816001600160a01b0316146127aa5760405162a1148160e81b815260040160405180910390fd5b6000806127b6846134d9565b915091506127db81876127c63390565b6001600160a01b039081169116811491141790565b612806576127e986336125ca565b61280657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661282d57604051633a954ecd60e21b815260040160405180910390fd5b801561283857600082555b6128406126e2565b6001600160a01b038716600090815260059190910160205260409020805460001901905561286c6126e2565b6001600160a01b0386166000908152600591909101602052604090208054600101905561289d85600160e11b613501565b6128a56126e2565b60008681526004919091016020526040812091909155600160e11b8416900361291b57600184016128d46126e2565b600082815260049190910160205260408120549003612919576128f56126e2565b54811461291957836129056126e2565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03166000805160206151f483398151915260405160405180910390a46114cd565b600061295d8261078d6129ab565b1561296a57506001919050565b8161297757506000919050565b610a8a61298383610ddf565b61294f565b6129928282613516565b600082815261015f60205260409020610c34908261359e565b60006117e86135b3565b6129bf82826135d5565b600082815261015f60205260409020610c34908261365b565b6129e0613670565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612a136129ab565b604051612a209190614194565b60405180910390a1565b610c3483838360405180602001604052806000815250612258565b6000612a5083612bac565b905080600080612a5f866134d9565b915091508415612a9f57612a748184336127c6565b612a9f57612a8283336125ca565b612a9f57604051632ce44b5f60e11b815260040160405180910390fd5b8015612aaa57600082555b6001600160801b03612aba6126e2565b6001600160a01b0385166000908152600591909101602052604090208054919091019055612aec83600360e01b613501565b612af46126e2565b60008881526004919091016020526040812091909155600160e11b85169003612b6a5760018601612b236126e2565b600082815260049190910160205260408120549003612b6857612b446126e2565b548114612b685784612b546126e2565b600083815260049190910160205260409020555b505b60405186906000906001600160a01b038616906000805160206151f4833981519152908390a4612b986126e2565b600190810180549091019055505050505050565b600081600111612c4057612bbe6126e2565b600083815260049190910160205260408120549150600160e01b82169003612c405780600003612c3b57612bf06126e2565b548210612c1057604051636f96cda160e11b815260040160405180910390fd5b612c186126e2565b600019909201600081815260049390930160205260409092205490508015612c10575b919050565b604051636f96cda160e11b815260040160405180910390fd5b610fe58282604051806020016040528060008152506136b9565b612c7b61372f565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a136129ab565b60006118068383613775565b600260015403612d0f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c21565b6002600155565b6000805b82811015612da15760005b83811015612d8e57848482818110612d3f57612d3f614d11565b90506020020135858584818110612d5857612d58614d11565b90506020020135148015612d6c5750808214155b15612d7c57600092505050610a8a565b80612d8681614d3f565b915050612d25565b5080612d9981614d3f565b915050612d1a565b5060019392505050565b60655460ff1680612dcd575060008181526101c0602052604090206007015442105b80612de9575060008181526101c0602052604090206008015442115b80612e07575060008181526101c0602052604090206001015460ff16155b15611025576040516347cc82cd60e01b815260040160405180910390fd5b60008681526101c0602052604090206005810154612e438787614d27565b1115612e6257604051631f43edc360e11b815260040160405180910390fd5b805415611cbc5783851180612e7f575083612e7d8787614d27565b115b15612e9d57604051631f43edc360e11b815260040160405180910390fd5b6000612f1f848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250508554604051909250612f0491508d908a9060200160609290921b6001600160601b0319168252601482015260340190565b6040516020818303038152906040528051906020012061379f565b50905080612f405760405163c8ac23c360e01b815260040160405180910390fd5b505050505050505050565b60606000612f588361386d565b60010190506000816001600160401b03811115612f7757612f77614688565b6040519080825280601f01601f191660200182016040528015612fa1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612fab57509392505050565b60018055565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90565b6001600160a01b03163b151590565b600054610100900460ff1661303d5760405162461bcd60e51b8152600401610c2190614fe1565b613045613943565b565b600054610100900460ff1661306e5760405162461bcd60e51b8152600401610c2190614fe1565b61307661396a565b61102581613991565b613087612fe3565b54610100900460ff166130ac5760405162461bcd60e51b8152600401610c219061502c565b610fe58282613a20565b610fe58282612988565b60006130cb83610ddf565b600084815261012d6020526040808220600101859055519192508391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b8061311d6126e2565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b606061319c83613007565b6131f75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c21565b600080846001600160a01b031684604051613212919061506e565b600060405180830381855af49150503d806000811461324d576040519150601f19603f3d011682016040523d82523d6000602084013e613252565b606091505b509150915061327a82826040518060600160405280602781526020016151ad60279139613a9c565b95945050505050565b61328e848484610d05565b6001600160a01b0383163b15610dd9576132aa84848484613ab5565b610dd9576040516368d2bf6b60e11b815260040160405180910390fd5b6000610a8a825490565b6127106001600160601b038216111561333f5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610c21565b6001600160a01b0382166133915760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606401610c21565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b9091021761019155565b60006133d68361134a565b9050811561341557336001600160a01b03821614613415576133f881336125ca565b613415576040516367d9dca160e11b815260040160405180910390fd5b8361341e6126e2565b6000858152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551859287811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a450505050565b61348a828261180d565b610fe55761349781613ba1565b6134a2836020613bb3565b6040516020016134b3929190615080565b60408051601f198184030181529082905262461bcd60e51b8252610c2191600401614168565b60008060006134e66126e2565b60009485526006016020525050604090912080549092909150565b4260a01b176001600160a01b03919091161790565b613520828261180d565b610fe557600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561355a6129ab565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611806836001600160a01b038416613d4e565b60006135be33611143565b156135d0575060131936013560601c90565b503390565b6135df828261180d565b15610fe557600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff191690556136176129ab565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611806836001600160a01b038416613d9d565b60655460ff166130455760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c21565b6136c38383613e90565b6001600160a01b0383163b15610c345760006136dd6126e2565b5490508281035b6136f76000868380600101945086613ab5565b613714576040516368d2bf6b60e11b815260040160405180910390fd5b8181106136e457816137246126e2565b54146113a457600080fd5b60655460ff16156130455760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c21565b600082600001828154811061378c5761378c614d11565b9060005260206000200154905092915050565b6000808281805b8751811015613861576137ba600283614a9f565b915060008882815181106137d0576137d0614d11565b6020026020010151905080841161381257604080516020810186905290810182905260600160405160208183030381529060405280519060200120935061384e565b604080516020810183905290810185905260600160405160208183030381529060405280519060200120935060018361384b9190614d27565b92505b508061385981614d3f565b9150506137a6565b50941495939450505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106138ac5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b83106138d6576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106138f457662386f26fc10000830492506010015b6305f5e100831061390c576305f5e100830492506008015b612710831061392057612710830492506004015b60648310613932576064830492506002015b600a8310610a8a5760010192915050565b600054610100900460ff16612fdd5760405162461bcd60e51b8152600401610c2190614fe1565b600054610100900460ff166130455760405162461bcd60e51b8152600401610c2190614fe1565b600054610100900460ff166139b85760405162461bcd60e51b8152600401610c2190614fe1565b60005b8151811015610fe5576001609760008484815181106139dc576139dc614d11565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580613a1881614d3f565b9150506139bb565b613a28612fe3565b54610100900460ff16613a4d5760405162461bcd60e51b8152600401610c219061502c565b81613a566126e2565b6002019080519060200190613a6c929190614054565b5080613a766126e2565b6003019080519060200190613a8c929190614054565b506001613a976126e2565b555050565b60608315613aab575081611806565b6118068383613fa6565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613aea9033908990889088906004016150ef565b6020604051808303816000875af1925050508015613b25575060408051601f3d908101601f19168201909252613b2291810190615122565b60015b613b83573d808015613b53576040519150601f19603f3d011682016040523d82523d6000602084013e613b58565b606091505b508051600003613b7b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060610a8a6001600160a01b03831660145b60606000613bc2836002614a9f565b613bcd906002614d27565b6001600160401b03811115613be457613be4614688565b6040519080825280601f01601f191660200182016040528015613c0e576020820181803683370190505b509050600360fc1b81600081518110613c2957613c29614d11565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613c5857613c58614d11565b60200101906001600160f81b031916908160001a9053506000613c7c846002614a9f565b613c87906001614d27565b90505b6001811115613cff576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613cbb57613cbb614d11565b1a60f81b828281518110613cd157613cd1614d11565b60200101906001600160f81b031916908160001a90535060049490941c93613cf88161513f565b9050613c8a565b5083156118065760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c21565b6000818152600183016020526040812054613d9557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a8a565b506000610a8a565b60008181526001830160205260408120548015613e86576000613dc1600183614efc565b8554909150600090613dd590600190614efc565b9050818114613e3a576000866000018281548110613df557613df5614d11565b9060005260206000200154905080876000018481548110613e1857613e18614d11565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613e4b57613e4b615156565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a8a565b6000915050610a8a565b6000613e9a6126e2565b5490506000829003613ebf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160401b018202613ed16126e2565b6001600160a01b0385166000908152600591909101602052604090208054919091019055613f05836001841460e11b613501565b613f0d6126e2565b600083815260049190910160205260408120919091556001600160a01b0384169083830190839083906000805160206151f48339815191528180a4600183015b818114613f7357808360006000805160206151f4833981519152600080a4600101613f4d565b5081600003613f9457604051622e076360e81b815260040160405180910390fd5b80613f9d6126e2565b5550610c349050565b815115613fb65781518083602001fd5b8060405162461bcd60e51b8152600401610c219190614168565b828054613fdc90614a1e565b90600052602060002090601f016020900481019282613ffe5760008555614044565b82601f106140175782800160ff19823516178555614044565b82800160010185558215614044579182015b82811115614044578235825591602001919060010190614029565b506140509291506140c8565b5090565b82805461406090614a1e565b90600052602060002090601f0160209004810192826140825760008555614044565b82601f1061409b57805160ff1916838001178555614044565b82800160010185558215614044579182015b828111156140445782518255916020019190600101906140ad565b5b8082111561405057600081556001016140c9565b6001600160e01b03198116811461102557600080fd5b60006020828403121561410557600080fd5b8135611806816140dd565b60005b8381101561412b578181015183820152602001614113565b83811115610dd95750506000910152565b60008151808452614154816020860160208601614110565b601f01601f19169290920160200192915050565b602081526000611806602083018461413c565b60006020828403121561418d57600080fd5b5035919050565b6001600160a01b0391909116815260200190565b80356001600160a01b0381168114612c3b57600080fd5b600080604083850312156141d257600080fd5b6141db836141a8565b946020939093013593505050565b6000602082840312156141fb57600080fd5b611806826141a8565b60008060006060848603121561421957600080fd5b614222846141a8565b9250614230602085016141a8565b9150604084013590509250925092565b6000806040838503121561425357600080fd5b50508035926020909101359150565b6000806040838503121561427557600080fd5b82359150614285602084016141a8565b90509250929050565b600080602083850312156142a157600080fd5b82356001600160401b03808211156142b857600080fd5b818501915085601f8301126142cc57600080fd5b8135818111156142db57600080fd5b8660208285010111156142ed57600080fd5b60209290920196919550909350505050565b60208152815160208201526000602083015161431f604084018215159052565b50604083015161012080606085015261433c61014085018361413c565b91506060850151601f19858403016080860152614359838261413c565b925050608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100818187015280870151838701525050508091505092915050565b600061012082840312156143af57600080fd5b50919050565b600080604083850312156143c857600080fd5b82356001600160401b038111156143de57600080fd5b6143ea8582860161439c565b95602094909401359450505050565b60008083601f84011261440b57600080fd5b5081356001600160401b0381111561442257600080fd5b6020830191508360208260051b8501011115610e9e57600080fd5b6000806000806040858703121561445357600080fd5b84356001600160401b038082111561446a57600080fd5b614476888389016143f9565b9096509450602087013591508082111561448f57600080fd5b5061449c878288016143f9565b95989497509550505050565b60006101008451151583526020850151602084015260408501516040840152606085015160608401526080850151608084015260a085015160a084015260c085015160c08401528060e0840152835160208285015261450b61012085018261413c565b9695505050505050565b6000806020838503121561452857600080fd5b82356001600160401b0381111561453e57600080fd5b61454a858286016143f9565b90969095509350505050565b60006020828403121561456857600080fd5b81356001600160401b0381111561457e57600080fd5b8201610100818503121561180657600080fd5b6000602082840312156145a357600080fd5b81356001600160401b038111156145b957600080fd5b613b998482850161439c565b6000806000806000806000806080898b0312156145e157600080fd5b88356001600160401b03808211156145f857600080fd5b6146048c838d016143f9565b909a50985060208b013591508082111561461d57600080fd5b6146298c838d016143f9565b909850965060408b013591508082111561464257600080fd5b61464e8c838d016143f9565b909650945060608b013591508082111561466757600080fd5b506146748b828c016143f9565b999c989b5096995094979396929594505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156146c6576146c6614688565b604052919050565b60006001600160401b038311156146e7576146e7614688565b6146fa601f8401601f191660200161469e565b905082815283838301111561470e57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261473657600080fd5b611806838335602085016146ce565b600082601f83011261475657600080fd5b813560206001600160401b0382111561477157614771614688565b8160051b61478082820161469e565b928352848101820192828101908785111561479a57600080fd5b83870192505b848310156147c0576147b1836141a8565b825291830191908301906147a0565b979650505050505050565b600080600080600080600060e0888a0312156147e657600080fd5b6147ef886141a8565b965060208801356001600160401b038082111561480b57600080fd5b6148178b838c01614725565b975060408a013591508082111561482d57600080fd5b6148398b838c01614725565b965060608a013591508082111561484f57600080fd5b61485b8b838c01614725565b955060808a013591508082111561487157600080fd5b5061487e8a828b01614745565b93505061488d60a089016141a8565b915061489b60c089016141a8565b905092959891949750929550565b801515811461102557600080fd5b600080604083850312156148ca57600080fd5b6148d3836141a8565b915060208301356148e3816148a9565b809150509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561494357603f1988860301845261493185835161413c565b94509285019290850190600101614915565b5092979650505050505050565b6000806000806080858703121561496657600080fd5b61496f856141a8565b935061497d602086016141a8565b92506040850135915060608501356001600160401b0381111561499f57600080fd5b8501601f810187136149b057600080fd5b6149bf878235602084016146ce565b91505092959194509250565b6000602082840312156149dd57600080fd5b81356001600160601b038116811461180657600080fd5b60008060408385031215614a0757600080fd5b614a10836141a8565b9150614285602084016141a8565b600181811c90821680614a3257607f821691505b6020821081036143af57634e487b7160e01b600052602260045260246000fd5b6001600160a01b0392831681529116602082015260400190565b600060208284031215614a7e57600080fd5b8151611806816148a9565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614ab957614ab9614a89565b500290565b600082614adb57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60008135610a8a816148a9565b60ff1981541660ff8315151681178255505050565b6000808335601e19843603018112614b4157600080fd5b8301803591506001600160401b03821115614b5b57600080fd5b602001915036819003821315610e9e57600080fd5b601f821115610c3457600081815260208120601f850160051c81016020861015614b975750805b601f850160051c820191505b818110156114cd57828155600101614ba3565b600019600383901b1c191660019190911b1790565b6001600160401b03831115614be257614be2614688565b614bf683614bf08354614a1e565b83614b70565b6000601f841160018114614c245760008515614c125750838201355b614c1c8682614bb6565b8455506113a4565b600083815260209020601f19861690835b82811015614c555786850135825560209485019460019092019101614c35565b5086821015614c725760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81358155614ca0614c9760208401614b08565b60018301614b15565b614cad6040830183614b2a565b614cbb818360028601614bcb565b5050614cca6060830183614b2a565b614cd8818360038601614bcb565b50506080820135600482015560a0820135600582015560c0820135600682015560e0820135600782015561010082013560088201555050565b634e487b7160e01b600052603260045260246000fd5b60008219821115614d3a57614d3a614a89565b500190565b600060018201614d5157614d51614a89565b5060010190565b6000823561011e19833603018112614d6f57600080fd5b9190910192915050565b614d838283614b2a565b6001600160401b03811115614d9a57614d9a614688565b614dae81614da88554614a1e565b85614b70565b6000601f821160018114614ddc5760008315614dca5750838201355b614dd48482614bb6565b8655506114cd565b600085815260209020601f19841690835b82811015614e0d5786850135825560209485019460019092019101614ded565b5084821015614e2a5760001960f88660031b161c19848701351681555b50505050600190811b019091555050565b8135614e46816148a9565b614e508183614b15565b506020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c0820135600682015560e0820135601e19833603018112614ea457600080fd5b610c3481840160078401614d79565b6000808335601e19843603018112614eca57600080fd5b8301803591506001600160401b03821115614ee457600080fd5b6020019150600581901b3603821315610e9e57600080fd5b600082821015614f0e57614f0e614a89565b500390565b60008351614f25818460208801614110565b835190830190614f39818360208801614110565b600b60fa1b9101908152600101949350505050565b6000808454614f5c81614a1e565b60018281168015614f745760018114614f8557614fb4565b60ff19841687528287019450614fb4565b8860005260208060002060005b85811015614fab5781548a820152908401908201614f92565b50505082870194505b505050508351614fc8818360208801614110565b64173539b7b760d91b9101908152600501949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b602080825260349082015260008051602061516d833981519152604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b60008251614d6f818460208701614110565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516150b2816017850160208801614110565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150e3816028840160208801614110565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061450b9083018461413c565b60006020828403121561513457600080fd5b8151611806816140dd565b60008161514e5761514e614a89565b506000190190565b634e487b7160e01b600052603160045260246000fdfe455243373231415f5f496e697469616c697a61626c653a20636f6e74726163748eb467f061ca67f42a2d2ca4a346fc9fb645efc0ba75056ee9f71c3a0ccc10a8416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef2ce8d04a9c35987429af538825cd2438cc5c5bb5dc427955f84daaa3ea105016a164736f6c634300080d000a

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.