Token Ryoshi Tales VIP

Overview CRC721

Total Supply:
10,000 RTVIP

Holders:
159 addresses
Balance
2 RTVIP
0xd156f87ea9f25b7820582b460553ee621eddc258
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
RyoshiVIP

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

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

import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "../Drop.sol";
import "./LegacyVIP.sol";
import "./SeaDragonCro.sol";

contract RyoshiVIP is Drop, ERC1155Receiver {

    uint64 private constant VIP_ID = 2;
    LegacyVIP public legacyVip;
    SeaDragonCro public seaDragon;
    ERC1155 public memberships;
    uint public unlock;

    constructor(address _marketAddress, address _membershipContract)
        Drop(
            "Ryoshi Tales VIP",
            "RTVIP",
            "ipfs://",
            10000,
            4,
            0,
            _marketAddress
    ){
        setDefaultRoyalty(0xB5d4f12b5E7d8Ce43FECe177a6C75dF14994FBe6, 500);
        legacyVip = new LegacyVIP();
        seaDragon = new SeaDragonCro();
        memberships = ERC1155(_membershipContract);
        unlock = block.timestamp + 365 days;
    }

    function canMint(address _address) public view override returns(uint256){
        uint leftToMint = maxSupply - totalSupply();
        uint balance = memberships.balanceOf(_address, VIP_ID);
        if(leftToMint <= balance) return leftToMint;
        if(balance < 4) return balance;
        else return 4;
    }

    function mint(uint256 _mintAmount) public override payable whenNotPaused {
        revert("not mintable with CRO");
    }

    function mintWithToken(uint256 _mintAmount) external whenNotPaused {
        require(_mintAmount > 0 && _mintAmount <= 4, "invalid amount");
        require(memberships.balanceOf(msg.sender, VIP_ID) >= _mintAmount, "invalid balance");
        memberships.safeTransferFrom(msg.sender, address(this), VIP_ID, _mintAmount, "");
        legacyVip.mint(msg.sender, _mintAmount);
        seaDragon.mint(msg.sender, _mintAmount);
        uint toMint = _mintAmount * 10;
        for(uint16 i = 0; i < toMint; i++){
            _mintRandomId(msg.sender);
        }
    }

    function mintWithoutToken(uint _mintAmount, address _to) external onlyOwner {
        require(block.timestamp > unlock, "mint still active");
        for(uint16 i = 0; i < _mintAmount; i++){
            _mintRandomId(_to);
        }
    }

    function setLegacyURI(string calldata _metadata) external onlyOwner {
        legacyVip.setMetadata(_metadata);
    }

    function setDragonURI(string calldata _metadata) external onlyOwner {
        seaDragon.setMetadata(_metadata);
    }

    function setLegacyRoyalty(address  receiver, uint96 feeNumerator) external onlyOwner {
        legacyVip.setDefaultRoyalty(receiver, feeNumerator);
    }

    function setDragonRoyalty(address  receiver, uint96 feeNumerator) external onlyOwner {
        seaDragon.setDefaultRoyalty(receiver, feeNumerator);
    }

    function onERC1155Received(
        address operator,
        address,
        uint256,
        uint256,
        bytes calldata
    ) public virtual override returns (bytes4) {
        require(operator == address(this), "invalid operator");
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        revert("batches not accepted");
    }

     function supportsInterface(bytes4 interfaceId) public view virtual override(Drop, ERC1155Receiver) returns (bool){
        return ERC1155Receiver.supportsInterface(interfaceId) || Drop.supportsInterface(interfaceId);
     }
}

File 2 of 32 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 3 of 32 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);
    }

    /**
     * @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, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 4 of 32 : Drop.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import './RandomlyAssigned.sol';
import "./SafeMathLite.sol";
import "./SafePct.sol";

abstract contract Market {
    function isMember(address user) public view virtual returns (bool);
    function addToEscrow(address _address) external virtual payable;
}

contract Drop is 
    Pausable,
    ERC721Enumerable,
    Ownable, 
    RandomlyAssigned,
    ERC2981
{
    using Counters for Counters.Counter;
    using Strings for uint256;
    using SafePct for uint256;
    using SafeMathLite for uint256;

    string public baseURI;
    
    uint256 public regularCost;
    uint256 public memberCost;
    uint256 public whitelistCost;
    
    //Restrictions
    uint256 public maxSupply;
    uint256 public immutable reservedNft;
    uint256 public immutable maxMintAmount;
    uint16 public maxMintPerAddress = 0;

    Counters.Counter public reservedMintedNFT;

    address marketAddress;

    address[] private payees;
    uint16[] private shares;

    uint256 publicStartTime;
    uint256 whitelistStartTime;
    bool public whiteListPresaleOnly = false;

    struct Infos {
        uint256 regularCost;
        uint256 memberCost;
        uint256 whitelistCost;
        uint256 maxSupply;
        uint256 totalSupply;
        uint256 maxMintPerAddress;
        uint256 maxMintPerTx;
    }

    mapping(address => bool) public whitelistedAddresses;
    mapping(address => uint256) whitelistMinted;
    uint256 internal MAX_WHITELIST_MINT = 0;

    constructor(
        string memory name_,
        string memory symbol_,
        string memory baseURI_,
        uint256 maxSupply_,
        uint256 maxMintAmount_,
        uint256 reservedNFT_,
        address marketAddress_
    ) 
    ERC721(name_, symbol_)
    RandomlyAssigned(maxSupply_, reservedNFT_) 
    {
        setBaseURI(baseURI_);
        maxSupply = maxSupply_;
        maxMintAmount = maxMintAmount_;
        reservedNft = reservedNFT_;
        marketAddress = marketAddress_;
        _transferOwnership(tx.origin);
    }

    function getInfo() public view returns (Infos memory) {
        Infos memory allInfos;
        allInfos.regularCost = regularCost;
        allInfos.memberCost = memberCost;
        allInfos.whitelistCost = whitelistCost;
        allInfos.maxSupply = maxSupply;
        allInfos.totalSupply = totalSupply();
        allInfos.maxMintPerTx = maxMintAmount;
        allInfos.maxMintPerAddress = maxMintPerAddress;

        return allInfos;
    }

    function isEbisusBayMember(address _address) internal view returns(bool) {
        return Market(marketAddress).isMember(_address);
    }

    function addWhiteList(address[] calldata _addresses) public onlyOwner {
        uint len = _addresses.length;
        for(uint i = 0; i < len; i ++) {
            whitelistedAddresses[_addresses[i]] = true;
        }        
    }
    
    function addWhiteListAddress(address _address) public onlyOwner {
        whitelistedAddresses[_address] = true;
    }

    function _removeWhiteList(address _address) internal {
        if (whitelistedAddresses[_address]) {
            delete whitelistedAddresses[_address];
        }
    }

    function removeWhiteList(address _address) public onlyOwner {
        _removeWhiteList(_address);
    }

    function setRegularCost(uint256 _cost) public onlyOwner {
        regularCost = _cost;
    }

    function setMemberCost(uint256 _cost) public onlyOwner {
        memberCost = _cost;
    }

    function setWhitelistCost(uint256 _cost) public onlyOwner {
        whitelistCost = _cost;
    }

    function isWhitelist(address _address) public virtual view returns(bool) {
        return whitelistedAddresses[_address];
    }

    function setWhiteListPresaleOnly(bool _presaleOnly) public onlyOwner{
        whiteListPresaleOnly = _presaleOnly;
    }

    function isPresale() public view returns (bool) {
        if (block.timestamp < publicStartTime  && block.timestamp >= whitelistStartTime) {
            return true;
        } else {
            return false;
        }
    }

    function mint(uint256 _mintAmount) public virtual payable whenNotPaused {
        require(msg.sender == tx.origin, "contract not allowed");
        require(payees.length > 0, "no payees set");
        if(whitelistStartTime != 0){
            require(block.timestamp >= whitelistStartTime, "not started");
        }

        uint256 supply = totalSupply();
        require(_mintAmount > 0, "need to mint at least 1 NFT");
        require(
            _mintAmount <= maxMintAmount,
            "max mint amount per session exceeded"
        );
        require((supply + _mintAmount) <= maxSupply, "max NFT limit exceeded");

        uint256 maxQty = canMint(msg.sender);
        require(_mintAmount <= maxQty, "mint limit exceeded");

        if (isPresale()) {
            require(isWhitelist(msg.sender), "not whitelist");
            if (MAX_WHITELIST_MINT > 0) {
                whitelistMinted[msg.sender] += _mintAmount;
                require(whitelistMinted[msg.sender] <= MAX_WHITELIST_MINT, "exceed amount in presale");
            }
        }

        uint256 cost = mintCost(msg.sender);
        uint256 totalCost = cost.mul(_mintAmount);

        require(totalCost <= msg.value, "insufficient funds");

        for (uint256 i = 1; i <= _mintAmount; i++) {
            _mintRandomId(msg.sender);
        }
        
        uint256 len = payees.length;
        uint256 amount;
        for(uint256 i = 0; i < len; i ++) {
            amount = totalCost.mulDiv(shares[i], 10000);
            addToEscrow(amount, payees[i]);
        }  

        if(isWhitelist(msg.sender) && MAX_WHITELIST_MINT > 0){
            if(balanceOf(msg.sender) >= MAX_WHITELIST_MINT){
                _removeWhiteList(msg.sender);
            }
        }
    }

    function reservedMint(address _to, uint256 _mintAmount) external onlyOwner{
        require((reservedMintedNFT.current() + _mintAmount) <= reservedNft, "All Reserved NFT Minted");
        for (uint256 i = 1; i <= _mintAmount; i++) {
            reservedMintedNFT.increment();
            _safeMint(_to, reservedMintedNFT.current());
        }
    }

    function reservedMintByIds(address _to, uint256[] calldata _ids) external onlyOwner {
        uint256 supply = totalSupply();
        uint256 len = _ids.length;
        require((supply + len) <= maxSupply, "max NFT limit exceeded");
        
        for (uint256 i = 0; i < len; i++) {
            reserveToken(_ids[i]);
            _safeMint(_to, _ids[i]);
        }
    }

    function airdropMint(address _to, uint256 _amount) external onlyOwner {
        uint256 supply = totalSupply();
        require((supply + _amount) <= maxSupply, "max NFT limit exceeded");
        for (uint256 i = 1; i <= _amount; i++) {
            _mintRandomId(_to);
        }
    }

	function _mintRandomId(address to) internal {
		uint256 id = nextToken();
		require(id > 0 && id <= maxSupply, "Mint not possible");
		_safeMint(to, id);
	}    

    //Get NFT Cost
    function mintCost(address _address) public view virtual returns (uint256) {
        require(_address != address(0), "not address 0");
        if(whiteListPresaleOnly){
            if(isPresale() && isWhitelist(_address)){
                return whitelistCost;
            }
        } else {
            if(isWhitelist(_address)){
                return whitelistCost;
            }
        }

        if (isEbisusBayMember(_address)) {
            return memberCost;
        }

        return regularCost;
    }

    // Can Mint Function
    function canMint(address _address) public view virtual returns(uint256){
        uint leftToMint = maxSupply - totalSupply();
        uint maxPerAddressRemaining = maxMintPerAddress > 0 ? maxMintPerAddress - balanceOf(_address) : maxSupply;

        if (isPresale()) {
            if (!isWhitelist(_address)) return 0;
            if (MAX_WHITELIST_MINT > 0) {
                maxPerAddressRemaining = MAX_WHITELIST_MINT - balanceOf(_address);
            }
        }

        if(leftToMint > maxMintAmount) leftToMint = maxMintAmount;
        if(maxMintAmount > maxPerAddressRemaining) leftToMint = maxPerAddressRemaining;

        return leftToMint;
    }

    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
      require(_exists(_tokenId),"ERC721Metadata: URI query for nonexistent token");

      string memory _tokenURI = string(abi.encodePacked(baseURI, "/", Strings.toString(_tokenId),".json"));

      return _tokenURI;
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseURI = _newBaseURI;
    }

    function pause() public onlyOwner{
        _pause();
    }

    function unpause() public onlyOwner{
        _unpause();
    }
    
    // internal
    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    function burn(uint256 tokenId) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }

    function lock() external onlyOwner {
        maxSupply = totalSupply();
    }

    function setPaymentShares(address[] calldata _newPayees, uint16[] calldata _newShares) public onlyOwner {
        require(_newPayees.length != 0, "empty payees");
        require(_newPayees.length == _newShares.length, "wrong payee numbers");
        
        if (!isCorrectShares(_newShares)) {
            revert("invalid shares");
        }
        payees = _newPayees;
        shares = _newShares;
    }

    function getPayees() public view returns(address[] memory) {
        return payees;
    }

    function getShares() public view returns(uint16[] memory) {
        return shares;
    }

    function isCorrectShares(uint16[] memory _shares) private pure returns (bool){
        uint256 len = _shares.length;
        uint256 totalFees;
        for(uint256 i = 0; i < len; i ++) {
            totalFees += _shares[i];
        }

        return totalFees == 10000;
    }

    function setPublicStartTime(uint256 _startTime) public onlyOwner {
        publicStartTime = _startTime;
    }
    
    function setWhitelistStartTime(uint256 _startTime) public onlyOwner {
        whitelistStartTime = _startTime;
    }

    function setMaxWhiteList(uint256 _max) public onlyOwner {
        MAX_WHITELIST_MINT = _max;
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

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

    function addToEscrow(uint _amount, address _receipient) internal {
        Market market = Market(marketAddress);
        market.addToEscrow{value : _amount}(_receipient);
    }

    function setMaxMintPerAddress(uint16 maxAmount) public onlyOwner {
        maxMintPerAddress = maxAmount;
    }
}

File 5 of 32 : LegacyVIP.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract LegacyVIP is ERC721A, Ownable, ERC2981 {


    string metadata = "ipfs://QmNhAD1YXid7psdUxFRwLujiPJqiUSRk8UdpkCwncZ2SNW";


    constructor() ERC721A("Ebisu Legacy FM VIP", "LegacyVIP") {
         setDefaultRoyalty(0xB5d4f12b5E7d8Ce43FECe177a6C75dF14994FBe6, 500);
    }


    function setMetadata(string calldata _metadata) public onlyOwner {
        metadata = _metadata;
    }

    function mint(address _to, uint256 quantity) external onlyOwner {
        _mint(_to, quantity);
    }

    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
        return metadata;
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721A, ERC2981) returns (bool) {
        return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId);
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }
}

File 6 of 32 : SeaDragonCro.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract SeaDragonCro is ERC721A, Ownable, ERC2981 {


    event ClaimAptosTokens(address indexed claimer, uint indexed amount, string indexed aptosWallet);

    string metadata = "ipfs://QmVfpPWygypTXdik8e45hee7dcebPM9opkjCAPJPb69y9J";


    constructor() ERC721A("SeaShrine VIP", "SeaDragon") {
         setDefaultRoyalty(0xB5d4f12b5E7d8Ce43FECe177a6C75dF14994FBe6, 500);
    }


    function setMetadata(string calldata _metadata) public onlyOwner {
        metadata = _metadata;
    }

    function mint(address _to, uint256 quantity) external onlyOwner {
        _mint(_to, quantity);
    }

    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
        return metadata;
    }
    
    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function unsafe_inc(uint x) private pure returns (uint) {
        unchecked { return x + 1; }
    }

    function requestMigration(uint256[] calldata tokens, string calldata aptosWallet) external {
        uint len = tokens.length;
        for(uint i = 0; i < len; i = unsafe_inc(i)){
            _burn(tokens[i], true);
        }
        emit ClaimAptosTokens(msg.sender, len, aptosWallet);
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721A, ERC2981) returns (bool) {
        return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId);
    }
}

File 7 of 32 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 32 : 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 9 of 32 : 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 10 of 32 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 11 of 32 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev 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 32 : 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 14 of 32 : 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 15 of 32 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

File 16 of 32 : 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 17 of 32 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

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

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

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

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

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

File 18 of 32 : 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 19 of 32 : RandomlyAssigned.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import './WithLimitedSupply.sol';

/// @author Modified version of original code by 1001.digital
/// @title Randomly assign tokenIDs from a given set of tokens.
abstract contract RandomlyAssigned is WithLimitedSupply {
	// Used for random index assignment
	mapping(uint256 => uint256) private tokenMatrix;

	// The initial token ID
	uint256 private immutable startFrom;

	/// Instanciate the contract
	/// @param maxSupply_ how many tokens this collection should hold
	/// @param numReserved_ the number of tokens reserved whose IDs dont come from the randomizer
	constructor(uint256 maxSupply_, uint256 numReserved_)
    	WithLimitedSupply(maxSupply_, numReserved_)
	{
		startFrom = numReserved_ + 1;
	}

	/// Get the next token ID
	/// @dev Randomly gets a new token ID and keeps track of the ones that are still available.
	/// @return the next token ID
	function nextToken() internal override returns (uint256) {
		uint256 maxIndex = maxAvailableSupply() - tokenCount();
		uint256 random = uint256(
			keccak256(
				abi.encodePacked(
					msg.sender,
					block.coinbase,
					block.difficulty,
					block.gaslimit,
					block.timestamp
				)
			)
		) % maxIndex;

		uint256 value = 0;
		if (tokenMatrix[random] == 0) {
			// If this matrix position is empty, set the value to the generated random number.
			value = random;
		} else {
			// Otherwise, use the previously stored number from the matrix.
			value = tokenMatrix[random];
		}

		// If the last available tokenID is still unused...
		if (tokenMatrix[maxIndex - 1] == 0) {
			// ...store that ID in the current matrix position.
			tokenMatrix[random] = maxIndex - 1;
		} else {
			// ...otherwise copy over the stored number to the current matrix position.
			tokenMatrix[random] = tokenMatrix[maxIndex - 1];
		}

		// Increment counts (ie. qty minted)
		super.nextToken();

		return value + startFrom;
	}

	function reserveToken(uint _id) internal {
		require(tokenMatrix[_id - 1] == 0, 'token already reserved');
		uint256 maxIndex = maxAvailableSupply() - tokenCount();
		tokenMatrix[_id - 1] = maxIndex - 1;
		super.nextToken();
	}
}

File 20 of 32 : SafeMathLite.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
library SafeMathLite{

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

File 21 of 32 : SafePct.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @dev Compute percentages safely without phantom overflows.
 *
 * Intermediate operations can overflow even when the result will always
 * fit into computed type. Developers usually
 * assume that overflows raise errors. `SafePct` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */

