Token Marble Maidens

 

Overview ERC-721

Total Supply:
551 MARBL

Holders:
109 addresses

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
MarbleMaidens

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion, MIT license
File 1 of 45 : BannersOracle.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";


contract BannersOracle is Context,  AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage{
  using Counters for Counters.Counter;
  Counters.Counter public _tokenIdTracker;

  string private _baseTokenURI;
  /// @notice Mint price
  uint private _price;
  /// @notice Max number of token mintable
  uint private _max;
  address _wallet;

  bool _openMint;
  bool _openWhitelistMint;

  mapping(address => uint) private whitelist;

  constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint max, address wallet, address admin) ERC721(name, symbol) {
      _baseTokenURI = baseTokenURI;
      _price = mintPrice;
      _max = max;
      _wallet = wallet;
      _openMint = false;
      _openWhitelistMint = false;
      _setupRole(DEFAULT_ADMIN_ROLE, wallet);
      _setupRole(DEFAULT_ADMIN_ROLE, admin);
  }

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

  function setBaseURI(string memory baseURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change base URI");
    _baseTokenURI = baseURI;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change token URI");
    _setTokenURI(tokenId, _tokenURI);
  }

  /**
    @notice Method for updating minting fee
    @dev Only admin
    @param mintPrice uint the minting fee to set
    */
  function setPrice(uint mintPrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change price");
    _price = mintPrice;
  }

  function setMax(uint max) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change the max quantity");
    _max = max;
  }

  function setMint(bool openMint, bool openWhitelistMint) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to open/close mint");
    _openMint = openMint;
    _openWhitelistMint = openWhitelistMint;
  }

  function getPrice() public view returns (uint) {
    return _price;
  }

  function getMax() public view returns (uint) {
    return _max;
  }

  function mint(uint amount) public payable {
    require(amount <= 10, "BannersOracle: max of 10 Oracle Witches per mint");
    require(_openMint == true, "BannersOracle: minting is closed");
    require(msg.value == _price*amount, "BannersOracle: must send correct price");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");
    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      _tokenIdTracker.increment();
    }
    payable(_wallet).transfer(msg.value);
  }

  // function mintWhitelist() public payable {
  //   require(_openWhitelistMint == true, "BannersOracle: minting is closed");
  //   require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
  //   require(msg.value == _presaleprice, "BannersOracle: must send correct price");
  //   require(_tokenIdTracker.current() < _max, "BannersOracle: all Oracle Witches have been minted");
    
  //   whitelist[msg.sender] = whitelist[msg.sender] - 1;
  //   _mint(msg.sender, _tokenIdTracker.current());
  //   _tokenIdTracker.increment();
  //   payable(_wallet).transfer(msg.value);
  // }

  function mintWhitelist(uint amount) public {
    require(_openWhitelistMint == true, "BannersOracle: minting is closed");
    require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
    require(amount <= whitelist[msg.sender], "BannersOracle: user must have enough whitelist spots left to mint");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");

    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      whitelist[msg.sender] = whitelist[msg.sender] - 1;
      _tokenIdTracker.increment();
    }
  }

  function whitelistUser(address user, uint nbspot) public {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to whitelist address");
    whitelist[user] = nbspot;
  }

  function whitelistStatus(address user) public view returns(uint) {
    // if (whitelist[user] > 0) {
    //   return whitelist[user];
    // }
    // else {
    //   return 0;
    // }
    return whitelist[user];
  }

  function burn(uint256 tokenId) public{
    require(_isApprovedOrOwner(msg.sender, tokenId), "BannersOracle: must own the token to burn it");
    _burn(tokenId);
  }

  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    return ERC721URIStorage._burn(tokenId);
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
    return ERC721URIStorage.tokenURI(tokenId);
  }
  
  function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

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

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 3 of 45 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 45 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 5 of 45 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

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

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

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

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 6 of 45 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

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

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).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 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 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);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 14 of 45 : 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 15 of 45 : 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 16 of 45 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 17 of 45 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @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 18 of 45 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.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 AccessControl is Context, IAccessControl, ERC165 {
    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, _msgSender());
        _;
    }

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

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

    /**
     * @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 {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.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 override returns (bytes32) {
        return _roles[role].adminRole;
    }

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 19 of 45 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

File 20 of 45 : IAccessControl.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 IAccessControl {
    /**
     * @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 21 of 45 : WitchesOracleRituals.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";


contract WitchesOracleRituals is Context,  AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage{
  using Counters for Counters.Counter;
  Counters.Counter public _tokenIdTracker;

  string private _baseTokenURI;
  /// @notice Mint price
  uint private _price;
  /// @notice Max number of token mintable
  uint private _max;
  address _wallet;

  bool _openMint;
  bool _openWhitelistMint;

  mapping(address => uint) private whitelist;

  constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint max, address wallet, address admin) ERC721(name, symbol) {
      _baseTokenURI = baseTokenURI;
      _price = mintPrice;
      _max = max;
      _wallet = wallet;
      _openMint = false;
      _openWhitelistMint = false;
      _setupRole(DEFAULT_ADMIN_ROLE, wallet);
      _setupRole(DEFAULT_ADMIN_ROLE, admin);
  }

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

  function setBaseURI(string memory baseURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change base URI");
    _baseTokenURI = baseURI;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change token URI");
    _setTokenURI(tokenId, _tokenURI);
  }

  /**
    @notice Method for updating minting fee
    @dev Only admin
    @param mintPrice uint the minting fee to set
    */
  function setPrice(uint mintPrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change price");
    _price = mintPrice;
  }

  function setMax(uint max) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change the max quantity");
    _max = max;
  }

  function setMint(bool openMint, bool openWhitelistMint) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to open/close mint");
    _openMint = openMint;
    _openWhitelistMint = openWhitelistMint;
  }

  function getPrice() public view returns (uint) {
    return _price;
  }

  function getMax() public view returns (uint) {
    return _max;
  }

  function mint(uint amount) public payable {
    require(amount <= 10, "Max of 10 Oracle Witches per mint");
    require(_openMint == true, "Minting is closed");
    require(msg.value == _price*amount, "Must send correct price");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");
    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      _tokenIdTracker.increment();
    }
    payable(_wallet).transfer(msg.value);
  }

  // function mintWhitelist() public payable {
  //   require(_openWhitelistMint == true, "Minting is closed");
  //   require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
  //   require(msg.value == _presaleprice, "Must send correct price");
  //   require(_tokenIdTracker.current() < _max, "BannersOracle: all Oracle Witches have been minted");
    
  //   whitelist[msg.sender] = whitelist[msg.sender] - 1;
  //   _mint(msg.sender, _tokenIdTracker.current());
  //   _tokenIdTracker.increment();
  //   payable(_wallet).transfer(msg.value);
  // }

  function mintWhitelist(uint amount) public {
    require(_openWhitelistMint == true, "Minting is closed");
    require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
    require(amount <= whitelist[msg.sender], "BannersOracle: user must have enough whitelist spots left to mint");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");

    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      whitelist[msg.sender] = whitelist[msg.sender] - 1;
      _tokenIdTracker.increment();
    }
  }

  function whitelistUser(address user, uint nbspot) public {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to whitelist address");
    whitelist[user] = nbspot;
  }

  function whitelistStatus(address user) public view returns(uint) {
    // if (whitelist[user] > 0) {
    //   return whitelist[user];
    // }
    // else {
    //   return 0;
    // }
    return whitelist[user];
  }

  function burn(uint256 tokenId) public{
    require(_isApprovedOrOwner(msg.sender, tokenId), "Must own the token to burn it");
    _burn(tokenId);
  }

  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    return ERC721URIStorage._burn(tokenId);
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
    return ERC721URIStorage.tokenURI(tokenId);
  }
  
  function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

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

File 22 of 45 : WitchesOracle.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";


contract WitchesOracle is Context,  AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage{
  using Counters for Counters.Counter;
  Counters.Counter public _tokenIdTracker;

  string private _baseTokenURI;
  /// @notice Mint price
  uint private _price;
  /// @notice Mint price for presale
  uint private _presaleprice;
  /// @notice Max number of token mintable
  uint private _max;
  address _wallet;

  bool _openMint;
  bool _openWhitelistMint;

  mapping(address => bool) private whitelist;

  constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint mintPreSalePrice, uint max, address wallet, address admin) ERC721(name, symbol) {
      _baseTokenURI = baseTokenURI;
      _price = mintPrice;
      _presaleprice = mintPreSalePrice;
      _max = max;
      _wallet = wallet;
      _openMint = false;
      _openWhitelistMint = false;
      _setupRole(DEFAULT_ADMIN_ROLE, wallet);
      _setupRole(DEFAULT_ADMIN_ROLE, admin);
  }

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

  function setBaseURI(string memory baseURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to change base URI");
    _baseTokenURI = baseURI;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to change token URI");
    _setTokenURI(tokenId, _tokenURI);
  }

  /**
    @notice Method for updating minting fee
    @dev Only admin
    @param mintPrice uint the minting fee to set
    */
  function setPrice(uint mintPrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to change price");
    _price = mintPrice;
  }

  function setPreSalePrice(uint mintPreSalePrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to change presale price");
    _presaleprice = mintPreSalePrice;
  }

  function setMax(uint max) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to change the max quantity");
    _max = max;
  }

  function setMint(bool openMint, bool openWhitelistMint) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to open/close mint");
    _openMint = openMint;
    _openWhitelistMint = openWhitelistMint;
  }

  function getPrice() public view returns (uint) {
    return _price;
  }

  function getPreSalePrice() public view returns (uint) {
    return _presaleprice;
  }

  function getMax() public view returns (uint) {
    return _max;
  }

  function mint(uint amount) public payable {
    require(amount <= 10, "WitchesOracle: max of 10 Oracle Witches per mint");
    require(_openMint == true, "WitchesOracle: minting is closed");
    require(msg.value == _price*amount, "WitchesOracle: must send correct price");
    require(_tokenIdTracker.current() + amount <= _max, "WitchesOracle: not enough Oracle Witches left to be minted");
    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      _tokenIdTracker.increment();
    }
    payable(_wallet).transfer(msg.value);
  }

  function mintWhitelist() public payable {
    require(_openWhitelistMint == true, "WitchesOracle: minting is closed");
    require(whitelist[msg.sender] == true, "WitchesOracle: user must be whitelisted to mint");
    require(msg.value == _presaleprice, "WitchesOracle: must send correct price");
    require(_tokenIdTracker.current() < _max, "WitchesOracle: all Oracle Witches have been minted");
    
    whitelist[msg.sender] = false;
    _mint(msg.sender, _tokenIdTracker.current());
    _tokenIdTracker.increment();
    payable(_wallet).transfer(msg.value);
  }

  function whitelistUser(address user) public {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "WitchesOracle: must have admin role to whitelist address");
    whitelist[user] = true;
  }

  function whitelistStatus(address user) public view returns(bool) {
    return whitelist[user];
  }

  function burn(uint256 tokenId) public{
    require(_isApprovedOrOwner(msg.sender, tokenId), "WitchesOracle: must own the token to burn it");
    _burn(tokenId);
  }

  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    return ERC721URIStorage._burn(tokenId);
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
    return ERC721URIStorage.tokenURI(tokenId);
  }
  
  function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

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

File 23 of 45 : MyNFTContractRandom.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../utils/ClampedRandomizer.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";


// Overview of contract capability
// Standard ERC721
// Supports for:
// - Presale list
// - Admin other than Owner
// - Burnable
// - Randomized ID at mint - WARNING - THIS PREVENTS THE MAXIMUM NUMBER OF NFTS TO MINT TO CHANGE

contract MyNFTContractRandom is ClampedRandomizer, Context, AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage{
  using Counters for Counters.Counter;
  Counters.Counter public _tokenIdTracker;

  string private _baseTokenURI;
  /// @notice Mint price
  uint private _price;
  /// @notice Mint price for presale
  uint private _presaleprice;
  /// @notice Max number of token mintable
  uint private _max;
  address _wallet;

  bool _openMint;
  bool _openWhitelistMint;

  mapping(address => bool) private whitelist;

  constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint mintPreSalePrice, uint max, address wallet, address admin) ERC721(name, symbol) ClampedRandomizer(max){
      _baseTokenURI = baseTokenURI;
      _price = mintPrice;
      _presaleprice = mintPreSalePrice;
      _max = max;
      _wallet = wallet;
      _openMint = false;
      _openWhitelistMint = false;
      _setupRole(DEFAULT_ADMIN_ROLE, wallet);
      _setupRole(DEFAULT_ADMIN_ROLE, admin);
  }

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

  function setBaseURI(string memory baseURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change base URI");
    _baseTokenURI = baseURI;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change token URI");
    _setTokenURI(tokenId, _tokenURI);
  }

  /**
    @notice Method for updating minting fee
    @dev Only admin
    @param mintPrice uint the minting fee to set
    */
  function setPrice(uint mintPrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change price");
    _price = mintPrice;
  }

  function setPreSalePrice(uint mintPreSalePrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change presale price");
    _presaleprice = mintPreSalePrice;
  }

  function setMax(uint max) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to change the max quantity");
    _max = max;
  }

  function setMint(bool openMint, bool openWhitelistMint) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to open/close mint");
    _openMint = openMint;
    _openWhitelistMint = openWhitelistMint;
  }

  function getPrice() public view returns (uint) {
    return _price;
  }

  function getPreSalePrice() public view returns (uint) {
    return _presaleprice;
  }

  function getMax() public view returns (uint) {
    return _max;
  }

  function internalMint(address to) internal {
      uint tokenId = _genClampedNonce();
      _mint(to, tokenId);
  }

  function mint(uint amount) public payable {
    uint supply = totalSupply();
    require(amount <= 10, "Max of 10 NFT per mint");
    require(_openMint == true, "Minting is closed");
    require(msg.value == _price*amount, "Must send correct price");
    require(supply + amount <= _max, "Not enough NFT left to be minted");

    for(uint i = 0; i < amount; i++) {
      internalMint(msg.sender);
    }
    payable(_wallet).transfer(msg.value);
  }

  function mintWhitelist() public payable {
    uint supply = totalSupply();
    require(_openWhitelistMint == true, "Minting is closed");
    require(whitelist[msg.sender] == true, "User must be whitelisted to mint");
    require(msg.value == _presaleprice, "Must send correct price");
    require(supply < _max, "All NFTs have been minted");
    
    whitelist[msg.sender] = false;
    internalMint(msg.sender);
    payable(_wallet).transfer(msg.value);
  }

  function whitelistUser(address user) public {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Must have admin role to whitelist address");
    whitelist[user] = true;
  }

  function whitelistStatus(address user) public view returns(bool) {
    return whitelist[user];
  }

  function burn(uint256 tokenId) public{
    require(_isApprovedOrOwner(msg.sender, tokenId), "Must own the token to burn it");
    _burn(tokenId);
  }

  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    return ERC721URIStorage._burn(tokenId);
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
    return ERC721URIStorage.tokenURI(tokenId);
  }
  
  function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

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

File 24 of 45 : ClampedRandomizer.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

contract ClampedRandomizer {
    uint256 private _scopeIndex = 0; //Clamping cache for random TokenID generation in the anti-sniping algo
    uint256 private immutable _scopeCap; //Size of initial randomized number pool & max generated value (zero indexed)
    mapping(uint256 => uint256) _swappedIDs; //TokenID cache for random TokenID generation in the anti-sniping algo

    constructor(uint256 scopeCap) {
        _scopeCap = scopeCap;
    }

    function _genClampedNonce() internal virtual returns (uint256) {
        uint256 scope = _scopeCap - _scopeIndex;
        uint256 swap;
        uint256 result;

        uint256 i = randomNumber() % scope;

        //Setup the value to swap in for the selected number
        if (_swappedIDs[scope - 1] == 0) {
            swap = scope - 1;
        } else {
            swap = _swappedIDs[scope - 1];
        }

        //Select a random number, swap it out with an unselected one then shorten the selection range by 1
        if (_swappedIDs[i] == 0) {
            result = i;
            _swappedIDs[i] = swap;
        } else {
            result = _swappedIDs[i];
            _swappedIDs[i] = swap;
        }
        _scopeIndex++;
        return result;
    }

    function randomNumber() internal view returns (uint256) {
        return uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp)));
    }
}

File 25 of 45 : MarbleMaidens.sol
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../layerzero_v0/NonblockingReceiver.sol";
import "../utils/ClampedRandomizer.sol";

pragma solidity ^0.8.7;

contract MarbleMaidens is ERC721Enumerable, ERC721URIStorage, IERC2981, Ownable, ERC721Burnable, NonblockingReceiver, ClampedRandomizer {
    
    using SafeMath for uint;
    using Address for address;

    event Migration(address indexed _to, uint indexed _tokenId);

    string public baseURI;
    // VARIABLES
    uint public startID;
    bool public openMint;
    bool public openWhitelistMint;
    bool public openTraversing;
    uint public maxSupply;
    uint public maxPerTx = 5;
    uint public maxPerPerson;
    uint public _price = 30000000000000000000;
    /// @notice Mint price for presale
    uint private _presaleprice;

    address public royaltyAddress = 0xB22fc8e22CAc0B95b381deA7Ea86705a7d622dF0;
    address private walletMint = 0xB22fc8e22CAc0B95b381deA7Ea86705a7d622dF0;
    uint public royalty = 750;
    uint private gasForDestinationLzReceive = 350000;   

    // MAPPINGS
    mapping(address => uint) public whiteListed;

    constructor(
        uint _startID,
        uint _mintPrice,
        uint _presalePrice,
        uint _maxSupply,
        address _lzEndpoint
    ) ERC721("Marble Maidens", "MARBL") ClampedRandomizer(_maxSupply) {
        startID = _startID;
        _price = _mintPrice;
        _presaleprice = _presalePrice;
        maxSupply = _maxSupply;
        maxPerPerson = _maxSupply;
        openMint = false;
        openTraversing = false;
        openWhitelistMint = false;
        endpoint = ILayerZeroEndpoint(_lzEndpoint);
    }

    // This function transfers the nft from your address on the
    // source chain to the same address on the destination chain
    function traverseChains(uint16 _chainId, uint tokenId) public payable {
        require(openTraversing == true, "Marble Maidens: traversing is closed");
        require(msg.sender == ownerOf(tokenId), "You must own the token to traverse");
        require(trustedRemoteLookup[_chainId].length > 0, "This chain is currently unavailable for travel");

        // burn NFT, eliminating it from circulation on src chain
        _burn(tokenId);

        // abi.encode() the payload with the values to send
        bytes memory payload = abi.encode(msg.sender, tokenId);

        // encode adapterParams to specify more gas for the destination
        uint16 version = 1;
        bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive);

        // get the fees we need to pay to LayerZero + Relayer to cover message delivery
        // you will be refunded for extra gas paid
        (uint messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams);

        require(msg.value >= messageFee, "Error: msg.value not enough to cover messageFee. Send gas for message fees");

        endpoint.send{value: msg.value}(
            _chainId, // destination chainId
            trustedRemoteLookup[_chainId], // destination address of nft contract
            payload, // abi.encoded()'ed bytes
            payable(msg.sender), // refund address
            address(0x0), // 'zroPaymentAddress' unused for this
            adapterParams // txParameters
        );
    }

    // just in case this fixed variable limits us from future integrations
    function setGasForDestinationLzReceive(uint newVal) external onlyOwner {
        gasForDestinationLzReceive = newVal;
    }

    function _LzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal override {
        // decode
        (address toAddr, uint tokenId) = abi.decode(_payload, (address, uint));

        // mint the tokens back into existence on destination chain
        _safeMint(toAddr, tokenId);
    }

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

    function mint(uint amount) public payable {
        uint supply = totalSupply();
        require(openMint == true, "Marble Maidens: minting is closed");
        require(supply + amount - 1 < maxSupply, "Error: cannot mint more than total supply");
        require(amount > 0 && amount <= maxPerTx, "Error: max par tx limit");
        //require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit");
        require(msg.value == _price * amount, "Error: invalid price");
        for (uint i = 0; i < amount; i++) {
            internalMint(msg.sender);
        }
        // Add transfer to destination wallet
        payable(walletMint).transfer(msg.value);
    }

    function mintWhitelist(uint amount) public payable {
        uint supply = totalSupply();
        require(openWhitelistMint == true, "Marble Maidens: minting is closed");
        require(supply + amount - 1 < maxSupply, "Error: cannot mint more than total supply");
        require(whiteListed[msg.sender] >= amount, "WitchesOracle: user must be whitelisted to mint");
        require(amount > 0 && amount <= maxPerTx, "Error: max par tx limit");
        //require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit");
        require(msg.value == _presaleprice * amount, "Error: invalid price");
        for (uint i = 0; i < amount; i++) {
            internalMint(msg.sender);
            whiteListed[msg.sender] = whiteListed[msg.sender] - 1;
        }
        // Add transfer to destination wallet
        payable(walletMint).transfer(msg.value);
    }

    function tokenURI(uint tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
        return super.tokenURI(tokenId);
    }

    function tokenExists(uint _id) external view returns (bool) {
        return (_exists(_id));
    }

    function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
        return (royaltyAddress, (_salePrice * royalty) / 10000);
    }

    //dev

    function whiteList(address[] memory _addressList, uint count) external onlyOwner {
        require(_addressList.length > 0, "Error: list is empty");
        for (uint i = 0; i < _addressList.length; ++i) {
            require(_addressList[i] != address(0), "Address cannot be 0.");
            whiteListed[_addressList[i]] = count;
        }
    }

    function whitelistUser(address user, uint nbspot) external onlyOwner{
        whiteListed[user] = nbspot;
    }

    function removeWhiteList(address[] memory addressList) external onlyOwner {
        require(addressList.length > 0, "Error: list is empty");
        for (uint i = 0; i < addressList.length; ++i) whiteListed[addressList[i]] = 0;
    }

    function setMint(bool _openMint) external onlyOwner {
        openMint = _openMint;
    }

    function setWhiteListMint(bool _openWhiteListMint) external onlyOwner {
        openWhitelistMint = _openWhiteListMint;
    }

    function setTraversing(bool _openTraversing) external onlyOwner {
        openTraversing = _openTraversing;
    }

    function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
        maxPerPerson = newMaxBuy;
    }

    function setMaxPerTx(uint newMaxBuy) external onlyOwner {
        maxPerTx = newMaxBuy;
    }

    function setBaseURI(string memory newBaseURI) external onlyOwner {
        baseURI = newBaseURI;
    }

    function setPrice(uint newPrice) external onlyOwner {
        _price = newPrice;
    }

    function setPresalePrice(uint newPresalePrice) external onlyOwner {
        _presaleprice = newPresalePrice;
    }

    function getPrice() public view returns (uint) {
        return _price;
    }

    function getPresalePrice() public view returns (uint) {
        return _presaleprice;
    }

    function getMax() public view returns (uint) {
        return maxSupply;
    }

    function setURI(uint tokenId, string memory uri) external onlyOwner {
        _setTokenURI(tokenId, uri);
    }

    function setRoyalty(uint16 _royalty) external onlyOwner {
        require(_royalty <= 1000, "Royalty must be lower than or equal to 10%");
        royalty = _royalty;
    }

    function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
        royaltyAddress = _royaltyAddress;
    }

    //Overrides

    function internalMint(address to) internal {
        uint tokenId = _genClampedNonce() + startID;
        _safeMint(to, tokenId);
    }

    function safeMint(address to) public onlyOwner {
        internalMint(to);
    }

    function internalMintToken(address to, uint tokenId) internal {
        _safeMint(to, tokenId);
    }

    function safeMintToken(address to, uint tokenId) public onlyOwner {
        internalMintToken(to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, IERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }

}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 27 of 45 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 28 of 45 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 29 of 45 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 30 of 45 : NonblockingReceiver.sol
//SPDX-License-Identifier: MIT

import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/ILayerZeroReceiver.sol";
import "./interfaces/ILayerZeroEndpoint.sol";

//pragma solidity ^0.8.6;
pragma solidity ^0.8.4;

abstract contract NonblockingReceiver is Ownable, ILayerZeroReceiver {
    ILayerZeroEndpoint internal endpoint;

    struct FailedMessages {
        uint payloadLength;
        bytes32 payloadHash;
    }

    mapping(uint16 => mapping(bytes => mapping(uint => FailedMessages))) public failedMessages;
    mapping(uint16 => bytes) public trustedRemoteLookup;

    event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload);

    function lzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) external override {
        require(msg.sender == address(endpoint)); // boilerplate! lzReceive must be called by the endpoint for security
        require(_srcAddress.length == trustedRemoteLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]), "NonblockingReceiver: invalid source sending contract");

        // try-catch all errors/exceptions
        // having failed messages does not block messages passing
        try this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
            // do nothing
        } catch {
            // error / exception
            failedMessages[_srcChainId][_srcAddress][_nonce] = FailedMessages(_payload.length, keccak256(_payload));
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    function onLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) public {
        // only internal transaction
        require(msg.sender == address(this), "NonblockingReceiver: caller must be Bridge.");

        // handle incoming message
        _LzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function
    function _LzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual;

    function _lzSend(
        uint16 _dstChainId,
        bytes memory _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes memory _txParam
    ) internal {
        endpoint.send{value: msg.value}(_dstChainId, trustedRemoteLookup[_dstChainId], _payload, _refundAddress, _zroPaymentAddress, _txParam);
    }

    function retryMessage(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes calldata _payload
    ) external payable {
        // assert there is message to retry
        FailedMessages storage failedMsg = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(failedMsg.payloadHash != bytes32(0), "NonblockingReceiver: no stored message");
        require(_payload.length == failedMsg.payloadLength && keccak256(_payload) == failedMsg.payloadHash, "LayerZero: invalid payload");
        // clear the stored message
        failedMsg.payloadLength = 0;
        failedMsg.payloadHash = bytes32(0);
        // execute the message. revert if it fails again
        this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    function setTrustedRemote(uint16 _chainId, bytes calldata _trustedRemote) external onlyOwner {
        trustedRemoteLookup[_chainId] = _trustedRemote;
    }
}

File 31 of 45 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 32 of 45 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 33 of 45 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 34 of 45 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 35 of 45 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 36 of 45 : HauntedWitches.sol
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../layerzero_v0/NonblockingReceiver.sol";
import "../utils/ClampedRandomizer.sol";

pragma solidity ^0.8.7;

contract HauntedWitches is ERC721Enumerable, ERC721URIStorage, IERC2981, Ownable, ERC721Burnable, NonblockingReceiver, ClampedRandomizer {
    
    using SafeMath for uint;
    using Address for address;
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdTracker;

    event Migration(address indexed _to, uint indexed _tokenId);

    string public baseURI;
    // VARIABLES
    uint public startID;
    bool public whitelistedOnly;
    bool public openMint;
    bool public openTraversing;
    uint public maxSupply;
    uint public maxPerTx = 5;
    uint public maxPerPerson;
    uint public price = 30000000000000000000;
    address public royaltyAddress = 0xB22fc8e22CAc0B95b381deA7Ea86705a7d622dF0;
    address private walletMint = 0xB22fc8e22CAc0B95b381deA7Ea86705a7d622dF0;
    uint public royalty = 750;
    uint private gasForDestinationLzReceive = 350000;   

    // MAPPINGS
    mapping(address => uint) public whiteListed;
    mapping(address => uint) public mintedCount;

    constructor(
        uint _startID,
        uint _mintPrice,
        uint _maxSupply,
        address _lzEndpoint,
        uint _randomizedSupply
    ) ERC721("BitWitches Haunted", "BWH") ClampedRandomizer(_randomizedSupply) {
        startID = _startID;
        price = _mintPrice;
        maxSupply = _maxSupply;
        maxPerPerson = _maxSupply;
        openMint = false;
        openTraversing = false;
        whitelistedOnly = false;
        endpoint = ILayerZeroEndpoint(_lzEndpoint);
    }

    // This function transfers the nft from your address on the
    // source chain to the same address on the destination chain
    function traverseChains(uint16 _chainId, uint tokenId) public payable {
        require(openTraversing == true, "Haunted BitWitches: traversing is closed");
        require(msg.sender == ownerOf(tokenId), "You must own the token to traverse");
        require(trustedRemoteLookup[_chainId].length > 0, "This chain is currently unavailable for travel");

        // burn NFT, eliminating it from circulation on src chain
        _burn(tokenId);

        // abi.encode() the payload with the values to send
        bytes memory payload = abi.encode(msg.sender, tokenId);

        // encode adapterParams to specify more gas for the destination
        uint16 version = 1;
        bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive);

        // get the fees we need to pay to LayerZero + Relayer to cover message delivery
        // you will be refunded for extra gas paid
        (uint messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams);

        require(msg.value >= messageFee, "Error: msg.value not enough to cover messageFee. Send gas for message fees");

        endpoint.send{value: msg.value}(
            _chainId, // destination chainId
            trustedRemoteLookup[_chainId], // destination address of nft contract
            payload, // abi.encoded()'ed bytes
            payable(msg.sender), // refund address
            address(0x0), // 'zroPaymentAddress' unused for this
            adapterParams // txParameters
        );
    }

    // just in case this fixed variable limits us from future integrations
    function setGasForDestinationLzReceive(uint newVal) external onlyOwner {
        gasForDestinationLzReceive = newVal;
    }

    function _LzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal override {
        // decode
        (address toAddr, uint tokenId) = abi.decode(_payload, (address, uint));

        // mint the tokens back into existence on destination chain
        _safeMint(toAddr, tokenId);
    }

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

    function mint(uint amount) public payable {
        uint supply = totalSupply();
        require(openMint == true, "Haunted BitWitches: minting is closed");
        require(supply + amount - 1 < maxSupply, "Error: cannot mint more than total supply");
        require(amount > 0 && amount <= maxPerTx, "Error: max par tx limit");
        require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit");
        require(msg.value == price * amount, "Error: invalid price");
        if (whitelistedOnly) require(whiteListed[msg.sender] >= amount, "Error: you are not whitelisted or amount is higher than limit");
        uint tempCount = mintedCount[msg.sender];
        for (uint i = 0; i < amount; i++) {
            internalMint(msg.sender);
            tempCount += 1;
            if (whitelistedOnly) whiteListed[msg.sender] -= 1;
        }
        mintedCount[msg.sender] = tempCount;
        // Add transfer to destination wallet
        payable(walletMint).transfer(msg.value);
    }

    function tokenURI(uint tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
        return super.tokenURI(tokenId);
    }

    function Owned(address _owner) external view returns (uint[] memory) {
        uint tokenCount = balanceOf(_owner);
        if (tokenCount == 0) {
            return new uint[](0);
        } else {
            uint[] memory result = new uint[](tokenCount);
            uint index;
            for (index = 0; index < tokenCount; ++index) {
                result[index] = tokenOfOwnerByIndex(_owner, index);
            }
            return result;
        }
    }

    function tokenExists(uint _id) external view returns (bool) {
        return (_exists(_id));
    }

    function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
        return (royaltyAddress, (_salePrice * royalty) / 10000);
    }

    //dev

    function whiteList(address[] memory _addressList, uint count) external onlyOwner {
        require(_addressList.length > 0, "Error: list is empty");
        for (uint i = 0; i < _addressList.length; ++i) {
            require(_addressList[i] != address(0), "Address cannot be 0.");
            whiteListed[_addressList[i]] = count;
        }
    }

    function whitelistUser(address user, uint nbspot) external onlyOwner{
        whiteListed[user] = nbspot;
    }

    function removeWhiteList(address[] memory addressList) external onlyOwner {
        require(addressList.length > 0, "Error: list is empty");
        for (uint i = 0; i < addressList.length; ++i) whiteListed[addressList[i]] = 0;
    }

    function updateWhitelistStatus() external onlyOwner {
        whitelistedOnly = !whitelistedOnly;
    }

    function setMint(bool _openMint) external onlyOwner {
        openMint = _openMint;
    }

    function setTraversing(bool _openTraversing) external onlyOwner {
        openTraversing = _openTraversing;
    }

    function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
        maxPerPerson = newMaxBuy;
    }

    function setMaxPerTx(uint newMaxBuy) external onlyOwner {
        maxPerTx = newMaxBuy;
    }

    function setBaseURI(string memory newBaseURI) external onlyOwner {
        baseURI = newBaseURI;
    }

    function setPrice(uint newPrice) external onlyOwner {
        price = newPrice;
    }

    function getPrice() public view returns (uint) {
        return price;
    }

    function getMax() public view returns (uint) {
        return maxSupply;
    }

    function setURI(uint tokenId, string memory uri) external onlyOwner {
        _setTokenURI(tokenId, uri);
    }

    function setRoyalty(uint16 _royalty) external onlyOwner {
        require(_royalty <= 1000, "Royalty must be lower than or equal to 10%");
        royalty = _royalty;
    }

    function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
        royaltyAddress = _royaltyAddress;
    }

    //Overrides

    function internalMint(address to) internal {
        uint tokenId = _genClampedNonce() + startID;
        _safeMint(to, tokenId);
    }

    function safeMint(address to) public onlyOwner {
        internalMint(to);
    }

    function internalMintToken(address to, uint tokenId) internal {
        _safeMint(to, tokenId);
    }

    function safeMintToken(address to, uint tokenId) public onlyOwner {
        internalMintToken(to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, IERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }

    function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner {
        for (uint256 i = 0; i < _addr.length; i++) {
            airdropTokenInternal(amount, _addr[i]);
        }
    }
    
    function airdropTokenInternal(uint256 amount, address _addr) internal {
        require(_tokenIdTracker.current() + amount <= startID, "Haunted BitWitches: not enough witches left to be minted");
        for (uint256 i = 0; i < amount; i++) {
            _safeMint(_addr, _tokenIdTracker.current());
            _tokenIdTracker.increment();
        }
    }
}

File 37 of 45 : BitWitchesRituals.sol
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../layerzero_v0/NonblockingReceiver.sol";

pragma solidity ^0.8.7;

contract BitWitchesRituals is ERC721Enumerable, ERC721URIStorage, IERC2981, Ownable, ERC721Burnable, NonblockingReceiver {
    
    using SafeMath for uint;
    using Address for address;
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdTracker;

    event Migration(address indexed _to, uint indexed _tokenId);

    string public baseURI;
    // VARIABLES
    bool public whitelistedOnly;
    bool public openMint;
    bool public openTraversing;
    uint public maxSupply;
    uint public maxPerTx = 5;
    uint public maxPerPerson;
    uint public price = 30000000000000000000;
    address public royaltyAddress = 0xB22fc8e22CAc0B95b381deA7Ea86705a7d622dF0;
    address private walletMint = 0xB22fc8e22CAc0B95b381deA7Ea86705a7d622dF0;
    uint public royalty = 750;
    uint private gasForDestinationLzReceive = 350000;   

    // MAPPINGS
    mapping(address => uint) public whiteListed;

    constructor(
        uint _mintPrice,
        uint _maxSupply,
        address _lzEndpoint
    ) ERC721("BitWitches Rituals", "BWRT") {
        price = _mintPrice;
        maxSupply = _maxSupply;
        maxPerPerson = _maxSupply;
        openMint = false;
        openTraversing = false;
        whitelistedOnly = true;
        endpoint = ILayerZeroEndpoint(_lzEndpoint);
    }

    // This function transfers the nft from your address on the
    // source chain to the same address on the destination chain
    function traverseChains(uint16 _chainId, uint tokenId) public payable {
        require(openTraversing == true, "Traversing is closed");
        require(msg.sender == ownerOf(tokenId), "You must own the token to traverse");
        require(trustedRemoteLookup[_chainId].length > 0, "This chain is currently unavailable for travel");

        // burn NFT, eliminating it from circulation on src chain
        _burn(tokenId);

        // abi.encode() the payload with the values to send
        bytes memory payload = abi.encode(msg.sender, tokenId);

        // encode adapterParams to specify more gas for the destination
        uint16 version = 1;
        bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive);

        // get the fees we need to pay to LayerZero + Relayer to cover message delivery
        // you will be refunded for extra gas paid
        (uint messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams);

        require(msg.value >= messageFee, "Error: msg.value not enough to cover messageFee. Send gas for message fees");

        endpoint.send{value: msg.value}(
            _chainId, // destination chainId
            trustedRemoteLookup[_chainId], // destination address of nft contract
            payload, // abi.encoded()'ed bytes
            payable(msg.sender), // refund address
            address(0x0), // 'zroPaymentAddress' unused for this
            adapterParams // txParameters
        );
    }

    // just in case this fixed variable limits us from future integrations
    function setGasForDestinationLzReceive(uint newVal) external onlyOwner {
        gasForDestinationLzReceive = newVal;
    }

    function _LzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal override {
        // decode
        (address toAddr, uint tokenId) = abi.decode(_payload, (address, uint));

        // mint the tokens back into existence on destination chain
        _safeMint(toAddr, tokenId);
    }

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

    function mint(uint amount) public payable {
        uint supply = totalSupply();
        require(openMint == true, "Minting is closed");
        require(supply + amount - 1 < maxSupply, "Error: cannot mint more than total supply");
        require(amount > 0 && amount <= maxPerTx, "Error: max par tx limit");
        require(balanceOf(msg.sender) + 1 <= maxPerPerson, "Error: max per address limit");
        require(msg.value == price * amount, "Error: invalid price");
        if (whitelistedOnly) require(whiteListed[msg.sender] >= amount, "Error: you are not whitelisted or amount is higher than limit");
        for (uint i = 0; i < amount; i++) {
            internalMintToken(msg.sender, _tokenIdTracker.current());
             _tokenIdTracker.increment();
            if (whitelistedOnly) whiteListed[msg.sender] -= 1;
        }
        // Add transfer to destination wallet
        payable(walletMint).transfer(msg.value);
    }

    function tokenURI(uint tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
        return super.tokenURI(tokenId);
    }

    function Owned(address _owner) external view returns (uint[] memory) {
        uint tokenCount = balanceOf(_owner);
        if (tokenCount == 0) {
            return new uint[](0);
        } else {
            uint[] memory result = new uint[](tokenCount);
            uint index;
            for (index = 0; index < tokenCount; ++index) {
                result[index] = tokenOfOwnerByIndex(_owner, index);
            }
            return result;
        }
    }

    function tokenExists(uint _id) external view returns (bool) {
        return (_exists(_id));
    }

    function royaltyInfo(uint, uint _salePrice) external view override returns (address receiver, uint royaltyAmount) {
        return (royaltyAddress, (_salePrice * royalty) / 10000);
    }

    //dev

    function whiteList(address[] memory _addressList, uint count) external onlyOwner {
        require(_addressList.length > 0, "Error: list is empty");
        for (uint i = 0; i < _addressList.length; ++i) {
            require(_addressList[i] != address(0), "Address cannot be 0.");
            whiteListed[_addressList[i]] = count;
        }
    }

    function whitelistUser(address user, uint nbspot) external onlyOwner{
        whiteListed[user] = nbspot;
    }

    function removeWhiteList(address[] memory addressList) external onlyOwner {
        require(addressList.length > 0, "Error: list is empty");
        for (uint i = 0; i < addressList.length; ++i) whiteListed[addressList[i]] = 0;
    }

    function updateWhitelistStatus() external onlyOwner {
        whitelistedOnly = !whitelistedOnly;
    }

    function setMint(bool _openMint) external onlyOwner {
        openMint = _openMint;
    }

    function setTraversing(bool _openTraversing) external onlyOwner {
        openTraversing = _openTraversing;
    }

    function setMaxPerPerson(uint newMaxBuy) external onlyOwner {
        maxPerPerson = newMaxBuy;
    }

    function setMaxPerTx(uint newMaxBuy) external onlyOwner {
        maxPerTx = newMaxBuy;
    }

    function setBaseURI(string memory newBaseURI) external onlyOwner {
        baseURI = newBaseURI;
    }

    function setPrice(uint newPrice) external onlyOwner {
        price = newPrice;
    }

    function getPrice() public view returns (uint) {
        return price;
    }

    function setMaxSupply(uint newSupply) external onlyOwner {
        maxSupply = newSupply;
    }

    function getMax() public view returns (uint) {
        return maxSupply;
    }

    function setURI(uint tokenId, string memory uri) external onlyOwner {
        _setTokenURI(tokenId, uri);
    }

    function setRoyalty(uint16 _royalty) external onlyOwner {
        require(_royalty <= 1000, "Royalty must be lower than or equal to 10%");
        royalty = _royalty;
    }

    function setRoyaltyAddress(address _royaltyAddress) external onlyOwner {
        royaltyAddress = _royaltyAddress;
    }

    //Overrides
    function internalMintToken(address to, uint tokenId) internal {
        _safeMint(to, tokenId);
    }

    function safeMintToken(address to, uint tokenId) public onlyOwner {
        internalMintToken(to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, IERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint tokenId
    ) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function _burn(uint tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }

    function airdropsToken(address[] memory _addr, uint256 amount) public onlyOwner {
        for (uint256 i = 0; i < _addr.length; i++) {
            airdropTokenInternal(amount, _addr[i]);
        }
    }
    
    function airdropTokenInternal(uint256 amount, address _addr) internal {
        for (uint256 i = 0; i < amount; i++) {
            _safeMint(_addr, _tokenIdTracker.current());
            _tokenIdTracker.increment();
        }
    }
}