import "./SafeMathLite.sol";

library SafePct {
    using SafeMathLite for uint256;
    /**
     * Requirements:
     *
     * - intermediate operations must revert on overflow
     */
    function mulDiv(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {
        require(z > 0, "Division by zero");

        if (x == 0) return 0;
        uint256 xy = x * y;
        if (xy / x == y) { // no overflow happened - same as in SafeMath mul
            return xy / z;
        }

        //slither-disable-next-line divide-before-multiply
        uint256 a = x / z;
        uint256 b = x % z; // x = a * z + b

        //slither-disable-next-line divide-before-multiply
        uint256 c = y / z;
        uint256 d = y % z; // y = c * z + d

        return (a.mul(c).mul(z)).add(a.mul(d)).add(b.mul(c)).add(b.mul(d).div(z));
    }


}

File 22 of 32 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (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);

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

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 23 of 32 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (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);

    /**
     * @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 24 of 32 : 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 25 of 32 : 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 26 of 32 : 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 27 of 32 : 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 28 of 32 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 29 of 32 : 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 30 of 32 : WithLimitedSupply.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @author Modified version of original code by 1001.digital
/// @title A token tracker that limits the token supply and increments token IDs on each new mint.
abstract contract WithLimitedSupply {
	// Keeps track of how many we have minted
	uint256 private _tokenCount;

	/// @dev The maximum count of tokens this token tracker will issue.
	uint256 private immutable _maxAvailableSupply;

	/// Instanciate the contract
	/// @param maxSupply_ how many tokens this collection should hold
	constructor(uint256 maxSupply_, uint256 reserved_) {
		_maxAvailableSupply = maxSupply_ - reserved_;
	}

	function maxAvailableSupply() public view returns (uint256) {
		return _maxAvailableSupply;
	}

	/// @dev Get the current token count
	/// @return the created token count
	/// TODO: if this is not required externally, does making it `public view` use unneccary gas?
	function tokenCount() public view returns (uint256) {
		return _tokenCount;
	}

	/// @dev Check whether tokens are still available
	/// @return the available token count
	function availableTokenCount() public view returns (uint256) {
		return maxAvailableSupply() - tokenCount();
	}

	/// @dev Increment the token count and fetch the latest count
	/// @return the next token id
	function nextToken() internal virtual ensureAvailability returns (uint256) {
		return _tokenCount++;
	}

	/// @dev Check whether another token is still available
	modifier ensureAvailability() {
		require(availableTokenCount() > 0, 'No more tokens available');
		_;
	}

	/// @param amount Check whether number of tokens are still available
	/// @dev Check whether tokens are still available
	modifier ensureAvailabilityFor(uint256 amount) {
		require(
			availableTokenCount() >= amount,
			'Requested number of tokens not available'
		);
		_;
	}
}

File 31 of 32 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

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

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

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

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

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

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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

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

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

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

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

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

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

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

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * 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) public payable virtual override {
        address owner = ownerOf(tokenId);

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

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

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

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

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

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

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

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

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

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

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

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

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

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

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

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

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

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

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

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

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

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

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

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

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

File 32 of 32 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_marketAddress","type":"address"},{"internalType":"address","name":"_membershipContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addWhiteListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"airdropMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"address","name":"_address","type":"address"}],"name":"canMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInfo","outputs":[{"components":[{"internalType":"uint256","name":"regularCost","type":"uint256"},{"internalType":"uint256","name":"memberCost","type":"uint256"},{"internalType":"uint256","name":"whitelistCost","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"maxMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"maxMintPerTx","type":"uint256"}],"internalType":"struct Drop.Infos","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPayees","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getShares","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legacyVip","outputs":[{"internalType":"contract LegacyVIP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxAvailableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerAddress","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"memberCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"memberships","outputs":[{"internalType":"contract ERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mintWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"mintWithoutToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regularCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"reservedMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"reservedMintByIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedMintedNFT","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seaDragon","outputs":[{"internalType":"contract SeaDragonCro","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDragonRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadata","type":"string"}],"name":"setDragonURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setLegacyRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadata","type":"string"}],"name":"setLegacyURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"maxAmount","type":"uint16"}],"name":"setMaxMintPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setMemberCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_newPayees","type":"address[]"},{"internalType":"uint16[]","name":"_newShares","type":"uint16[]"}],"name":"setPaymentShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setPublicStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setRegularCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_presaleOnly","type":"bool"}],"name":"setWhiteListPresaleOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setWhitelistCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setWhitelistStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whiteListPresaleOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

6101006040526015805461ffff19169055601c805460ff191690556000601f553480156200002c57600080fd5b5060405162008207380380620082078339810160408190526200004f916200055d565b604080518082018252601081526f052796f7368692054616c6573205649560841b6020808301918252835180850185526005815264052545649560dc1b8183015284518086019095526007855266697066733a2f2f60c81b918501919091526000805460ff1916815583519394919391926127109260049291899185918491839183918c918c91620000e4916001916200047e565b508051620000fa9060029060208401906200047e565b50505062000117620001116200026e60201b60201c565b62000272565b620001238183620005af565b6080525062000136905081600162000594565b60a0525062000147905085620002c4565b601484905560e083905260c0829052601780546001600160a01b0319166001600160a01b0383161790556200017c3262000272565b50505050505050620001ab73b5d4f12b5e7d8ce43fece177a6c75df14994fbe66101f46200032c60201b60201c565b604051620001b9906200050d565b604051809103906000f080158015620001d6573d6000803e3d6000fd5b50602080546001600160a01b0319166001600160a01b039290921691909117905560405162000205906200051b565b604051809103906000f08015801562000222573d6000803e3d6000fd5b50602180546001600160a01b03199081166001600160a01b03938416179091556022805490911691831691909117905562000262426301e1338062000594565b602355506200061c9050565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600b546001600160a01b03163314620003135760405162461bcd60e51b81526020600482018190526024820152600080516020620081e783398151915260448201526064015b60405180910390fd5b8051620003289060109060208401906200047e565b5050565b600b546001600160a01b03163314620003775760405162461bcd60e51b81526020600482018190526024820152600080516020620081e783398151915260448201526064016200030a565b6200032882826127106001600160601b0382161115620003ed5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016200030a565b6001600160a01b038216620004455760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200030a565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600e55565b8280546200048c90620005c9565b90600052602060002090601f016020900481019282620004b05760008555620004fb565b82601f10620004cb57805160ff1916838001178555620004fb565b82800160010185558215620004fb579182015b82811115620004fb578251825591602001919060010190620004de565b506200050992915062000529565b5090565b6118898062004e4b83390190565b611b1380620066d483390190565b5b808211156200050957600081556001016200052a565b80516001600160a01b03811681146200055857600080fd5b919050565b6000806040838503121562000570578182fd5b6200057b8362000540565b91506200058b6020840162000540565b90509250929050565b60008219821115620005aa57620005aa62000606565b500190565b600082821015620005c457620005c462000606565b500390565b600181811c90821680620005de57607f821691505b602082108114156200060057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60805160a05160c05160e0516147d26200067960003960008181610631015261195b015260008181610a1001526121060152600061348201526000818161055c0152818161259b01528181612e35015261334501526147d26000f3fe6080604052600436106104475760003560e01c8063715018a611610234578063c2ba47441161012e578063dc09e923116100b6578063ea798c6d1161007a578063ea798c6d14610dd8578063eba830d814610dee578063f23a6e6114610e0e578063f2fde38b14610e2e578063f83d08ba14610e4e57600080fd5b8063dc09e92314610d24578063e14ca35314610d44578063e1ec629414610d59578063e7b99ec714610d79578063e985e9c514610d8f57600080fd5b8063d49479eb116100fd578063d49479eb14610c8c578063d5abeb0114610cac578063d73fe0aa14610cc2578063da7f07ca14610ce4578063db8cc8fa14610d0457600080fd5b8063c2ba474414610bf3578063c683630d14610c13578063c87b56dd14610c4c578063cbd5380014610c6c57600080fd5b80639f181b5e116101bc578063b42fa83d11610180578063b42fa83d14610b44578063b7a34c8a14610b5a578063b88d4fde14610b7a578063b88fe6a314610b9a578063bc197c8114610bba57600080fd5b80639f181b5e14610ac6578063a0712d6814610adb578063a22cb46514610aee578063a69df4b514610b0e578063b3eaff8b14610b2457600080fd5b80638456cb59116102035780638456cb5914610a525780638da5cb5b14610a675780638dbe817f14610a8557806395364a8414610a9c57806395d89b4114610ab157600080fd5b8063715018a6146109c957806379a2c3f8146109de5780637fa7c50b146109fe5780638164c30914610a3257600080fd5b80632f13265d116103455780635a9b0b89116102cd57806366c47a361161029157806366c47a36146109345780636c0360eb146109545780636cec4dfe146109695780636f8d95761461098957806370a08231146109a957600080fd5b80635a9b0b89146108575780635c83ca47146108c25780635c975abb146108dc5780635e1045ec146108f45780636352211e1461091457600080fd5b806342842e0e1161031457806342842e0e146107a957806342966c68146107c95780634f6ccce7146107e957806355f804b314610809578063572849c41461082957600080fd5b80632f13265d146107345780632f745c5914610754578063391e6bdc146107745780633f4ba83a1461079457600080fd5b80632042e5c2116103d35780632474c33f116103975780632474c33f1461067357806327f38113146106935780632a55205a146106b55780632ac496e0146106f45780632acc659e1461071457600080fd5b80632042e5c2146105bf57806322ad0670146105df57806322c515d1146105ff578063239c70ae1461061f57806323b872dd1461065357600080fd5b8063081812fc1161041a578063081812fc146104f5578063095ea7b31461052d57806315f91c181461054d57806318160ddd1461058a5780631c0ce3d31461059f57600080fd5b806301ffc9a71461044c57806304634d8d1461048157806306c933d8146104a357806306fdde03146104d3575b600080fd5b34801561045857600080fd5b5061046c61046736600461418b565b610e63565b60405190151581526020015b60405180910390f35b34801561048d57600080fd5b506104a161049c366004614076565b610e83565b005b3480156104af57600080fd5b5061046c6104be366004613dc1565b601d6020526000908152604090205460ff1681565b3480156104df57600080fd5b506104e8610ec4565b60405161047891906144d7565b34801561050157600080fd5b5061051561051036600461425d565b610f56565b6040516001600160a01b039091168152602001610478565b34801561053957600080fd5b506104a161054836600461404d565b610feb565b34801561055957600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b604051908152602001610478565b34801561059657600080fd5b5060095461057c565b3480156105ab57600080fd5b506104a16105ba36600461425d565b611101565b3480156105cb57600080fd5b506104a16105da366004613dc1565b611130565b3480156105eb57600080fd5b506104a16105fa36600461404d565b611166565b34801561060b57600080fd5b50602054610515906001600160a01b031681565b34801561062b57600080fd5b5061057c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065f57600080fd5b506104a161066e366004613eb2565b61121d565b34801561067f57600080fd5b506104a161068e3660046141c3565b61124f565b34801561069f57600080fd5b506106a86112e1565b604051610478919061441f565b3480156106c157600080fd5b506106d56106d03660046142af565b611342565b604080516001600160a01b039093168352602083019190915201610478565b34801561070057600080fd5b506104a161070f366004614153565b6113f0565b34801561072057600080fd5b5061057c61072f366004613dc1565b61142d565b34801561074057600080fd5b506104a161074f366004613fc7565b611505565b34801561076057600080fd5b5061057c61076f36600461404d565b61160f565b34801561078057600080fd5b506104a161078f366004614076565b6116a5565b3480156107a057600080fd5b506104a1611710565b3480156107b557600080fd5b506104a16107c4366004613eb2565b611744565b3480156107d557600080fd5b506104a16107e436600461425d565b61175f565b3480156107f557600080fd5b5061057c61080436600461425d565b6117d6565b34801561081557600080fd5b506104a16108243660046141f6565b611877565b34801561083557600080fd5b506015546108449061ffff1681565b60405161ffff9091168152602001610478565b34801561086357600080fd5b5061086c6118b4565b6040516104789190600060e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015292915050565b3480156108ce57600080fd5b50601c5461046c9060ff1681565b3480156108e857600080fd5b5060005460ff1661046c565b34801561090057600080fd5b506104a161090f3660046140ac565b611990565b34801561092057600080fd5b5061051561092f36600461425d565b611a3b565b34801561094057600080fd5b50602154610515906001600160a01b031681565b34801561096057600080fd5b506104e8611ab2565b34801561097557600080fd5b506104a16109843660046141c3565b611b40565b34801561099557600080fd5b506104a16109a4366004614076565b611b9c565b3480156109b557600080fd5b5061057c6109c4366004613dc1565b611c07565b3480156109d557600080fd5b506104a1611c8e565b3480156109ea57600080fd5b506104a16109f936600461423b565b611cc2565b348015610a0a57600080fd5b5061057c7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a3e57600080fd5b506104a1610a4d366004613dc1565b611d04565b348015610a5e57600080fd5b506104a1611d52565b348015610a7357600080fd5b50600b546001600160a01b0316610515565b348015610a9157600080fd5b5060165461057c9081565b348015610aa857600080fd5b5061046c611d84565b348015610abd57600080fd5b506104e8611daa565b348015610ad257600080fd5b50600c5461057c565b6104a1610ae936600461425d565b611db9565b348015610afa57600080fd5b506104a1610b09366004614017565b611e1c565b348015610b1a57600080fd5b5061057c60235481565b348015610b3057600080fd5b506104a1610b3f36600461425d565b611e27565b348015610b5057600080fd5b5061057c60125481565b348015610b6657600080fd5b506104a1610b7536600461404d565b6120da565b348015610b8657600080fd5b506104a1610b95366004613eed565b6121c3565b348015610ba657600080fd5b50602254610515906001600160a01b031681565b348015610bc657600080fd5b50610bda610bd5366004613e0d565b6121f5565b6040516001600160e01b03199091168152602001610478565b348015610bff57600080fd5b5061057c610c0e366004613dc1565b612237565b348015610c1f57600080fd5b5061046c610c2e366004613dc1565b6001600160a01b03166000908152601d602052604090205460ff1690565b348015610c5857600080fd5b506104e8610c6736600461425d565b612302565b348015610c7857600080fd5b506104a1610c8736600461425d565b6123b6565b348015610c9857600080fd5b506104a1610ca736600461425d565b6123e5565b348015610cb857600080fd5b5061057c60145481565b348015610cce57600080fd5b50610cd7612414565b604051610478919061446c565b348015610cf057600080fd5b506104a1610cff36600461428d565b612493565b348015610d1057600080fd5b506104a1610d1f36600461425d565b61252c565b348015610d3057600080fd5b506104a1610d3f36600461425d565b61255b565b348015610d5057600080fd5b5061057c61258a565b348015610d6557600080fd5b506104a1610d7436600461425d565b6125c4565b348015610d8557600080fd5b5061057c60135481565b348015610d9b57600080fd5b5061046c610daa366004613ddb565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610de457600080fd5b5061057c60115481565b348015610dfa57600080fd5b506104a1610e093660046140eb565b6125f3565b348015610e1a57600080fd5b50610bda610e29366004613f52565b612737565b348015610e3a57600080fd5b506104a1610e49366004613dc1565b612797565b348015610e5a57600080fd5b506104a161282f565b6000610e6e82612861565b80610e7d5750610e7d82612882565b92915050565b600b546001600160a01b03163314610eb65760405162461bcd60e51b8152600401610ead90614566565b60405180910390fd5b610ec0828261288d565b5050565b606060018054610ed3906146aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610eff906146aa565b8015610f4c5780601f10610f2157610100808354040283529160200191610f4c565b820191906000526020600020905b815481529060010190602001808311610f2f57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610fcf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ead565b506000908152600560205260409020546001600160a01b031690565b6000610ff682611a3b565b9050806001600160a01b0316836001600160a01b031614156110645760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ead565b336001600160a01b038216148061108057506110808133610daa565b6110f25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ead565b6110fc838361298a565b505050565b600b546001600160a01b0316331461112b5760405162461bcd60e51b8152600401610ead90614566565b601b55565b600b546001600160a01b0316331461115a5760405162461bcd60e51b8152600401610ead90614566565b611163816129f8565b50565b600b546001600160a01b031633146111905760405162461bcd60e51b8152600401610ead90614566565b600061119b60095490565b6014549091506111ab838361461c565b11156111f25760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ead565b60015b8281116112175761120584612a3a565b8061120f81614707565b9150506111f5565b50505050565b611228335b82612aa2565b6112445760405162461bcd60e51b8152600401610ead9061459b565b6110fc838383612b99565b600b546001600160a01b031633146112795760405162461bcd60e51b8152600401610ead90614566565b60205460405163a49a1e7d60e01b81526001600160a01b039091169063a49a1e7d906112ab90859085906004016144a8565b600060405180830381600087803b1580156112c557600080fd5b505af11580156112d9573d6000803e3d6000fd5b505050505050565b60606018805480602002602001604051908101604052809291908181526020018280548015610f4c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161131b575050505050905090565b6000828152600f602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916113b7575060408051808201909152600e546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906113d6906001600160601b031687614648565b6113e09190614634565b91519350909150505b9250929050565b600b546001600160a01b0316331461141a5760405162461bcd60e51b8152600401610ead90614566565b601c805460ff1916911515919091179055565b60006001600160a01b0382166114755760405162461bcd60e51b815260206004820152600d60248201526c06e6f742061646472657373203609c1b6044820152606401610ead565b601c5460ff16156114be57611488611d84565b80156114ac57506001600160a01b0382166000908152601d602052604090205460ff165b156114b957505060135490565b6114e7565b6001600160a01b0382166000908152601d602052604090205460ff16156114e757505060135490565b6114f082612d40565b156114fd57505060125490565b505060115490565b600b546001600160a01b0316331461152f5760405162461bcd60e51b8152600401610ead90614566565b600061153a60095490565b601454909150829061154c828461461c565b11156115935760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ead565b60005b818110156112d9576115cd8585838181106115c157634e487b7160e01b600052603260045260246000fd5b90506020020135612dbe565b6115fd868686848181106115f157634e487b7160e01b600052603260045260246000fd5b90506020020135612e8e565b8061160781614707565b915050611596565b600061161a83611c07565b821061167c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ead565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b600b546001600160a01b031633146116cf5760405162461bcd60e51b8152600401610ead90614566565b6020546040516304634d8d60e01b81526001600160a01b0384811660048301526001600160601b0384166024830152909116906304634d8d906044016112ab565b600b546001600160a01b0316331461173a5760405162461bcd60e51b8152600401610ead90614566565b611742612ea8565b565b6110fc838383604051806020016040528060008152506121c3565b61176833611222565b6117cd5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610ead565b61116381612f3b565b60006117e160095490565b82106118445760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ead565b6009828154811061186557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600b546001600160a01b031633146118a15760405162461bcd60e51b8152600401610ead90614566565b8051610ec0906010906020840190613a95565b6118f46040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6119346040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b601154815260125460208201526013546040820152601454606082015260095460808201527f000000000000000000000000000000000000000000000000000000000000000060c082015260155461ffff1660a0820152919050565b600b546001600160a01b031633146119ba5760405162461bcd60e51b8152600401610ead90614566565b8060005b81811015611217576001601d60008686858181106119ec57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611a019190613dc1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611a3381614707565b9150506119be565b6000818152600360205260408120546001600160a01b031680610e7d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610ead565b60108054611abf906146aa565b80601f0160208091040260200160405190810160405280929190818152602001828054611aeb906146aa565b8015611b385780601f10611b0d57610100808354040283529160200191611b38565b820191906000526020600020905b815481529060010190602001808311611b1b57829003601f168201915b505050505081565b600b546001600160a01b03163314611b6a5760405162461bcd60e51b8152600401610ead90614566565b60215460405163a49a1e7d60e01b81526001600160a01b039091169063a49a1e7d906112ab90859085906004016144a8565b600b546001600160a01b03163314611bc65760405162461bcd60e51b8152600401610ead90614566565b6021546040516304634d8d60e01b81526001600160a01b0384811660048301526001600160601b0384166024830152909116906304634d8d906044016112ab565b60006001600160a01b038216611c725760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610ead565b506001600160a01b031660009081526004602052604090205490565b600b546001600160a01b03163314611cb85760405162461bcd60e51b8152600401610ead90614566565b6117426000612fe2565b600b546001600160a01b03163314611cec5760405162461bcd60e51b8152600401610ead90614566565b6015805461ffff191661ffff92909216919091179055565b600b546001600160a01b03163314611d2e5760405162461bcd60e51b8152600401610ead90614566565b6001600160a01b03166000908152601d60205260409020805460ff19166001179055565b600b546001600160a01b03163314611d7c5760405162461bcd60e51b8152600401610ead90614566565b611742613034565b6000601a5442108015611d995750601b544210155b15611da45750600190565b50600090565b606060028054610ed3906146aa565b60005460ff1615611ddc5760405162461bcd60e51b8152600401610ead9061453c565b60405162461bcd60e51b81526020600482015260156024820152746e6f74206d696e7461626c6520776974682043524f60581b6044820152606401610ead565b610ec033838361308c565b60005460ff1615611e4a5760405162461bcd60e51b8152600401610ead9061453c565b600081118015611e5b575060048111155b611e985760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908185b5bdd5b9d60921b6044820152606401610ead565b602254604051627eeac760e11b81523360048201526002602482015282916001600160a01b03169062fdd58e9060440160206040518083038186803b158015611ee057600080fd5b505afa158015611ef4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f189190614275565b1015611f585760405162461bcd60e51b815260206004820152600f60248201526e696e76616c69642062616c616e636560881b6044820152606401610ead565b602254604051637921219560e11b8152336004820152306024820152600260448201526064810183905260a06084820152600060a48201526001600160a01b039091169063f242432a9060c401600060405180830381600087803b158015611fbf57600080fd5b505af1158015611fd3573d6000803e3d6000fd5b50506020546040516340c10f1960e01b8152336004820152602481018590526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b15801561202357600080fd5b505af1158015612037573d6000803e3d6000fd5b50506021546040516340c10f1960e01b8152336004820152602481018590526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b15801561208757600080fd5b505af115801561209b573d6000803e3d6000fd5b50505050600081600a6120ae9190614648565b905060005b818161ffff1610156110fc576120c833612a3a565b806120d2816146e5565b9150506120b3565b600b546001600160a01b031633146121045760405162461bcd60e51b8152600401610ead90614566565b7f00000000000000000000000000000000000000000000000000000000000000008161212f60165490565b612139919061461c565b11156121875760405162461bcd60e51b815260206004820152601760248201527f416c6c205265736572766564204e4654204d696e7465640000000000000000006044820152606401610ead565b60015b8181116110fc5761219f601680546001019055565b6121b1836121ac60165490565b612e8e565b806121bb81614707565b91505061218a565b6121cd3383612aa2565b6121e95760405162461bcd60e51b8152600401610ead9061459b565b6112178484848461315b565b60405162461bcd60e51b815260206004820152601460248201527318985d18da195cc81b9bdd081858d8d95c1d195960621b6044820152600090606401610ead565b60008061224360095490565b6014546122509190614667565b602254604051627eeac760e11b81526001600160a01b038681166004830152600260248301529293506000929091169062fdd58e9060440160206040518083038186803b1580156122a057600080fd5b505afa1580156122b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d89190614275565b90508082116122e8575092915050565b60048110156122f8579392505050565b5060049392505050565b6000818152600360205260409020546060906001600160a01b03166123815760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610ead565b6000601061238e8461318e565b60405160200161239f929190614318565b60408051601f198184030181529190529392505050565b600b546001600160a01b031633146123e05760405162461bcd60e51b8152600401610ead90614566565b601f55565b600b546001600160a01b0316331461240f5760405162461bcd60e51b8152600401610ead90614566565b601355565b60606019805480602002602001604051908101604052809291908181526020018280548015610f4c57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116124515790505050505050905090565b600b546001600160a01b031633146124bd5760405162461bcd60e51b8152600401610ead90614566565b60235442116125025760405162461bcd60e51b81526020600482015260116024820152706d696e74207374696c6c2061637469766560781b6044820152606401610ead565b60005b828161ffff1610156110fc5761251a82612a3a565b80612524816146e5565b915050612505565b600b546001600160a01b031633146125565760405162461bcd60e51b8152600401610ead90614566565b601a55565b600b546001600160a01b031633146125855760405162461bcd60e51b8152600401610ead90614566565b601255565b6000612595600c5490565b6125bf907f0000000000000000000000000000000000000000000000000000000000000000614667565b905090565b600b546001600160a01b031633146125ee5760405162461bcd60e51b8152600401610ead90614566565b601155565b600b546001600160a01b0316331461261d5760405162461bcd60e51b8152600401610ead90614566565b826126595760405162461bcd60e51b815260206004820152600c60248201526b656d7074792070617965657360a01b6044820152606401610ead565b82811461269e5760405162461bcd60e51b815260206004820152601360248201527277726f6e67207061796565206e756d6265727360681b6044820152606401610ead565b6126da8282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506132a792505050565b6127175760405162461bcd60e51b815260206004820152600e60248201526d696e76616c69642073686172657360901b6044820152606401610ead565b61272360188585613b19565b5061273060198383613b6c565b5050505050565b60006001600160a01b03871630146127845760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b21037b832b930ba37b960811b6044820152606401610ead565b5063f23a6e6160e01b9695505050505050565b600b546001600160a01b031633146127c15760405162461bcd60e51b8152600401610ead90614566565b6001600160a01b0381166128265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ead565b61116381612fe2565b600b546001600160a01b031633146128595760405162461bcd60e51b8152600401610ead90614566565b600954601455565b60006001600160e01b03198216630271189760e51b1480610e7d5750610e7d825b6000610e7d8261330e565b6127106001600160601b03821611156128fb5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610ead565b6001600160a01b0382166129515760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610ead565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600e55565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906129bf82611a3b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0381166000908152601d602052604090205460ff1615611163576001600160a01b03166000908152601d60205260409020805460ff19169055565b6000612a44613333565b9050600081118015612a5857506014548111155b612a985760405162461bcd60e51b81526020600482015260116024820152704d696e74206e6f7420706f737369626c6560781b6044820152606401610ead565b610ec08282612e8e565b6000818152600360205260408120546001600160a01b0316612b1b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ead565b6000612b2683611a3b565b9050806001600160a01b0316846001600160a01b03161480612b615750836001600160a01b0316612b5684610f56565b6001600160a01b0316145b80612b9157506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612bac82611a3b565b6001600160a01b031614612c105760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610ead565b6001600160a01b038216612c725760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ead565b612c7d8383836134af565b612c8860008261298a565b6001600160a01b0383166000908152600460205260408120805460019290612cb1908490614667565b90915550506001600160a01b0382166000908152600460205260408120805460019290612cdf90849061461c565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60175460405163288c314960e21b81526001600160a01b038381166004830152600092169063a230c5249060240160206040518083038186803b158015612d8657600080fd5b505afa158015612d9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7d919061416f565b600d6000612dcd600184614667565b815260200190815260200160002054600014612e245760405162461bcd60e51b81526020600482015260166024820152751d1bdad95b88185b1c9958591e481c995cd95c9d995960521b6044820152606401610ead565b6000612e2f600c5490565b612e59907f0000000000000000000000000000000000000000000000000000000000000000614667565b9050612e66600182614667565b600d6000612e75600186614667565b81526020810191909152604001600020556110fc613567565b610ec08282604051806020016040528060008152506135d8565b60005460ff16612ef15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ead565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000612f4682611a3b565b9050612f54816000846134af565b612f5f60008361298a565b6001600160a01b0381166000908152600460205260408120805460019290612f88908490614667565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005460ff16156130575760405162461bcd60e51b8152600401610ead9061453c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612f1e3390565b816001600160a01b0316836001600160a01b031614156130ee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ead565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613166848484612b99565b6131728484848461360b565b6112175760405162461bcd60e51b8152600401610ead906144ea565b6060816131b25750506040805180820190915260018152600360fc1b602082015290565b8160005b81156131dc57806131c681614707565b91506131d59050600a83614634565b91506131b6565b6000816001600160401b0381111561320457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561322e576020820181803683370190505b5090505b8415612b9157613243600183614667565b9150613250600a86614722565b61325b90603061461c565b60f81b81838151811061327e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506132a0600a86614634565b9450613232565b805160009081805b82811015613302578481815181106132d757634e487b7160e01b600052603260045260246000fd5b602002602001015161ffff16826132ee919061461c565b9150806132fa81614707565b9150506132af565b50612710149392505050565b60006001600160e01b0319821663152a902d60e11b1480610e7d5750610e7d82613718565b60008061333f600c5490565b613369907f0000000000000000000000000000000000000000000000000000000000000000614667565b6040516bffffffffffffffffffffffff1933606090811b8216602084015241901b166034820152446048820152456068820152426088820152909150600090829060a8016040516020818303038152906040528051906020012060001c6133d09190614722565b6000818152600d6020526040812054919250906133ee5750806133ff565b506000818152600d60205260409020545b600d600061340e600186614667565b8152602001908152602001600020546000141561344457613430600184614667565b6000838152600d6020526040902055613474565b600d6000613453600186614667565b81526020808201929092526040908101600090812054858252600d90935220555b61347c613567565b506134a77f00000000000000000000000000000000000000000000000000000000000000008261461c565b935050505090565b6001600160a01b03831661350a5761350581600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b61352d565b816001600160a01b0316836001600160a01b03161461352d5761352d838261373d565b6001600160a01b038216613544576110fc816137da565b826001600160a01b0316826001600160a01b0316146110fc576110fc82826138b3565b60008061357261258a565b116135bf5760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610ead565b600c80549060006135cf83614707565b91905055905090565b6135e283836138f7565b6135ef600084848461360b565b6110fc5760405162461bcd60e51b8152600401610ead906144ea565b60006001600160a01b0384163b1561370d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061364f9033908990889088906004016143e2565b602060405180830381600087803b15801561366957600080fd5b505af1925050508015613699575060408051601f3d908101601f19168201909252613696918101906141a7565b60015b6136f3573d8080156136c7576040519150601f19603f3d011682016040523d82523d6000602084013e6136cc565b606091505b5080516136eb5760405162461bcd60e51b8152600401610ead906144ea565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b91565b506001949350505050565b60006001600160e01b0319821663780e9d6360e01b1480610e7d5750610e7d82613a45565b6000600161374a84611c07565b6137549190614667565b6000838152600860205260409020549091508082146137a7576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906137ec90600190614667565b6000838152600a60205260408120546009805493945090928490811061382257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061385157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061389757634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006138be83611c07565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b03821661394d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ead565b6000818152600360205260409020546001600160a01b0316156139b25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ead565b6139be600083836134af565b6001600160a01b03821660009081526004602052604081208054600192906139e790849061461c565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b031982166380ac58cd60e01b1480613a7657506001600160e01b03198216635b5e139f60e01b145b80610e7d57506301ffc9a760e01b6001600160e01b0319831614610e7d565b828054613aa1906146aa565b90600052602060002090601f016020900481019282613ac35760008555613b09565b82601f10613adc57805160ff1916838001178555613b09565b82800160010185558215613b09579182015b82811115613b09578251825591602001919060010190613aee565b50613b15929150613c10565b5090565b828054828255906000526020600020908101928215613b09579160200282015b82811115613b095781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190613b39565b82805482825590600052602060002090600f01601090048101928215613b095791602002820160005b83821115613bd957833561ffff1683826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302613b95565b8015613c075782816101000a81549061ffff0219169055600201602081600101049283019260010302613bd9565b5050613b159291505b5b80821115613b155760008155600101613c11565b60006001600160401b03831115613c3e57613c3e614762565b613c51601f8401601f19166020016145ec565b9050828152838383011115613c6557600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114613c9357600080fd5b919050565b60008083601f840112613ca9578182fd5b5081356001600160401b03811115613cbf578182fd5b6020830191508360208260051b85010111156113e957600080fd5b600082601f830112613cea578081fd5b813560206001600160401b03821115613d0557613d05614762565b8160051b613d148282016145ec565b838152828101908684018388018501891015613d2e578687fd5b8693505b85841015613d50578035835260019390930192918401918401613d32565b50979650505050505050565b60008083601f840112613d6d578182fd5b5081356001600160401b03811115613d83578182fd5b6020830191508360208285010111156113e957600080fd5b600082601f830112613dab578081fd5b613dba83833560208501613c25565b9392505050565b600060208284031215613dd2578081fd5b613dba82613c7c565b60008060408385031215613ded578081fd5b613df683613c7c565b9150613e0460208401613c7c565b90509250929050565b600080600080600060a08688031215613e24578081fd5b613e2d86613c7c565b9450613e3b60208701613c7c565b935060408601356001600160401b0380821115613e56578283fd5b613e6289838a01613cda565b94506060880135915080821115613e77578283fd5b613e8389838a01613cda565b93506080880135915080821115613e98578283fd5b50613ea588828901613d9b565b9150509295509295909350565b600080600060608486031215613ec6578283fd5b613ecf84613c7c565b9250613edd60208501613c7c565b9150604084013590509250925092565b60008060008060808587031215613f02578384fd5b613f0b85613c7c565b9350613f1960208601613c7c565b92506040850135915060608501356001600160401b03811115613f3a578182fd5b613f4687828801613d9b565b91505092959194509250565b60008060008060008060a08789031215613f6a578384fd5b613f7387613c7c565b9550613f8160208801613c7c565b9450604087013593506060870135925060808701356001600160401b03811115613fa9578182fd5b613fb589828a01613d5c565b979a9699509497509295939492505050565b600080600060408486031215613fdb578081fd5b613fe484613c7c565b925060208401356001600160401b03811115613ffe578182fd5b61400a86828701613c98565b9497909650939450505050565b60008060408385031215614029578182fd5b61403283613c7c565b9150602083013561404281614778565b809150509250929050565b6000806040838503121561405f578182fd5b61406883613c7c565b946020939093013593505050565b60008060408385031215614088578182fd5b61409183613c7c565b915060208301356001600160601b0381168114614042578182fd5b600080602083850312156140be578182fd5b82356001600160401b038111156140d3578283fd5b6140df85828601613c98565b90969095509350505050565b60008060008060408587031215614100578182fd5b84356001600160401b0380821115614116578384fd5b61412288838901613c98565b9096509450602087013591508082111561413a578384fd5b5061414787828801613c98565b95989497509550505050565b600060208284031215614164578081fd5b8135613dba81614778565b600060208284031215614180578081fd5b8151613dba81614778565b60006020828403121561419c578081fd5b8135613dba81614786565b6000602082840312156141b8578081fd5b8151613dba81614786565b600080602083850312156141d5578182fd5b82356001600160401b038111156141ea578283fd5b6140df85828601613d5c565b600060208284031215614207578081fd5b81356001600160401b0381111561421c578182fd5b8201601f8101841361422c578182fd5b612b9184823560208401613c25565b60006020828403121561424c578081fd5b813561ffff81168114613dba578182fd5b60006020828403121561426e578081fd5b5035919050565b600060208284031215614286578081fd5b5051919050565b6000806040838503121561429f578182fd5b82359150613e0460208401613c7c565b600080604083850312156142c1578182fd5b50508035926020909101359150565b600081518084526142e881602086016020860161467e565b601f01601f19169290920160200192915050565b6000815161430e81856020860161467e565b9290920192915050565b600080845482600182811c91508083168061433457607f831692505b602080841082141561435457634e487b7160e01b87526022600452602487fd5b8180156143685760018114614379576143a5565b60ff198616895284890196506143a5565b60008b815260209020885b8681101561439d5781548b820152908501908301614384565b505084890196505b5050505050506143d96143c86143c283602f60f81b815260010190565b866142fc565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614415908301846142d0565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156144605783516001600160a01b03168352928401929184019160010161443b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561446057835161ffff1683529284019291840191600101614488565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b602081526000613dba60208301846142d0565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b038111828210171561461457614614614762565b604052919050565b6000821982111561462f5761462f614736565b500190565b6000826146435761464361474c565b500490565b600081600019048311821515161561466257614662614736565b500290565b60008282101561467957614679614736565b500390565b60005b83811015614699578181015183820152602001614681565b838111156112175750506000910152565b600181811c908216806146be57607f821691505b602082108114156146df57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156146fd576146fd614736565b6001019392505050565b600060001982141561471b5761471b614736565b5060010190565b6000826147315761473161474c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461116357600080fd5b6001600160e01b03198116811461116357600080fdfea2646970667358221220bc74ffe4b5f8491a27d3b6bbe3122903818df937efa24f4da0f3930d2c0fe72d64736f6c6343000804003360e060405260356080818152906200185460a03980516200002991600b91602090910190620002b1565b503480156200003757600080fd5b50604080518082018252601381527f4562697375204c656761637920464d205649500000000000000000000000000060208083019182528351808501909452600984526804c65676163795649560bc1b9084015281519192916200009e91600291620002b1565b508051620000b4906003906020840190620002b1565b50506000805550620000c633620000ee565b620000e873b5d4f12b5e7d8ce43fece177a6c75df14994fbe66101f462000140565b62000394565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6008546001600160a01b03163314620001a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b620001ac8282620001b0565b5050565b6127106001600160601b0382161115620002205760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840162000197565b6001600160a01b038216620002785760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000197565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b828054620002bf9062000357565b90600052602060002090601f016020900481019282620002e357600085556200032e565b82601f10620002fe57805160ff19168380011785556200032e565b828001600101855582156200032e579182015b828111156200032e57825182559160200191906001019062000311565b506200033c92915062000340565b5090565b5b808211156200033c576000815560010162000341565b600181811c908216806200036c57607f821691505b602082108114156200038e57634e487b7160e01b600052602260045260246000fd5b50919050565b6114b080620003a46000396000f3fe60806040526004361061012a5760003560e01c80636352211e116100ab578063a22cb4651161006f578063a22cb46514610323578063a49a1e7d14610343578063b88d4fde14610363578063c87b56dd14610376578063e985e9c514610396578063f2fde38b146103df57600080fd5b80636352211e1461029b57806370a08231146102bb578063715018a6146102db5780638da5cb5b146102f057806395d89b411461030e57600080fd5b806318160ddd116100f257806318160ddd146101f357806323b872dd146102165780632a55205a1461022957806340c10f191461026857806342842e0e1461028857600080fd5b806301ffc9a71461012f57806304634d8d1461016457806306fdde0314610186578063081812fc146101a8578063095ea7b3146101e0575b600080fd5b34801561013b57600080fd5b5061014f61014a36600461121a565b6103ff565b60405190151581526020015b60405180910390f35b34801561017057600080fd5b5061018461017f3660046111e4565b61041f565b005b34801561019257600080fd5b5061019b610460565b60405161015b9190611380565b3480156101b457600080fd5b506101c86101c33660046112bf565b6104f2565b6040516001600160a01b03909116815260200161015b565b6101846101ee3660046111bb565b610536565b3480156101ff57600080fd5b50600154600054035b60405190815260200161015b565b610184610224366004611071565b6105d6565b34801561023557600080fd5b506102496102443660046112d7565b610767565b604080516001600160a01b03909316835260208301919091520161015b565b34801561027457600080fd5b506101846102833660046111bb565b610813565b610184610296366004611071565b610847565b3480156102a757600080fd5b506101c86102b63660046112bf565b610867565b3480156102c757600080fd5b506102086102d6366004611025565b610872565b3480156102e757600080fd5b506101846108c1565b3480156102fc57600080fd5b506008546001600160a01b03166101c8565b34801561031a57600080fd5b5061019b6108f7565b34801561032f57600080fd5b5061018461033e366004611181565b610906565b34801561034f57600080fd5b5061018461035e366004611252565b610972565b6101846103713660046110ac565b6109a8565b34801561038257600080fd5b5061019b6103913660046112bf565b6109f2565b3480156103a257600080fd5b5061014f6103b136600461103f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156103eb57600080fd5b506101846103fa366004611025565b610a86565b600061040a82610b21565b80610419575061041982610b6f565b92915050565b6008546001600160a01b031633146104525760405162461bcd60e51b815260040161044990611393565b60405180910390fd5b61045c8282610ba4565b5050565b60606002805461046f90611413565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90611413565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b60006104fd82610ca1565b61051a576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061054182610867565b9050336001600160a01b0382161461057a5761055d81336103b1565b61057a576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006105e182610cc8565b9050836001600160a01b0316816001600160a01b0316146106145760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176106615761064486336103b1565b61066157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661068857604051633a954ecd60e21b815260040160405180910390fd5b801561069357600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b831661071e576001840160008181526004602052604090205461071c57600054811461071c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916107dc5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906107fb906001600160601b0316876113e8565b61080591906113c8565b915196919550909350505050565b6008546001600160a01b0316331461083d5760405162461bcd60e51b815260040161044990611393565b61045c8282610d30565b610862838383604051806020016040528060008152506109a8565b505050565b600061041982610cc8565b60006001600160a01b03821661089b576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146108eb5760405162461bcd60e51b815260040161044990611393565b6108f56000610e27565b565b60606003805461046f90611413565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b0316331461099c5760405162461bcd60e51b815260040161044990611393565b610862600b8383610f70565b6109b38484846105d6565b6001600160a01b0383163b156109ec576109cf84848484610e79565b6109ec576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060600b8054610a0190611413565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2d90611413565b8015610a7a5780601f10610a4f57610100808354040283529160200191610a7a565b820191906000526020600020905b815481529060010190602001808311610a5d57829003601f168201915b50505050509050919050565b6008546001600160a01b03163314610ab05760405162461bcd60e51b815260040161044990611393565b6001600160a01b038116610b155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610449565b610b1e81610e27565b50565b60006301ffc9a760e01b6001600160e01b031983161480610b5257506380ac58cd60e01b6001600160e01b03198316145b806104195750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b148061041957506301ffc9a760e01b6001600160e01b0319831614610419565b6127106001600160601b0382161115610c125760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610449565b6001600160a01b038216610c685760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610449565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6000805482108015610419575050600090815260046020526040902054600160e01b161590565b600081600054811015610d1757600081815260046020526040902054600160e01b8116610d15575b80610d0e575060001901600081815260046020526040902054610cf0565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b60005481610d515760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114610e0057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101610dc8565b5081610e1e57604051622e076360e81b815260040160405180910390fd5b60005550505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290610eae903390899088908890600401611343565b602060405180830381600087803b158015610ec857600080fd5b505af1925050508015610ef8575060408051601f3d908101601f19168201909252610ef591810190611236565b60015b610f53573d808015610f26576040519150601f19603f3d011682016040523d82523d6000602084013e610f2b565b606091505b508051610f4b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b828054610f7c90611413565b90600052602060002090601f016020900481019282610f9e5760008555610fe4565b82601f10610fb75782800160ff19823516178555610fe4565b82800160010185558215610fe4579182015b82811115610fe4578235825591602001919060010190610fc9565b50610ff0929150610ff4565b5090565b5b80821115610ff05760008155600101610ff5565b80356001600160a01b038116811461102057600080fd5b919050565b600060208284031215611036578081fd5b610d0e82611009565b60008060408385031215611051578081fd5b61105a83611009565b915061106860208401611009565b90509250929050565b600080600060608486031215611085578081fd5b61108e84611009565b925061109c60208501611009565b9150604084013590509250925092565b600080600080608085870312156110c1578081fd5b6110ca85611009565b93506110d860208601611009565b925060408501359150606085013567ffffffffffffffff808211156110fb578283fd5b818701915087601f83011261110e578283fd5b8135818111156111205761112061144e565b604051601f8201601f19908116603f011681019083821181831017156111485761114861144e565b816040528281528a6020848701011115611160578586fd5b82602086016020830137918201602001949094529598949750929550505050565b60008060408385031215611193578182fd5b61119c83611009565b9150602083013580151581146111b0578182fd5b809150509250929050565b600080604083850312156111cd578182fd5b6111d683611009565b946020939093013593505050565b600080604083850312156111f6578182fd5b6111ff83611009565b915060208301356001600160601b03811681146111b0578182fd5b60006020828403121561122b578081fd5b8135610d0e81611464565b600060208284031215611247578081fd5b8151610d0e81611464565b60008060208385031215611264578182fd5b823567ffffffffffffffff8082111561127b578384fd5b818501915085601f83011261128e578384fd5b81358181111561129c578485fd5b8660208285010111156112ad578485fd5b60209290920196919550909350505050565b6000602082840312156112d0578081fd5b5035919050565b600080604083850312156112e9578182fd5b50508035926020909101359150565b60008151808452815b8181101561131d57602081850181015186830182015201611301565b8181111561132e5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611376908301846112f8565b9695505050505050565b602081526000610d0e60208301846112f8565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000826113e357634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561140e57634e487b7160e01b81526011600452602481fd5b500290565b600181811c9082168061142757607f821691505b6020821081141561144857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610b1e57600080fdfea26469706673582212208c887359f906c955157342f260f6dba66c5a42e72c5ee7bbfd16f54c51db0a5d64736f6c63430008040033697066733a2f2f516d4e68414431595869643770736455784652774c756a69504a71695553526b385564706b43776e635a32534e5760e0604052603560808181529062001ade60a03980516200002991600b91602090910190620002a1565b503480156200003757600080fd5b50604080518082018252600d81526c0536561536872696e652056495609c1b60208083019182528351808501909452600984526829b2b0a23930b3b7b760b91b9084015281519192916200008e91600291620002a1565b508051620000a4906003906020840190620002a1565b50506000805550620000b633620000de565b620000d873b5d4f12b5e7d8ce43fece177a6c75df14994fbe66101f462000130565b62000384565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6008546001600160a01b03163314620001905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6200019c8282620001a0565b5050565b6127106001600160601b0382161115620002105760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840162000187565b6001600160a01b038216620002685760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000187565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b828054620002af9062000347565b90600052602060002090601f016020900481019282620002d357600085556200031e565b82601f10620002ee57805160ff19168380011785556200031e565b828001600101855582156200031e579182015b828111156200031e57825182559160200191906001019062000301565b506200032c92915062000330565b5090565b5b808211156200032c576000815560010162000331565b600181811c908216806200035c57607f821691505b602082108114156200037e57634e487b7160e01b600052602260045260246000fd5b50919050565b61174a80620003946000396000f3fe6080604052600436106101355760003560e01c80636352211e116100ab578063a22cb4651161006f578063a22cb4651461034e578063a49a1e7d1461036e578063b88d4fde1461038e578063c87b56dd146103a1578063e985e9c5146103c1578063f2fde38b1461040a57600080fd5b80636352211e146102c657806370a08231146102e6578063715018a6146103065780638da5cb5b1461031b57806395d89b411461033957600080fd5b806318160ddd116100fd57806318160ddd146101fe57806323b872dd146102215780632a55205a146102345780633d3f23331461027357806340c10f191461029357806342842e0e146102b357600080fd5b806301ffc9a71461013a57806304634d8d1461016f57806306fdde0314610191578063081812fc146101b3578063095ea7b3146101eb575b600080fd5b34801561014657600080fd5b5061015a6101553660046114b1565b61042a565b60405190151581526020015b60405180910390f35b34801561017b57600080fd5b5061018f61018a3660046113e7565b61044a565b005b34801561019d57600080fd5b506101a661048b565b60405161016691906115fa565b3480156101bf57600080fd5b506101d36101ce366004611529565b61051d565b6040516001600160a01b039091168152602001610166565b61018f6101f93660046113be565b610561565b34801561020a57600080fd5b50600154600054035b604051908152602001610166565b61018f61022f366004611274565b610601565b34801561024057600080fd5b5061025461024f366004611541565b61078a565b604080516001600160a01b039093168352602083019190915201610166565b34801561027f57600080fd5b5061018f61028e36600461141d565b610838565b34801561029f57600080fd5b5061018f6102ae3660046113be565b6108c9565b61018f6102c1366004611274565b6108fd565b3480156102d257600080fd5b506101d36102e1366004611529565b61091d565b3480156102f257600080fd5b50610213610301366004611228565b610928565b34801561031257600080fd5b5061018f610977565b34801561032757600080fd5b506008546001600160a01b03166101d3565b34801561034557600080fd5b506101a66109ad565b34801561035a57600080fd5b5061018f610369366004611384565b6109bc565b34801561037a57600080fd5b5061018f6103893660046114e9565b610a28565b61018f61039c3660046112af565b610a5e565b3480156103ad57600080fd5b506101a66103bc366004611529565b610aa8565b3480156103cd57600080fd5b5061015a6103dc366004611242565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561041657600080fd5b5061018f610425366004611228565b610b3c565b600061043582610bd7565b80610444575061044482610c25565b92915050565b6008546001600160a01b0316331461047d5760405162461bcd60e51b81526004016104749061160d565b60405180910390fd5b6104878282610c5a565b5050565b60606002805461049a9061168d565b80601f01602080910402602001604051908101604052809291908181526020018280546104c69061168d565b80156105135780601f106104e857610100808354040283529160200191610513565b820191906000526020600020905b8154815290600101906020018083116104f657829003601f168201915b5050505050905090565b600061052882610d57565b610545576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061056c8261091d565b9050336001600160a01b038216146105a55761058881336103dc565b6105a5576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061060c82610d7e565b9050836001600160a01b0316816001600160a01b03161461063f5760405162a1148160e81b815260040160405180910390fd5b6000828152600660205260409020805461066b8187335b6001600160a01b039081169116811491141790565b6106965761067986336103dc565b61069657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166106bd57604051633a954ecd60e21b815260040160405180910390fd5b80156106c857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b831661075357600184016000818152600460205260409020546107515760005481146107515760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206116f583398151915260405160405180910390a4505050505050565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916107ff5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061081e906001600160601b031687611662565b6108289190611642565b91519350909150505b9250929050565b8260005b8181101561087d5761087586868381811061086757634e487b7160e01b600052603260045260246000fd5b905060200201356001610de6565b60010161083c565b50828260405161088e9291906115ad565b60405190819003812090829033907f05cbebb4597337e33e4a1de662bd86f4b225d0bfe94f12913eb5aedd526e57d790600090a45050505050565b6008546001600160a01b031633146108f35760405162461bcd60e51b81526004016104749061160d565b6104878282610f17565b61091883838360405180602001604052806000815250610a5e565b505050565b600061044482610d7e565b60006001600160a01b038216610951576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146109a15760405162461bcd60e51b81526004016104749061160d565b6109ab6000610fea565b565b60606003805461049a9061168d565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b03163314610a525760405162461bcd60e51b81526004016104749061160d565b610918600b8383611133565b610a69848484610601565b6001600160a01b0383163b15610aa257610a858484848461103c565b610aa2576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060600b8054610ab79061168d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae39061168d565b8015610b305780601f10610b0557610100808354040283529160200191610b30565b820191906000526020600020905b815481529060010190602001808311610b1357829003601f168201915b50505050509050919050565b6008546001600160a01b03163314610b665760405162461bcd60e51b81526004016104749061160d565b6001600160a01b038116610bcb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610474565b610bd481610fea565b50565b60006301ffc9a760e01b6001600160e01b031983161480610c0857506380ac58cd60e01b6001600160e01b03198316145b806104445750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b148061044457506301ffc9a760e01b6001600160e01b0319831614610444565b6127106001600160601b0382161115610cc85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610474565b6001600160a01b038216610d1e5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610474565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6000805482108015610444575050600090815260046020526040902054600160e01b161590565b600081600054811015610dcd57600081815260046020526040902054600160e01b8116610dcb575b80610dc4575060001901600081815260046020526040902054610da6565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000610df183610d7e565b905080600080610e0f86600090815260066020526040902080549091565b915091508415610e4f57610e24818433610656565b610e4f57610e3283336103dc565b610e4f57604051632ce44b5f60e11b815260040160405180910390fd5b8015610e5a57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040902055600160e11b8416610ee15760018601600081815260046020526040902054610edf576000548114610edf5760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206116f5833981519152908390a45050600180548101905550505050565b60005481610f385760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206116f58339815191528180a4600183015b818114610fc357808360006000805160206116f5833981519152600080a4600101610f9d565b5081610fe157604051622e076360e81b815260040160405180910390fd5b60005550505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906110719033908990889088906004016115bd565b602060405180830381600087803b15801561108b57600080fd5b505af19250505080156110bb575060408051601f3d908101601f191682019092526110b8918101906114cd565b60015b611116573d8080156110e9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ee565b606091505b50805161110e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b82805461113f9061168d565b90600052602060002090601f01602090048101928261116157600085556111a7565b82601f1061117a5782800160ff198235161785556111a7565b828001600101855582156111a7579182015b828111156111a757823582559160200191906001019061118c565b506111b39291506111b7565b5090565b5b808211156111b357600081556001016111b8565b80356001600160a01b03811681146111e357600080fd5b919050565b60008083601f8401126111f9578182fd5b50813567ffffffffffffffff811115611210578182fd5b60208301915083602082850101111561083157600080fd5b600060208284031215611239578081fd5b610dc4826111cc565b60008060408385031215611254578081fd5b61125d836111cc565b915061126b602084016111cc565b90509250929050565b600080600060608486031215611288578081fd5b611291846111cc565b925061129f602085016111cc565b9150604084013590509250925092565b600080600080608085870312156112c4578081fd5b6112cd856111cc565b93506112db602086016111cc565b925060408501359150606085013567ffffffffffffffff808211156112fe578283fd5b818701915087601f830112611311578283fd5b813581811115611323576113236116c8565b604051601f8201601f19908116603f0116810190838211818310171561134b5761134b6116c8565b816040528281528a6020848701011115611363578586fd5b82602086016020830137918201602001949094529598949750929550505050565b60008060408385031215611396578182fd5b61139f836111cc565b9150602083013580151581146113b3578182fd5b809150509250929050565b600080604083850312156113d0578182fd5b6113d9836111cc565b946020939093013593505050565b600080604083850312156113f9578182fd5b611402836111cc565b915060208301356001600160601b03811681146113b3578182fd5b60008060008060408587031215611432578384fd5b843567ffffffffffffffff80821115611449578586fd5b818701915087601f83011261145c578586fd5b81358181111561146a578687fd5b8860208260051b850101111561147e578687fd5b602092830196509450908601359080821115611498578384fd5b506114a5878288016111e8565b95989497509550505050565b6000602082840312156114c2578081fd5b8135610dc4816116de565b6000602082840312156114de578081fd5b8151610dc4816116de565b600080602083850312156114fb578182fd5b823567ffffffffffffffff811115611511578283fd5b61151d858286016111e8565b90969095509350505050565b60006020828403121561153a578081fd5b5035919050565b60008060408385031215611553578182fd5b50508035926020909101359150565b60008151808452815b818110156115875760208185018101518683018201520161156b565b818111156115985782602083870101525b50601f01601f19169290920160200192915050565b8183823760009101908152919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906115f090830184611562565b9695505050505050565b602081526000610dc46020830184611562565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008261165d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561168857634e487b7160e01b81526011600452602481fd5b500290565b600181811c908216806116a157607f821691505b602082108114156116c257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610bd457600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220cae8bef29377b330ab43243a08679e4630e515e7acbc19254e507ab1fbe8555264736f6c63430008040033697066733a2f2f516d566670505779677970545864696b386534356865653764636562504d396f706b6a4341504a5062363979394a4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720000000000000000000000007a3cdb2364f92369a602cae81167d0679087e6a30000000000000000000000008d9232ebc4f06b7b8005ccff0ca401675ceb25f5

Deployed Bytecode

0x6080604052600436106104475760003560e01c8063715018a611610234578063c2ba47441161012e578063dc09e923116100b6578063ea798c6d1161007a578063ea798c6d14610dd8578063eba830d814610dee578063f23a6e6114610e0e578063f2fde38b14610e2e578063f83d08ba14610e4e57600080fd5b8063dc09e92314610d24578063e14ca35314610d44578063e1ec629414610d59578063e7b99ec714610d79578063e985e9c514610d8f57600080fd5b8063d49479eb116100fd578063d49479eb14610c8c578063d5abeb0114610cac578063d73fe0aa14610cc2578063da7f07ca14610ce4578063db8cc8fa14610d0457600080fd5b8063c2ba474414610bf3578063c683630d14610c13578063c87b56dd14610c4c578063cbd5380014610c6c57600080fd5b80639f181b5e116101bc578063b42fa83d11610180578063b42fa83d14610b44578063b7a34c8a14610b5a578063b88d4fde14610b7a578063b88fe6a314610b9a578063bc197c8114610bba57600080fd5b80639f181b5e14610ac6578063a0712d6814610adb578063a22cb46514610aee578063a69df4b514610b0e578063b3eaff8b14610b2457600080fd5b80638456cb59116102035780638456cb5914610a525780638da5cb5b14610a675780638dbe817f14610a8557806395364a8414610a9c57806395d89b4114610ab157600080fd5b8063715018a6146109c957806379a2c3f8146109de5780637fa7c50b146109fe5780638164c30914610a3257600080fd5b80632f13265d116103455780635a9b0b89116102cd57806366c47a361161029157806366c47a36146109345780636c0360eb146109545780636cec4dfe146109695780636f8d95761461098957806370a08231146109a957600080fd5b80635a9b0b89146108575780635c83ca47146108c25780635c975abb146108dc5780635e1045ec146108f45780636352211e1461091457600080fd5b806342842e0e1161031457806342842e0e146107a957806342966c68146107c95780634f6ccce7146107e957806355f804b314610809578063572849c41461082957600080fd5b80632f13265d146107345780632f745c5914610754578063391e6bdc146107745780633f4ba83a1461079457600080fd5b80632042e5c2116103d35780632474c33f116103975780632474c33f1461067357806327f38113146106935780632a55205a146106b55780632ac496e0146106f45780632acc659e1461071457600080fd5b80632042e5c2146105bf57806322ad0670146105df57806322c515d1146105ff578063239c70ae1461061f57806323b872dd1461065357600080fd5b8063081812fc1161041a578063081812fc146104f5578063095ea7b31461052d57806315f91c181461054d57806318160ddd1461058a5780631c0ce3d31461059f57600080fd5b806301ffc9a71461044c57806304634d8d1461048157806306c933d8146104a357806306fdde03146104d3575b600080fd5b34801561045857600080fd5b5061046c61046736600461418b565b610e63565b60405190151581526020015b60405180910390f35b34801561048d57600080fd5b506104a161049c366004614076565b610e83565b005b3480156104af57600080fd5b5061046c6104be366004613dc1565b601d6020526000908152604090205460ff1681565b3480156104df57600080fd5b506104e8610ec4565b60405161047891906144d7565b34801561050157600080fd5b5061051561051036600461425d565b610f56565b6040516001600160a01b039091168152602001610478565b34801561053957600080fd5b506104a161054836600461404d565b610feb565b34801561055957600080fd5b507f00000000000000000000000000000000000000000000000000000000000027105b604051908152602001610478565b34801561059657600080fd5b5060095461057c565b3480156105ab57600080fd5b506104a16105ba36600461425d565b611101565b3480156105cb57600080fd5b506104a16105da366004613dc1565b611130565b3480156105eb57600080fd5b506104a16105fa36600461404d565b611166565b34801561060b57600080fd5b50602054610515906001600160a01b031681565b34801561062b57600080fd5b5061057c7f000000000000000000000000000000000000000000000000000000000000000481565b34801561065f57600080fd5b506104a161066e366004613eb2565b61121d565b34801561067f57600080fd5b506104a161068e3660046141c3565b61124f565b34801561069f57600080fd5b506106a86112e1565b604051610478919061441f565b3480156106c157600080fd5b506106d56106d03660046142af565b611342565b604080516001600160a01b039093168352602083019190915201610478565b34801561070057600080fd5b506104a161070f366004614153565b6113f0565b34801561072057600080fd5b5061057c61072f366004613dc1565b61142d565b34801561074057600080fd5b506104a161074f366004613fc7565b611505565b34801561076057600080fd5b5061057c61076f36600461404d565b61160f565b34801561078057600080fd5b506104a161078f366004614076565b6116a5565b3480156107a057600080fd5b506104a1611710565b3480156107b557600080fd5b506104a16107c4366004613eb2565b611744565b3480156107d557600080fd5b506104a16107e436600461425d565b61175f565b3480156107f557600080fd5b5061057c61080436600461425d565b6117d6565b34801561081557600080fd5b506104a16108243660046141f6565b611877565b34801561083557600080fd5b506015546108449061ffff1681565b60405161ffff9091168152602001610478565b34801561086357600080fd5b5061086c6118b4565b6040516104789190600060e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015292915050565b3480156108ce57600080fd5b50601c5461046c9060ff1681565b3480156108e857600080fd5b5060005460ff1661046c565b34801561090057600080fd5b506104a161090f3660046140ac565b611990565b34801561092057600080fd5b5061051561092f36600461425d565b611a3b565b34801561094057600080fd5b50602154610515906001600160a01b031681565b34801561096057600080fd5b506104e8611ab2565b34801561097557600080fd5b506104a16109843660046141c3565b611b40565b34801561099557600080fd5b506104a16109a4366004614076565b611b9c565b3480156109b557600080fd5b5061057c6109c4366004613dc1565b611c07565b3480156109d557600080fd5b506104a1611c8e565b3480156109ea57600080fd5b506104a16109f936600461423b565b611cc2565b348015610a0a57600080fd5b5061057c7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a3e57600080fd5b506104a1610a4d366004613dc1565b611d04565b348015610a5e57600080fd5b506104a1611d52565b348015610a7357600080fd5b50600b546001600160a01b0316610515565b348015610a9157600080fd5b5060165461057c9081565b348015610aa857600080fd5b5061046c611d84565b348015610abd57600080fd5b506104e8611daa565b348015610ad257600080fd5b50600c5461057c565b6104a1610ae936600461425d565b611db9565b348015610afa57600080fd5b506104a1610b09366004614017565b611e1c565b348015610b1a57600080fd5b5061057c60235481565b348015610b3057600080fd5b506104a1610b3f36600461425d565b611e27565b348015610b5057600080fd5b5061057c60125481565b348015610b6657600080fd5b506104a1610b7536600461404d565b6120da565b348015610b8657600080fd5b506104a1610b95366004613eed565b6121c3565b348015610ba657600080fd5b50602254610515906001600160a01b031681565b348015610bc657600080fd5b50610bda610bd5366004613e0d565b6121f5565b6040516001600160e01b03199091168152602001610478565b348015610bff57600080fd5b5061057c610c0e366004613dc1565b612237565b348015610c1f57600080fd5b5061046c610c2e366004613dc1565b6001600160a01b03166000908152601d602052604090205460ff1690565b348015610c5857600080fd5b506104e8610c6736600461425d565b612302565b348015610c7857600080fd5b506104a1610c8736600461425d565b6123b6565b348015610c9857600080fd5b506104a1610ca736600461425d565b6123e5565b348015610cb857600080fd5b5061057c60145481565b348015610cce57600080fd5b50610cd7612414565b604051610478919061446c565b348015610cf057600080fd5b506104a1610cff36600461428d565b612493565b348015610d1057600080fd5b506104a1610d1f36600461425d565b61252c565b348015610d3057600080fd5b506104a1610d3f36600461425d565b61255b565b348015610d5057600080fd5b5061057c61258a565b348015610d6557600080fd5b506104a1610d7436600461425d565b6125c4565b348015610d8557600080fd5b5061057c60135481565b348015610d9b57600080fd5b5061046c610daa366004613ddb565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610de457600080fd5b5061057c60115481565b348015610dfa57600080fd5b506104a1610e093660046140eb565b6125f3565b348015610e1a57600080fd5b50610bda610e29366004613f52565b612737565b348015610e3a57600080fd5b506104a1610e49366004613dc1565b612797565b348015610e5a57600080fd5b506104a161282f565b6000610e6e82612861565b80610e7d5750610e7d82612882565b92915050565b600b546001600160a01b03163314610eb65760405162461bcd60e51b8152600401610ead90614566565b60405180910390fd5b610ec0828261288d565b5050565b606060018054610ed3906146aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610eff906146aa565b8015610f4c5780601f10610f2157610100808354040283529160200191610f4c565b820191906000526020600020905b815481529060010190602001808311610f2f57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610fcf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ead565b506000908152600560205260409020546001600160a01b031690565b6000610ff682611a3b565b9050806001600160a01b0316836001600160a01b031614156110645760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ead565b336001600160a01b038216148061108057506110808133610daa565b6110f25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ead565b6110fc838361298a565b505050565b600b546001600160a01b0316331461112b5760405162461bcd60e51b8152600401610ead90614566565b601b55565b600b546001600160a01b0316331461115a5760405162461bcd60e51b8152600401610ead90614566565b611163816129f8565b50565b600b546001600160a01b031633146111905760405162461bcd60e51b8152600401610ead90614566565b600061119b60095490565b6014549091506111ab838361461c565b11156111f25760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ead565b60015b8281116112175761120584612a3a565b8061120f81614707565b9150506111f5565b50505050565b611228335b82612aa2565b6112445760405162461bcd60e51b8152600401610ead9061459b565b6110fc838383612b99565b600b546001600160a01b031633146112795760405162461bcd60e51b8152600401610ead90614566565b60205460405163a49a1e7d60e01b81526001600160a01b039091169063a49a1e7d906112ab90859085906004016144a8565b600060405180830381600087803b1580156112c557600080fd5b505af11580156112d9573d6000803e3d6000fd5b505050505050565b60606018805480602002602001604051908101604052809291908181526020018280548015610f4c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161131b575050505050905090565b6000828152600f602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916113b7575060408051808201909152600e546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906113d6906001600160601b031687614648565b6113e09190614634565b91519350909150505b9250929050565b600b546001600160a01b0316331461141a5760405162461bcd60e51b8152600401610ead90614566565b601c805460ff1916911515919091179055565b60006001600160a01b0382166114755760405162461bcd60e51b815260206004820152600d60248201526c06e6f742061646472657373203609c1b6044820152606401610ead565b601c5460ff16156114be57611488611d84565b80156114ac57506001600160a01b0382166000908152601d602052604090205460ff165b156114b957505060135490565b6114e7565b6001600160a01b0382166000908152601d602052604090205460ff16156114e757505060135490565b6114f082612d40565b156114fd57505060125490565b505060115490565b600b546001600160a01b0316331461152f5760405162461bcd60e51b8152600401610ead90614566565b600061153a60095490565b601454909150829061154c828461461c565b11156115935760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ead565b60005b818110156112d9576115cd8585838181106115c157634e487b7160e01b600052603260045260246000fd5b90506020020135612dbe565b6115fd868686848181106115f157634e487b7160e01b600052603260045260246000fd5b90506020020135612e8e565b8061160781614707565b915050611596565b600061161a83611c07565b821061167c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ead565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b600b546001600160a01b031633146116cf5760405162461bcd60e51b8152600401610ead90614566565b6020546040516304634d8d60e01b81526001600160a01b0384811660048301526001600160601b0384166024830152909116906304634d8d906044016112ab565b600b546001600160a01b0316331461173a5760405162461bcd60e51b8152600401610ead90614566565b611742612ea8565b565b6110fc838383604051806020016040528060008152506121c3565b61176833611222565b6117cd5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610ead565b61116381612f3b565b60006117e160095490565b82106118445760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ead565b6009828154811061186557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600b546001600160a01b031633146118a15760405162461bcd60e51b8152600401610ead90614566565b8051610ec0906010906020840190613a95565b6118f46040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6119346040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b601154815260125460208201526013546040820152601454606082015260095460808201527f000000000000000000000000000000000000000000000000000000000000000460c082015260155461ffff1660a0820152919050565b600b546001600160a01b031633146119ba5760405162461bcd60e51b8152600401610ead90614566565b8060005b81811015611217576001601d60008686858181106119ec57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611a019190613dc1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611a3381614707565b9150506119be565b6000818152600360205260408120546001600160a01b031680610e7d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610ead565b60108054611abf906146aa565b80601f0160208091040260200160405190810160405280929190818152602001828054611aeb906146aa565b8015611b385780601f10611b0d57610100808354040283529160200191611b38565b820191906000526020600020905b815481529060010190602001808311611b1b57829003601f168201915b505050505081565b600b546001600160a01b03163314611b6a5760405162461bcd60e51b8152600401610ead90614566565b60215460405163a49a1e7d60e01b81526001600160a01b039091169063a49a1e7d906112ab90859085906004016144a8565b600b546001600160a01b03163314611bc65760405162461bcd60e51b8152600401610ead90614566565b6021546040516304634d8d60e01b81526001600160a01b0384811660048301526001600160601b0384166024830152909116906304634d8d906044016112ab565b60006001600160a01b038216611c725760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610ead565b506001600160a01b031660009081526004602052604090205490565b600b546001600160a01b03163314611cb85760405162461bcd60e51b8152600401610ead90614566565b6117426000612fe2565b600b546001600160a01b03163314611cec5760405162461bcd60e51b8152600401610ead90614566565b6015805461ffff191661ffff92909216919091179055565b600b546001600160a01b03163314611d2e5760405162461bcd60e51b8152600401610ead90614566565b6001600160a01b03166000908152601d60205260409020805460ff19166001179055565b600b546001600160a01b03163314611d7c5760405162461bcd60e51b8152600401610ead90614566565b611742613034565b6000601a5442108015611d995750601b544210155b15611da45750600190565b50600090565b606060028054610ed3906146aa565b60005460ff1615611ddc5760405162461bcd60e51b8152600401610ead9061453c565b60405162461bcd60e51b81526020600482015260156024820152746e6f74206d696e7461626c6520776974682043524f60581b6044820152606401610ead565b610ec033838361308c565b60005460ff1615611e4a5760405162461bcd60e51b8152600401610ead9061453c565b600081118015611e5b575060048111155b611e985760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908185b5bdd5b9d60921b6044820152606401610ead565b602254604051627eeac760e11b81523360048201526002602482015282916001600160a01b03169062fdd58e9060440160206040518083038186803b158015611ee057600080fd5b505afa158015611ef4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f189190614275565b1015611f585760405162461bcd60e51b815260206004820152600f60248201526e696e76616c69642062616c616e636560881b6044820152606401610ead565b602254604051637921219560e11b8152336004820152306024820152600260448201526064810183905260a06084820152600060a48201526001600160a01b039091169063f242432a9060c401600060405180830381600087803b158015611fbf57600080fd5b505af1158015611fd3573d6000803e3d6000fd5b50506020546040516340c10f1960e01b8152336004820152602481018590526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b15801561202357600080fd5b505af1158015612037573d6000803e3d6000fd5b50506021546040516340c10f1960e01b8152336004820152602481018590526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b15801561208757600080fd5b505af115801561209b573d6000803e3d6000fd5b50505050600081600a6120ae9190614648565b905060005b818161ffff1610156110fc576120c833612a3a565b806120d2816146e5565b9150506120b3565b600b546001600160a01b031633146121045760405162461bcd60e51b8152600401610ead90614566565b7f00000000000000000000000000000000000000000000000000000000000000008161212f60165490565b612139919061461c565b11156121875760405162461bcd60e51b815260206004820152601760248201527f416c6c205265736572766564204e4654204d696e7465640000000000000000006044820152606401610ead565b60015b8181116110fc5761219f601680546001019055565b6121b1836121ac60165490565b612e8e565b806121bb81614707565b91505061218a565b6121cd3383612aa2565b6121e95760405162461bcd60e51b8152600401610ead9061459b565b6112178484848461315b565b60405162461bcd60e51b815260206004820152601460248201527318985d18da195cc81b9bdd081858d8d95c1d195960621b6044820152600090606401610ead565b60008061224360095490565b6014546122509190614667565b602254604051627eeac760e11b81526001600160a01b038681166004830152600260248301529293506000929091169062fdd58e9060440160206040518083038186803b1580156122a057600080fd5b505afa1580156122b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d89190614275565b90508082116122e8575092915050565b60048110156122f8579392505050565b5060049392505050565b6000818152600360205260409020546060906001600160a01b03166123815760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610ead565b6000601061238e8461318e565b60405160200161239f929190614318565b60408051601f198184030181529190529392505050565b600b546001600160a01b031633146123e05760405162461bcd60e51b8152600401610ead90614566565b601f55565b600b546001600160a01b0316331461240f5760405162461bcd60e51b8152600401610ead90614566565b601355565b60606019805480602002602001604051908101604052809291908181526020018280548015610f4c57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff16815260200190600201906020826001010492830192600103820291508084116124515790505050505050905090565b600b546001600160a01b031633146124bd5760405162461bcd60e51b8152600401610ead90614566565b60235442116125025760405162461bcd60e51b81526020600482015260116024820152706d696e74207374696c6c2061637469766560781b6044820152606401610ead565b60005b828161ffff1610156110fc5761251a82612a3a565b80612524816146e5565b915050612505565b600b546001600160a01b031633146125565760405162461bcd60e51b8152600401610ead90614566565b601a55565b600b546001600160a01b031633146125855760405162461bcd60e51b8152600401610ead90614566565b601255565b6000612595600c5490565b6125bf907f0000000000000000000000000000000000000000000000000000000000002710614667565b905090565b600b546001600160a01b031633146125ee5760405162461bcd60e51b8152600401610ead90614566565b601155565b600b546001600160a01b0316331461261d5760405162461bcd60e51b8152600401610ead90614566565b826126595760405162461bcd60e51b815260206004820152600c60248201526b656d7074792070617965657360a01b6044820152606401610ead565b82811461269e5760405162461bcd60e51b815260206004820152601360248201527277726f6e67207061796565206e756d6265727360681b6044820152606401610ead565b6126da8282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506132a792505050565b6127175760405162461bcd60e51b815260206004820152600e60248201526d696e76616c69642073686172657360901b6044820152606401610ead565b61272360188585613b19565b5061273060198383613b6c565b5050505050565b60006001600160a01b03871630146127845760405162461bcd60e51b815260206004820152601060248201526f34b73b30b634b21037b832b930ba37b960811b6044820152606401610ead565b5063f23a6e6160e01b9695505050505050565b600b546001600160a01b031633146127c15760405162461bcd60e51b8152600401610ead90614566565b6001600160a01b0381166128265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ead565b61116381612fe2565b600b546001600160a01b031633146128595760405162461bcd60e51b8152600401610ead90614566565b600954601455565b60006001600160e01b03198216630271189760e51b1480610e7d5750610e7d825b6000610e7d8261330e565b6127106001600160601b03821611156128fb5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610ead565b6001600160a01b0382166129515760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610ead565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600e55565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906129bf82611a3b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0381166000908152601d602052604090205460ff1615611163576001600160a01b03166000908152601d60205260409020805460ff19169055565b6000612a44613333565b9050600081118015612a5857506014548111155b612a985760405162461bcd60e51b81526020600482015260116024820152704d696e74206e6f7420706f737369626c6560781b6044820152606401610ead565b610ec08282612e8e565b6000818152600360205260408120546001600160a01b0316612b1b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ead565b6000612b2683611a3b565b9050806001600160a01b0316846001600160a01b03161480612b615750836001600160a01b0316612b5684610f56565b6001600160a01b0316145b80612b9157506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612bac82611a3b565b6001600160a01b031614612c105760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610ead565b6001600160a01b038216612c725760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ead565b612c7d8383836134af565b612c8860008261298a565b6001600160a01b0383166000908152600460205260408120805460019290612cb1908490614667565b90915550506001600160a01b0382166000908152600460205260408120805460019290612cdf90849061461c565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60175460405163288c314960e21b81526001600160a01b038381166004830152600092169063a230c5249060240160206040518083038186803b158015612d8657600080fd5b505afa158015612d9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7d919061416f565b600d6000612dcd600184614667565b815260200190815260200160002054600014612e245760405162461bcd60e51b81526020600482015260166024820152751d1bdad95b88185b1c9958591e481c995cd95c9d995960521b6044820152606401610ead565b6000612e2f600c5490565b612e59907f0000000000000000000000000000000000000000000000000000000000002710614667565b9050612e66600182614667565b600d6000612e75600186614667565b81526020810191909152604001600020556110fc613567565b610ec08282604051806020016040528060008152506135d8565b60005460ff16612ef15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ead565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000612f4682611a3b565b9050612f54816000846134af565b612f5f60008361298a565b6001600160a01b0381166000908152600460205260408120805460019290612f88908490614667565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005460ff16156130575760405162461bcd60e51b8152600401610ead9061453c565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612f1e3390565b816001600160a01b0316836001600160a01b031614156130ee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ead565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613166848484612b99565b6131728484848461360b565b6112175760405162461bcd60e51b8152600401610ead906144ea565b6060816131b25750506040805180820190915260018152600360fc1b602082015290565b8160005b81156131dc57806131c681614707565b91506131d59050600a83614634565b91506131b6565b6000816001600160401b0381111561320457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561322e576020820181803683370190505b5090505b8415612b9157613243600183614667565b9150613250600a86614722565b61325b90603061461c565b60f81b81838151811061327e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506132a0600a86614634565b9450613232565b805160009081805b82811015613302578481815181106132d757634e487b7160e01b600052603260045260246000fd5b602002602001015161ffff16826132ee919061461c565b9150806132fa81614707565b9150506132af565b50612710149392505050565b60006001600160e01b0319821663152a902d60e11b1480610e7d5750610e7d82613718565b60008061333f600c5490565b613369907f0000000000000000000000000000000000000000000000000000000000002710614667565b6040516bffffffffffffffffffffffff1933606090811b8216602084015241901b166034820152446048820152456068820152426088820152909150600090829060a8016040516020818303038152906040528051906020012060001c6133d09190614722565b6000818152600d6020526040812054919250906133ee5750806133ff565b506000818152600d60205260409020545b600d600061340e600186614667565b8152602001908152602001600020546000141561344457613430600184614667565b6000838152600d6020526040902055613474565b600d6000613453600186614667565b81526020808201929092526040908101600090812054858252600d90935220555b61347c613567565b506134a77f00000000000000000000000000000000000000000000000000000000000000018261461c565b935050505090565b6001600160a01b03831661350a5761350581600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b61352d565b816001600160a01b0316836001600160a01b03161461352d5761352d838261373d565b6001600160a01b038216613544576110fc816137da565b826001600160a01b0316826001600160a01b0316146110fc576110fc82826138b3565b60008061357261258a565b116135bf5760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610ead565b600c80549060006135cf83614707565b91905055905090565b6135e283836138f7565b6135ef600084848461360b565b6110fc5760405162461bcd60e51b8152600401610ead906144ea565b60006001600160a01b0384163b1561370d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061364f9033908990889088906004016143e2565b602060405180830381600087803b15801561366957600080fd5b505af1925050508015613699575060408051601f3d908101601f19168201909252613696918101906141a7565b60015b6136f3573d8080156136c7576040519150601f19603f3d011682016040523d82523d6000602084013e6136cc565b606091505b5080516136eb5760405162461bcd60e51b8152600401610ead906144ea565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b91565b506001949350505050565b60006001600160e01b0319821663780e9d6360e01b1480610e7d5750610e7d82613a45565b6000600161374a84611c07565b6137549190614667565b6000838152600860205260409020549091508082146137a7576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906137ec90600190614667565b6000838152600a60205260408120546009805493945090928490811061382257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806009838154811061385157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061389757634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006138be83611c07565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b03821661394d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ead565b6000818152600360205260409020546001600160a01b0316156139b25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ead565b6139be600083836134af565b6001600160a01b03821660009081526004602052604081208054600192906139e790849061461c565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b031982166380ac58cd60e01b1480613a7657506001600160e01b03198216635b5e139f60e01b145b80610e7d57506301ffc9a760e01b6001600160e01b0319831614610e7d565b828054613aa1906146aa565b90600052602060002090601f016020900481019282613ac35760008555613b09565b82601f10613adc57805160ff1916838001178555613b09565b82800160010185558215613b09579182015b82811115613b09578251825591602001919060010190613aee565b50613b15929150613c10565b5090565b828054828255906000526020600020908101928215613b09579160200282015b82811115613b095781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190613b39565b82805482825590600052602060002090600f01601090048101928215613b095791602002820160005b83821115613bd957833561ffff1683826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302613b95565b8015613c075782816101000a81549061ffff0219169055600201602081600101049283019260010302613bd9565b5050613b159291505b5b80821115613b155760008155600101613c11565b60006001600160401b03831115613c3e57613c3e614762565b613c51601f8401601f19166020016145ec565b9050828152838383011115613c6557600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114613c9357600080fd5b919050565b60008083601f840112613ca9578182fd5b5081356001600160401b03811115613cbf578182fd5b6020830191508360208260051b85010111156113e957600080fd5b600082601f830112613cea578081fd5b813560206001600160401b03821115613d0557613d05614762565b8160051b613d148282016145ec565b838152828101908684018388018501891015613d2e578687fd5b8693505b85841015613d50578035835260019390930192918401918401613d32565b50979650505050505050565b60008083601f840112613d6d578182fd5b5081356001600160401b03811115613d83578182fd5b6020830191508360208285010111156113e957600080fd5b600082601f830112613dab578081fd5b613dba83833560208501613c25565b9392505050565b600060208284031215613dd2578081fd5b613dba82613c7c565b60008060408385031215613ded578081fd5b613df683613c7c565b9150613e0460208401613c7c565b90509250929050565b600080600080600060a08688031215613e24578081fd5b613e2d86613c7c565b9450613e3b60208701613c7c565b935060408601356001600160401b0380821115613e56578283fd5b613e6289838a01613cda565b94506060880135915080821115613e77578283fd5b613e8389838a01613cda565b93506080880135915080821115613e98578283fd5b50613ea588828901613d9b565b9150509295509295909350565b600080600060608486031215613ec6578283fd5b613ecf84613c7c565b9250613edd60208501613c7c565b9150604084013590509250925092565b60008060008060808587031215613f02578384fd5b613f0b85613c7c565b9350613f1960208601613c7c565b92506040850135915060608501356001600160401b03811115613f3a578182fd5b613f4687828801613d9b565b91505092959194509250565b60008060008060008060a08789031215613f6a578384fd5b613f7387613c7c565b9550613f8160208801613c7c565b9450604087013593506060870135925060808701356001600160401b03811115613fa9578182fd5b613fb589828a01613d5c565b979a9699509497509295939492505050565b600080600060408486031215613fdb578081fd5b613fe484613c7c565b925060208401356001600160401b03811115613ffe578182fd5b61400a86828701613c98565b9497909650939450505050565b60008060408385031215614029578182fd5b61403283613c7c565b9150602083013561404281614778565b809150509250929050565b6000806040838503121561405f578182fd5b61406883613c7c565b946020939093013593505050565b60008060408385031215614088578182fd5b61409183613c7c565b915060208301356001600160601b0381168114614042578182fd5b600080602083850312156140be578182fd5b82356001600160401b038111156140d3578283fd5b6140df85828601613c98565b90969095509350505050565b60008060008060408587031215614100578182fd5b84356001600160401b0380821115614116578384fd5b61412288838901613c98565b9096509450602087013591508082111561413a578384fd5b5061414787828801613c98565b95989497509550505050565b600060208284031215614164578081fd5b8135613dba81614778565b600060208284031215614180578081fd5b8151613dba81614778565b60006020828403121561419c578081fd5b8135613dba81614786565b6000602082840312156141b8578081fd5b8151613dba81614786565b600080602083850312156141d5578182fd5b82356001600160401b038111156141ea578283fd5b6140df85828601613d5c565b600060208284031215614207578081fd5b81356001600160401b0381111561421c578182fd5b8201601f8101841361422c578182fd5b612b9184823560208401613c25565b60006020828403121561424c578081fd5b813561ffff81168114613dba578182fd5b60006020828403121561426e578081fd5b5035919050565b600060208284031215614286578081fd5b5051919050565b6000806040838503121561429f578182fd5b82359150613e0460208401613c7c565b600080604083850312156142c1578182fd5b50508035926020909101359150565b600081518084526142e881602086016020860161467e565b601f01601f19169290920160200192915050565b6000815161430e81856020860161467e565b9290920192915050565b600080845482600182811c91508083168061433457607f831692505b602080841082141561435457634e487b7160e01b87526022600452602487fd5b8180156143685760018114614379576143a5565b60ff198616895284890196506143a5565b60008b815260209020885b8681101561439d5781548b820152908501908301614384565b505084890196505b5050505050506143d96143c86143c283602f60f81b815260010190565b866142fc565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614415908301846142d0565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156144605783516001600160a01b03168352928401929184019160010161443b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561446057835161ffff1683529284019291840191600101614488565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b602081526000613dba60208301846142d0565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b038111828210171561461457614614614762565b604052919050565b6000821982111561462f5761462f614736565b500190565b6000826146435761464361474c565b500490565b600081600019048311821515161561466257614662614736565b500290565b60008282101561467957614679614736565b500390565b60005b83811015614699578181015183820152602001614681565b838111156112175750506000910152565b600181811c908216806146be57607f821691505b602082108114156146df57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156146fd576146fd614736565b6001019392505050565b600060001982141561471b5761471b614736565b5060010190565b6000826147315761473161474c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461116357600080fd5b6001600160e01b03198116811461116357600080fdfea2646970667358221220bc74ffe4b5f8491a27d3b6bbe3122903818df937efa24f4da0f3930d2c0fe72d64736f6c63430008040033

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

0000000000000000000000007a3cdb2364f92369a602cae81167d0679087e6a30000000000000000000000008d9232ebc4f06b7b8005ccff0ca401675ceb25f5

-----Decoded View---------------
Arg [0] : _marketAddress (address): 0x7a3cdb2364f92369a602cae81167d0679087e6a3
Arg [1] : _membershipContract (address): 0x8d9232ebc4f06b7b8005ccff0ca401675ceb25f5

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a3cdb2364f92369a602cae81167d0679087e6a3
Arg [1] : 0000000000000000000000008d9232ebc4f06b7b8005ccff0ca401675ceb25f5


Loading