File 38 of 45 : BannersOracleLZClean.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../layerzero/contracts/token/onft/IONFT721.sol";
import "../layerzero/contracts/lzApp/NonblockingLzApp.sol";

contract BannersOracleLZClean is Context, AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage, IONFT721, NonblockingLzApp{
  using Counters for Counters.Counter;
  Counters.Counter public _tokenIdTracker;

  string private _baseTokenURI;
  /// @notice Mint price
  uint private _price;
  /// @notice Max number of token mintable
  uint private _max;
  address _wallet;

  bool _openMint;
  bool _openWhitelistMint;

  mapping(address => uint) private whitelist;

  constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint max, address wallet, address admin, address _lzEndpoint) ERC721(name, symbol) NonblockingLzApp(_lzEndpoint){
      _baseTokenURI = baseTokenURI;
      _price = mintPrice;
      _max = max;
      _wallet = wallet;
      _openMint = false;
      _openWhitelistMint = false;
      _setupRole(DEFAULT_ADMIN_ROLE, wallet);
      _setupRole(DEFAULT_ADMIN_ROLE, admin);
  }

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

  function setBaseURI(string memory baseURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change base URI");
    _baseTokenURI = baseURI;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change token URI");
    _setTokenURI(tokenId, _tokenURI);
  }

  /**
    @notice Method for updating minting fee
    @dev Only admin
    @param mintPrice uint the minting fee to set
    */
  function setPrice(uint mintPrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change price");
    _price = mintPrice;
  }

  function setMax(uint max) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change the max quantity");
    _max = max;
  }

  function setMint(bool openMint, bool openWhitelistMint) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to open/close mint");
    _openMint = openMint;
    _openWhitelistMint = openWhitelistMint;
  }

  function getPrice() public view returns (uint) {
    return _price;
  }

  function getMax() public view returns (uint) {
    return _max;
  }

  function mint(uint amount) public payable {
    require(amount <= 10, "BannersOracle: max of 10 Oracle Witches per mint");
    require(_openMint == true, "BannersOracle: minting is closed");
    require(msg.value == _price*amount, "BannersOracle: must send correct price");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");
    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      _tokenIdTracker.increment();
    }
    payable(_wallet).transfer(msg.value);
  }

  // function mintWhitelist() public payable {
  //   require(_openWhitelistMint == true, "BannersOracle: minting is closed");
  //   require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
  //   require(msg.value == _presaleprice, "BannersOracle: must send correct price");
  //   require(_tokenIdTracker.current() < _max, "BannersOracle: all Oracle Witches have been minted");
    
  //   whitelist[msg.sender] = whitelist[msg.sender] - 1;
  //   _mint(msg.sender, _tokenIdTracker.current());
  //   _tokenIdTracker.increment();
  //   payable(_wallet).transfer(msg.value);
  // }

  function mintWhitelist(uint amount) public {
    require(_openWhitelistMint == true, "BannersOracle: minting is closed");
    require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
    require(amount <= whitelist[msg.sender], "BannersOracle: user must have enough whitelist spots left to mint");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");

    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      whitelist[msg.sender] = whitelist[msg.sender] - 1;
      _tokenIdTracker.increment();
    }
  }

  function whitelistUser(address user, uint nbspot) public {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to whitelist address");
    whitelist[user] = nbspot;
  }

  function whitelistStatus(address user) public view returns(uint) {
    // if (whitelist[user] > 0) {
    //   return whitelist[user];
    // }
    // else {
    //   return 0;
    // }
    return whitelist[user];
  }

  function burn(uint256 tokenId) public{
    require(_isApprovedOrOwner(msg.sender, tokenId), "BannersOracle: must own the token to burn it");
    _burn(tokenId);
  }

  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    return ERC721URIStorage._burn(tokenId);
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
    return ERC721URIStorage.tokenURI(tokenId);
  }
  
  function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

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

  // LAYER ZERO
    function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, bool _useZro, bytes calldata _adapterParams) external view virtual override returns (uint nativeFee, uint zroFee) {
        // mock the payload for send()
        bytes memory payload = abi.encode(_toAddress, _tokenId);
        return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);
    }

    function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParam) external payable virtual override {
        _send(_from, _dstChainId, _toAddress, _tokenId, _refundAddress, _zroPaymentAddress, _adapterParam);
    }

    function send(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParam) external payable virtual override {
        _send(_msgSender(), _dstChainId, _toAddress, _tokenId, _refundAddress, _zroPaymentAddress, _adapterParam);
    }

    function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParam) internal virtual {
        require(_isApprovedOrOwner(_msgSender(), _tokenId), "ERC721: transfer caller is not owner nor approved");
        _beforeSend(_from, _dstChainId, _toAddress, _tokenId);

        bytes memory payload = abi.encode(_toAddress, _tokenId);
        _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParam);

        uint64 nonce = lzEndpoint.getOutboundNonce(_dstChainId, address(this));
        emit SendToChain(_from, _dstChainId, _toAddress, _tokenId, nonce);
        //_afterSend(_from, _dstChainId, _toAddress, _tokenId);
    }

    function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {
        //_beforeReceive(_srcChainId, _srcAddress, _payload);

        // decode and load the toAddress
        (bytes memory toAddress, uint tokenId) = abi.decode(_payload, (bytes, uint));
        address localToAddress;
        assembly {
            localToAddress := mload(add(toAddress, 20))
        }

        // if the toAddress is 0x0, convert to dead address, or it will get cached
        if (localToAddress == address(0x0)) localToAddress == address(0xdEaD);

        _afterReceive(_srcChainId, localToAddress, tokenId);

        emit ReceiveFromChain(_srcChainId, localToAddress, tokenId, _nonce);
    }

    function _beforeSend(
        address, /* _from */
        uint16, /* _dstChainId */
        bytes memory, /* _toAddress */
        uint _tokenId
    ) internal virtual {
        _burn(_tokenId);
    }

    // function _afterSend(
    //     address, /* _from */
    //     uint16, /* _dstChainId */
    //     bytes memory, /* _toAddress */
    //     uint /* _tokenId */
    // ) internal virtual {}

    // function _beforeReceive(
    //     uint16, /* _srcChainId */
    //     bytes memory, /* _srcAddress */
    //     bytes memory /* _payload */
    // ) internal virtual {}

    function _afterReceive(
        uint16, /* _srcChainId */
        address _toAddress,
        uint _tokenId
    ) internal virtual {
        _safeMint(_toAddress, _tokenId);
    }

}

File 39 of 45 : IONFT721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/**
 * @dev Interface of the ONFT standard
 */
interface IONFT721 is IERC721 {
    /**
     * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)
     * _dstChainId - L0 defined chain id to send tokens too
     * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain
     * _tokenId - token Id to transfer
     * _useZro - indicates to use zro to pay L0 fees
     * _adapterParam - flexible bytes array to indicate messaging adapter services in L0
     */
    function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);

    /**
     * @dev send token `_tokenId` to (`_dstChainId`, `_toAddress`)
     * `_toAddress` can be any size depending on the `dstChainId`.
     * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)
     * `_adapterParam` is a flexible bytes array to indicate messaging adapter services
     */
    function send(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParam) external payable;

    /**
     * @dev send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from`
     * `_toAddress` can be any size depending on the `dstChainId`.
     * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)
     * `_adapterParam` is a flexible bytes array to indicate messaging adapter services
     */
    function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParam) external payable;

    /**
     * @dev Emitted when `_tokenId` are moved from the `_sender` to (`_dstChainId`, `_toAddress`)
     * `_nonce` is the outbound nonce from
     */
    event SendToChain(address indexed _sender, uint16 indexed _dstChainId, bytes indexed _toAddress, uint _tokenId, uint64 _nonce);

    /**
     * @dev Emitted when `_tokenId` are sent from `_srcChainId` to the `_toAddress` at this chain. `_nonce` is the inbound nonce.
     */
    event ReceiveFromChain(uint16 _srcChainId, address _toAddress, uint _tokenId, uint64 _nonce);
}

File 40 of 45 : NonblockingLzApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./LzApp.sol";

/*
 * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel
 * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking
 * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)
 */
abstract contract NonblockingLzApp is LzApp {
    constructor(address _endpoint) LzApp(_endpoint) {}

    mapping(uint16 => mapping(bytes => mapping(uint => bytes32))) public failedMessages;

    event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload);

    // overriding the virtual function in LzReceiver
    function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {
        // try-catch all errors/exceptions
        try this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
            // do nothing
        } catch {
            // error / exception
            failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    function nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual {
        // only internal transaction
        require(_msgSender() == address(this), "LzReceiver: caller must be LzApp");
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    //@notice override this function
    function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;

    function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes calldata _payload) external payable virtual {
        // assert there is message to retry
        bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(payloadHash != bytes32(0), "LzReceiver: no stored message");
        require(keccak256(_payload) == payloadHash, "LzReceiver: invalid payload");
        // clear the stored message
        failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);
        // execute the message. revert if it fails again
        this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }
}

File 41 of 45 : LzApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/ILayerZeroReceiver.sol";
import "../interfaces/ILayerZeroUserApplicationConfig.sol";
import "../interfaces/ILayerZeroEndpoint.sol";

/*
 * a generic LzReceiver implementation
 */
abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {
    ILayerZeroEndpoint internal immutable lzEndpoint;

    mapping(uint16 => bytes) internal trustedRemoteLookup;

    event SetTrustedRemote(uint16 _srcChainId, bytes _srcAddress);

    constructor(address _endpoint) {
        lzEndpoint = ILayerZeroEndpoint(_endpoint);
    }

    function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) external override {
        // lzReceive must be called by the endpoint for security
        require(_msgSender() == address(lzEndpoint));
        // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.
        require(_srcAddress.length == trustedRemoteLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]), "LzReceiver: invalid source sending contract");

        _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging
    function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;

    function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParam) internal {
        require(trustedRemoteLookup[_dstChainId].length != 0, "LzSend: destination chain is not a trusted source.");
        lzEndpoint.send{value: msg.value}(_dstChainId, trustedRemoteLookup[_dstChainId], _payload, _refundAddress, _zroPaymentAddress, _adapterParam);
    }

    //---------------------------UserApplication config----------------------------------------
    function getConfig(uint16, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {
        return lzEndpoint.getConfig(lzEndpoint.getSendVersion(address(this)), _chainId, address(this), _configType);
    }

    // generic config for LayerZero user Application
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {
        lzEndpoint.setConfig(_version, _chainId, _configType, _config);
    }

    function setSendVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setSendVersion(_version);
    }

    function setReceiveVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setReceiveVersion(_version);
    }

    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
        lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);
    }

    // allow owner to set it multiple times.
    function setTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external onlyOwner {
        trustedRemoteLookup[_srcChainId] = _srcAddress;
        emit SetTrustedRemote(_srcChainId, _srcAddress);
    }

    function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {
        bytes memory trustedSource = trustedRemoteLookup[_srcChainId];
        return keccak256(trustedSource) == keccak256(_srcAddress);
    }

    //--------------------------- VIEW FUNCTION ----------------------------------------
    // interacting with the LayerZero Endpoint and remote contracts

    function getTrustedRemote(uint16 _chainId) external view returns (bytes memory) {
        return trustedRemoteLookup[_chainId];
    }

    function getLzEndpoint() external view returns (address) {
        return address(lzEndpoint);
    }
}

File 42 of 45 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 43 of 45 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 44 of 45 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 45 of 45 : BannersOracleLZ.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../layerzero_v0/NonblockingReceiver.sol";

contract BannersOracleLZ is Context, AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage, NonblockingReceiver{
  using Counters for Counters.Counter;
  Counters.Counter public _tokenIdTracker;

  string private _baseTokenURI;
  /// @notice Mint price
  uint private _price;
  /// @notice Max number of token mintable
  uint private _max;
  address _wallet;

  bool _openMint;
  bool _openWhitelistMint;

  event Migration(address indexed _to, uint indexed _tokenId);
  uint private gasForDestinationLzReceive = 350000;

  mapping(address => uint) private whitelist;

  constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint max, address wallet, address admin, address _lzEndpoint) ERC721(name, symbol) {
      _baseTokenURI = baseTokenURI;
      _price = mintPrice;
      _max = max;
      _wallet = wallet;
      _openMint = false;
      _openWhitelistMint = false;
      _setupRole(DEFAULT_ADMIN_ROLE, wallet);
      _setupRole(DEFAULT_ADMIN_ROLE, admin);

      endpoint = ILayerZeroEndpoint(_lzEndpoint);
  }

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

  function setBaseURI(string memory baseURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change base URI");
    _baseTokenURI = baseURI;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change token URI");
    _setTokenURI(tokenId, _tokenURI);
  }

  /**
    @notice Method for updating minting fee
    @dev Only admin
    @param mintPrice uint the minting fee to set
    */
  function setPrice(uint mintPrice) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change price");
    _price = mintPrice;
  }

  function setMax(uint max) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to change the max quantity");
    _max = max;
  }

  function setMint(bool openMint, bool openWhitelistMint) external {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to open/close mint");
    _openMint = openMint;
    _openWhitelistMint = openWhitelistMint;
  }

  function getPrice() public view returns (uint) {
    return _price;
  }

  function getMax() public view returns (uint) {
    return _max;
  }

  function mint(uint amount) public payable {
    require(amount <= 10, "BannersOracle: max of 10 Oracle Witches per mint");
    require(_openMint == true, "BannersOracle: minting is closed");
    require(msg.value == _price*amount, "BannersOracle: must send correct price");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");
    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      _tokenIdTracker.increment();
    }
    payable(_wallet).transfer(msg.value);
  }

  // function mintWhitelist() public payable {
  //   require(_openWhitelistMint == true, "BannersOracle: minting is closed");
  //   require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
  //   require(msg.value == _presaleprice, "BannersOracle: must send correct price");
  //   require(_tokenIdTracker.current() < _max, "BannersOracle: all Oracle Witches have been minted");
    
  //   whitelist[msg.sender] = whitelist[msg.sender] - 1;
  //   _mint(msg.sender, _tokenIdTracker.current());
  //   _tokenIdTracker.increment();
  //   payable(_wallet).transfer(msg.value);
  // }

  function mintWhitelist(uint amount) public {
    require(_openWhitelistMint == true, "BannersOracle: minting is closed");
    require(whitelist[msg.sender] > 0, "BannersOracle: user must be whitelisted to mint");
    require(amount <= whitelist[msg.sender], "BannersOracle: user must have enough whitelist spots left to mint");
    require(_tokenIdTracker.current() + amount <= _max, "BannersOracle: not enough Banners left to be minted");

    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      whitelist[msg.sender] = whitelist[msg.sender] - 1;
      _tokenIdTracker.increment();
    }
  }

  function whitelistUser(address user, uint nbspot) public {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "BannersOracle: must have admin role to whitelist address");
    whitelist[user] = nbspot;
  }

  function whitelistStatus(address user) public view returns(uint) {
    // if (whitelist[user] > 0) {
    //   return whitelist[user];
    // }
    // else {
    //   return 0;
    // }
    return whitelist[user];
  }

  function burn(uint256 tokenId) public{
    require(_isApprovedOrOwner(msg.sender, tokenId), "BannersOracle: must own the token to burn it");
    _burn(tokenId);
  }

  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    return ERC721URIStorage._burn(tokenId);
  }

  function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
    return ERC721URIStorage.tokenURI(tokenId);
  }
  
  function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

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

  // LAYER ZERO
  // This function transfers the nft from your address on the
  // source chain to the same address on the destination chain
  function traverseChains(uint16 _chainId, uint tokenId) public payable {
      require(msg.sender == ownerOf(tokenId), "You must own the token to traverse");
      require(trustedRemoteLookup[_chainId].length > 0, "This chain is currently unavailable for travel");

      // burn NFT, eliminating it from circulation on src chain
      _burn(tokenId);

      // abi.encode() the payload with the values to send
      bytes memory payload = abi.encode(msg.sender, tokenId);

      // encode adapterParams to specify more gas for the destination
      uint16 version = 1;
      bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive);

      // get the fees we need to pay to LayerZero + Relayer to cover message delivery
      // you will be refunded for extra gas paid
      (uint messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams);

      require(msg.value >= messageFee, "Error: msg.value not enough to cover messageFee. Send gas for message fees");

      endpoint.send{value: msg.value}(
          _chainId, // destination chainId
          trustedRemoteLookup[_chainId], // destination address of nft contract
          payload, // abi.encoded()'ed bytes
          payable(msg.sender), // refund address
          address(0x0), // 'zroPaymentAddress' unused for this
          adapterParams // txParameters
      );
  }

  // just in case this fixed variable limits us from future integrations
  function setGasForDestinationLzReceive(uint newVal) external onlyOwner {
      gasForDestinationLzReceive = newVal;
  }

  function _LzReceive(
      uint16 _srcChainId,
      bytes memory _srcAddress,
      uint64 _nonce,
      bytes memory _payload
  ) internal override {
      // decode
      (address toAddr, uint tokenId) = abi.decode(_payload, (address, uint));

      // mint the tokens back into existence on destination chain
      _safeMint(toAddr, tokenId);
  }


}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 20
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_startID","type":"uint256"},{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"uint256","name":"_presalePrice","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"address","name":"_lzEndpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Migration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"failedMessages","outputs":[{"internalType":"uint256","name":"payloadLength","type":"uint256"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPresalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxPerPerson","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"onLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTraversing","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openWhitelistMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addressList","type":"address[]"}],"name":"removeWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeMintToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVal","type":"uint256"}],"name":"setGasForDestinationLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxBuy","type":"uint256"}],"name":"setMaxPerPerson","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxBuy","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openMint","type":"bool"}],"name":"setMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPresalePrice","type":"uint256"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_royalty","type":"uint16"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openTraversing","type":"bool"}],"name":"setTraversing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"bytes","name":"_trustedRemote","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openWhiteListMint","type":"bool"}],"name":"setWhiteListMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"tokenExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"traverseChains","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addressList","type":"address[]"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"whiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whiteListed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"nbspot","type":"uint256"}],"name":"whitelistUser","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040526000600f5560056015556801a055690d9db800006017556019805473b22fc8e22cac0b95b381dea7ea86705a7d622df06001600160a01b03199182168117909255601a805490911690911790556102ee601b5562055730601c553480156200006b57600080fd5b5060405162004426380380620044268339810160408190526200008e916200025c565b604080518082018252600e81526d4d6172626c65204d616964656e7360901b602080830191825283518085019094526005845264135054909360da1b908401528151859391620000e29160009190620001b6565b508051620000f8906001906020840190620001b6565b505050620001156200010f6200016060201b60201c565b62000164565b60805260129490945560179290925560185560148190556016556013805462ffffff19169055600c80546001600160a01b0319166001600160a01b03909216919091179055620002f6565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001c490620002b9565b90600052602060002090601f016020900481019282620001e8576000855562000233565b82601f106200020357805160ff191683800117855562000233565b8280016001018555821562000233579182015b828111156200023357825182559160200191906001019062000216565b506200024192915062000245565b5090565b5b8082111562000241576000815560010162000246565b600080600080600060a086880312156200027557600080fd5b855160208701516040880151606089015160808a0151939850919650945092506001600160a01b0381168114620002ab57600080fd5b809150509295509295909350565b600181811c90821680620002ce57607f821691505b60208210811415620002f057634e487b7160e01b600052602260045260246000fd5b50919050565b60805161411462000312600039600061297801526141146000f3fe6080604052600436106102d65760003560e01c806370a082311161018257806370a08231146106c2578063715018a6146106e25780637533d788146106f7578063768d71381461071757806377ee4b0f1461072d5780637e0586f114610742578063862440e2146107625780638da5cb5b146107825780638ee749121461079757806391b7f5ed14610802578063943fb8721461082257806395d89b411461084257806398d5fdca14610857578063a0712d681461086c578063a1a2f9271461087f578063a22cb4651461089f578063ad2f852a146108bf578063b88d4fde146108df578063bce6d672146108ff578063c6f6f21614610919578063c87b56dd14610939578063cf89fa0314610959578063d1deba1f1461096c578063d5abeb011461097f578063e054ffc314610995578063e3ae8691146109b5578063e985e9c5146109d4578063ea52e55b146109f4578063eb8d72b714610a0a578063f2fde38b14610a2a578063f968adbe14610a4a578063fa0fca8414610a6057600080fd5b80621d3567146102db578062923f9e146102fd57806301ffc9a71461033257806306d254da1461035257806306fdde031461037257806307eb4ac214610394578063081812fc146103b4578063095ea7b3146103ec57806318160ddd1461040c5780631c37a8221461042b578063235b6ea11461044b57806323b872dd1461046157806329ee566c146104815780632a55205a146104975780632f745c59146104c55780633075f552146104e55780633549345e146104fa57806336e79a5a1461051a578063397457911461053a57806340d097c31461055a57806342842e0e1461057a57806342966c681461059a578063429ff28d146105ba5780634389de9a146105da5780634618163e146105fa57806346c859391461060d578063483efda21461062d5780634f6ccce71461064d57806355f804b31461066d5780636352211e1461068d5780636c0360eb146106ad575b600080fd5b3480156102e757600080fd5b506102fb6102f636600461342a565b610a8d565b005b34801561030957600080fd5b5061031d6103183660046134ae565b610c87565b60405190151581526020015b60405180910390f35b34801561033e57600080fd5b5061031d61034d3660046134dd565b610c98565b34801561035e57600080fd5b506102fb61036d36600461350f565b610cbd565b34801561037e57600080fd5b50610387610d0e565b6040516103299190613584565b3480156103a057600080fd5b506102fb6103af3660046135a7565b610da0565b3480156103c057600080fd5b506103d46103cf3660046134ae565b610deb565b6040516001600160a01b039091168152602001610329565b3480156103f857600080fd5b506102fb6104073660046135cf565b610e73565b34801561041857600080fd5b506008545b604051908152602001610329565b34801561043757600080fd5b506102fb61044636600461342a565b610f84565b34801561045757600080fd5b5061041d60175481565b34801561046d57600080fd5b506102fb61047c3660046135fb565b610ff3565b34801561048d57600080fd5b5061041d601b5481565b3480156104a357600080fd5b506104b76104b236600461363c565b611025565b60405161032992919061365e565b3480156104d157600080fd5b5061041d6104e03660046135cf565b611060565b3480156104f157600080fd5b5060145461041d565b34801561050657600080fd5b506102fb6105153660046134ae565b6110f6565b34801561052657600080fd5b506102fb610535366004613677565b61112a565b34801561054657600080fd5b506102fb61055536600461371a565b6111cb565b34801561056657600080fd5b506102fb61057536600461350f565b611280565b34801561058657600080fd5b506102fb6105953660046135fb565b6112bb565b3480156105a657600080fd5b506102fb6105b53660046134ae565b6112d6565b3480156105c657600080fd5b506102fb6105d53660046135a7565b61134d565b3480156105e657600080fd5b506102fb6105f53660046135cf565b61138f565b6102fb6106083660046134ae565b6113c8565b34801561061957600080fd5b506102fb6106283660046135a7565b611596565b34801561063957600080fd5b506102fb6106483660046134ae565b6115df565b34801561065957600080fd5b5061041d6106683660046134ae565b611613565b34801561067957600080fd5b506102fb61068836600461374e565b6116a6565b34801561069957600080fd5b506103d46106a83660046134ae565b6116e8565b3480156106b957600080fd5b5061038761175f565b3480156106ce57600080fd5b5061041d6106dd36600461350f565b6117ed565b3480156106ee57600080fd5b506102fb611874565b34801561070357600080fd5b50610387610712366004613677565b6118af565b34801561072357600080fd5b5061041d60165481565b34801561073957600080fd5b5060185461041d565b34801561074e57600080fd5b506102fb61075d366004613782565b6118c8565b34801561076e57600080fd5b506102fb61077d3660046137c6565b6119eb565b34801561078e57600080fd5b506103d4611a24565b3480156107a357600080fd5b506107ed6107b236600461380c565b600d60209081526000938452604080852084518086018401805192815290840195840195909520945292905282529020805460019091015482565b60408051928352602083019190915201610329565b34801561080e57600080fd5b506102fb61081d3660046134ae565b611a33565b34801561082e57600080fd5b506102fb61083d3660046134ae565b611a67565b34801561084e57600080fd5b50610387611a9b565b34801561086357600080fd5b5060175461041d565b6102fb61087a3660046134ae565b611aaa565b34801561088b57600080fd5b5060135461031d9062010000900460ff1681565b3480156108ab57600080fd5b506102fb6108ba366004613862565b611b95565b3480156108cb57600080fd5b506019546103d4906001600160a01b031681565b3480156108eb57600080fd5b506102fb6108fa366004613897565b611ba0565b34801561090b57600080fd5b5060135461031d9060ff1681565b34801561092557600080fd5b506102fb6109343660046134ae565b611bd2565b34801561094557600080fd5b506103876109543660046134ae565b611c06565b6102fb6109673660046138f6565b611c11565b6102fb61097a366004613953565b611f5b565b34801561098b57600080fd5b5061041d60145481565b3480156109a157600080fd5b506102fb6109b03660046135cf565b6120e5565b3480156109c157600080fd5b5060135461031d90610100900460ff1681565b3480156109e057600080fd5b5061031d6109ef3660046139de565b612130565b348015610a0057600080fd5b5061041d60125481565b348015610a1657600080fd5b506102fb610a25366004613a17565b61215e565b348015610a3657600080fd5b506102fb610a4536600461350f565b6121ab565b348015610a5657600080fd5b5061041d60155481565b348015610a6c57600080fd5b5061041d610a7b36600461350f565b601d6020526000908152604090205481565b600c546001600160a01b03163314610aa457600080fd5b61ffff84166000908152600e602052604090208054610ac290613a69565b90508351148015610b01575061ffff84166000908152600e6020526040908190209051610aef9190613aa4565b60405180910390208380519060200120145b610b6f5760405162461bcd60e51b815260206004820152603460248201527f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f756044820152731c98d9481cd95b991a5b99c818dbdb9d1c9858dd60621b60648201526084015b60405180910390fd5b604051630e1bd41160e11b81523090631c37a82290610b98908790879087908790600401613b16565b600060405180830381600087803b158015610bb257600080fd5b505af1925050508015610bc3575060015b610c81576040518060400160405280825181526020018280519060200120815250600d60008661ffff1661ffff16815260200190815260200160002084604051610c0d9190613b54565b9081526040805191829003602090810183206001600160401b038716600090815290825291909120835181559201516001909201919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90610c78908690869086908690613b16565b60405180910390a15b50505050565b6000610c9282612248565b92915050565b60006001600160e01b0319821663152a902d60e11b1480610c925750610c9282612265565b33610cc6611a24565b6001600160a01b031614610cec5760405162461bcd60e51b8152600401610b6690613b70565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b606060008054610d1d90613a69565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4990613a69565b8015610d965780601f10610d6b57610100808354040283529160200191610d96565b820191906000526020600020905b815481529060010190602001808311610d7957829003601f168201915b5050505050905090565b33610da9611a24565b6001600160a01b031614610dcf5760405162461bcd60e51b8152600401610b6690613b70565b60138054911515620100000262ff000019909216919091179055565b6000610df682612248565b610e575760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b66565b506000908152600460205260409020546001600160a01b031690565b6000610e7e826116e8565b9050806001600160a01b0316836001600160a01b03161415610eec5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b66565b336001600160a01b0382161480610f085750610f088133612130565b610f755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610b66565b610f7f838361228a565b505050565b333014610fe75760405162461bcd60e51b815260206004820152602b60248201527f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d75737460448201526a10313290213934b233b29760a91b6064820152608401610b66565b610c81848484846122f8565b610ffe335b82612325565b61101a5760405162461bcd60e51b8152600401610b6690613ba5565b610f7f8383836123ef565b601954601b5460009182916001600160a01b03909116906127109061104a9086613c0c565b6110549190613c41565b915091505b9250929050565b600061106b836117ed565b82106110cd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b66565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b336110ff611a24565b6001600160a01b0316146111255760405162461bcd60e51b8152600401610b6690613b70565b601855565b33611133611a24565b6001600160a01b0316146111595760405162461bcd60e51b8152600401610b6690613b70565b6103e88161ffff1611156111c25760405162461bcd60e51b815260206004820152602a60248201527f526f79616c7479206d757374206265206c6f776572207468616e206f7220657160448201526975616c20746f2031302560b01b6064820152608401610b66565b61ffff16601b55565b336111d4611a24565b6001600160a01b0316146111fa5760405162461bcd60e51b8152600401610b6690613b70565b600081511161121b5760405162461bcd60e51b8152600401610b6690613c55565b60005b815181101561127c576000601d600084848151811061123f5761123f613c83565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508061127590613c99565b905061121e565b5050565b33611289611a24565b6001600160a01b0316146112af5760405162461bcd60e51b8152600401610b6690613b70565b6112b881612588565b50565b610f7f83838360405180602001604052806000815250611ba0565b6112df33610ff8565b6113445760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610b66565b6112b8816125ab565b33611356611a24565b6001600160a01b03161461137c5760405162461bcd60e51b8152600401610b6690613b70565b6013805460ff1916911515919091179055565b33611398611a24565b6001600160a01b0316146113be5760405162461bcd60e51b8152600401610b6690613b70565b61127c82826125b4565b60006113d360085490565b60135490915060ff6101009091041615156001146114035760405162461bcd60e51b8152600401610b6690613cb4565b60145460016114128484613cf5565b61141c9190613d0d565b106114395760405162461bcd60e51b8152600401610b6690613d24565b336000908152601d60205260409020548211156114b05760405162461bcd60e51b815260206004820152602f60248201527f576974636865734f7261636c653a2075736572206d757374206265207768697460448201526e195b1a5cdd1959081d1bc81b5a5b9d608a1b6064820152608401610b66565b6000821180156114c257506015548211155b6114de5760405162461bcd60e51b8152600401610b6690613d6d565b816018546114ec9190613c0c565b341461150a5760405162461bcd60e51b8152600401610b6690613d9e565b60005b8281101561155c5761151e33612588565b336000908152601d602052604090205461153a90600190613d0d565b336000908152601d60205260409020558061155481613c99565b91505061150d565b50601a546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610f7f573d6000803e3d6000fd5b3361159f611a24565b6001600160a01b0316146115c55760405162461bcd60e51b8152600401610b6690613b70565b601380549115156101000261ff0019909216919091179055565b336115e8611a24565b6001600160a01b03161461160e5760405162461bcd60e51b8152600401610b6690613b70565b601655565b600061161e60085490565b82106116815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b66565b6008828154811061169457611694613c83565b90600052602060002001549050919050565b336116af611a24565b6001600160a01b0316146116d55760405162461bcd60e51b8152600401610b6690613b70565b805161127c906011906020840190613204565b6000818152600260205260408120546001600160a01b031680610c925760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b66565b6011805461176c90613a69565b80601f016020809104026020016040519081016040528092919081815260200182805461179890613a69565b80156117e55780601f106117ba576101008083540402835291602001916117e5565b820191906000526020600020905b8154815290600101906020018083116117c857829003601f168201915b505050505081565b60006001600160a01b0382166118585760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b66565b506001600160a01b031660009081526003602052604090205490565b3361187d611a24565b6001600160a01b0316146118a35760405162461bcd60e51b8152600401610b6690613b70565b6118ad60006125be565b565b600e602052600090815260409020805461176c90613a69565b336118d1611a24565b6001600160a01b0316146118f75760405162461bcd60e51b8152600401610b6690613b70565b60008251116119185760405162461bcd60e51b8152600401610b6690613c55565b60005b8251811015610f7f5760006001600160a01b031683828151811061194157611941613c83565b60200260200101516001600160a01b031614156119975760405162461bcd60e51b815260206004820152601460248201527320b2323932b9b99031b0b73737ba10313290181760611b6044820152606401610b66565b81601d60008584815181106119ae576119ae613c83565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550806119e490613c99565b905061191b565b336119f4611a24565b6001600160a01b031614611a1a5760405162461bcd60e51b8152600401610b6690613b70565b61127c8282612610565b600b546001600160a01b031690565b33611a3c611a24565b6001600160a01b031614611a625760405162461bcd60e51b8152600401610b6690613b70565b601755565b33611a70611a24565b6001600160a01b031614611a965760405162461bcd60e51b8152600401610b6690613b70565b601c55565b606060018054610d1d90613a69565b6000611ab560085490565b60135490915060ff161515600114611adf5760405162461bcd60e51b8152600401610b6690613cb4565b6014546001611aee8484613cf5565b611af89190613d0d565b10611b155760405162461bcd60e51b8152600401610b6690613d24565b600082118015611b2757506015548211155b611b435760405162461bcd60e51b8152600401610b6690613d6d565b81601754611b519190613c0c565b3414611b6f5760405162461bcd60e51b8152600401610b6690613d9e565b60005b8281101561155c57611b8333612588565b80611b8d81613c99565b915050611b72565b61127c33838361269b565b611baa3383612325565b611bc65760405162461bcd60e51b8152600401610b6690613ba5565b610c8184848484612766565b33611bdb611a24565b6001600160a01b031614611c015760405162461bcd60e51b8152600401610b6690613b70565b601555565b6060610c9282612799565b60135462010000900460ff161515600114611c7a5760405162461bcd60e51b8152602060048201526024808201527f4d6172626c65204d616964656e733a2074726176657273696e6720697320636c6044820152631bdcd95960e21b6064820152608401610b66565b611c83816116e8565b6001600160a01b0316336001600160a01b031614611cee5760405162461bcd60e51b815260206004820152602260248201527f596f75206d757374206f776e2074686520746f6b656e20746f20747261766572604482015261736560f01b6064820152608401610b66565b61ffff82166000908152600e602052604081208054611d0c90613a69565b905011611d725760405162461bcd60e51b815260206004820152602e60248201527f5468697320636861696e2069732063757272656e746c7920756e617661696c6160448201526d189b1948199bdc881d1c985d995b60921b6064820152608401610b66565b611d7b816125ab565b60003382604051602001611d9092919061365e565b60408051601f1981840301815290829052601c54600160f01b60208401526022830152915060019060009060420160408051601f1981840301815290829052600c5463040a7bb160e41b83529092506000916001600160a01b03909116906340a7bb1090611e0a9089903090899087908990600401613dcc565b6040805180830381865afa158015611e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4a9190613e20565b50905080341015611ed65760405162461bcd60e51b815260206004820152604a60248201527f4572726f723a206d73672e76616c7565206e6f7420656e6f75676820746f206360448201527f6f766572206d6573736167654665652e2053656e642067617320666f72206d656064820152697373616765206665657360b01b608482015260a401610b66565b600c5461ffff87166000908152600e6020526040808220905162c5803160e81b81526001600160a01b039093169263c5803100923492611f21928c928b913391908b90600401613e44565b6000604051808303818588803b158015611f3a57600080fd5b505af1158015611f4e573d6000803e3d6000fd5b5050505050505050505050565b61ffff85166000908152600d60205260408082209051611f7c908790613b54565b90815260408051602092819003830190206001600160401b03871660009081529252902060018101549091506120035760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d60448201526565737361676560d01b6064820152608401610b66565b80548214801561202d575080600101548383604051612023929190613f1a565b6040518091039020145b6120765760405162461bcd60e51b815260206004820152601a60248201527913185e595c96995c9bce881a5b9d985b1a59081c185e5b1bd85960321b6044820152606401610b66565b60008082556001820155604051630e1bd41160e11b81523090631c37a822906120ab9089908990899089908990600401613f2a565b600060405180830381600087803b1580156120c557600080fd5b505af11580156120d9573d6000803e3d6000fd5b50505050505050505050565b336120ee611a24565b6001600160a01b0316146121145760405162461bcd60e51b8152600401610b6690613b70565b6001600160a01b039091166000908152601d6020526040902055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b33612167611a24565b6001600160a01b03161461218d5760405162461bcd60e51b8152600401610b6690613b70565b61ffff83166000908152600e60205260409020610c81908383613288565b336121b4611a24565b6001600160a01b0316146121da5760405162461bcd60e51b8152600401610b6690613b70565b6001600160a01b03811661223f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b66565b6112b8816125be565b6000908152600260205260409020546001600160a01b0316151590565b60006001600160e01b0319821663780e9d6360e01b1480610c925750610c92826128fb565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122bf826116e8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000808280602001905181019061230f9190613f8b565b9150915061231d828261294b565b505050505050565b600061233082612248565b6123915760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b66565b600061239c836116e8565b9050806001600160a01b0316846001600160a01b031614806123d75750836001600160a01b03166123cc84610deb565b6001600160a01b0316145b806123e757506123e78185612130565b949350505050565b826001600160a01b0316612402826116e8565b6001600160a01b03161461246a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610b66565b6001600160a01b0382166124cc5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b66565b6124d7838383612965565b6124e260008261228a565b6001600160a01b038316600090815260036020526040812080546001929061250b908490613d0d565b90915550506001600160a01b0382166000908152600360205260408120805460019290612539908490613cf5565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716916000805160206140bf83398151915291a4505050565b6000601254612595612970565b61259f9190613cf5565b905061127c828261294b565b6112b881612a77565b61127c828261294b565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61261982612248565b61267c5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610b66565b6000828152600a602090815260409091208251610f7f92840190613204565b816001600160a01b0316836001600160a01b031614156126f95760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610b66565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127718484846123ef565b61277d84848484612ab7565b610c815760405162461bcd60e51b8152600401610b6690613fb9565b60606127a482612248565b61280a5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610b66565b6000828152600a60205260408120805461282390613a69565b80601f016020809104026020016040519081016040528092919081815260200182805461284f90613a69565b801561289c5780601f106128715761010080835404028352916020019161289c565b820191906000526020600020905b81548152906001019060200180831161287f57829003601f168201915b5050505050905060006128ad612bb5565b90508051600014156128c0575092915050565b8151156128f25780826040516020016128da92919061400b565b60405160208183030381529060405292505050919050565b6123e784612bc4565b60006001600160e01b031982166380ac58cd60e01b148061292c57506001600160e01b03198216635b5e139f60e01b145b80610c9257506301ffc9a760e01b6001600160e01b0319831614610c92565b61127c828260405180602001604052806000815250612c8f565b610f7f838383612cc2565b600080600f547f00000000000000000000000000000000000000000000000000000000000000006129a19190613d0d565b90506000806000836129b1612d7a565b6129bb919061403a565b9050601060006129cc600187613d0d565b815260200190815260200160002054600014156129f5576129ee600185613d0d565b9250612a16565b60106000612a04600187613d0d565b81526020019081526020016000205492505b600081815260106020526040902054612a42576000818152601060205260409020839055905080612a59565b600081815260106020526040902080549084905591505b600f8054906000612a6983613c99565b909155509195945050505050565b612a8081612db6565b6000818152600a602052604090208054612a9990613a69565b1590506112b8576000818152600a602052604081206112b8916132fc565b60006001600160a01b0384163b15612baa57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612afb90339089908890889060040161404e565b6020604051808303816000875af1925050508015612b36575060408051601f3d908101601f19168201909252612b339181019061408b565b60015b612b90573d808015612b64576040519150601f19603f3d011682016040523d82523d6000602084013e612b69565b606091505b508051612b885760405162461bcd60e51b8152600401610b6690613fb9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123e7565b506001949350505050565b606060118054610d1d90613a69565b6060612bcf82612248565b612c335760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b66565b6000612c3d612bb5565b90506000815111612c5d5760405180602001604052806000815250612c88565b80612c6784612e4b565b604051602001612c7892919061400b565b6040516020818303038152906040525b9392505050565b612c998383612f48565b612ca66000848484612ab7565b610f7f5760405162461bcd60e51b8152600401610b6690613fb9565b6001600160a01b038316612d1d57612d1881600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612d40565b816001600160a01b0316836001600160a01b031614612d4057612d408382613074565b6001600160a01b038216612d5757610f7f81613111565b826001600160a01b0316826001600160a01b031614610f7f57610f7f82826131c0565b60004442604051602001612d98929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905090565b6000612dc1826116e8565b9050612dcf81600084612965565b612dda60008361228a565b6001600160a01b0381166000908152600360205260408120805460019290612e03908490613d0d565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416906000805160206140bf833981519152908390a45050565b606081612e6f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612e995780612e8381613c99565b9150612e929050600a83613c41565b9150612e73565b6000816001600160401b03811115612eb357612eb361335e565b6040519080825280601f01601f191660200182016040528015612edd576020820181803683370190505b5090505b84156123e757612ef2600183613d0d565b9150612eff600a8661403a565b612f0a906030613cf5565b60f81b818381518110612f1f57612f1f613c83565b60200101906001600160f81b031916908160001a905350612f41600a86613c41565b9450612ee1565b6001600160a01b038216612f9e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b66565b612fa781612248565b15612ff35760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610b66565b612fff60008383612965565b6001600160a01b0382166000908152600360205260408120805460019290613028908490613cf5565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392906000805160206140bf833981519152908290a45050565b60006001613081846117ed565b61308b9190613d0d565b6000838152600760205260409020549091508082146130de576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061312390600190613d0d565b6000838152600960205260408120546008805493945090928490811061314b5761314b613c83565b90600052602060002001549050806008838154811061316c5761316c613c83565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806131a4576131a46140a8565b6001900381819060005260206000200160009055905550505050565b60006131cb836117ed565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461321090613a69565b90600052602060002090601f0160209004810192826132325760008555613278565b82601f1061324b57805160ff1916838001178555613278565b82800160010185558215613278579182015b8281111561327857825182559160200191906001019061325d565b50613284929150613332565b5090565b82805461329490613a69565b90600052602060002090601f0160209004810192826132b65760008555613278565b82601f106132cf5782800160ff19823516178555613278565b82800160010185558215613278579182015b828111156132785782358255916020019190600101906132e1565b50805461330890613a69565b6000825580601f10613318575050565b601f0160209004906000526020600020908101906112b891905b5b808211156132845760008155600101613333565b803561ffff8116811461335957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561339c5761339c61335e565b604052919050565b600082601f8301126133b557600080fd5b81356001600160401b038111156133ce576133ce61335e565b6133e1601f8201601f1916602001613374565b8181528460208386010111156133f657600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160401b038116811461335957600080fd5b6000806000806080858703121561344057600080fd5b61344985613347565b935060208501356001600160401b038082111561346557600080fd5b613471888389016133a4565b945061347f60408801613413565b9350606087013591508082111561349557600080fd5b506134a2878288016133a4565b91505092959194509250565b6000602082840312156134c057600080fd5b5035919050565b6001600160e01b0319811681146112b857600080fd5b6000602082840312156134ef57600080fd5b8135612c88816134c7565b6001600160a01b03811681146112b857600080fd5b60006020828403121561352157600080fd5b8135612c88816134fa565b60005b8381101561354757818101518382015260200161352f565b83811115610c815750506000910152565b6000815180845261357081602086016020860161352c565b601f01601f19169290920160200192915050565b602081526000612c886020830184613558565b8035801515811461335957600080fd5b6000602082840312156135b957600080fd5b612c8882613597565b6001600160a01b03169052565b600080604083850312156135e257600080fd5b82356135ed816134fa565b946020939093013593505050565b60008060006060848603121561361057600080fd5b833561361b816134fa565b9250602084013561362b816134fa565b929592945050506040919091013590565b6000806040838503121561364f57600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b60006020828403121561368957600080fd5b612c8882613347565b600082601f8301126136a357600080fd5b813560206001600160401b038211156136be576136be61335e565b8160051b6136cd828201613374565b92835284810182019282810190878511156136e757600080fd5b83870192505b8483101561370f578235613700816134fa565b825291830191908301906136ed565b979650505050505050565b60006020828403121561372c57600080fd5b81356001600160401b0381111561374257600080fd5b6123e784828501613692565b60006020828403121561376057600080fd5b81356001600160401b0381111561377657600080fd5b6123e7848285016133a4565b6000806040838503121561379557600080fd5b82356001600160401b038111156137ab57600080fd5b6137b785828601613692565b95602094909401359450505050565b600080604083850312156137d957600080fd5b8235915060208301356001600160401b038111156137f657600080fd5b613802858286016133a4565b9150509250929050565b60008060006060848603121561382157600080fd5b61382a84613347565b925060208401356001600160401b0381111561384557600080fd5b613851868287016133a4565b925050604084013590509250925092565b6000806040838503121561387557600080fd5b8235613880816134fa565b915061388e60208401613597565b90509250929050565b600080600080608085870312156138ad57600080fd5b84356138b8816134fa565b935060208501356138c8816134fa565b92506040850135915060608501356001600160401b038111156138ea57600080fd5b6134a2878288016133a4565b6000806040838503121561390957600080fd5b6135ed83613347565b60008083601f84011261392457600080fd5b5081356001600160401b0381111561393b57600080fd5b60208301915083602082850101111561105957600080fd5b60008060008060006080868803121561396b57600080fd5b61397486613347565b945060208601356001600160401b038082111561399057600080fd5b61399c89838a016133a4565b95506139aa60408901613413565b945060608801359150808211156139c057600080fd5b506139cd88828901613912565b969995985093965092949392505050565b600080604083850312156139f157600080fd5b82356139fc816134fa565b91506020830135613a0c816134fa565b809150509250929050565b600080600060408486031215613a2c57600080fd5b613a3584613347565b925060208401356001600160401b03811115613a5057600080fd5b613a5c86828701613912565b9497909650939450505050565b600181811c90821680613a7d57607f821691505b60208210811415613a9e57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808354613ab281613a69565b60018281168015613aca5760018114613adb57613b0a565b60ff19841687528287019450613b0a565b8760005260208060002060005b85811015613b015781548a820152908401908201613ae8565b50505082870194505b50929695505050505050565b61ffff85168152608060208201526000613b336080830186613558565b6001600160401b0385166040840152828103606084015261370f8185613558565b60008251613b6681846020870161352c565b9190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613c2657613c26613bf6565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613c5057613c50613c2b565b500490565b6020808252601490820152734572726f723a206c69737420697320656d70747960601b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613cad57613cad613bf6565b5060010190565b60208082526021908201527f4d6172626c65204d616964656e733a206d696e74696e6720697320636c6f73656040820152601960fa1b606082015260800190565b60008219821115613d0857613d08613bf6565b500190565b600082821015613d1f57613d1f613bf6565b500390565b60208082526029908201527f4572726f723a2063616e6e6f74206d696e74206d6f7265207468616e20746f74604082015268616c20737570706c7960b81b606082015260800190565b602080825260179082015276115c9c9bdc8e881b585e081c185c881d1e081b1a5b5a5d604a1b604082015260600190565b6020808252601490820152734572726f723a20696e76616c696420707269636560601b604082015260600190565b61ffff861681526001600160a01b038516602082015260a060408201819052600090613dfa90830186613558565b84151560608401528281036080840152613e148185613558565b98975050505050505050565b60008060408385031215613e3357600080fd5b505080516020909101519092909150565b61ffff871681526000602060c08184015260008854613e6281613a69565b8060c087015260e0600180841660008114613e845760018114613e9957613ec7565b60ff1985168984015261010089019550613ec7565b8d6000528660002060005b85811015613ebf5781548b8201860152908301908801613ea4565b8a0184019650505b50505050508381036040850152613ede8189613558565b915050613eee60608401876135c2565b613efb60808401866135c2565b82810360a0840152613f0d8185613558565b9998505050505050505050565b8183823760009101908152919050565b61ffff86168152608060208201526000613f476080830187613558565b6001600160401b03861660408401528281036060840152838152838560208301376000602085830101526020601f19601f8601168201019150509695505050505050565b60008060408385031215613f9e57600080fd5b8251613fa9816134fa565b6020939093015192949293505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161401d81846020880161352c565b83519083019061403181836020880161352c565b01949350505050565b60008261404957614049613c2b565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061408190830184613558565b9695505050505050565b60006020828403121561409d57600080fd5b8151612c88816134c7565b634e487b7160e01b600052603160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220e0f865bdf439834e7c648e577fd0c6debd36f092a1efa14e5071c5f0513cd4ba64736f6c634300080a00330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b5e3af16b1880000000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000000000000000000000000000000000000000022b000000000000000000000000b6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7

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

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b5e3af16b1880000000000000000000000000000000000000000000000000001a055690d9db80000000000000000000000000000000000000000000000000000000000000000022b000000000000000000000000b6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7

-----Decoded View---------------
Arg [0] : _startID (uint256): 0
Arg [1] : _mintPrice (uint256): 50000000000000000000
Arg [2] : _presalePrice (uint256): 30000000000000000000
Arg [3] : _maxSupply (uint256): 555
Arg [4] : _lzEndpoint (address): 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 000000000000000000000000000000000000000000000002b5e3af16b1880000
Arg [2] : 000000000000000000000000000000000000000000000001a055690d9db80000
Arg [3] : 000000000000000000000000000000000000000000000000000000000000022b
Arg [4] : 000000000000000000000000b6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7


Deployed ByteCode Sourcemap

676:9403:30:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;711:978:40;;;;;;;;;;-1:-1:-1;711:978:40;;;;;:::i;:::-;;:::i;:::-;;6364:100:30;;;;;;;;;;-1:-1:-1;6364:100:30;;;;;:::i;:::-;;:::i;:::-;;;2340:14:45;;2333:22;2315:41;;2303:2;2288:18;6364:100:30;;;;;;;;9509:225;;;;;;;;;;-1:-1:-1;9509:225:30;;;;;:::i;:::-;;:::i;8890:122::-;;;;;;;;;;-1:-1:-1;8890:122:30;;;;;:::i;:::-;;:::i;2473:98:9:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;7641:115:30:-;;;;;;;;;;-1:-1:-1;7641:115:30;;;;;:::i;:::-;;:::i;3984:217:9:-;;;;;;;;;;-1:-1:-1;3984:217:9;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;4515:32:45;;;4497:51;;4485:2;4470:18;3984:217:9;4351:203:45;3522:401:9;;;;;;;;;;-1:-1:-1;3522:401:9;;;;;:::i;:::-;;:::i;1615:111:13:-;;;;;;;;;;-1:-1:-1;1702:10:13;:17;1615:111;;;5025:25:45;;;5013:2;4998:18;1615:111:13;4879:177:45;1697:398:40;;;;;;;;;;-1:-1:-1;1697:398:40;;;;;:::i;:::-;;:::i;1215:41:30:-;;;;;;;;;;;;;;;;4711:330:9;;;;;;;;;;-1:-1:-1;4711:330:9;;;;;:::i;:::-;;:::i;1497:25:30:-;;;;;;;;;;;;;;;;6472:188;;;;;;;;;;-1:-1:-1;6472:188:30;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;1291:253:13:-;;;;;;;;;;-1:-1:-1;1291:253:13;;;;;:::i;:::-;;:::i;8498:80:30:-;;;;;;;;;;-1:-1:-1;8561:9:30;;8498:80;;8186:116;;;;;;;;;;-1:-1:-1;8186:116:30;;;;;:::i;:::-;;:::i;8707:175::-;;;;;;;;;;-1:-1:-1;8707:175:30;;;;;:::i;:::-;;:::i;7163:236::-;;;;;;;;;;-1:-1:-1;7163:236:30;;;;;:::i;:::-;;:::i;9185:82::-;;;;;;;;;;-1:-1:-1;9185:82:30;;;;;:::i;:::-;;:::i;5107:179:9:-;;;;;;;;;;-1:-1:-1;5107:179:9;;;;;:::i;:::-;;:::i;529:241:12:-;;;;;;;;;;-1:-1:-1;529:241:12;;;;;:::i;:::-;;:::i;7407:91:30:-;;;;;;;;;;-1:-1:-1;7407:91:30;;;;;:::i;:::-;;:::i;9386:115::-;;;;;;;;;;-1:-1:-1;9386:115:30;;;;;:::i;:::-;;:::i;5304:892::-;;;;;;:::i;:::-;;:::i;7506:127::-;;;;;;;;;;-1:-1:-1;7506:127:30;;;;;:::i;:::-;;:::i;7764:103::-;;;;;;;;;;-1:-1:-1;7764:103:30;;;;;:::i;:::-;;:::i;1798:230:13:-;;;;;;;;;;-1:-1:-1;1798:230:13;;;;;:::i;:::-;;:::i;7978:104:30:-;;;;;;;;;;-1:-1:-1;7978:104:30;;;;;:::i;:::-;;:::i;2176:235:9:-;;;;;;;;;;-1:-1:-1;2176:235:9;;;;;:::i;:::-;;:::i;957:21:30:-;;;;;;;;;;;;;:::i;1914:205:9:-;;;;;;;;;;-1:-1:-1;1914:205:9;;;;;:::i;:::-;;:::i;1668:101:4:-;;;;;;;;;;;;;:::i;553:51:40:-;;;;;;;;;;-1:-1:-1;553:51:40;;;;;:::i;:::-;;:::i;1184:24:30:-;;;;;;;;;;;;;;;;8397:93;;;;;;;;;;-1:-1:-1;8469:13:30;;8397:93;;6681:353;;;;;;;;;;-1:-1:-1;6681:353:30;;;;;:::i;:::-;;:::i;8586:113::-;;;;;;;;;;-1:-1:-1;8586:113:30;;;;;:::i;:::-;;:::i;1036:85:4:-;;;;;;;;;;;;;:::i;456:90:40:-;;;;;;;;;;-1:-1:-1;456:90:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9391:25:45;;;9447:2;9432:18;;9425:34;;;;9364:18;456:90:40;9217:248:45;8090:88:30;;;;;;;;;;-1:-1:-1;8090:88:30;;;;;:::i;:::-;;:::i;3971:125::-;;;;;;;;;;-1:-1:-1;3971:125:30;;;;;:::i;:::-;;:::i;2635:102:9:-;;;;;;;;;;;;;:::i;8310:79:30:-;;;;;;;;;;-1:-1:-1;8375:6:30;;8310:79;;4601:695;;;;;;:::i;:::-;;:::i;1092:26::-;;;;;;;;;;-1:-1:-1;1092:26:30;;;;;;;;;;;4268:153:9;;;;;;;;;;-1:-1:-1;4268:153:9;;;;;:::i;:::-;;:::i;1338:74:30:-;;;;;;;;;;-1:-1:-1;1338:74:30;;;;-1:-1:-1;;;;;1338:74:30;;;5352:320:9;;;;;;;;;;-1:-1:-1;5352:320:9;;;;;:::i;:::-;;:::i;1029:20:30:-;;;;;;;;;;-1:-1:-1;1029:20:30;;;;;;;;7875:95;;;;;;;;;;-1:-1:-1;7875:95:30;;;;;:::i;:::-;;:::i;6204:152::-;;;;;;;;;;-1:-1:-1;6204:152:30;;;;;:::i;:::-;;:::i;2340:1547::-;;;;;;:::i;:::-;;:::i;2666:801:40:-;;;;;;:::i;:::-;;:::i;1125:21:30:-;;;;;;;;;;;;;;;;7042:113;;;;;;;;;;-1:-1:-1;7042:113:30;;;;;:::i;:::-;;:::i;1056:29::-;;;;;;;;;;-1:-1:-1;1056:29:30;;;;;;;;;;;4487:162:9;;;;;;;;;;-1:-1:-1;4487:162:9;;;;;:::i;:::-;;:::i;1003:19:30:-;;;;;;;;;;;;;;;;3475:158:40;;;;;;;;;;-1:-1:-1;3475:158:40;;;;;:::i;:::-;;:::i;1918:198:4:-;;;;;;;;;;-1:-1:-1;1918:198:4;;;;;:::i;:::-;;:::i;1153:24:30:-;;;;;;;;;;;;;;;;1606:43;;;;;;;;;;-1:-1:-1;1606:43:30;;;;;:::i;:::-;;;;;;;;;;;;;;711:978:40;916:8;;-1:-1:-1;;;;;916:8:40;894:10;:31;886:40;;;;;;1037:32;;;;;;;:19;:32;;;;;:39;;;;;:::i;:::-;;;1015:11;:18;:61;:134;;;;-1:-1:-1;1116:32:40;;;;;;;:19;:32;;;;;;;1106:43;;;;1116:32;1106:43;:::i;:::-;;;;;;;;1090:11;1080:22;;;;;;:69;1015:134;1007:199;;;;-1:-1:-1;;;1007:199:40;;14129:2:45;1007:199:40;;;14111:21:45;14168:2;14148:18;;;14141:30;14207:34;14187:18;;;14180:62;-1:-1:-1;;;14258:18:45;;;14251:50;14318:19;;1007:199:40;;;;;;;;;1334:60;;-1:-1:-1;;;1334:60:40;;:4;;:16;;:60;;1351:11;;1364;;1377:6;;1385:8;;1334:60;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1330:352;;1541:52;;;;;;;;1556:8;:15;1541:52;;;;1583:8;1573:19;;;;;;1541:52;;;1490:14;:27;1505:11;1490:27;;;;;;;;;;;;;;;1518:11;1490:40;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1490:48:40;;;;;;;;;;;;;:103;;;;;;;;;;;;;;;1613:57;;;;1627:11;;1640;;1531:6;;1661:8;;1613:57;:::i;:::-;;;;;;;;1330:352;711:978;;;;:::o;6364:100:30:-;6418:4;6443:12;6451:3;6443:7;:12::i;:::-;6435:21;6364:100;-1:-1:-1;;6364:100:30:o;9509:225::-;9621:4;-1:-1:-1;;;;;;9645:41:30;;-1:-1:-1;;;9645:41:30;;:81;;;9690:36;9714:11;9690:23;:36::i;8890:122::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;8972:14:30::1;:32:::0;;-1:-1:-1;;;;;;8972:32:30::1;-1:-1:-1::0;;;;;8972:32:30;;;::::1;::::0;;;::::1;::::0;;8890:122::o;2473:98:9:-;2527:13;2559:5;2552:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2473:98;:::o;7641:115:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;7716:14:30::1;:32:::0;;;::::1;;::::0;::::1;-1:-1:-1::0;;7716:32:30;;::::1;::::0;;;::::1;::::0;;7641:115::o;3984:217:9:-;4060:7;4087:16;4095:7;4087;:16::i;:::-;4079:73;;;;-1:-1:-1;;;4079:73:9;;15752:2:45;4079:73:9;;;15734:21:45;15791:2;15771:18;;;15764:30;15830:34;15810:18;;;15803:62;-1:-1:-1;;;15881:18:45;;;15874:42;15933:19;;4079:73:9;15550:408:45;4079:73:9;-1:-1:-1;4170:24:9;;;;:15;:24;;;;;;-1:-1:-1;;;;;4170:24:9;;3984:217::o;3522:401::-;3602:13;3618:23;3633:7;3618:14;:23::i;:::-;3602:39;;3665:5;-1:-1:-1;;;;;3659:11:9;:2;-1:-1:-1;;;;;3659:11:9;;;3651:57;;;;-1:-1:-1;;;3651:57:9;;16165:2:45;3651:57:9;;;16147:21:45;16204:2;16184:18;;;16177:30;16243:34;16223:18;;;16216:62;-1:-1:-1;;;16294:18:45;;;16287:31;16335:19;;3651:57:9;15963:397:45;3651:57:9;719:10:18;-1:-1:-1;;;;;3740:21:9;;;;:62;;-1:-1:-1;3765:37:9;3782:5;719:10:18;4487:162:9;:::i;3765:37::-;3719:165;;;;-1:-1:-1;;;3719:165:9;;16567:2:45;3719:165:9;;;16549:21:45;16606:2;16586:18;;;16579:30;16645:34;16625:18;;;16618:62;-1:-1:-1;;;16696:18:45;;;16689:54;16760:19;;3719:165:9;16365:420:45;3719:165:9;3895:21;3904:2;3908:7;3895:8;:21::i;:::-;3592:331;3522:401;;:::o;1697:398:40:-;1909:10;1931:4;1909:27;1901:83;;;;-1:-1:-1;;;1901:83:40;;16992:2:45;1901:83:40;;;16974:21:45;17031:2;17011:18;;;17004:30;17070:34;17050:18;;;17043:62;-1:-1:-1;;;17121:18:45;;;17114:41;17172:19;;1901:83:40;16790:407:45;1901:83:40;2033:54;2044:11;2057;2070:6;2078:8;2033:10;:54::i;4711:330:9:-;4900:41;719:10:18;4919:12:9;4933:7;4900:18;:41::i;:::-;4892:103;;;;-1:-1:-1;;;4892:103:9;;;;;;;:::i;:::-;5006:28;5016:4;5022:2;5026:7;5006:9;:28::i;6472:188:30:-;6605:14;;6635:7;;6548:16;;;;-1:-1:-1;;;;;6605:14:30;;;;6646:5;;6622:20;;:10;:20;:::i;:::-;6621:30;;;;:::i;:::-;6597:55;;;;6472:188;;;;;;:::o;1291:253:13:-;1388:7;1423:23;1440:5;1423:16;:23::i;:::-;1415:5;:31;1407:87;;;;-1:-1:-1;;;1407:87:13;;18384:2:45;1407:87:13;;;18366:21:45;18423:2;18403:18;;;18396:30;18462:34;18442:18;;;18435:62;-1:-1:-1;;;18513:18:45;;;18506:41;18564:19;;1407:87:13;18182:407:45;1407:87:13;-1:-1:-1;;;;;;1511:19:13;;;;;;;;:12;:19;;;;;;;;:26;;;;;;;;;1291:253::o;8186:116:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;8263:13:30::1;:31:::0;8186:116::o;8707:175::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;8794:4:30::1;8782:8;:16;;;;8774:71;;;::::0;-1:-1:-1;;;8774:71:30;;18796:2:45;8774:71:30::1;::::0;::::1;18778:21:45::0;18835:2;18815:18;;;18808:30;18874:34;18854:18;;;18847:62;-1:-1:-1;;;18925:18:45;;;18918:40;18975:19;;8774:71:30::1;18594:406:45::0;8774:71:30::1;8856:18;;:7;:18:::0;8707:175::o;7163:236::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;7277:1:30::1;7256:11;:18;:22;7248:55;;;;-1:-1:-1::0;;;7248:55:30::1;;;;;;;:::i;:::-;7319:6;7314:77;7335:11;:18;7331:1;:22;7314:77;;;7390:1;7360:11;:27;7372:11;7384:1;7372:14;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1::0;;;;;7360:27:30::1;-1:-1:-1::0;;;;;7360:27:30::1;;;;;;;;;;;;:31;;;;7355:3;;;;:::i;:::-;;;7314:77;;;;7163:236:::0;:::o;9185:82::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;9243:16:30::1;9256:2;9243:12;:16::i;:::-;9185:82:::0;:::o;5107:179:9:-;5240:39;5257:4;5263:2;5267:7;5240:39;;;;;;;;;;;;:16;:39::i;529:241:12:-;645:41;719:10:18;664:12:12;640:96:18;645:41:12;637:102;;;;-1:-1:-1;;;637:102:12;;19828:2:45;637:102:12;;;19810:21:45;19867:2;19847:18;;;19840:30;19906:34;19886:18;;;19879:62;-1:-1:-1;;;19957:18:45;;;19950:46;20013:19;;637:102:12;19626:412:45;637:102:12;749:14;755:7;749:5;:14::i;7407:91:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;7470:8:30::1;:20:::0;;-1:-1:-1;;7470:20:30::1;::::0;::::1;;::::0;;;::::1;::::0;;7407:91::o;9386:115::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;9463:30:30::1;9481:2;9485:7;9463:17;:30::i;5304:892::-:0;5366:11;5380:13;1702:10:13;:17;;1615:111;5380:13:30;5412:17;;5366:27;;-1:-1:-1;5412:17:30;;;;;;:25;;:17;:25;5404:71;;;;-1:-1:-1;;;5404:71:30;;;;;;;:::i;:::-;5516:9;;5512:1;5494:15;5503:6;5494;:15;:::i;:::-;:19;;;;:::i;:::-;:31;5486:85;;;;-1:-1:-1;;;5486:85:30;;;;;;;:::i;:::-;5602:10;5590:23;;;;:11;:23;;;;;;:33;-1:-1:-1;5590:33:30;5582:93;;;;-1:-1:-1;;;5582:93:30;;21320:2:45;5582:93:30;;;21302:21:45;21359:2;21339:18;;;21332:30;21398:34;21378:18;;;21371:62;-1:-1:-1;;;21449:18:45;;;21442:45;21504:19;;5582:93:30;21118:411:45;5582:93:30;5703:1;5694:6;:10;:32;;;;;5718:8;;5708:6;:18;;5694:32;5686:68;;;;-1:-1:-1;;;5686:68:30;;;;;;;:::i;:::-;5897:6;5881:13;;:22;;;;:::i;:::-;5868:9;:35;5860:68;;;;-1:-1:-1;;;5860:68:30;;;;;;;:::i;:::-;5944:6;5939:153;5960:6;5956:1;:10;5939:153;;;5988:24;6001:10;5988:12;:24::i;:::-;6065:10;6053:23;;;;:11;:23;;;;;;:27;;6079:1;;6053:27;:::i;:::-;6039:10;6027:23;;;;:11;:23;;;;;:53;5968:3;;;;:::i;:::-;;;;5939:153;;;-1:-1:-1;6157:10:30;;6149:39;;-1:-1:-1;;;;;6157:10:30;;;;6178:9;6149:39;;;;;6157:10;6149:39;6157:10;6149:39;6178:9;6157:10;6149:39;;;;;;;;;;;;;;;;;;;7506:127;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;7587:17:30::1;:38:::0;;;::::1;;;;-1:-1:-1::0;;7587:38:30;;::::1;::::0;;;::::1;::::0;;7506:127::o;7764:103::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;7835:12:30::1;:24:::0;7764:103::o;1798:230:13:-;1873:7;1908:30;1702:10;:17;;1615:111;1908:30;1900:5;:38;1892:95;;;;-1:-1:-1;;;1892:95:13;;22437:2:45;1892:95:13;;;22419:21:45;22476:2;22456:18;;;22449:30;22515:34;22495:18;;;22488:62;-1:-1:-1;;;22566:18:45;;;22559:42;22618:19;;1892:95:13;22235:408:45;1892:95:13;2004:10;2015:5;2004:17;;;;;;;;:::i;:::-;;;;;;;;;1997:24;;1798:230;;;:::o;7978:104:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;8054:20:30;;::::1;::::0;:7:::1;::::0;:20:::1;::::0;::::1;::::0;::::1;:::i;2176:235:9:-:0;2248:7;2283:16;;;:7;:16;;;;;;-1:-1:-1;;;;;2283:16:9;2317:19;2309:73;;;;-1:-1:-1;;;2309:73:9;;22850:2:45;2309:73:9;;;22832:21:45;22889:2;22869:18;;;22862:30;22928:34;22908:18;;;22901:62;-1:-1:-1;;;22979:18:45;;;22972:39;23028:19;;2309:73:9;22648:405:45;957:21:30;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1914:205:9:-;1986:7;-1:-1:-1;;;;;2013:19:9;;2005:74;;;;-1:-1:-1;;;2005:74:9;;23260:2:45;2005:74:9;;;23242:21:45;23299:2;23279:18;;;23272:30;23338:34;23318:18;;;23311:62;-1:-1:-1;;;23389:18:45;;;23382:40;23439:19;;2005:74:9;23058:406:45;2005:74:9;-1:-1:-1;;;;;;2096:16:9;;;;;:9;:16;;;;;;;1914:205::o;1668:101:4:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;553:51:40:-;;;;;;;;;;;;;;;;:::i;6681:353:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;6803:1:30::1;6781:12;:19;:23;6773:56;;;;-1:-1:-1::0;;;6773:56:30::1;;;;;;;:::i;:::-;6845:6;6840:187;6861:12;:19;6857:1;:23;6840:187;;;6937:1;-1:-1:-1::0;;;;;6910:29:30::1;:12;6923:1;6910:15;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1::0;;;;;6910:29:30::1;;;6902:62;;;::::0;-1:-1:-1;;;6902:62:30;;23671:2:45;6902:62:30::1;::::0;::::1;23653:21:45::0;23710:2;23690:18;;;23683:30;-1:-1:-1;;;23729:18:45;;;23722:50;23789:18;;6902:62:30::1;23469:344:45::0;6902:62:30::1;7010:5;6979:11;:28;6991:12;7004:1;6991:15;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1::0;;;;;6979:28:30::1;-1:-1:-1::0;;;;;6979:28:30::1;;;;;;;;;;;;:36;;;;6882:3;;;;:::i;:::-;;;6840:187;;8586:113:::0;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;8665:26:30::1;8678:7;8687:3;8665:12;:26::i;1036:85:4:-:0;1108:6;;-1:-1:-1;;;;;1108:6:4;;1036:85::o;8090:88:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;8153:6:30::1;:17:::0;8090:88::o;3971:125::-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;4053:26:30::1;:35:::0;3971:125::o;2635:102:9:-;2691:13;2723:7;2716:14;;;;;:::i;4601:695:30:-;4654:11;4668:13;1702:10:13;:17;;1615:111;4668:13:30;4700:8;;4654:27;;-1:-1:-1;4700:8:30;;:16;;:8;:16;4692:62;;;;-1:-1:-1;;;4692:62:30;;;;;;;:::i;:::-;4795:9;;4791:1;4773:15;4782:6;4773;:15;:::i;:::-;:19;;;;:::i;:::-;:31;4765:85;;;;-1:-1:-1;;;4765:85:30;;;;;;;:::i;:::-;4878:1;4869:6;:10;:32;;;;;4893:8;;4883:6;:18;;4869:32;4861:68;;;;-1:-1:-1;;;4861:68:30;;;;;;;:::i;:::-;5065:6;5056;;:15;;;;:::i;:::-;5043:9;:28;5035:61;;;;-1:-1:-1;;;5035:61:30;;;;;;;:::i;:::-;5112:6;5107:85;5128:6;5124:1;:10;5107:85;;;5156:24;5169:10;5156:12;:24::i;:::-;5136:3;;;;:::i;:::-;;;;5107:85;;4268:153:9;4362:52;719:10:18;4395:8:9;4405;4362:18;:52::i;5352:320::-;5521:41;719:10:18;5554:7:9;5521:18;:41::i;:::-;5513:103;;;;-1:-1:-1;;;5513:103:9;;;;;;;:::i;:::-;5626:39;5640:4;5646:2;5650:7;5659:5;5626:13;:39::i;7875:95:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;7942:8:30::1;:20:::0;7875:95::o;6204:152::-;6292:13;6325:23;6340:7;6325:14;:23::i;2340:1547::-;2429:14;;;;;;;:22;;2447:4;2429:22;2421:71;;;;-1:-1:-1;;;2421:71:30;;24020:2:45;2421:71:30;;;24002:21:45;24059:2;24039:18;;;24032:30;24098:34;24078:18;;;24071:62;-1:-1:-1;;;24149:18:45;;;24142:34;24193:19;;2421:71:30;23818:400:45;2421:71:30;2525:16;2533:7;2525;:16::i;:::-;-1:-1:-1;;;;;2511:30:30;:10;-1:-1:-1;;;;;2511:30:30;;2503:77;;;;-1:-1:-1;;;2503:77:30;;24425:2:45;2503:77:30;;;24407:21:45;24464:2;24444:18;;;24437:30;24503:34;24483:18;;;24476:62;-1:-1:-1;;;24554:18:45;;;24547:32;24596:19;;2503:77:30;24223:398:45;2503:77:30;2599:29;;;2638:1;2599:29;;;:19;:29;;;;;:36;;;;;:::i;:::-;;;:40;2591:99;;;;-1:-1:-1;;;2591:99:30;;24828:2:45;2591:99:30;;;24810:21:45;24867:2;24847:18;;;24840:30;24906:34;24886:18;;;24879:62;-1:-1:-1;;;24957:18:45;;;24950:44;25011:19;;2591:99:30;24626:410:45;2591:99:30;2770:14;2776:7;2770:5;:14::i;:::-;2858:20;2892:10;2904:7;2881:31;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;2881:31:30;;;;;;;;;;3082:26;;-1:-1:-1;;;2881:31:30;3056:53;;25196:51:45;25263:11;;;25256:27;2881:31:30;-1:-1:-1;3015:1:30;;2998:14;;25299:12:45;;3056:53:30;;;-1:-1:-1;;3056:53:30;;;;;;;;;;3285:8;;-1:-1:-1;;;3285:77:30;;3056:53;;-1:-1:-1;3264:15:30;;-1:-1:-1;;;;;3285:8:30;;;;:21;;:77;;3307:8;;3325:4;;3332:7;;3264:15;;3056:53;;3285:77;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3263:99;;;3396:10;3383:9;:23;;3375:110;;;;-1:-1:-1;;;3375:110:30;;26421:2:45;3375:110:30;;;26403:21:45;26460:2;26440:18;;;26433:30;26499:34;26479:18;;;26472:62;26570:34;26550:18;;;26543:62;-1:-1:-1;;;26621:19:45;;;26614:41;26672:19;;3375:110:30;26219:478:45;3375:110:30;3498:8;;3590:29;;;3498:8;3590:29;;;:19;:29;;;;;;3498:381;;-1:-1:-1;;;3498:381:30;;-1:-1:-1;;;;;3498:8:30;;;;:13;;3519:9;;3498:381;;3544:8;;3673:7;;3729:10;;3498:8;3839:13;;3498:381;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2410:1477;;;;2340:1547;;:::o;2666:801:40:-;2925:27;;;2890:32;2925:27;;;:14;:27;;;;;;:40;;;;2953:11;;2925:40;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2925:48:40;;;;;;;;;;2992:21;;;;2925:48;;-1:-1:-1;2984:86:40;;;;-1:-1:-1;;;2984:86:40;;28393:2:45;2984:86:40;;;28375:21:45;28432:2;28412:18;;;28405:30;28471:34;28451:18;;;28444:62;-1:-1:-1;;;28522:18:45;;;28515:36;28568:19;;2984:86:40;28191:402:45;2984:86:40;3108:23;;3089:42;;:90;;;;;3158:9;:21;;;3145:8;;3135:19;;;;;;;:::i;:::-;;;;;;;;:44;3089:90;3081:129;;;;-1:-1:-1;;;3081:129:40;;29076:2:45;3081:129:40;;;29058:21:45;29115:2;29095:18;;;29088:30;-1:-1:-1;;;29134:18:45;;;29127:56;29200:18;;3081:129:40;28874:350:45;3081:129:40;3284:1;3258:27;;;3296:21;;;:34;3399:60;;-1:-1:-1;;;3399:60:40;;:4;;:16;;:60;;3416:11;;3429;;3442:6;;3450:8;;;;3399:60;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2834:633;2666:801;;;;;:::o;7042:113:30:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;-1:-1:-1;;;;;7121:17:30;;::::1;;::::0;;;:11:::1;:17;::::0;;;;:26;7042:113::o;4487:162:9:-;-1:-1:-1;;;;;4607:25:9;;;4584:4;4607:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;4487:162::o;3475:158:40:-;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;3579:29:40::1;::::0;::::1;;::::0;;;:19:::1;:29;::::0;;;;:46:::1;::::0;3611:14;;3579:46:::1;:::i;1918:198:4:-:0;719:10:18;1248:7:4;:5;:7::i;:::-;-1:-1:-1;;;;;1248:23:4;;1240:68;;;;-1:-1:-1;;;1240:68:4;;;;;;;:::i;:::-;-1:-1:-1;;;;;2006:22:4;::::1;1998:73;;;::::0;-1:-1:-1;;;1998:73:4;;30154:2:45;1998:73:4::1;::::0;::::1;30136:21:45::0;30193:2;30173:18;;;30166:30;30232:34;30212:18;;;30205:62;-1:-1:-1;;;30283:18:45;;;30276:36;30329:19;;1998:73:4::1;29952:402:45::0;1998:73:4::1;2081:28;2100:8;2081:18;:28::i;7144:125:9:-:0;7209:4;7232:16;;;:7;:16;;;;;;-1:-1:-1;;;;;7232:16:9;:30;;;7144:125::o;990:222:13:-;1092:4;-1:-1:-1;;;;;;1115:50:13;;-1:-1:-1;;;1115:50:13;;:90;;;1169:36;1193:11;1169:23;:36::i;10995:171:9:-;11069:24;;;;:15;:24;;;;;:29;;-1:-1:-1;;;;;;11069:29:9;-1:-1:-1;;;;;11069:29:9;;;;;;;;:24;;11122:23;11069:24;11122:14;:23::i;:::-;-1:-1:-1;;;;;11113:46:9;;;;;;;;;;;10995:171;;:::o;4104:381:30:-;4300:14;4316:12;4343:8;4332:37;;;;;;;;;;;;:::i;:::-;4299:70;;;;4451:26;4461:6;4469:7;4451:9;:26::i;:::-;4269:216;;4104:381;;;;:::o;7427:344:9:-;7520:4;7544:16;7552:7;7544;:16::i;:::-;7536:73;;;;-1:-1:-1;;;7536:73:9;;30886:2:45;7536:73:9;;;30868:21:45;30925:2;30905:18;;;30898:30;30964:34;30944:18;;;30937:62;-1:-1:-1;;;31015:18:45;;;31008:42;31067:19;;7536:73:9;30684:408:45;7536:73:9;7619:13;7635:23;7650:7;7635:14;:23::i;:::-;7619:39;;7687:5;-1:-1:-1;;;;;7676:16:9;:7;-1:-1:-1;;;;;7676:16:9;;:51;;;;7720:7;-1:-1:-1;;;;;7696:31:9;:20;7708:7;7696:11;:20::i;:::-;-1:-1:-1;;;;;7696:31:9;;7676:51;:87;;;;7731:32;7748:5;7755:7;7731:16;:32::i;:::-;7668:96;7427:344;-1:-1:-1;;;;7427:344:9:o;10324:560::-;10478:4;-1:-1:-1;;;;;10451:31:9;:23;10466:7;10451:14;:23::i;:::-;-1:-1:-1;;;;;10451:31:9;;10443:85;;;;-1:-1:-1;;;10443:85:9;;31299:2:45;10443:85:9;;;31281:21:45;31338:2;31318:18;;;31311:30;31377:34;31357:18;;;31350:62;-1:-1:-1;;;31428:18:45;;;31421:39;31477:19;;10443:85:9;31097:405:45;10443:85:9;-1:-1:-1;;;;;10546:16:9;;10538:65;;;;-1:-1:-1;;;10538:65:9;;31709:2:45;10538:65:9;;;31691:21:45;31748:2;31728:18;;;31721:30;31787:34;31767:18;;;31760:62;-1:-1:-1;;;31838:18:45;;;31831:34;31882:19;;10538:65:9;31507:400:45;10538:65:9;10614:39;10635:4;10641:2;10645:7;10614:20;:39::i;:::-;10715:29;10732:1;10736:7;10715:8;:29::i;:::-;-1:-1:-1;;;;;10755:15:9;;;;;;:9;:15;;;;;:20;;10774:1;;10755:15;:20;;10774:1;;10755:20;:::i;:::-;;;;-1:-1:-1;;;;;;;10785:13:9;;;;;;:9;:13;;;;;:18;;10802:1;;10785:13;:18;;10802:1;;10785:18;:::i;:::-;;;;-1:-1:-1;;10813:16:9;;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;10813:21:9;-1:-1:-1;;;;;10813:21:9;;;;;;;;;10850:27;;10813:16;;10850:27;;;;-1:-1:-1;;;;;;;;;;;10850:27:9;;10324:560;;;:::o;9039:138:30:-;9093:12;9129:7;;9108:18;:16;:18::i;:::-;:28;;;;:::i;:::-;9093:43;;9147:22;9157:2;9161:7;9147:9;:22::i;9962:112::-;10046:20;10058:7;10046:11;:20::i;9275:103::-;9348:22;9358:2;9362:7;9348:9;:22::i;2270:187:4:-;2362:6;;;-1:-1:-1;;;;;2378:17:4;;;-1:-1:-1;;;;;;2378:17:4;;;;;;;2410:40;;2362:6;;;2378:17;2362:6;;2410:40;;2343:16;;2410:40;2333:124;2270:187;:::o;1277:214:14:-;1376:16;1384:7;1376;:16::i;:::-;1368:75;;;;-1:-1:-1;;;1368:75:14;;32114:2:45;1368:75:14;;;32096:21:45;32153:2;32133:18;;;32126:30;32192:34;32172:18;;;32165:62;-1:-1:-1;;;32243:18:45;;;32236:44;32297:19;;1368:75:14;31912:410:45;1368:75:14;1453:19;;;;:10;:19;;;;;;;;:31;;;;;;;;:::i;11301:307:9:-;11451:8;-1:-1:-1;;;;;11442:17:9;:5;-1:-1:-1;;;;;11442:17:9;;;11434:55;;;;-1:-1:-1;;;11434:55:9;;32529:2:45;11434:55:9;;;32511:21:45;32568:2;32548:18;;;32541:30;-1:-1:-1;;;32587:18:45;;;32580:55;32652:18;;11434:55:9;32327:349:45;11434:55:9;-1:-1:-1;;;;;11499:25:9;;;;;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;:46;;-1:-1:-1;;11499:46:9;;;;;;;;;;11560:41;;2315::45;;;11560::9;;2288:18:45;11560:41:9;;;;;;;11301:307;;;:::o;6534:::-;6685:28;6695:4;6701:2;6705:7;6685:9;:28::i;:::-;6731:48;6754:4;6760:2;6764:7;6773:5;6731:22;:48::i;:::-;6723:111;;;;-1:-1:-1;;;6723:111:9;;;;;;;:::i;467:663:14:-;540:13;573:16;581:7;573;:16::i;:::-;565:78;;;;-1:-1:-1;;;565:78:14;;33302:2:45;565:78:14;;;33284:21:45;33341:2;33321:18;;;33314:30;33380:34;33360:18;;;33353:62;-1:-1:-1;;;33431:18:45;;;33424:47;33488:19;;565:78:14;33100:413:45;565:78:14;654:23;680:19;;;:10;:19;;;;;654:45;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;709:18;730:10;:8;:10::i;:::-;709:31;;819:4;813:18;835:1;813:23;809:70;;;-1:-1:-1;859:9:14;467:663;-1:-1:-1;;467:663:14:o;809:70::-;981:23;;:27;977:106;;1055:4;1061:9;1038:33;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1024:48;;;;467:663;;;:::o;977:106::-;1100:23;1115:7;1100:14;:23::i;1555:300:9:-;1657:4;-1:-1:-1;;;;;;1692:40:9;;-1:-1:-1;;;1692:40:9;;:104;;-1:-1:-1;;;;;;;1748:48:9;;-1:-1:-1;;;1748:48:9;1692:104;:156;;;-1:-1:-1;;;;;;;;;;937:40:21;;;1812:36:9;829:155:21;8101:108:9;8176:26;8186:2;8190:7;8176:26;;;;;;;;;;;;:9;:26::i;9742:212:30:-;9901:45;9928:4;9934:2;9938:7;9901:26;:45::i;519:786:44:-;573:7;593:13;621:11;;609:9;:23;;;;:::i;:::-;593:39;;643:12;666:14;693:9;722:5;705:14;:12;:14::i;:::-;:22;;;;:::i;:::-;693:34;-1:-1:-1;806:11:44;:22;818:9;826:1;818:5;:9;:::i;:::-;806:22;;;;;;;;;;;;832:1;806:27;802:138;;;857:9;865:1;857:5;:9;:::i;:::-;850:16;;802:138;;;906:11;:22;918:9;926:1;918:5;:9;:::i;:::-;906:22;;;;;;;;;;;;899:29;;802:138;1064:14;;;;:11;:14;;;;;;1060:190;;1125:14;;;;:11;:14;;;;;:21;;;1109:1;-1:-1:-1;1109:1:44;1060:190;;;1188:14;;;;:11;:14;;;;;;;1217:21;;;;1188:14;-1:-1:-1;1060:190:44;1260:11;:13;;;:11;:13;;;:::i;:::-;;;;-1:-1:-1;1291:6:44;;519:786;-1:-1:-1;;;;;519:786:44:o;1708:200:14:-;1776:20;1788:7;1776:11;:20::i;:::-;1817:19;;;;:10;:19;;;;;1811:33;;;;;:::i;:::-;:38;;-1:-1:-1;1807:95:14;;1872:19;;;;:10;:19;;;;;1865:26;;;:::i;12161:778:9:-;12311:4;-1:-1:-1;;;;;12331:13:9;;1087:20:17;1133:8;12327:606:9;;12366:72;;-1:-1:-1;;;12366:72:9;;-1:-1:-1;;;;;12366:36:9;;;;;:72;;719:10:18;;12417:4:9;;12423:7;;12432:5;;12366:72;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12366:72:9;;;;;;;;-1:-1:-1;;12366:72:9;;;;;;;;;;;;:::i;:::-;;;12362:519;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12605:13:9;;12601:266;;12647:60;;-1:-1:-1;;;12647:60:9;;;;;;;:::i;12601:266::-;12819:6;12813:13;12804:6;12800:2;12796:15;12789:38;12362:519;-1:-1:-1;;;;;;12488:51:9;-1:-1:-1;;;12488:51:9;;-1:-1:-1;12481:58:9;;12327:606;-1:-1:-1;12918:4:9;12161:778;;;;;;:::o;4493:100:30:-;4545:13;4578:7;4571:14;;;;;:::i;2803:329:9:-;2876:13;2909:16;2917:7;2909;:16::i;:::-;2901:76;;;;-1:-1:-1;;;2901:76:9;;35060:2:45;2901:76:9;;;35042:21:45;35099:2;35079:18;;;35072:30;35138:34;35118:18;;;35111:62;-1:-1:-1;;;35189:18:45;;;35182:45;35244:19;;2901:76:9;34858:411:45;2901:76:9;2988:21;3012:10;:8;:10::i;:::-;2988:34;;3063:1;3045:7;3039:21;:25;:86;;;;;;;;;;;;;;;;;3091:7;3100:18;:7;:16;:18::i;:::-;3074:45;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3039:86;3032:93;2803:329;-1:-1:-1;;;2803:329:9:o;8430:311::-;8555:18;8561:2;8565:7;8555:5;:18::i;:::-;8604:54;8635:1;8639:2;8643:7;8652:5;8604:22;:54::i;:::-;8583:151;;;;-1:-1:-1;;;8583:151:9;;;;;;;:::i;2624:572:13:-;-1:-1:-1;;;;;2823:18:13;;2819:183;;2857:40;2889:7;4005:10;:17;;3978:24;;;;:15;:24;;;;;:44;;;4032:24;;;;;;;;;;;;3902:161;2857:40;2819:183;;;2926:2;-1:-1:-1;;;;;2918:10:13;:4;-1:-1:-1;;;;;2918:10:13;;2914:88;;2944:47;2977:4;2983:7;2944:32;:47::i;:::-;-1:-1:-1;;;;;3015:16:13;;3011:179;;3047:45;3084:7;3047:36;:45::i;3011:179::-;3119:4;-1:-1:-1;;;;;3113:10:13;:2;-1:-1:-1;;;;;3113:10:13;;3109:81;;3139:40;3167:2;3171:7;3139:27;:40::i;1313:153:44:-;1360:7;1422:16;1440:15;1405:51;;;;;;;;35431:19:45;;;35475:2;35466:12;;35459:28;35512:2;35503:12;;35274:247;1405:51:44;;;;;;;;;;;;;1395:62;;;;;;1387:71;;1380:78;;1313:153;:::o;9652:348:9:-;9711:13;9727:23;9742:7;9727:14;:23::i;:::-;9711:39;;9761:48;9782:5;9797:1;9801:7;9761:20;:48::i;:::-;9847:29;9864:1;9868:7;9847:8;:29::i;:::-;-1:-1:-1;;;;;9887:16:9;;;;;;:9;:16;;;;;:21;;9907:1;;9887:16;:21;;9907:1;;9887:21;:::i;:::-;;;;-1:-1:-1;;9925:16:9;;;;:7;:16;;;;;;9918:23;;-1:-1:-1;;;;;;9918:23:9;;;9957:36;9933:7;;9925:16;-1:-1:-1;;;;;9957:36:9;;;-1:-1:-1;;;;;;;;;;;9957:36:9;9925:16;;9957:36;9701:299;9652:348;:::o;328:703:20:-;384:13;601:10;597:51;;-1:-1:-1;;627:10:20;;;;;;;;;;;;-1:-1:-1;;;627:10:20;;;;;328:703::o;597:51::-;672:5;657:12;711:75;718:9;;711:75;;743:8;;;;:::i;:::-;;-1:-1:-1;765:10:20;;-1:-1:-1;773:2:20;765:10;;:::i;:::-;;;711:75;;;795:19;827:6;-1:-1:-1;;;;;817:17:20;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;817:17:20;;795:39;;844:150;851:10;;844:150;;877:11;887:1;877:11;;:::i;:::-;;-1:-1:-1;945:10:20;953:2;945:5;:10;:::i;:::-;932:24;;:2;:24;:::i;:::-;919:39;;902:6;909;902:14;;;;;;;;:::i;:::-;;;;:56;-1:-1:-1;;;;;902:56:20;;;;;;;;-1:-1:-1;972:11:20;981:2;972:11;;:::i;:::-;;;844:150;;9063:372:9;-1:-1:-1;;;;;9142:16:9;;9134:61;;;;-1:-1:-1;;;9134:61:9;;35728:2:45;9134:61:9;;;35710:21:45;;;35747:18;;;35740:30;35806:34;35786:18;;;35779:62;35858:18;;9134:61:9;35526:356:45;9134:61:9;9214:16;9222:7;9214;:16::i;:::-;9213:17;9205:58;;;;-1:-1:-1;;;9205:58:9;;36089:2:45;9205:58:9;;;36071:21:45;36128:2;36108:18;;;36101:30;-1:-1:-1;;;36147:18:45;;;36140:58;36215:18;;9205:58:9;35887:352:45;9205:58:9;9274:45;9303:1;9307:2;9311:7;9274:20;:45::i;:::-;-1:-1:-1;;;;;9330:13:9;;;;;;:9;:13;;;;;:18;;9347:1;;9330:13;:18;;9347:1;;9330:18;:::i;:::-;;;;-1:-1:-1;;9358:16:9;;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;9358:21:9;-1:-1:-1;;;;;9358:21:9;;;;;;;;9395:33;;9358:16;;;-1:-1:-1;;;;;;;;;;;9395:33:9;9358:16;;9395:33;9063:372;;:::o;4680:970:13:-;4942:22;4992:1;4967:22;4984:4;4967:16;:22::i;:::-;:26;;;;:::i;:::-;5003:18;5024:26;;;:17;:26;;;;;;4942:51;;-1:-1:-1;5154:28:13;;;5150:323;;-1:-1:-1;;;;;5220:18:13;;5198:19;5220:18;;;:12;:18;;;;;;;;:34;;;;;;;;;5269:30;;;;;;:44;;;5385:30;;:17;:30;;;;;:43;;;5150:323;-1:-1:-1;5566:26:13;;;;:17;:26;;;;;;;;5559:33;;;-1:-1:-1;;;;;5609:18:13;;;;;:12;:18;;;;;:34;;;;;;;5602:41;4680:970::o;5938:1061::-;6212:10;:17;6187:22;;6212:21;;6232:1;;6212:21;:::i;:::-;6243:18;6264:24;;;:15;:24;;;;;;6632:10;:26;;6187:46;;-1:-1:-1;6264:24:13;;6187:46;;6632:26;;;;;;:::i;:::-;;;;;;;;;6610:48;;6694:11;6669:10;6680;6669:22;;;;;;;;:::i;:::-;;;;;;;;;;;;:36;;;;6773:28;;;:15;:28;;;;;;;:41;;;6942:24;;;;;6935:31;6976:10;:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;6009:990;;;5938:1061;:::o;3490:217::-;3574:14;3591:20;3608:2;3591:16;:20::i;:::-;-1:-1:-1;;;;;3621:16:13;;;;;;;:12;:16;;;;;;;;:24;;;;;;;;:34;;;3665:26;;;:17;:26;;;;;;:35;;;;-1:-1:-1;3490:217:13:o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:159:45;81:20;;141:6;130:18;;120:29;;110:57;;163:1;160;153:12;110:57;14:159;;;:::o;178:127::-;239:10;234:3;230:20;227:1;220:31;270:4;267:1;260:15;294:4;291:1;284:15;310:275;381:2;375:9;446:2;427:13;;-1:-1:-1;;423:27:45;411:40;;-1:-1:-1;;;;;466:34:45;;502:22;;;463:62;460:88;;;528:18;;:::i;:::-;564:2;557:22;310:275;;-1:-1:-1;310:275:45:o;590:530::-;632:5;685:3;678:4;670:6;666:17;662:27;652:55;;703:1;700;693:12;652:55;739:6;726:20;-1:-1:-1;;;;;761:2:45;758:26;755:52;;;787:18;;:::i;:::-;831:55;874:2;855:13;;-1:-1:-1;;851:27:45;880:4;847:38;831:55;:::i;:::-;911:2;902:7;895:19;957:3;950:4;945:2;937:6;933:15;929:26;926:35;923:55;;;974:1;971;964:12;923:55;1039:2;1032:4;1024:6;1020:17;1013:4;1004:7;1000:18;987:55;1087:1;1062:16;;;1080:4;1058:27;1051:38;;;;1066:7;590:530;-1:-1:-1;;;590:530:45:o;1125:171::-;1192:20;;-1:-1:-1;;;;;1241:30:45;;1231:41;;1221:69;;1286:1;1283;1276:12;1301:684;1403:6;1411;1419;1427;1480:3;1468:9;1459:7;1455:23;1451:33;1448:53;;;1497:1;1494;1487:12;1448:53;1520:28;1538:9;1520:28;:::i;:::-;1510:38;;1599:2;1588:9;1584:18;1571:32;-1:-1:-1;;;;;1663:2:45;1655:6;1652:14;1649:34;;;1679:1;1676;1669:12;1649:34;1702:49;1743:7;1734:6;1723:9;1719:22;1702:49;:::i;:::-;1692:59;;1770:37;1803:2;1792:9;1788:18;1770:37;:::i;:::-;1760:47;;1860:2;1849:9;1845:18;1832:32;1816:48;;1889:2;1879:8;1876:16;1873:36;;;1905:1;1902;1895:12;1873:36;;1928:51;1971:7;1960:8;1949:9;1945:24;1928:51;:::i;:::-;1918:61;;;1301:684;;;;;;;:::o;1990:180::-;2049:6;2102:2;2090:9;2081:7;2077:23;2073:32;2070:52;;;2118:1;2115;2108:12;2070:52;-1:-1:-1;2141:23:45;;1990:180;-1:-1:-1;1990:180:45:o;2367:131::-;-1:-1:-1;;;;;;2441:32:45;;2431:43;;2421:71;;2488:1;2485;2478:12;2503:245;2561:6;2614:2;2602:9;2593:7;2589:23;2585:32;2582:52;;;2630:1;2627;2620:12;2582:52;2669:9;2656:23;2688:30;2712:5;2688:30;:::i;2753:131::-;-1:-1:-1;;;;;2828:31:45;;2818:42;;2808:70;;2874:1;2871;2864:12;2889:247;2948:6;3001:2;2989:9;2980:7;2976:23;2972:32;2969:52;;;3017:1;3014;3007:12;2969:52;3056:9;3043:23;3075:31;3100:5;3075:31;:::i;3141:258::-;3213:1;3223:113;3237:6;3234:1;3231:13;3223:113;;;3313:11;;;3307:18;3294:11;;;3287:39;3259:2;3252:10;3223:113;;;3354:6;3351:1;3348:13;3345:48;;;-1:-1:-1;;3389:1:45;3371:16;;3364:27;3141:258::o;3404:::-;3446:3;3484:5;3478:12;3511:6;3506:3;3499:19;3527:63;3583:6;3576:4;3571:3;3567:14;3560:4;3553:5;3549:16;3527:63;:::i;:::-;3644:2;3623:15;-1:-1:-1;;3619:29:45;3610:39;;;;3651:4;3606:50;;3404:258;-1:-1:-1;;3404:258:45:o;3667:220::-;3816:2;3805:9;3798:21;3779:4;3836:45;3877:2;3866:9;3862:18;3854:6;3836:45;:::i;3892:160::-;3957:20;;4013:13;;4006:21;3996:32;;3986:60;;4042:1;4039;4032:12;4057:180;4113:6;4166:2;4154:9;4145:7;4141:23;4137:32;4134:52;;;4182:1;4179;4172:12;4134:52;4205:26;4221:9;4205:26;:::i;4242:104::-;-1:-1:-1;;;;;4308:31:45;4296:44;;4242:104::o;4559:315::-;4627:6;4635;4688:2;4676:9;4667:7;4663:23;4659:32;4656:52;;;4704:1;4701;4694:12;4656:52;4743:9;4730:23;4762:31;4787:5;4762:31;:::i;:::-;4812:5;4864:2;4849:18;;;;4836:32;;-1:-1:-1;;;4559:315:45:o;5061:456::-;5138:6;5146;5154;5207:2;5195:9;5186:7;5182:23;5178:32;5175:52;;;5223:1;5220;5213:12;5175:52;5262:9;5249:23;5281:31;5306:5;5281:31;:::i;:::-;5331:5;-1:-1:-1;5388:2:45;5373:18;;5360:32;5401:33;5360:32;5401:33;:::i;:::-;5061:456;;5453:7;;-1:-1:-1;;;5507:2:45;5492:18;;;;5479:32;;5061:456::o;5522:248::-;5590:6;5598;5651:2;5639:9;5630:7;5626:23;5622:32;5619:52;;;5667:1;5664;5657:12;5619:52;-1:-1:-1;;5690:23:45;;;5760:2;5745:18;;;5732:32;;-1:-1:-1;5522:248:45:o;5775:274::-;-1:-1:-1;;;;;5967:32:45;;;;5949:51;;6031:2;6016:18;;6009:34;5937:2;5922:18;;5775:274::o;6054:184::-;6112:6;6165:2;6153:9;6144:7;6140:23;6136:32;6133:52;;;6181:1;6178;6171:12;6133:52;6204:28;6222:9;6204:28;:::i;6243:787::-;6297:5;6350:3;6343:4;6335:6;6331:17;6327:27;6317:55;;6368:1;6365;6358:12;6317:55;6404:6;6391:20;6430:4;-1:-1:-1;;;;;6449:2:45;6446:26;6443:52;;;6475:18;;:::i;:::-;6521:2;6518:1;6514:10;6544:28;6568:2;6564;6560:11;6544:28;:::i;:::-;6606:15;;;6676;;;6672:24;;;6637:12;;;;6708:15;;;6705:35;;;6736:1;6733;6726:12;6705:35;6772:2;6764:6;6760:15;6749:26;;6784:217;6800:6;6795:3;6792:15;6784:217;;;6880:3;6867:17;6897:31;6922:5;6897:31;:::i;:::-;6941:18;;6817:12;;;;6979;;;;6784:217;;;7019:5;6243:787;-1:-1:-1;;;;;;;6243:787:45:o;7035:348::-;7119:6;7172:2;7160:9;7151:7;7147:23;7143:32;7140:52;;;7188:1;7185;7178:12;7140:52;7228:9;7215:23;-1:-1:-1;;;;;7253:6:45;7250:30;7247:50;;;7293:1;7290;7283:12;7247:50;7316:61;7369:7;7360:6;7349:9;7345:22;7316:61;:::i;7388:321::-;7457:6;7510:2;7498:9;7489:7;7485:23;7481:32;7478:52;;;7526:1;7523;7516:12;7478:52;7566:9;7553:23;-1:-1:-1;;;;;7591:6:45;7588:30;7585:50;;;7631:1;7628;7621:12;7585:50;7654:49;7695:7;7686:6;7675:9;7671:22;7654:49;:::i;7937:416::-;8030:6;8038;8091:2;8079:9;8070:7;8066:23;8062:32;8059:52;;;8107:1;8104;8097:12;8059:52;8147:9;8134:23;-1:-1:-1;;;;;8172:6:45;8169:30;8166:50;;;8212:1;8209;8202:12;8166:50;8235:61;8288:7;8279:6;8268:9;8264:22;8235:61;:::i;:::-;8225:71;8343:2;8328:18;;;;8315:32;;-1:-1:-1;;;;7937:416:45:o;8358:389::-;8436:6;8444;8497:2;8485:9;8476:7;8472:23;8468:32;8465:52;;;8513:1;8510;8503:12;8465:52;8549:9;8536:23;8526:33;;8610:2;8599:9;8595:18;8582:32;-1:-1:-1;;;;;8629:6:45;8626:30;8623:50;;;8669:1;8666;8659:12;8623:50;8692:49;8733:7;8724:6;8713:9;8709:22;8692:49;:::i;:::-;8682:59;;;8358:389;;;;;:::o;8752:460::-;8837:6;8845;8853;8906:2;8894:9;8885:7;8881:23;8877:32;8874:52;;;8922:1;8919;8912:12;8874:52;8945:28;8963:9;8945:28;:::i;:::-;8935:38;;9024:2;9013:9;9009:18;8996:32;-1:-1:-1;;;;;9043:6:45;9040:30;9037:50;;;9083:1;9080;9073:12;9037:50;9106:49;9147:7;9138:6;9127:9;9123:22;9106:49;:::i;:::-;9096:59;;;9202:2;9191:9;9187:18;9174:32;9164:42;;8752:460;;;;;:::o;9470:315::-;9535:6;9543;9596:2;9584:9;9575:7;9571:23;9567:32;9564:52;;;9612:1;9609;9602:12;9564:52;9651:9;9638:23;9670:31;9695:5;9670:31;:::i;:::-;9720:5;-1:-1:-1;9744:35:45;9775:2;9760:18;;9744:35;:::i;:::-;9734:45;;9470:315;;;;;:::o;9790:665::-;9885:6;9893;9901;9909;9962:3;9950:9;9941:7;9937:23;9933:33;9930:53;;;9979:1;9976;9969:12;9930:53;10018:9;10005:23;10037:31;10062:5;10037:31;:::i;:::-;10087:5;-1:-1:-1;10144:2:45;10129:18;;10116:32;10157:33;10116:32;10157:33;:::i;:::-;10209:7;-1:-1:-1;10263:2:45;10248:18;;10235:32;;-1:-1:-1;10318:2:45;10303:18;;10290:32;-1:-1:-1;;;;;10334:30:45;;10331:50;;;10377:1;10374;10367:12;10331:50;10400:49;10441:7;10432:6;10421:9;10417:22;10400:49;:::i;10460:252::-;10527:6;10535;10588:2;10576:9;10567:7;10563:23;10559:32;10556:52;;;10604:1;10601;10594:12;10556:52;10627:28;10645:9;10627:28;:::i;10717:347::-;10768:8;10778:6;10832:3;10825:4;10817:6;10813:17;10809:27;10799:55;;10850:1;10847;10840:12;10799:55;-1:-1:-1;10873:20:45;;-1:-1:-1;;;;;10905:30:45;;10902:50;;;10948:1;10945;10938:12;10902:50;10985:4;10977:6;10973:17;10961:29;;11037:3;11030:4;11021:6;11013;11009:19;11005:30;11002:39;10999:59;;;11054:1;11051;11044:12;11069:773;11173:6;11181;11189;11197;11205;11258:3;11246:9;11237:7;11233:23;11229:33;11226:53;;;11275:1;11272;11265:12;11226:53;11298:28;11316:9;11298:28;:::i;:::-;11288:38;;11377:2;11366:9;11362:18;11349:32;-1:-1:-1;;;;;11441:2:45;11433:6;11430:14;11427:34;;;11457:1;11454;11447:12;11427:34;11480:49;11521:7;11512:6;11501:9;11497:22;11480:49;:::i;:::-;11470:59;;11548:37;11581:2;11570:9;11566:18;11548:37;:::i;:::-;11538:47;;11638:2;11627:9;11623:18;11610:32;11594:48;;11667:2;11657:8;11654:16;11651:36;;;11683:1;11680;11673:12;11651:36;;11722:60;11774:7;11763:8;11752:9;11748:24;11722:60;:::i;:::-;11069:773;;;;-1:-1:-1;11069:773:45;;-1:-1:-1;11801:8:45;;11696:86;11069:773;-1:-1:-1;;;11069:773:45:o;11847:388::-;11915:6;11923;11976:2;11964:9;11955:7;11951:23;11947:32;11944:52;;;11992:1;11989;11982:12;11944:52;12031:9;12018:23;12050:31;12075:5;12050:31;:::i;:::-;12100:5;-1:-1:-1;12157:2:45;12142:18;;12129:32;12170:33;12129:32;12170:33;:::i;:::-;12222:7;12212:17;;;11847:388;;;;;:::o;12240:481::-;12318:6;12326;12334;12387:2;12375:9;12366:7;12362:23;12358:32;12355:52;;;12403:1;12400;12393:12;12355:52;12426:28;12444:9;12426:28;:::i;:::-;12416:38;;12505:2;12494:9;12490:18;12477:32;-1:-1:-1;;;;;12524:6:45;12521:30;12518:50;;;12564:1;12561;12554:12;12518:50;12603:58;12653:7;12644:6;12633:9;12629:22;12603:58;:::i;:::-;12240:481;;12680:8;;-1:-1:-1;12577:84:45;;-1:-1:-1;;;;12240:481:45:o;12726:380::-;12805:1;12801:12;;;;12848;;;12869:61;;12923:4;12915:6;12911:17;12901:27;;12869:61;12976:2;12968:6;12965:14;12945:18;12942:38;12939:161;;;13022:10;13017:3;13013:20;13010:1;13003:31;13057:4;13054:1;13047:15;13085:4;13082:1;13075:15;12939:161;;12726:380;;;:::o;13111:811::-;13237:3;13266:1;13299:6;13293:13;13329:36;13355:9;13329:36;:::i;:::-;13384:1;13401:18;;;13428:104;;;;13546:1;13541:356;;;;13394:503;;13428:104;-1:-1:-1;;13461:24:45;;13449:37;;13506:16;;;;-1:-1:-1;13428:104:45;;13541:356;13572:6;13569:1;13562:17;13602:4;13647:2;13644:1;13634:16;13672:1;13686:165;13700:6;13697:1;13694:13;13686:165;;;13778:14;;13765:11;;;13758:35;13821:16;;;;13715:10;;13686:165;;;13690:3;;;13880:6;13875:3;13871:16;13864:23;;13394:503;-1:-1:-1;13913:3:45;;13111:811;-1:-1:-1;;;;;;13111:811:45:o;14348:557::-;14605:6;14597;14593:19;14582:9;14575:38;14649:3;14644:2;14633:9;14629:18;14622:31;14556:4;14676:46;14717:3;14706:9;14702:19;14694:6;14676:46;:::i;:::-;-1:-1:-1;;;;;14762:6:45;14758:31;14753:2;14742:9;14738:18;14731:59;14838:9;14830:6;14826:22;14821:2;14810:9;14806:18;14799:50;14866:33;14892:6;14884;14866:33;:::i;14910:274::-;15039:3;15077:6;15071:13;15093:53;15139:6;15134:3;15127:4;15119:6;15115:17;15093:53;:::i;:::-;15162:16;;;;;14910:274;-1:-1:-1;;14910:274:45:o;15189:356::-;15391:2;15373:21;;;15410:18;;;15403:30;15469:34;15464:2;15449:18;;15442:62;15536:2;15521:18;;15189:356::o;17202:413::-;17404:2;17386:21;;;17443:2;17423:18;;;17416:30;17482:34;17477:2;17462:18;;17455:62;-1:-1:-1;;;17548:2:45;17533:18;;17526:47;17605:3;17590:19;;17202:413::o;17620:127::-;17681:10;17676:3;17672:20;17669:1;17662:31;17712:4;17709:1;17702:15;17736:4;17733:1;17726:15;17752:168;17792:7;17858:1;17854;17850:6;17846:14;17843:1;17840:21;17835:1;17828:9;17821:17;17817:45;17814:71;;;17865:18;;:::i;:::-;-1:-1:-1;17905:9:45;;17752:168::o;17925:127::-;17986:10;17981:3;17977:20;17974:1;17967:31;18017:4;18014:1;18007:15;18041:4;18038:1;18031:15;18057:120;18097:1;18123;18113:35;;18128:18;;:::i;:::-;-1:-1:-1;18162:9:45;;18057:120::o;19005:344::-;19207:2;19189:21;;;19246:2;19226:18;;;19219:30;-1:-1:-1;;;19280:2:45;19265:18;;19258:50;19340:2;19325:18;;19005:344::o;19354:127::-;19415:10;19410:3;19406:20;19403:1;19396:31;19446:4;19443:1;19436:15;19470:4;19467:1;19460:15;19486:135;19525:3;-1:-1:-1;;19546:17:45;;19543:43;;;19566:18;;:::i;:::-;-1:-1:-1;19613:1:45;19602:13;;19486:135::o;20043:397::-;20245:2;20227:21;;;20284:2;20264:18;;;20257:30;20323:34;20318:2;20303:18;;20296:62;-1:-1:-1;;;20389:2:45;20374:18;;20367:31;20430:3;20415:19;;20043:397::o;20445:128::-;20485:3;20516:1;20512:6;20509:1;20506:13;20503:39;;;20522:18;;:::i;:::-;-1:-1:-1;20558:9:45;;20445:128::o;20578:125::-;20618:4;20646:1;20643;20640:8;20637:34;;;20651:18;;:::i;:::-;-1:-1:-1;20688:9:45;;20578:125::o;20708:405::-;20910:2;20892:21;;;20949:2;20929:18;;;20922:30;20988:34;20983:2;20968:18;;20961:62;-1:-1:-1;;;21054:2:45;21039:18;;21032:39;21103:3;21088:19;;20708:405::o;21534:347::-;21736:2;21718:21;;;21775:2;21755:18;;;21748:30;-1:-1:-1;;;21809:2:45;21794:18;;21787:53;21872:2;21857:18;;21534:347::o;21886:344::-;22088:2;22070:21;;;22127:2;22107:18;;;22100:30;-1:-1:-1;;;22161:2:45;22146:18;;22139:50;22221:2;22206:18;;21886:344::o;25322:642::-;25603:6;25591:19;;25573:38;;-1:-1:-1;;;;;25647:32:45;;25642:2;25627:18;;25620:60;25667:3;25711:2;25696:18;;25689:31;;;-1:-1:-1;;25743:46:45;;25769:19;;25761:6;25743:46;:::i;:::-;25839:6;25832:14;25825:22;25820:2;25809:9;25805:18;25798:50;25897:9;25889:6;25885:22;25879:3;25868:9;25864:19;25857:51;25925:33;25951:6;25943;25925:33;:::i;:::-;25917:41;25322:642;-1:-1:-1;;;;;;;;25322:642:45:o;25969:245::-;26048:6;26056;26109:2;26097:9;26088:7;26084:23;26080:32;26077:52;;;26125:1;26122;26115:12;26077:52;-1:-1:-1;;26148:16:45;;26204:2;26189:18;;;26183:25;26148:16;;26183:25;;-1:-1:-1;25969:245:45:o;26702:1484::-;27048:6;27040;27036:19;27025:9;27018:38;26999:4;27075:2;27113:3;27108:2;27097:9;27093:18;27086:31;27137:1;27170:6;27164:13;27200:36;27226:9;27200:36;:::i;:::-;27273:6;27267:3;27256:9;27252:19;27245:35;27299:3;27321:1;27353:2;27342:9;27338:18;27370:1;27365:122;;;;27501:1;27496:354;;;;27331:519;;27365:122;-1:-1:-1;;27413:24:45;;27393:18;;;27386:52;27473:3;27458:19;;;-1:-1:-1;27365:122:45;;27496:354;27527:6;27524:1;27517:17;27575:2;27572:1;27562:16;27600:1;27614:180;27628:6;27625:1;27622:13;27614:180;;;27721:14;;27697:17;;;27693:26;;27686:50;27764:16;;;;27643:10;;27614:180;;;27818:17;;27814:26;;;-1:-1:-1;;27331:519:45;;;;;;27895:9;27890:3;27886:19;27881:2;27870:9;27866:18;27859:47;27929:30;27955:3;27947:6;27929:30;:::i;:::-;27915:44;;;27968:46;28010:2;27999:9;27995:18;27987:6;27968:46;:::i;:::-;28023:47;28065:3;28054:9;28050:19;28042:6;28023:47;:::i;:::-;28119:9;28111:6;28107:22;28101:3;28090:9;28086:19;28079:51;28147:33;28173:6;28165;28147:33;:::i;:::-;28139:41;26702:1484;-1:-1:-1;;;;;;;;;26702:1484:45:o;28598:271::-;28781:6;28773;28768:3;28755:33;28737:3;28807:16;;28832:13;;;28807:16;28598:271;-1:-1:-1;28598:271:45:o;29229:718::-;29496:6;29488;29484:19;29473:9;29466:38;29540:3;29535:2;29524:9;29520:18;29513:31;29447:4;29567:46;29608:3;29597:9;29593:19;29585:6;29567:46;:::i;:::-;-1:-1:-1;;;;;29653:6:45;29649:31;29644:2;29633:9;29629:18;29622:59;29729:9;29721:6;29717:22;29712:2;29701:9;29697:18;29690:50;29764:6;29756;29749:22;29818:6;29810;29805:2;29797:6;29793:15;29780:45;29871:1;29866:2;29857:6;29849;29845:19;29841:28;29834:39;29938:2;29931;29927:7;29922:2;29914:6;29910:15;29906:29;29898:6;29894:42;29890:51;29882:59;;;29229:718;;;;;;;;:::o;30359:320::-;30446:6;30454;30507:2;30495:9;30486:7;30482:23;30478:32;30475:52;;;30523:1;30520;30513:12;30475:52;30555:9;30549:16;30574:31;30599:5;30574:31;:::i;:::-;30669:2;30654:18;;;;30648:25;30624:5;;30648:25;;-1:-1:-1;;;30359:320:45:o;32681:414::-;32883:2;32865:21;;;32922:2;32902:18;;;32895:30;32961:34;32956:2;32941:18;;32934:62;-1:-1:-1;;;33027:2:45;33012:18;;33005:48;33085:3;33070:19;;32681:414::o;33518:470::-;33697:3;33735:6;33729:13;33751:53;33797:6;33792:3;33785:4;33777:6;33773:17;33751:53;:::i;:::-;33867:13;;33826:16;;;;33889:57;33867:13;33826:16;33923:4;33911:17;;33889:57;:::i;:::-;33962:20;;33518:470;-1:-1:-1;;;;33518:470:45:o;33993:112::-;34025:1;34051;34041:35;;34056:18;;:::i;:::-;-1:-1:-1;34090:9:45;;33993:112::o;34110:489::-;-1:-1:-1;;;;;34379:15:45;;;34361:34;;34431:15;;34426:2;34411:18;;34404:43;34478:2;34463:18;;34456:34;;;34526:3;34521:2;34506:18;;34499:31;;;34304:4;;34547:46;;34573:19;;34565:6;34547:46;:::i;:::-;34539:54;34110:489;-1:-1:-1;;;;;;34110:489:45:o;34604:249::-;34673:6;34726:2;34714:9;34705:7;34701:23;34697:32;34694:52;;;34742:1;34739;34732:12;34694:52;34774:9;34768:16;34793:30;34817:5;34793:30;:::i;36244:127::-;36305:10;36300:3;36296:20;36293:1;36286:31;36336:4;36333:1;36326:15;36360:4;36357:1;36350:15

Swarm Source

ipfs://e0f865bdf439834e7c648e577fd0c6debd36f092a1efa14e5071c5f0513cd4ba
Loading