ETH Price: $3,566.88 (+8.18%)

Token

Origamasks (⭐)
 

Overview

Max Total Supply

4,999

Holders

1,477

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
elodrawz.eth
Balance
1 ⭐
0x7c8249A15Ef13e6C73889A4dF359BB901AC71dB0
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

A collection of 5,000 kid-avatars that gives you membership access to The Playground.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Origamasks

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion, MIT license
File 1 of 24 : Origamasks.sol
// SPDX-License-Identifier: MIT
// Creator: OrigamasksTeam

pragma solidity ^0.8.13;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@chainlink/contracts/src/v0.8/VRFV2WrapperConsumerBase.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

abstract contract RewardContract {
    function mintReward(address to_, uint256 tokenId_) public payable virtual returns (uint256);
}

error ProvenanceHashNotSetYet();
error LevelNotReachedToClaim();
error RewardAddressNotSetYet();
error LimitPerWalletExceeded();
error RewardAlreadyClaimed();
error StartingIndexExisted();
error WrongFieldTripLevel();
error ExceedReservedSpots();
error WrongDaysToLevelUp();
error LevelNotAvailable();
error TokenNotAvailable();
error InvalidSignature();
error InvalidSaleState();
error TokenOutOfRange();
error FieldTripClosed();
error ExceedVIPSpots();
error NotOnFieldTrip();
error IncorrectPrice();
error PublicNotReady();
error TransferFailed();
error WrongMaxLevel();
error LevelExisted();
error SizeNotSame();
error ZeroAddress();
error OnFieldTrip();
error NotOwner();
error NotUser();
error SoldOut();
error Level0();

contract Origamasks is
    ERC721,
    ERC2981,
    ReentrancyGuard,
    AccessControl,
    DefaultOperatorFilterer,
    Ownable,
    VRFV2WrapperConsumerBase
{
    using ECDSA for bytes32;

    // ECDSA signing address
    address public signerAddress;

    enum SaleState {
        Closed,
        VIP,
        BuddyList,
        WaitList,
        Public,
        Airdrop,
        Reserve
    }

    SaleState public saleState;

    mapping(address => uint256[]) private mintedTokenIds; // Tracker tokenIds that owned by wallet address
    mapping(address => uint256) private buddyListMints; // Buddy List quota
    mapping(address => uint256) private waitListMints; // Wait List quota (if still available)
    mapping(address => uint256) private publicMints; // Public quota (if still available)

    uint256 public collectionSize = 5000;
    uint256 public totalSupply = 0;
    uint256 public vipSupply;
    uint256 public mintPrice = 0.025 ether;
    uint256 public waitListMintPrice = 0.035 ether;
    uint256 public publicMintPrice;
    uint256 public constant VIP_LIMIT_PER_WALLET = 1;
    uint256 public buddyListLimitPerWallet = 2;
    uint256 public waitListLimitPerWallet = 2;
    uint256 public publicLimitPerWallet = 2;
    uint256 public numberReserved = 200;

    mapping(uint256 => string) public baseTokenUriPerLevel;
    string private contractMetadataURI;
    string public provenanceHash;
    uint256 public startingIndex;

    struct Experience {
        uint256 level;
        uint256 daysToLevelUp;
    }
    mapping(uint256 => Experience) public experienceData;

    constructor(
        address signer_,
        address payable origamasksAddress_,
        address linkAddress_,
        address wrapperAddress_,
        uint256 vipSupply_,
        uint256 minimumReserved_,
        uint256 initialMaxLevel_,
        uint256 initialDaysToLevelUp_
    )
        ERC721("Origamasks", unicode"⭐")
        VRFV2WrapperConsumerBase(linkAddress_, wrapperAddress_)
    {
        setSignerAddress(signer_);
        setOrigamasksAddress(origamasksAddress_);
        setRoyaltyInfo(500); //(500 → 5%)
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);

        linkAddress = linkAddress_;
        vipSupply = vipSupply_;
        numberReserved = minimumReserved_;
        setNewMaxLevel(initialMaxLevel_, initialDaysToLevelUp_);

        _mint(origamasksAddress_, 1); // Will be included to numberReserved (initial collection setup purpose)
    }

    /**
     * @dev Handle VIP minting
     * @param signature_ Validate signature
     * @param tokenId_ Chosen tokenId
     */
    function VIPMint(bytes calldata signature_, uint256 tokenId_)
        external
        payable
        isSaleState(SaleState.VIP)
    {
        // General validation
        if (tokenId_ < 1 || tokenId_ > collectionSize) revert TokenOutOfRange();

        // Specific per sale state validation
        if (!verifySignature(signature_, "VIP")) revert InvalidSignature();
        if (totalSupply + 1 > vipSupply) revert ExceedVIPSpots();
        if (msg.value != mintPrice) revert IncorrectPrice();
        if (buddyListMints[msg.sender] >= VIP_LIMIT_PER_WALLET) revert LimitPerWalletExceeded();

        // Save purchased token ids
        mintedTokenIds[msg.sender].push(tokenId_);

        // Track and future validation
        buddyListMints[msg.sender] += 1;
        
        // User instantly receive the token
        _mint(msg.sender, tokenId_);
        totalSupply++;

        emit Minted(msg.sender, SaleState.VIP, msg.value, tokenId_);
    }

    /**
     * @dev Handle Buddy List minting
     * @param signature_ Validate signature
     * @param tokenId_ Chosen tokenId
     */
    function buddyListMint(bytes calldata signature_, uint256 tokenId_)
        external
        payable
        isSaleState(SaleState.BuddyList)
    {
        // General validation
        if (tokenId_ < 1 || tokenId_ > collectionSize) revert TokenOutOfRange();

        // Specific per sale state validation
        if (!verifySignature(signature_, "BuddyList")) revert InvalidSignature();
        if (totalSupply + 1 > maxSupply()) revert SoldOut();
        if (msg.value != mintPrice) revert IncorrectPrice();
        if (buddyListMints[msg.sender] >= buddyListLimitPerWallet) revert LimitPerWalletExceeded();

        // Save purchased token ids
        mintedTokenIds[msg.sender].push(tokenId_);

        // Track and future validation
        buddyListMints[msg.sender] += 1;
        
        // User instantly receive the token
        _mint(msg.sender, tokenId_);
        totalSupply++;

        emit Minted(msg.sender, SaleState.BuddyList, msg.value, tokenId_);
    }

    /**
     * @dev handle Buddy List + Wait List minting
     * @param signature_ Validate signature
     * @param tokenId_ Chosen tokenId
     */
    function waitListMint(bytes calldata signature_, uint256 tokenId_)
        external
        payable
        isSaleState(SaleState.WaitList)
    {
        // General validation
        if (tokenId_ < 1 || tokenId_ > collectionSize) revert TokenOutOfRange();

        // Specific per sale state validation
        if (!verifySignature(signature_, "WaitList")) revert InvalidSignature();
        if (totalSupply + 1 > maxSupply()) revert SoldOut();
        if (msg.value != waitListMintPrice) revert IncorrectPrice();
        if (waitListMints[msg.sender] >= waitListLimitPerWallet) revert LimitPerWalletExceeded();

        // Save purchased token ids
        mintedTokenIds[msg.sender].push(tokenId_);

        // Track and future validation
        waitListMints[msg.sender] += 1;
        
        // User instantly receive the token
        _mint(msg.sender, tokenId_);
        totalSupply++;

        emit Minted(msg.sender, SaleState.WaitList, msg.value, tokenId_);
    }

    /**
     * @dev Handle Public minting
     * @param signature_ Validate signature
     * @param tokenId_ Chosen tokenId
     */
    function publicMint(bytes calldata signature_, uint256 tokenId_)
        external
        payable
        isSaleState(SaleState.Public)
    {
        if (publicMintPrice == 0) revert PublicNotReady();

        // General validation
        if (tokenId_ < 1 || tokenId_ > collectionSize) revert TokenOutOfRange();

        // Specific per sale state validation
        if (!verifySignature(signature_, "Public")) revert InvalidSignature();
        if (totalSupply + 1 > maxSupply()) revert SoldOut();
        if (msg.value != publicMintPrice) revert IncorrectPrice();
        if (publicMints[msg.sender] >= publicLimitPerWallet) revert LimitPerWalletExceeded();

        // Save purchased token ids
        mintedTokenIds[msg.sender].push(tokenId_);

        // Track and future validation
        publicMints[msg.sender] += 1;
        
        // User instantly receive the token
        _mint(msg.sender, tokenId_);
        totalSupply++;

        emit Minted(msg.sender, SaleState.Public, msg.value, tokenId_);
    }

    /**
     * @dev Reserve tokens (will be done after all sale finished)
     */
    function reserve(uint256[] memory tokenIds, address receiver_)
        external
        onlyOwner
        isSaleState(SaleState.Reserve)
    {
        if (totalSupply + tokenIds.length > collectionSize) revert ExceedReservedSpots();

        // Loop through owners' addresses
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _mint(receiver_, tokenIds[i]);
            totalSupply++;
        }
    }

    /**
     * @dev Emitted when mint
     */
    event Minted(
        address indexed to,
        SaleState indexed state,
        uint256 amount,
        uint256 indexed tokenId
    );

    /**
     * @dev Get array of tokenIds that owned by ownerAddress_
     * @param ownerAddress_ Address of the owner
     */
    function getMintedTokenIds(address ownerAddress_)
        public
        view
        returns (uint256[] memory)
    {
        return mintedTokenIds[ownerAddress_];
    }


    /**
     * @dev Get maximum supply that can be minted
     */
    function maxSupply() public view returns (uint256) {
        return collectionSize - numberReserved;
    }

    /**
     * @dev Tracker minted on Buddy List
     */
    function numberMintedBuddyList(address address_)
        external
        view
        returns (uint256)
    {
        return buddyListMints[address_];
    }

    /**
     * @dev Tracker minted on Wait List
     */
    function numberMintedWaitList(address address_)
        external
        view
        returns (uint256)
    {
        return waitListMints[address_];
    }

    /**
     * @dev Tracker minted on Public
     */
    function numberMintedPublic(address address_)
        external
        view
        returns (uint256)
    {
        return publicMints[address_];
    }

    /**
     * @dev Airdrop for many addresses with specific tokenIds
     * @param tos_ Many addresses
     * @param tokenIds_ Matched token id
     */
    function airdrop(address[] memory tos_, uint256[] memory tokenIds_)
        external
        onlyOwner
        nonReentrant
        isSaleState(SaleState.Airdrop)
    {
        if (tos_.length != tokenIds_.length) revert SizeNotSame();

        // Loop through owners' addresses
        for (uint256 i = 0; i < tos_.length; i++) {
            address _receiver = tos_[i];
            uint256 _tokenId = tokenIds_[i];

            // Track and future validation
            buddyListMints[_receiver] += 1;
            _mint(_receiver, _tokenId);
            totalSupply++;
        }
    }

    /**
     * @dev verify ECDSA signature
     */
    function verifySignature(
        bytes memory signature_,
        string memory saleStateName_
    ) internal view returns (bool) {
        return
            signerAddress ==
            keccak256(
                abi.encodePacked(
                    "\x19Ethereum Signed Message:\n32",
                    bytes32(abi.encodePacked(msg.sender, saleStateName_))
                )
            ).recover(signature_);
    }

    /**
    @dev Emitted when sale state changed.
     */
    event SaleStateChanged(SaleState indexed saleState);

    modifier isSaleState(SaleState saleState_) {
        if (msg.sender != tx.origin) revert NotUser();
        if (saleState != saleState_) revert InvalidSaleState();
        _;
    }

    /*
    // @dev Change the current `saleState` value. 
    */
    function setSaleState(uint256 saleState_) external onlyOwner {
        saleState = SaleState(saleState_);
        emit SaleStateChanged(saleState);
    }

    /*
    // @dev Dynamic tokenURI based on level
    */
    function tokenURI(uint256 tokenId_)
        public
        view
        override
        returns (string memory)
    {
        require(_exists(tokenId_), "Token doesn't exist!");

        uint256 _currentLevel = getLevel(tokenId_);
        return
            string(
                abi.encodePacked(
                    baseTokenUriPerLevel[_currentLevel],
                    Strings.toString(tokenId_)
                )
            );
    }

    /*
     *
     * F
     * I
     * E
     * L
     * D
     *
     * T
     * R
     * I
     * P
     *
     */

    /**
     * @dev Level is tied to tokenId, not owner
     */
    mapping(uint256 => uint256) private levelTokenId;
    uint256 public maxLevel;

    /**
     * @dev TokenId to fieldTrip start time in epoch (0 = not fieldTrip)
     */
    mapping(uint256 => uint256) private fieldTripStarted;

    /**
     * @dev Start field trip
     */
    function startFieldTrip(uint256 tokenId_, uint256 level_)
        internal
        onlyApprovedOrOwner(tokenId_)
    {
        if (!fieldTripOpen[level_]) revert FieldTripClosed();
        if (fieldTripStarted[tokenId_] > 0) revert OnFieldTrip();
        if (level_ > maxLevel) revert LevelNotAvailable();

        fieldTripStarted[tokenId_] = block.timestamp; //change time
        emit StartedFieldTrip(tokenId_, level_); //emit
    }

    /**
     * @dev Stop field trip
     */
    function stopFieldTrip(uint256 tokenId_)
        internal
        onlyApprovedOrOwner(tokenId_)
    {
        if (fieldTripStarted[tokenId_] == 0) revert NotOnFieldTrip();

        // Level up if already level up in field trip
        if (isLeveledUpFromCurrentFieldTrip(tokenId_)) {
            uint256 currentLevel = levelTokenId[tokenId_];
            levelTokenId[tokenId_] = currentLevel + 1;
        }

        // Reset if dismissed
        fieldTripStarted[tokenId_] = 0;

        emit StoppedFieldTrip(tokenId_);
    }

    /**
     * @dev Start field trip for many tokenIds
     */
    function startManyFieldTrips(uint256[] calldata tokenIds_) external {
        uint256 count = tokenIds_.length;
        for (uint256 i = 0; i < count; i++) {
            uint256 nextLevel = getLevel(tokenIds_[i]) + 1;
            if (nextLevel <= maxLevel) {
                startFieldTrip(tokenIds_[i], nextLevel);
            }
        }
    }

    /**
     * @dev Stop field trip for many tokenIds
     */
    function stopManyFieldTrips(uint256[] calldata tokenIds_) external {
        uint256 count = tokenIds_.length;
        for (uint256 i = 0; i < count; i++) {
            stopFieldTrip(tokenIds_[i]);
        }
    }

    /* 
    Linked with the token (not reset upon sale)
    return "isFieldTrip" status fieldTrip
    return "currentPeriod" how long already fieldTrip, in seconds
    return "prevLevel" current level fieldTrip
    return "isLeveledUp" check if already leveled up before stop field trip
    */
    function fieldTripStatus(uint256 tokenId_)
        public
        view
        returns (
            bool isFieldTrip,
            uint256 currentPeriod,
            uint256 prevLevel,
            bool isLeveledUp
        )
    {
        uint256 start = fieldTripStarted[tokenId_];
        if (start > 0) {
            isFieldTrip = true;
            currentPeriod = block.timestamp - start;
        }

        prevLevel = levelTokenId[tokenId_];

        uint256 daysNeededToLevelUp = levelData[prevLevel + 1];

        // make sure next level already exists && currentPeriod already passed
        if (
            daysNeededToLevelUp > 0 &&
            currentPeriod >= (daysNeededToLevelUp * 86400)
        ) {
            isLeveledUp = true;
        }
    }

    /**
     * @dev level => days needed to level up
     */
    mapping(uint256 => uint256) public levelData;

    /**
     * @dev Set new max level
     */
    function setNewMaxLevel(uint256 newMaxLevel_, uint256 daysToLevelUp_)
        public
        onlyOwner
    {
        if (levelData[newMaxLevel_] > 0) revert LevelExisted();
        if (daysToLevelUp_ <= 0) revert WrongDaysToLevelUp();
        if (newMaxLevel_ != maxLevel + 1) revert WrongMaxLevel();

        levelData[newMaxLevel_] = daysToLevelUp_;
        maxLevel = newMaxLevel_;
    }

    /**
     * @dev Get current level for specific tokenId (Dynamic tokenURI)
     */
    function getLevel(uint256 tokenId_) public view returns (uint256) {
        uint256 newLevel = levelTokenId[tokenId_];
        if (isLeveledUpFromCurrentFieldTrip(tokenId_)) {
            newLevel += 1;
        }
        return newLevel;
    }

    /**
     * @dev Status if already leveled up in current Field Trip
     */
    function isLeveledUpFromCurrentFieldTrip(uint256 tokenId_)
        public
        view
        returns (bool)
    {
        bool isLeveledUp;
        (, , , isLeveledUp) = fieldTripStatus(tokenId_);
        return isLeveledUp;
    }

    /**
     * @dev Force dismiss - with help manually from DISMISS role
     */
    function dismissFromFieldTrip(uint256 tokenId_)
        external
        onlyRole(DISMISS_ROLE)
    {
        if (fieldTripStarted[tokenId_] == 0) revert NotOnFieldTrip();

        // Level up if already level up in field trip
        if (isLeveledUpFromCurrentFieldTrip(tokenId_)) {
            uint256 currentLevel = levelTokenId[tokenId_];
            levelTokenId[tokenId_] = currentLevel + 1;
        }

        // Reset if dismissed
        fieldTripStarted[tokenId_] = 0;

        emit StoppedFieldTrip(tokenId_); // emit Unnested
        emit Dismissed(tokenId_); // emit Expelled
    }

    /**
     * @notice Block transfer when Field Trip
     */
    function _beforeTokenTransfer(
        address,
        address,
        uint256 tokenId,
        uint256
    ) internal view override {
        if (fieldTripStarted[tokenId] > 0) revert OnFieldTrip();
    }

    /**
    @dev Emitted when starts fieldTrip.
     */
    event StartedFieldTrip(uint256 indexed tokenId, uint256 indexed nextLevel);

    /**
    @dev Emitted when stops fieldTrip
     */
    event StoppedFieldTrip(uint256 indexed tokenId);

    /**
    @dev Emitted when is Dismissed from the fieldTrip.
     */
    event Dismissed(uint256 indexed tokenId);

    /**
    @notice Whether fieldTrip is currently allowed.
    @dev If false then fieldTrip is blocked, but stopFieldTrip is always allowed.
     */
    mapping(uint256 => bool) public fieldTripOpen;

    /**
    @notice Toggles the `fieldTripOpen` flag.
     */
    function setFieldTripOpen(uint256 level_, bool open_) external onlyOwner {
        if (level_ <= 0) revert Level0();
        if (level_ > maxLevel) revert LevelNotAvailable();

        fieldTripOpen[level_] = open_;
    }

    bytes32 public constant DISMISS_ROLE = keccak256("DISMISS_ROLE");

    /**
     * @dev REWARD based on Level of the token
     */
    mapping(uint256 => bool) public rewardAlreadyClaimed; // check claimed status
    mapping(uint256 => address) public rewardContractAddress; // reward contract per level
    mapping(uint256 => bool) public rewardOpenToClaim;

    function claimReward(uint256 level_, uint256 tokenId_) public payable {
        if (ownerOf(tokenId_) != msg.sender) revert NotOwner();
        if (getLevel(tokenId_) < level_) revert LevelNotReachedToClaim();
        if (rewardAlreadyClaimed[tokenId_]) revert RewardAlreadyClaimed();
        if (rewardContractAddress[level_] == address(0x0))
            revert RewardAddressNotSetYet();

        rewardAlreadyClaimed[tokenId_] = true;
        RewardContract rewardContract = RewardContract(
            rewardContractAddress[level_]
        );
        rewardContract.mintReward{value: msg.value}(msg.sender, tokenId_);
    }

    function setRewardContract(uint256 level_, address contractAddress_)
        public
        onlyOwner
    {
        rewardContractAddress[level_] = contractAddress_;
    }

    function setRewardOpenToClaim(uint256 level_, bool open_) public onlyOwner {
        if (rewardContractAddress[level_] == address(0x0))
            revert RewardAddressNotSetYet();
        rewardOpenToClaim[level_] = open_;
    }

    /**
     * @dev SET THE PROVENANCE HASH for Fairness Random
     */
    function setProvenanceHash(string memory provenanceHash_)
        external
        onlyOwner
    {
        provenanceHash = provenanceHash_;
    }

    /* BEGIN CHAINLINK CONFIG */

    event RequestSent(uint256 requestId, uint32 numWords);
    event RequestFulfilled(
        uint256 requestId,
        uint256[] randomWords,
        uint256 payment
    );

    struct RequestStatus {
        uint256 paid; // amount paid in link
        bool fulfilled; // whether the request has been successfully fulfilled
        uint256[] randomWords;
    }
    mapping(uint256 => RequestStatus) public s_requests; /* requestId --> requestStatus */

    // ChainLink config
    uint256[] public requestIds;
    uint256 public lastRequestId;
    uint32 callbackGasLimit = 100000;
    uint16 requestConfirmations = 3;
    uint32 numWords = 1;
    address public linkAddress;

    /* END CHAINLINK CONFIG */

    // Request random for provable fairness
    function requestRandomStartingIndex()
        external
        onlyOwner
        returns (uint256 requestId)
    {
        if (bytes(provenanceHash).length <= 0) revert ProvenanceHashNotSetYet(); // should be done after provenance hash existed
        if (startingIndex > 0) revert StartingIndexExisted(); // once only

        requestId = requestRandomness(
            callbackGasLimit,
            requestConfirmations,
            numWords
        );
        s_requests[requestId] = RequestStatus({
            paid: VRF_V2_WRAPPER.calculateRequestPrice(callbackGasLimit),
            randomWords: new uint256[](0),
            fulfilled: false
        });
        requestIds.push(requestId);
        lastRequestId = requestId;
        emit RequestSent(requestId, numWords);
        return requestId;
    }

    function fulfillRandomWords(
        uint256 _requestId,
        uint256[] memory _randomWords
    ) internal override {
        require(s_requests[_requestId].paid > 0, "request not found");
        s_requests[_requestId].fulfilled = true;

        startingIndex = _randomWords[0] % collectionSize;
        // Prevent default sequence
        if (startingIndex == 0) {
            startingIndex = startingIndex + 1;
        }

        emit RequestFulfilled(
            _requestId,
            _randomWords,
            s_requests[_requestId].paid
        );
    }

    function getRequestStatus(uint256 _requestId)
        external
        view
        returns (
            uint256 paid,
            bool fulfilled,
            uint256[] memory randomWords
        )
    {
        require(s_requests[_requestId].paid > 0, "request not found");
        RequestStatus memory request = s_requests[_requestId];
        return (request.paid, request.fulfilled, request.randomWords);
    }

    /**
     * @dev Set LINK address
     */
    function setLinkAddress(address linkAddress_) external onlyOwner {
        linkAddress = linkAddress_;
    }

    /**
     * @dev Filter registry
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public override onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

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

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

    /**
     * @dev Set the baseTokenURI for {_baseURI}
     */
    function setBaseTokenURI(string memory baseTokenURI_, uint256 level_)
        public
        onlyOwner
    {
        baseTokenUriPerLevel[level_] = baseTokenURI_;
    }

    /**
     * @dev Owner's
     */
    function setBuddyListLimitPerWallet(uint256 newLimit_) external onlyOwner {
        buddyListLimitPerWallet = newLimit_;
    }

    function setWaitListLimitPerWallet(uint256 newLimit_) external onlyOwner {
        waitListLimitPerWallet = newLimit_;
    }

    function setPublicLimitPerWallet(uint256 newLimit_) external onlyOwner {
        publicLimitPerWallet = newLimit_;
    }

    function setContractMetadataURI(string memory contractMetadataURI_)
        public
        onlyOwner
    {
        contractMetadataURI = contractMetadataURI_;
    }

    function setSignerAddress(address signerAddress_) public onlyOwner {
        if (signerAddress_ == address(0)) revert ZeroAddress();
        signerAddress = signerAddress_;
    }

    function setMintPrice(uint256 mintPrice_) public onlyOwner {
        mintPrice = mintPrice_;
    }

    function setPublicMintPrice(uint256 publicMintPrice_) public onlyOwner {
        publicMintPrice = publicMintPrice_;
    }

    /**
     * In case needed, otherwise just use from constructor
     * @dev newSupply_
     */
    function setVIPSupply(uint256 newSupply_) external onlyOwner {
        vipSupply = newSupply_;
    }

    /**
     * Will be set at the end of sale state if needed
     * @dev numberReserved_ new reserved qty
     */
    function setNumberReservedToken(uint256 numberReserved_)
        external
        onlyOwner
    {
        numberReserved = numberReserved_;
    }

    // Sets Origamasks Address for withdraw(), reserved tokens, and ERC2981 royaltyInfo
    address payable public origamasksAddress;

    /**
     * @dev Update the Origamasks address
     */
    function setOrigamasksAddress(address payable origamasksAddress_)
        public
        onlyOwner
    {
        if (origamasksAddress_ == address(0)) revert ZeroAddress();
        origamasksAddress = origamasksAddress_;
    }

    /**
     * @dev Update the royalty percentage (500 = 5%)
     */
    function setRoyaltyInfo(uint96 royaltyPercentage_) public onlyOwner {
        if (origamasksAddress == address(0)) revert ZeroAddress();
        _setDefaultRoyalty(origamasksAddress, royaltyPercentage_);
    }

    /**
     * @dev Set contract royalty info
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControl, ERC721, ERC2981)
        returns (bool)
    {
        return
            ERC721.supportsInterface(interfaceId) ||
            ERC2981.supportsInterface(interfaceId);
    }

    /**
     * @notice Requires that msg.sender owns or is approved for the token.
     */
    modifier onlyApprovedOrOwner(uint256 tokenId_) {
        require(
            // _ownershipOf(tokenId_).addr == _msgSender() ||
            ownerOf(tokenId_) == _msgSender() ||
                getApproved(tokenId_) == _msgSender(),
            "ERC721: Not approved nor owner"
        );
        _;
    }

    /**
     * @dev Withdraw of LINK tokens from the contract
     */
    function withdrawLink() public onlyOwner {
        LinkTokenInterface link = LinkTokenInterface(linkAddress);
        require(
            link.transfer(msg.sender, link.balanceOf(address(this))),
            "Unable to transfer"
        );
    }

    /**
     * @dev Withdraw function for owner.
     */
    function withdraw() external onlyOwner {
        (bool success, ) = payable(origamasksAddress).call{
            value: address(this).balance
        }("");
        if (!success) revert TransferFailed();
    }

    /**
     * Useful for testing. Not to use in production.
     */
    function setCollectionSize(uint256 size) external onlyOwner {
        collectionSize = size;
    }
}

File 2 of 24 : VRFV2WrapperConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";
import "./interfaces/VRFV2WrapperInterface.sol";

/** *******************************************************************************
 * @notice Interface for contracts using VRF randomness through the VRF V2 wrapper
 * ********************************************************************************
 * @dev PURPOSE
 *
 * @dev Create VRF V2 requests without the need for subscription management. Rather than creating
 * @dev and funding a VRF V2 subscription, a user can use this wrapper to create one off requests,
 * @dev paying up front rather than at fulfillment.
 *
 * @dev Since the price is determined using the gas price of the request transaction rather than
 * @dev the fulfillment transaction, the wrapper charges an additional premium on callback gas
 * @dev usage, in addition to some extra overhead costs associated with the VRFV2Wrapper contract.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFV2WrapperConsumerBase. The consumer must be funded
 * @dev with enough LINK to make the request, otherwise requests will revert. To request randomness,
 * @dev call the 'requestRandomness' function with the desired VRF parameters. This function handles
 * @dev paying for the request based on the current pricing.
 *
 * @dev Consumers must implement the fullfillRandomWords function, which will be called during
 * @dev fulfillment with the randomness result.
 */
abstract contract VRFV2WrapperConsumerBase {
  LinkTokenInterface internal immutable LINK;
  VRFV2WrapperInterface internal immutable VRF_V2_WRAPPER;

  /**
   * @param _link is the address of LinkToken
   * @param _vrfV2Wrapper is the address of the VRFV2Wrapper contract
   */
  constructor(address _link, address _vrfV2Wrapper) {
    LINK = LinkTokenInterface(_link);
    VRF_V2_WRAPPER = VRFV2WrapperInterface(_vrfV2Wrapper);
  }

  /**
   * @dev Requests randomness from the VRF V2 wrapper.
   *
   * @param _callbackGasLimit is the gas limit that should be used when calling the consumer's
   *        fulfillRandomWords function.
   * @param _requestConfirmations is the number of confirmations to wait before fulfilling the
   *        request. A higher number of confirmations increases security by reducing the likelihood
   *        that a chain re-org changes a published randomness outcome.
   * @param _numWords is the number of random words to request.
   *
   * @return requestId is the VRF V2 request ID of the newly created randomness request.
   */
  function requestRandomness(
    uint32 _callbackGasLimit,
    uint16 _requestConfirmations,
    uint32 _numWords
  ) internal returns (uint256 requestId) {
    LINK.transferAndCall(
      address(VRF_V2_WRAPPER),
      VRF_V2_WRAPPER.calculateRequestPrice(_callbackGasLimit),
      abi.encode(_callbackGasLimit, _requestConfirmations, _numWords)
    );
    return VRF_V2_WRAPPER.lastRequestId();
  }

  /**
   * @notice fulfillRandomWords handles the VRF V2 wrapper response. The consuming contract must
   * @notice implement it.
   *
   * @param _requestId is the VRF V2 request ID.
   * @param _randomWords is the randomness result.
   */
  function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal virtual;

  function rawFulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) external {
    require(msg.sender == address(VRF_V2_WRAPPER), "only VRF V2 wrapper can fulfill");
    fulfillRandomWords(_requestId, _randomWords);
  }
}

File 3 of 24 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 4 of 24 : VRFV2WrapperInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFV2WrapperInterface {
  /**
   * @return the request ID of the most recent VRF V2 request made by this wrapper. This should only
   * be relied option within the same transaction that the request was made.
   */
  function lastRequestId() external view returns (uint256);

  /**
   * @notice Calculates the price of a VRF request with the given callbackGasLimit at the current
   * @notice block.
   *
   * @dev This function relies on the transaction gas price which is not automatically set during
   * @dev simulation. To estimate the price at a specific gas price, use the estimatePrice function.
   *
   * @param _callbackGasLimit is the gas limit used to estimate the price.
   */
  function calculateRequestPrice(uint32 _callbackGasLimit) external view returns (uint256);

  /**
   * @notice Estimates the price of a VRF request with a specific gas limit and gas price.
   *
   * @dev This is a convenience function that can be called in simulation to better understand
   * @dev pricing.
   *
   * @param _callbackGasLimit is the gas limit used to estimate the price.
   * @param _requestGasPriceWei is the gas price in wei used for the estimation.
   */
  function estimateRequestPrice(uint32 _callbackGasLimit, uint256 _requestGasPriceWei) external view returns (uint256);
}

File 5 of 24 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 24 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 8 of 24 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

File 9 of 24 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

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

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

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 10 of 24 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        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) {
        _requireMinted(tokenId);

        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 overridden 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 token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(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) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

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

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @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 {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 11 of 24 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 13 of 24 : 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 14 of 24 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `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 15 of 24 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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 functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 16 of 24 : 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 17 of 24 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 18 of 24 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 19 of 24 : 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 20 of 24 : 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 21 of 24 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 22 of 24 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

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

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

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

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

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

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

abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant operatorFilterRegistry =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

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

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

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"signer_","type":"address"},{"internalType":"address payable","name":"origamasksAddress_","type":"address"},{"internalType":"address","name":"linkAddress_","type":"address"},{"internalType":"address","name":"wrapperAddress_","type":"address"},{"internalType":"uint256","name":"vipSupply_","type":"uint256"},{"internalType":"uint256","name":"minimumReserved_","type":"uint256"},{"internalType":"uint256","name":"initialMaxLevel_","type":"uint256"},{"internalType":"uint256","name":"initialDaysToLevelUp_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ExceedReservedSpots","type":"error"},{"inputs":[],"name":"ExceedVIPSpots","type":"error"},{"inputs":[],"name":"FieldTripClosed","type":"error"},{"inputs":[],"name":"IncorrectPrice","type":"error"},{"inputs":[],"name":"InvalidSaleState","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"Level0","type":"error"},{"inputs":[],"name":"LevelExisted","type":"error"},{"inputs":[],"name":"LevelNotAvailable","type":"error"},{"inputs":[],"name":"LevelNotReachedToClaim","type":"error"},{"inputs":[],"name":"LimitPerWalletExceeded","type":"error"},{"inputs":[],"name":"NotOnFieldTrip","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NotUser","type":"error"},{"inputs":[],"name":"OnFieldTrip","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"ProvenanceHashNotSetYet","type":"error"},{"inputs":[],"name":"PublicNotReady","type":"error"},{"inputs":[],"name":"RewardAddressNotSetYet","type":"error"},{"inputs":[],"name":"RewardAlreadyClaimed","type":"error"},{"inputs":[],"name":"SizeNotSame","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"StartingIndexExisted","type":"error"},{"inputs":[],"name":"TokenOutOfRange","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"WrongDaysToLevelUp","type":"error"},{"inputs":[],"name":"WrongMaxLevel","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Dismissed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"enum Origamasks.SaleState","name":"state","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Minted","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":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"randomWords","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"RequestFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"numWords","type":"uint32"}],"name":"RequestSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum Origamasks.SaleState","name":"saleState","type":"uint8"}],"name":"SaleStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"nextLevel","type":"uint256"}],"name":"StartedFieldTrip","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"StoppedFieldTrip","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISMISS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"VIPMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"VIP_LIMIT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tos_","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"name":"airdrop","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"baseTokenUriPerLevel","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buddyListLimitPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"buddyListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level_","type":"uint256"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"claimReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"collectionSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"dismissFromFieldTrip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"experienceData","outputs":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"daysToLevelUp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fieldTripOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"fieldTripStatus","outputs":[{"internalType":"bool","name":"isFieldTrip","type":"bool"},{"internalType":"uint256","name":"currentPeriod","type":"uint256"},{"internalType":"uint256","name":"prevLevel","type":"uint256"},{"internalType":"bool","name":"isLeveledUp","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ownerAddress_","type":"address"}],"name":"getMintedTokenIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"getRequestStatus","outputs":[{"internalType":"uint256","name":"paid","type":"uint256"},{"internalType":"bool","name":"fulfilled","type":"bool"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"isLeveledUpFromCurrentFieldTrip","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRequestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"levelData","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"linkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"numberMintedBuddyList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"numberMintedPublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"numberMintedWaitList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberReserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"origamasksAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicLimitPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"},{"internalType":"uint256[]","name":"_randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"requestRandomStartingIndex","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"receiver_","type":"address"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardAlreadyClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardOpenToClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"","type":"uint256"}],"name":"s_requests","outputs":[{"internalType":"uint256","name":"paid","type":"uint256"},{"internalType":"bool","name":"fulfilled","type":"bool"}],"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":"saleState","outputs":[{"internalType":"enum Origamasks.SaleState","name":"","type":"uint8"}],"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":"baseTokenURI_","type":"string"},{"internalType":"uint256","name":"level_","type":"uint256"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit_","type":"uint256"}],"name":"setBuddyListLimitPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"}],"name":"setCollectionSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractMetadataURI_","type":"string"}],"name":"setContractMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level_","type":"uint256"},{"internalType":"bool","name":"open_","type":"bool"}],"name":"setFieldTripOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"linkAddress_","type":"address"}],"name":"setLinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintPrice_","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxLevel_","type":"uint256"},{"internalType":"uint256","name":"daysToLevelUp_","type":"uint256"}],"name":"setNewMaxLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberReserved_","type":"uint256"}],"name":"setNumberReservedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"origamasksAddress_","type":"address"}],"name":"setOrigamasksAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash_","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit_","type":"uint256"}],"name":"setPublicLimitPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"publicMintPrice_","type":"uint256"}],"name":"setPublicMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level_","type":"uint256"},{"internalType":"address","name":"contractAddress_","type":"address"}],"name":"setRewardContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level_","type":"uint256"},{"internalType":"bool","name":"open_","type":"bool"}],"name":"setRewardOpenToClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"royaltyPercentage_","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"saleState_","type":"uint256"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signerAddress_","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSupply_","type":"uint256"}],"name":"setVIPSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit_","type":"uint256"}],"name":"setWaitListLimitPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"name":"startManyFieldTrips","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"name":"stopManyFieldTrips","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vipSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"waitListLimitPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature_","type":"bytes"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"waitListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"waitListMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405261138860105560006011556658d15e17628000601355667c58508723800060145560026016819055601781905560185560c8601955602a80546001600160501b03191666010003000186a01790553480156200005f57600080fd5b506040516200652338038062006523833981016040819052620000829162000994565b8585733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280600a8152602001694f726967616d61736b7360b01b815250604051806040016040528060038152602001620e2ad960ec1b8152508160009080519060200190620000f2929190620008d8565b50805162000108906001906020840190620008d8565b50506001600855506daaeb6d7670e522a718067333cd4e3b1562000255578015620001a357604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200018457600080fd5b505af115801562000199573d6000803e3d6000fd5b5050505062000255565b6001600160a01b03821615620001f45760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000169565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200023b57600080fd5b505af115801562000250573d6000803e3d6000fd5b505050505b506200026390503362000301565b6001600160a01b039182166080521660a052620002808862000353565b6200028b87620003a7565b620002986101f4620003fb565b620002a56000336200044a565b602a8054600160501b600160f01b0319166a01000000000000000000006001600160a01b0389160217905560128490556019839055620002e682826200045a565b620002f3876001620004fc565b505050505050505062000a86565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200035d620006a1565b6001600160a01b038116620003855760405163d92e233d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b620003b1620006a1565b6001600160a01b038116620003d95760405163d92e233d60e01b815260040160405180910390fd5b602b80546001600160a01b0319166001600160a01b0392909216919091179055565b62000405620006a1565b602b546001600160a01b03166200042f5760405163d92e233d60e01b815260040160405180910390fd5b602b5462000447906001600160a01b031682620006ff565b50565b62000456828262000800565b5050565b62000464620006a1565b6000828152602260205260409020541562000492576040516347c7b8b560e11b815260040160405180910390fd5b60008111620004b45760405163648a146160e01b815260040160405180910390fd5b602054620004c490600162000a23565b8214620004e45760405163269a18e560e01b815260040160405180910390fd5b60008281526022602090815260409091209190915555565b6001600160a01b038216620005585760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064015b60405180910390fd5b6000818152600260205260409020546001600160a01b031615620005bf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016200054f565b620005cf600083836001620008a4565b6000818152600260205260409020546001600160a01b031615620006365760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016200054f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a546001600160a01b03163314620006fd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200054f565b565b6127106001600160601b03821611156200076f5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016200054f565b6001600160a01b038216620007c75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200054f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620004565760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620008603390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526021602052604090205415620008d2576040516365a2f84360e11b815260040160405180910390fd5b50505050565b828054620008e69062000a4a565b90600052602060002090601f0160209004810192826200090a576000855562000955565b82601f106200092557805160ff191683800117855562000955565b8280016001018555821562000955579182015b828111156200095557825182559160200191906001019062000938565b506200096392915062000967565b5090565b5b8082111562000963576000815560010162000968565b6001600160a01b03811681146200044757600080fd5b600080600080600080600080610100898b031215620009b257600080fd5b8851620009bf816200097e565b60208a0151909850620009d2816200097e565b60408a0151909750620009e5816200097e565b60608a0151909650620009f8816200097e565b60808a015160a08b015160c08c015160e0909c01519a9d999c50979a91999098919650945092505050565b6000821982111562000a4557634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168062000a5f57607f821691505b60208210810362000a8057634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051615a6262000ac1600039600081816118ec01528181611a4f01528181613a370152613b4001526000613a0d0152615a626000f3fe6080604052600436106106085760003560e01c80636ea3d6a211610322578063a217fddf116101a5578063d547741f116100ec578063e8fd152b11610095578063f2fde38b1161006f578063f2fde38b1461127f578063f4a0a5281461129f578063fc2a88c3146112bf57600080fd5b8063e8fd152b1461120d578063e907090314611223578063e985e9c51461123657600080fd5b8063d8a4676f116100c6578063d8a4676f146111b5578063dc53fd92146111e4578063e375a938146111fa57600080fd5b8063d547741f14611160578063d5abeb0114611180578063d6397c611461119557600080fd5b8063c46da04a1161014e578063cb774d4711610128578063cb774d4714611107578063cbc9e8271461111d578063cc06c3591461114a57600080fd5b8063c46da04a146110b2578063c6ab67a3146110d2578063c87b56dd146110e757600080fd5b8063aca8ffe71161017f578063aca8ffe71461102e578063b88d4fde1461104e578063c22b28051461106e57600080fd5b8063a217fddf14610fd9578063a22cb46514610fee578063a574da231461100e57600080fd5b80638796ba8c116102695780639b2573ee11610212578063a011a4b6116101ec578063a011a4b614610f4d578063a168fa8914610f6d578063a201fc5014610fb957600080fd5b80639b2573ee14610ee35780639d6eab8214610ef95780639eb978aa14610f1957600080fd5b806391d148541161024357806391d1485414610e5257806394611b8a14610e9857806395d89b4114610ece57600080fd5b80638796ba8c14610dff5780638da5cb5b14610e1f5780638dc654a214610e3d57600080fd5b8063798c7d9a116102cb5780638535923f116102a55780638535923f14610d9657806386481d4014610dcc57806386bb8f3714610dec57600080fd5b8063798c7d9a14610d2a578063845b505f14610d4057806384a0125a14610d6057600080fd5b80637183e226116102fc5780637183e22614610cba57806375e589a314610cea57806376aa6b7e14610d0a57600080fd5b80636ea3d6a214610c6557806370a0823114610c85578063715018a614610ca557600080fd5b8063324d1510116104aa5780635925b7b9116103f157806360a5dded1161039a5780636817c76c116103745780636817c76c14610c0c5780636b1ad36714610c225780636debc0b814610c3857600080fd5b806360a5dded14610bac5780636352211e14610bcc5780636724348214610bec57600080fd5b80635d82cf6e116103cb5780635d82cf6e14610b28578063603f4d5214610b485780636045817414610b7657600080fd5b80635925b7b914610ac8578063593f391514610ae85780635b7633d014610b0857600080fd5b80634af9345e11610453578063547f4f3a1161042d578063547f4f3a14610a685780635713b93514610a88578063575e609814610aa857600080fd5b80634af9345e14610a055780634c0fb3c014610a255780635073356414610a5557600080fd5b80633ccfd60b116104845780633ccfd60b146109ba57806342842e0e146109cf57806345c0f533146109ef57600080fd5b8063324d15101461093b57806336568abe146109515780633b6914531461097157600080fd5b806318160ddd1161056e57806323b872dd116105175780632a55205a116104f15780632a55205a146108bc5780632c26313a146108fb5780632f2ff15d1461091b57600080fd5b806323b872dd1461084c578063248a9ca31461086c57806324ff766e1461089c57600080fd5b80631fe543e3116105485780631fe543e3146107e557806321dcd43a14610805578063235cea981461082557600080fd5b806318160ddd1461079a57806318935732146107b05780631d89dab2146107d057600080fd5b8063084c4088116105d057806310969523116105aa5780631096952314610741578063148097021461076157806315b58f9c1461078457600080fd5b8063084c4088146106ee578063095ea7b31461070e5780630ea5ff561461072e57600080fd5b806301ffc9a71461060d578063031fdd1f14610642578063046dc1661461067257806306fdde0314610694578063081812fc146106b6575b600080fd5b34801561061957600080fd5b5061062d610628366004614f28565b6112d5565b60405190151581526020015b60405180910390f35b34801561064e57600080fd5b5061062d61065d366004614f45565b60236020526000908152604090205460ff1681565b34801561067e57600080fd5b5061069261068d366004614f73565b6112f5565b005b3480156106a057600080fd5b506106a9611346565b6040516106399190614fe8565b3480156106c257600080fd5b506106d66106d1366004614f45565b6113d8565b6040516001600160a01b039091168152602001610639565b3480156106fa57600080fd5b50610692610709366004614f45565b6113ff565b34801561071a57600080fd5b50610692610729366004614ffb565b61148a565b61069261073c366004615027565b6115a4565b34801561074d57600080fd5b5061069261075c36600461515e565b61180b565b34801561076d57600080fd5b50610776600181565b604051908152602001610639565b34801561079057600080fd5b5061077660145481565b3480156107a657600080fd5b5061077660115481565b3480156107bc57600080fd5b506106926107cb366004614f45565b61182a565b3480156107dc57600080fd5b50610776611837565b3480156107f157600080fd5b50610692610800366004615222565b611a44565b34801561081157600080fd5b50610692610820366004615269565b611ac6565b34801561083157600080fd5b50602a546106d690600160501b90046001600160a01b031681565b34801561085857600080fd5b50610692610867366004615299565b611afc565b34801561087857600080fd5b50610776610887366004614f45565b60009081526009602052604090206001015490565b3480156108a857600080fd5b506106926108b7366004614f73565b611c58565b3480156108c857600080fd5b506108dc6108d73660046152da565b611ca1565b604080516001600160a01b039093168352602083019190915201610639565b34801561090757600080fd5b506106926109163660046152da565b611d4f565b34801561092757600080fd5b50610692610936366004615269565b611dea565b34801561094757600080fd5b5061077660195481565b34801561095d57600080fd5b5061069261096c366004615269565b611e0f565b34801561097d57600080fd5b506109a561098c366004614f45565b601e602052600090815260409020805460019091015482565b60408051928352602083019190915201610639565b3480156109c657600080fd5b50610692611e97565b3480156109db57600080fd5b506106926109ea366004615299565b611f16565b3480156109fb57600080fd5b5061077660105481565b348015610a1157600080fd5b50610692610a203660046152fc565b612067565b348015610a3157600080fd5b5061062d610a40366004614f45565b60246020526000908152604090205460ff1681565b610692610a63366004615027565b6120ae565b348015610a7457600080fd5b50610692610a83366004615333565b6122be565b348015610a9457600080fd5b50610692610aa3366004615333565b61232a565b348015610ab457600080fd5b50610692610ac3366004615358565b612387565b348015610ad457600080fd5b50610692610ae33660046153cd565b612401565b348015610af457600080fd5b50610692610b03366004614f73565b612501565b348015610b1457600080fd5b50600b546106d6906001600160a01b031681565b348015610b3457600080fd5b50610692610b43366004614f45565b612552565b348015610b5457600080fd5b50600b54610b6990600160a01b900460ff1681565b604051610639919061542a565b348015610b8257600080fd5b50610776610b91366004614f73565b6001600160a01b03166000908152600e602052604090205490565b348015610bb857600080fd5b50610692610bc7366004614f45565b61255f565b348015610bd857600080fd5b506106d6610be7366004614f45565b612657565b348015610bf857600080fd5b50610692610c07366004615452565b6126bc565b348015610c1857600080fd5b5061077660135481565b348015610c2e57600080fd5b5061077660185481565b348015610c4457600080fd5b50610c58610c53366004614f73565b612822565b6040516106399190615545565b348015610c7157600080fd5b50610692610c80366004614f45565b61288e565b348015610c9157600080fd5b50610776610ca0366004614f73565b61289b565b348015610cb157600080fd5b50610692612921565b348015610cc657600080fd5b5061062d610cd5366004614f45565b60266020526000908152604090205460ff1681565b348015610cf657600080fd5b50610692610d05366004614f45565b612935565b348015610d1657600080fd5b50602b546106d6906001600160a01b031681565b348015610d3657600080fd5b5061077660165481565b348015610d4c57600080fd5b50610692610d5b366004614f45565b612942565b348015610d6c57600080fd5b50610776610d7b366004614f73565b6001600160a01b03166000908152600d602052604090205490565b348015610da257600080fd5b50610776610db1366004614f73565b6001600160a01b03166000908152600f602052604090205490565b348015610dd857600080fd5b50610776610de7366004614f45565b61294f565b610692610dfa3660046152da565b61297e565b348015610e0b57600080fd5b50610776610e1a366004614f45565b612ada565b348015610e2b57600080fd5b50600a546001600160a01b03166106d6565b348015610e4957600080fd5b50610692612afb565b348015610e5e57600080fd5b5061062d610e6d366004615269565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610ea457600080fd5b506106d6610eb3366004614f45565b6025602052600090815260409020546001600160a01b031681565b348015610eda57600080fd5b506106a9612c3c565b348015610eef57600080fd5b5061077660125481565b348015610f0557600080fd5b50610692610f14366004615358565b612c4b565b348015610f2557600080fd5b506107767f2486b27fa81d5092a513ddb984a65deb0df3f677fc467c072b096791a56773dc81565b348015610f5957600080fd5b50610692610f68366004614f45565b612c8a565b348015610f7957600080fd5b50610fa4610f88366004614f45565b6027602052600090815260409020805460019091015460ff1682565b60408051928352901515602083015201610639565b348015610fc557600080fd5b50610692610fd436600461515e565b612c97565b348015610fe557600080fd5b50610776600081565b348015610ffa57600080fd5b50610692611009366004615558565b612cb2565b34801561101a57600080fd5b506106a9611029366004614f45565b612cbd565b34801561103a57600080fd5b50610692611049366004614f45565b612d57565b34801561105a57600080fd5b50610692611069366004615586565b612d64565b34801561107a57600080fd5b5061108e611089366004614f45565b612ec3565b60408051941515855260208501939093529183015215156060820152608001610639565b3480156110be57600080fd5b5061062d6110cd366004614f45565b612f4e565b3480156110de57600080fd5b506106a9612f64565b3480156110f357600080fd5b506106a9611102366004614f45565b612f71565b34801561111357600080fd5b50610776601d5481565b34801561112957600080fd5b50610776611138366004614f45565b60226020526000908152604090205481565b34801561115657600080fd5b5061077660205481565b34801561116c57600080fd5b5061069261117b366004615269565b613025565b34801561118c57600080fd5b5061077661304a565b3480156111a157600080fd5b506106926111b0366004615606565b613061565b3480156111c157600080fd5b506111d56111d0366004614f45565b613088565b6040516106399392919061564b565b3480156111f057600080fd5b5061077660155481565b610692611208366004615027565b613176565b34801561121957600080fd5b5061077660175481565b610692611231366004615027565b61337a565b34801561124257600080fd5b5061062d611251366004615675565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561128b57600080fd5b5061069261129a366004614f73565b613589565b3480156112ab57600080fd5b506106926112ba366004614f45565b6135ff565b3480156112cb57600080fd5b5061077660295481565b60006112e08261360c565b806112ef57506112ef8261365c565b92915050565b6112fd613681565b6001600160a01b0381166113245760405163d92e233d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b606060008054611355906156a3565b80601f0160208091040260200160405190810160405280929190818152602001828054611381906156a3565b80156113ce5780601f106113a3576101008083540402835291602001916113ce565b820191906000526020600020905b8154815290600101906020018083116113b157829003601f168201915b5050505050905090565b60006113e3826136db565b506000908152600460205260409020546001600160a01b031690565b611407613681565b80600681111561141957611419615414565b600b805460ff60a01b1916600160a01b83600681111561143b5761143b615414565b0217905550600b54600160a01b900460ff16600681111561145e5761145e615414565b6040517f92a17b827ee9d42ea9454bb4ca941a1800870e6d01c0842d09ba23ccc0190ee190600090a250565b600061149582612657565b9050806001600160a01b0316836001600160a01b0316036115075760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061152357506115238133611251565b6115955760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016114fe565b61159f838361373f565b505050565b60043332146115c657604051637aafae9760e01b815260040160405180910390fd5b8060068111156115d8576115d8615414565b600b54600160a01b900460ff1660068111156115f6576115f6615414565b1461161457604051633482502f60e01b815260040160405180910390fd5b601554600003611637576040516327d9031160e11b815260040160405180910390fd5b6001821080611647575060105482115b156116655760405163744f82e360e01b815260040160405180910390fd5b6116c284848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260068152655075626c696360d01b602082015291506137ad9050565b6116df57604051638baa579f60e01b815260040160405180910390fd5b6116e761304a565b6011546116f59060016156f3565b1115611714576040516352df9fe560e01b815260040160405180910390fd5b6015543414611736576040516399b5cb1d60e01b815260040160405180910390fd5b601854336000908152600f602052604090205410611767576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600f909152812080549091906117a69084906156f3565b909155506117b69050338361384e565b601180549060006117c68361570b565b9091555082905060045b60405134815233907fba4ff9d44bbafa5bd145a99f6e3381a0f9da59c4b68dc8621e54c3d7032f07b49060200160405180910390a450505050565b611813613681565b805161182690601c906020840190614e3f565b5050565b611832613681565b601955565b6000611841613681565b6000601c8054611850906156a3565b905011611870576040516342f1e79360e01b815260040160405180910390fd5b601d5415611891576040516393a79bd960e01b815260040160405180910390fd5b602a546118bf9063ffffffff8082169161ffff640100000000820416916601000000000000909104166139e7565b604080516060810191829052602a546310c1b4d560e21b90925263ffffffff9091166064820152909150807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634306d35460848301602060405180830381865afa15801561193a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195e9190615724565b815260006020808301829052604080518381528083018252938101939093528482526027815290829020835181558382015160018201805460ff19169115159190911790559183015180516119b99260028501920190614ec3565b5050602880546001810182556000919091527fe16da923a2d88192e5070f37b4571d58682c0d66212ec634d495f33de3f77ab501829055506029819055602a5460408051838152660100000000000090920463ffffffff1660208301527fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee910160405180910390a190565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611abc5760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792056524620563220777261707065722063616e2066756c66696c6c0060448201526064016114fe565b6118268282613bc8565b611ace613681565b60009182526025602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b826daaeb6d7670e522a718067333cd4e3b15611c4757336001600160a01b03821603611b3257611b2d848484613cc8565b611c52565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba5919061573d565b8015611c285750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c28919061573d565b611c4757604051633b79c77360e21b81523360048201526024016114fe565b611c52848484613cc8565b50505050565b611c60613681565b602a80546001600160a01b03909216600160501b027fffff0000000000000000000000000000000000000000ffffffffffffffffffff909216919091179055565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291611d165750604080518082019091526006546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611d35906001600160601b03168761575a565b611d3f919061578f565b91519350909150505b9250929050565b611d57613681565b60008281526022602052604090205415611d84576040516347c7b8b560e11b815260040160405180910390fd5b60008111611da55760405163648a146160e01b815260040160405180910390fd5b602054611db39060016156f3565b8214611dd25760405163269a18e560e01b815260040160405180910390fd5b60008281526022602090815260409091209190915555565b600082815260096020526040902060010154611e0581613d3f565b61159f8383613d49565b6001600160a01b0381163314611e8d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016114fe565b6118268282613deb565b611e9f613681565b602b546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611eec576040519150601f19603f3d011682016040523d82523d6000602084013e611ef1565b606091505b5050905080611f13576040516312171d8360e31b815260040160405180910390fd5b50565b826daaeb6d7670e522a718067333cd4e3b1561205c57336001600160a01b03821603611f4757611b2d848484613e6e565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611f96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fba919061573d565b801561203d5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d919061573d565b61205c57604051633b79c77360e21b81523360048201526024016114fe565b611c52848484613e6e565b61206f613681565b602b546001600160a01b03166120985760405163d92e233d60e01b815260040160405180910390fd5b602b54611f13906001600160a01b031682613e89565b60023332146120d057604051637aafae9760e01b815260040160405180910390fd5b8060068111156120e2576120e2615414565b600b54600160a01b900460ff16600681111561210057612100615414565b1461211e57604051633482502f60e01b815260040160405180910390fd5b600182108061212e575060105482115b1561214c5760405163744f82e360e01b815260040160405180910390fd5b6121ac84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526009815268109d59191e531a5cdd60ba1b602082015291506137ad9050565b6121c957604051638baa579f60e01b815260040160405180910390fd5b6121d161304a565b6011546121df9060016156f3565b11156121fe576040516352df9fe560e01b815260040160405180910390fd5b6013543414612220576040516399b5cb1d60e01b815260040160405180910390fd5b601654336000908152600d602052604090205410612251576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600d909152812080549091906122909084906156f3565b909155506122a09050338361384e565b601180549060006122b08361570b565b9091555082905060026117d0565b6122c6613681565b600082116122e757604051638f65cf4160e01b815260040160405180910390fd5b60205482111561230a5760405163f4cb421f60e01b815260040160405180910390fd5b600091825260236020526040909120805460ff1916911515919091179055565b612332613681565b6000828152602560205260409020546001600160a01b031661236757604051631a5a25d360e11b815260040160405180910390fd5b600091825260266020526040909120805460ff1916911515919091179055565b8060005b81811015611c525760006123b68585848181106123aa576123aa6157a3565b9050602002013561294f565b6123c19060016156f3565b905060205481116123ee576123ee8585848181106123e1576123e16157a3565b9050602002013582613f86565b50806123f98161570b565b91505061238b565b612409613681565b600633321461242b57604051637aafae9760e01b815260040160405180910390fd5b80600681111561243d5761243d615414565b600b54600160a01b900460ff16600681111561245b5761245b615414565b1461247957604051633482502f60e01b815260040160405180910390fd5b601054835160115461248b91906156f3565b11156124aa57604051631279e56160e11b815260040160405180910390fd5b60005b8351811015611c52576124d9838583815181106124cc576124cc6157a3565b602002602001015161384e565b601180549060006124e98361570b565b919050555080806124f99061570b565b9150506124ad565b612509613681565b6001600160a01b0381166125305760405163d92e233d60e01b815260040160405180910390fd5b602b80546001600160a01b0319166001600160a01b0392909216919091179055565b61255a613681565b601555565b7f2486b27fa81d5092a513ddb984a65deb0df3f677fc467c072b096791a56773dc61258981613d3f565b60008281526021602052604081205490036125b75760405163290da5e160e01b815260040160405180910390fd5b6125c082612f4e565b156125f0576000828152601f60205260409020546125df8160016156f3565b6000848152601f6020526040902055505b6000828152602160205260408082208290555183917f687f2bdd19dccc556cb5455661050c9b9c1d8e5ea08012290cbeb69da4ec28a891a260405182907f3b834a47ba67ef104aea456265866673a3f6b0a58e7201148d17a57a991892e890600090a25050565b6000818152600260205260408120546001600160a01b0316806112ef5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016114fe565b6126c4613681565b6126cc6140c1565b60053332146126ee57604051637aafae9760e01b815260040160405180910390fd5b80600681111561270057612700615414565b600b54600160a01b900460ff16600681111561271e5761271e615414565b1461273c57604051633482502f60e01b815260040160405180910390fd5b815183511461275e5760405163b3fd7b3b60e01b815260040160405180910390fd5b60005b835181101561281657600084828151811061277e5761277e6157a3565b60200260200101519050600084838151811061279c5761279c6157a3565b602002602001015190506001600d6000846001600160a01b03166001600160a01b0316815260200190815260200160002060008282546127dc91906156f3565b909155506127ec9050828261384e565b601180549060006127fc8361570b565b91905055505050808061280e9061570b565b915050612761565b50506118266001600855565b6001600160a01b0381166000908152600c602090815260409182902080548351818402810184019094528084526060939283018282801561288257602002820191906000526020600020905b81548152602001906001019080831161286e575b50505050509050919050565b612896613681565b601855565b60006001600160a01b0382166129055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016114fe565b506001600160a01b031660009081526003602052604090205490565b612929613681565b612933600061411a565b565b61293d613681565b601255565b61294a613681565b601755565b6000818152601f602052604081205461296783612f4e565b156112ef576129776001826156f3565b9392505050565b3361298882612657565b6001600160a01b0316146129af576040516330cd747160e01b815260040160405180910390fd5b816129b98261294f565b10156129d85760405163d1cb832f60e01b815260040160405180910390fd5b60008181526024602052604090205460ff1615612a0857604051632cfe303760e21b815260040160405180910390fd5b6000828152602560205260409020546001600160a01b0316612a3d57604051631a5a25d360e11b815260040160405180910390fd5b6000818152602460208181526040808420805460ff19166001179055858452602590915291829020549151634d24848760e11b81523360048201529081018390526001600160a01b03909116908190639a49090e90349060440160206040518083038185885af1158015612ab5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611c529190615724565b60288181548110612aea57600080fd5b600091825260209091200154905081565b612b03613681565b602a546040516370a0823160e01b8152306004820152600160501b9091046001600160a01b031690819063a9059cbb90339083906370a0823190602401602060405180830381865afa158015612b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b819190615724565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf0919061573d565b611f135760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207472616e73666572000000000000000000000000000060448201526064016114fe565b606060018054611355906156a3565b8060005b81811015611c5257612c78848483818110612c6c57612c6c6157a3565b9050602002013561416c565b80612c828161570b565b915050612c4f565b612c92613681565b601655565b612c9f613681565b805161182690601b906020840190614e3f565b61182633838361428b565b601a6020526000908152604090208054612cd6906156a3565b80601f0160208091040260200160405190810160405280929190818152602001828054612d02906156a3565b8015612d4f5780601f10612d2457610100808354040283529160200191612d4f565b820191906000526020600020905b815481529060010190602001808311612d3257829003601f168201915b505050505081565b612d5f613681565b601055565b836daaeb6d7670e522a718067333cd4e3b15612eb057336001600160a01b03821603612d9b57612d9685858585614359565b612ebc565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0e919061573d565b8015612e915750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e91919061573d565b612eb057604051633b79c77360e21b81523360048201526024016114fe565b612ebc85858585614359565b5050505050565b6000818152602160205260408120548190819081908015612eef5760019450612eec81426157b9565b93505b6000868152601f60205260408120549350602281612f0e8660016156f3565b8152602001908152602001600020549050600081118015612f3b5750612f37816201518061575a565b8510155b15612f4557600192505b50509193509193565b600080612f5a83612ec3565b9695505050505050565b601c8054612cd6906156a3565b6000818152600260205260409020546060906001600160a01b0316612fd85760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f65736e27742065786973742100000000000000000000000060448201526064016114fe565b6000612fe38361294f565b6000818152601a60205260409020909150612ffd846143d1565b60405160200161300e9291906157ec565b604051602081830303815290604052915050919050565b60008281526009602052604090206001015461304081613d3f565b61159f8383613deb565b600060195460105461305c91906157b9565b905090565b613069613681565b6000818152601a60209081526040909120835161159f92850190614e3f565b60008181526027602052604081205481906060906130dc5760405162461bcd60e51b81526020600482015260116024820152701c995c5d595cdd081b9bdd08199bdd5b99607a1b60448201526064016114fe565b6000848152602760209081526040808320815160608101835281548152600182015460ff1615158185015260028201805484518187028101870186528181529295939486019383018282801561315157602002820191906000526020600020905b81548152602001906001019080831161313d575b5050509190925250508151602083015160409093015190989297509550909350505050565b600133321461319857604051637aafae9760e01b815260040160405180910390fd5b8060068111156131aa576131aa615414565b600b54600160a01b900460ff1660068111156131c8576131c8615414565b146131e657604051633482502f60e01b815260040160405180910390fd5b60018210806131f6575060105482115b156132145760405163744f82e360e01b815260040160405180910390fd5b61326e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600381526205649560ec1b602082015291506137ad9050565b61328b57604051638baa579f60e01b815260040160405180910390fd5b60125460115461329c9060016156f3565b11156132bb5760405163664dad0f60e11b815260040160405180910390fd5b60135434146132dd576040516399b5cb1d60e01b815260040160405180910390fd5b336000908152600d602052604090205460011161330d576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600d9091528120805490919061334c9084906156f3565b9091555061335c9050338361384e565b6011805490600061336c8361570b565b9091555082905060016117d0565b600333321461339c57604051637aafae9760e01b815260040160405180910390fd5b8060068111156133ae576133ae615414565b600b54600160a01b900460ff1660068111156133cc576133cc615414565b146133ea57604051633482502f60e01b815260040160405180910390fd5b60018210806133fa575060105482115b156134185760405163744f82e360e01b815260040160405180910390fd5b61347784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600881526715d85a5d131a5cdd60c21b602082015291506137ad9050565b61349457604051638baa579f60e01b815260040160405180910390fd5b61349c61304a565b6011546134aa9060016156f3565b11156134c9576040516352df9fe560e01b815260040160405180910390fd5b60145434146134eb576040516399b5cb1d60e01b815260040160405180910390fd5b601754336000908152600e60205260409020541061351c576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600e9091528120805490919061355b9084906156f3565b9091555061356b9050338361384e565b6011805490600061357b8361570b565b9091555082905060036117d0565b613591613681565b6001600160a01b0381166135f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016114fe565b611f138161411a565b613607613681565b601355565b60006001600160e01b031982166380ac58cd60e01b148061363d57506001600160e01b03198216635b5e139f60e01b145b806112ef57506301ffc9a760e01b6001600160e01b03198316146112ef565b60006001600160e01b0319821663152a902d60e11b14806112ef57506112ef8261360c565b600a546001600160a01b031633146129335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016114fe565b6000818152600260205260409020546001600160a01b0316611f135760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016114fe565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061377482612657565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006138368333846040516020016137c6929190615889565b6040516020818303038152906040526137de906158bc565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810191909152605c016040516020818303038152906040528051906020012061446490919063ffffffff16565b600b546001600160a01b039182169116149392505050565b6001600160a01b0382166138a45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016114fe565b6000818152600260205260409020546001600160a01b0316156139095760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016114fe565b613917600083836001614488565b6000818152600260205260409020546001600160a01b03161561397c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016114fe565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040516310c1b4d560e21b815263ffffffff841660048201526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691634000aea0917f00000000000000000000000000000000000000000000000000000000000000009190821690634306d35490602401602060405180830381865afa158015613a81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa59190615724565b6040805163ffffffff808b16602083015261ffff8a169282019290925290871660608201526080016040516020818303038152906040526040518463ffffffff1660e01b8152600401613afa939291906158e0565b6020604051808303816000875af1158015613b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b3d919061573d565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bc09190615724565b949350505050565b600082815260276020526040902054613c175760405162461bcd60e51b81526020600482015260116024820152701c995c5d595cdd081b9bdd08199bdd5b99607a1b60448201526064016114fe565b60008281526027602052604081206001908101805460ff19169091179055601054825190918391613c4a57613c4a6157a3565b6020026020010151613c5c9190615908565b601d819055600003613c7a57601d54613c769060016156f3565b601d555b600082815260276020526040908190205490517f147eb1ff0c82f87f2b03e2c43f5a36488ff63ec6b730195fde4605f612f8db5191613cbc918591859161591c565b60405180910390a15050565b613cd233826144b5565b613d345760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b60648201526084016114fe565b61159f838383614533565b611f138133614720565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff166118265760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613da73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16156118265760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61159f83838360405180602001604052806000815250612d64565b6127106001600160601b0382161115613ef75760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016114fe565b6001600160a01b038216613f4d5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016114fe565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b8133613f9182612657565b6001600160a01b03161480613fb6575033613fab826113d8565b6001600160a01b0316145b6140025760405162461bcd60e51b815260206004820152601e60248201527f4552433732313a204e6f7420617070726f766564206e6f72206f776e6572000060448201526064016114fe565b60008281526023602052604090205460ff1661403157604051630f65b44560e01b815260040160405180910390fd5b6000838152602160205260409020541561405e576040516365a2f84360e11b815260040160405180910390fd5b6020548211156140815760405163f4cb421f60e01b815260040160405180910390fd5b60008381526021602052604080822042905551839185917f1595e8771273259bf12e7d81d3e7b998f01eeaca6cd0172b56d01cd966177ab69190a3505050565b6002600854036141135760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016114fe565b6002600855565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b803361417782612657565b6001600160a01b0316148061419c575033614191826113d8565b6001600160a01b0316145b6141e85760405162461bcd60e51b815260206004820152601e60248201527f4552433732313a204e6f7420617070726f766564206e6f72206f776e6572000060448201526064016114fe565b60008281526021602052604081205490036142165760405163290da5e160e01b815260040160405180910390fd5b61421f82612f4e565b1561424f576000828152601f602052604090205461423e8160016156f3565b6000848152601f6020526040902055505b6000828152602160205260408082208290555183917f687f2bdd19dccc556cb5455661050c9b9c1d8e5ea08012290cbeb69da4ec28a891a25050565b816001600160a01b0316836001600160a01b0316036142ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016114fe565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61436333836144b5565b6143c55760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b60648201526084016114fe565b611c5284848484614795565b606060006143de83614813565b600101905060008167ffffffffffffffff8111156143fe576143fe61509f565b6040519080825280601f01601f191660200182016040528015614428576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461443257509392505050565b600080600061447385856148f5565b9150915061448081614937565b509392505050565b60008281526021602052604090205415611c52576040516365a2f84360e11b815260040160405180910390fd5b6000806144c183612657565b9050806001600160a01b0316846001600160a01b0316148061450857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80613bc05750836001600160a01b0316614521846113d8565b6001600160a01b031614949350505050565b826001600160a01b031661454682612657565b6001600160a01b0316146145aa5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016114fe565b6001600160a01b03821661460c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016114fe565b6146198383836001614488565b826001600160a01b031661462c82612657565b6001600160a01b0316146146905760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016114fe565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff166118265761475381614a81565b61475e836020614a93565b60405160200161476f929190615945565b60408051601f198184030181529082905262461bcd60e51b82526114fe91600401614fe8565b6147a0848484614533565b6147ac84848484614c2f565b611c525760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016114fe565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061485c577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310614888576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106148a657662386f26fc10000830492506010015b6305f5e10083106148be576305f5e100830492506008015b61271083106148d257612710830492506004015b606483106148e4576064830492506002015b600a83106112ef5760010192915050565b600080825160410361492b5760208301516040840151606085015160001a61491f87828585614d7b565b94509450505050611d48565b50600090506002611d48565b600081600481111561494b5761494b615414565b036149535750565b600181600481111561496757614967615414565b036149b45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016114fe565b60028160048111156149c8576149c8615414565b03614a155760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016114fe565b6003816004811115614a2957614a29615414565b03611f135760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016114fe565b60606112ef6001600160a01b03831660145b60606000614aa283600261575a565b614aad9060026156f3565b67ffffffffffffffff811115614ac557614ac561509f565b6040519080825280601f01601f191660200182016040528015614aef576020820181803683370190505b509050600360fc1b81600081518110614b0a57614b0a6157a3565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110614b3957614b396157a3565b60200101906001600160f81b031916908160001a9053506000614b5d84600261575a565b614b689060016156f3565b90505b6001811115614be0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614b9c57614b9c6157a3565b1a60f81b828281518110614bb257614bb26157a3565b60200101906001600160f81b031916908160001a90535060049490941c93614bd9816159c6565b9050614b6b565b5083156129775760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016114fe565b60006001600160a01b0384163b15614d7057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614c739033908990889088906004016159dd565b6020604051808303816000875af1925050508015614cae575060408051601f3d908101601f19168201909252614cab91810190615a0f565b60015b614d56573d808015614cdc576040519150601f19603f3d011682016040523d82523d6000602084013e614ce1565b606091505b508051600003614d4e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016114fe565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613bc0565b506001949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614db25750600090506003614e36565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614e06573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614e2f57600060019250925050614e36565b9150600090505b94509492505050565b828054614e4b906156a3565b90600052602060002090601f016020900481019282614e6d5760008555614eb3565b82601f10614e8657805160ff1916838001178555614eb3565b82800160010185558215614eb3579182015b82811115614eb3578251825591602001919060010190614e98565b50614ebf929150614efd565b5090565b828054828255906000526020600020908101928215614eb35791602002820182811115614eb3578251825591602001919060010190614e98565b5b80821115614ebf5760008155600101614efe565b6001600160e01b031981168114611f1357600080fd5b600060208284031215614f3a57600080fd5b813561297781614f12565b600060208284031215614f5757600080fd5b5035919050565b6001600160a01b0381168114611f1357600080fd5b600060208284031215614f8557600080fd5b813561297781614f5e565b60005b83811015614fab578181015183820152602001614f93565b83811115611c525750506000910152565b60008151808452614fd4816020860160208601614f90565b601f01601f19169290920160200192915050565b6020815260006129776020830184614fbc565b6000806040838503121561500e57600080fd5b823561501981614f5e565b946020939093013593505050565b60008060006040848603121561503c57600080fd5b833567ffffffffffffffff8082111561505457600080fd5b818601915086601f83011261506857600080fd5b81358181111561507757600080fd5b87602082850101111561508957600080fd5b6020928301989097509590910135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156150de576150de61509f565b604052919050565b600067ffffffffffffffff8311156151005761510061509f565b615113601f8401601f19166020016150b5565b905082815283838301111561512757600080fd5b828260208301376000602084830101529392505050565b600082601f83011261514f57600080fd5b612977838335602085016150e6565b60006020828403121561517057600080fd5b813567ffffffffffffffff81111561518757600080fd5b613bc08482850161513e565b600067ffffffffffffffff8211156151ad576151ad61509f565b5060051b60200190565b600082601f8301126151c857600080fd5b813560206151dd6151d883615193565b6150b5565b82815260059290921b840181019181810190868411156151fc57600080fd5b8286015b848110156152175780358352918301918301615200565b509695505050505050565b6000806040838503121561523557600080fd5b82359150602083013567ffffffffffffffff81111561525357600080fd5b61525f858286016151b7565b9150509250929050565b6000806040838503121561527c57600080fd5b82359150602083013561528e81614f5e565b809150509250929050565b6000806000606084860312156152ae57600080fd5b83356152b981614f5e565b925060208401356152c981614f5e565b929592945050506040919091013590565b600080604083850312156152ed57600080fd5b50508035926020909101359150565b60006020828403121561530e57600080fd5b81356001600160601b038116811461297757600080fd5b8015158114611f1357600080fd5b6000806040838503121561534657600080fd5b82359150602083013561528e81615325565b6000806020838503121561536b57600080fd5b823567ffffffffffffffff8082111561538357600080fd5b818501915085601f83011261539757600080fd5b8135818111156153a657600080fd5b8660208260051b85010111156153bb57600080fd5b60209290920196919550909350505050565b600080604083850312156153e057600080fd5b823567ffffffffffffffff8111156153f757600080fd5b615403858286016151b7565b925050602083013561528e81614f5e565b634e487b7160e01b600052602160045260246000fd5b602081016007831061544c57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806040838503121561546557600080fd5b823567ffffffffffffffff8082111561547d57600080fd5b818501915085601f83011261549157600080fd5b813560206154a16151d883615193565b82815260059290921b840181019181810190898411156154c057600080fd5b948201945b838610156154e75785356154d881614f5e565b825294820194908201906154c5565b965050860135925050808211156154fd57600080fd5b5061525f858286016151b7565b600081518084526020808501945080840160005b8381101561553a5781518752958201959082019060010161551e565b509495945050505050565b602081526000612977602083018461550a565b6000806040838503121561556b57600080fd5b823561557681614f5e565b9150602083013561528e81615325565b6000806000806080858703121561559c57600080fd5b84356155a781614f5e565b935060208501356155b781614f5e565b925060408501359150606085013567ffffffffffffffff8111156155da57600080fd5b8501601f810187136155eb57600080fd5b6155fa878235602084016150e6565b91505092959194509250565b6000806040838503121561561957600080fd5b823567ffffffffffffffff81111561563057600080fd5b61563c8582860161513e565b95602094909401359450505050565b838152821515602082015260606040820152600061566c606083018461550a565b95945050505050565b6000806040838503121561568857600080fd5b823561569381614f5e565b9150602083013561528e81614f5e565b600181811c908216806156b757607f821691505b6020821081036156d757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615706576157066156dd565b500190565b60006001820161571d5761571d6156dd565b5060010190565b60006020828403121561573657600080fd5b5051919050565b60006020828403121561574f57600080fd5b815161297781615325565b6000816000190483118215151615615774576157746156dd565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261579e5761579e615779565b500490565b634e487b7160e01b600052603260045260246000fd5b6000828210156157cb576157cb6156dd565b500390565b600081516157e2818560208601614f90565b9290920192915050565b600080845481600182811c91508083168061580857607f831692505b6020808410820361582757634e487b7160e01b86526022600452602486fd5b81801561583b576001811461584c57615879565b60ff19861689528489019650615879565b60008b81526020902060005b868110156158715781548b820152908501908301615858565b505084890196505b50505050505061566c81856157d0565b6001600160601b03198360601b168152600082516158ae816014850160208701614f90565b919091016014019392505050565b805160208083015191908110156156d75760001960209190910360031b1b16919050565b6001600160a01b038416815282602082015260606040820152600061566c6060830184614fbc565b60008261591757615917615779565b500690565b838152606060208201526000615935606083018561550a565b9050826040830152949350505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161597d816017850160208801614f90565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516159ba816028840160208801614f90565b01602801949350505050565b6000816159d5576159d56156dd565b506000190190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612f5a6080830184614fbc565b600060208284031215615a2157600080fd5b815161297781614f1256fea26469706673582212206d68727eb3b3ccf8945c530d870e49d9a3330d4048a61729221dfd8c56d1fa1964736f6c634300080d003300000000000000000000000012367227acba32e16febb990a7a35e61c08664d50000000000000000000000004fb7c9c32017c49cf598a6f9ade7038ef5f6d8dd000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001e

Deployed Bytecode

0x6080604052600436106106085760003560e01c80636ea3d6a211610322578063a217fddf116101a5578063d547741f116100ec578063e8fd152b11610095578063f2fde38b1161006f578063f2fde38b1461127f578063f4a0a5281461129f578063fc2a88c3146112bf57600080fd5b8063e8fd152b1461120d578063e907090314611223578063e985e9c51461123657600080fd5b8063d8a4676f116100c6578063d8a4676f146111b5578063dc53fd92146111e4578063e375a938146111fa57600080fd5b8063d547741f14611160578063d5abeb0114611180578063d6397c611461119557600080fd5b8063c46da04a1161014e578063cb774d4711610128578063cb774d4714611107578063cbc9e8271461111d578063cc06c3591461114a57600080fd5b8063c46da04a146110b2578063c6ab67a3146110d2578063c87b56dd146110e757600080fd5b8063aca8ffe71161017f578063aca8ffe71461102e578063b88d4fde1461104e578063c22b28051461106e57600080fd5b8063a217fddf14610fd9578063a22cb46514610fee578063a574da231461100e57600080fd5b80638796ba8c116102695780639b2573ee11610212578063a011a4b6116101ec578063a011a4b614610f4d578063a168fa8914610f6d578063a201fc5014610fb957600080fd5b80639b2573ee14610ee35780639d6eab8214610ef95780639eb978aa14610f1957600080fd5b806391d148541161024357806391d1485414610e5257806394611b8a14610e9857806395d89b4114610ece57600080fd5b80638796ba8c14610dff5780638da5cb5b14610e1f5780638dc654a214610e3d57600080fd5b8063798c7d9a116102cb5780638535923f116102a55780638535923f14610d9657806386481d4014610dcc57806386bb8f3714610dec57600080fd5b8063798c7d9a14610d2a578063845b505f14610d4057806384a0125a14610d6057600080fd5b80637183e226116102fc5780637183e22614610cba57806375e589a314610cea57806376aa6b7e14610d0a57600080fd5b80636ea3d6a214610c6557806370a0823114610c85578063715018a614610ca557600080fd5b8063324d1510116104aa5780635925b7b9116103f157806360a5dded1161039a5780636817c76c116103745780636817c76c14610c0c5780636b1ad36714610c225780636debc0b814610c3857600080fd5b806360a5dded14610bac5780636352211e14610bcc5780636724348214610bec57600080fd5b80635d82cf6e116103cb5780635d82cf6e14610b28578063603f4d5214610b485780636045817414610b7657600080fd5b80635925b7b914610ac8578063593f391514610ae85780635b7633d014610b0857600080fd5b80634af9345e11610453578063547f4f3a1161042d578063547f4f3a14610a685780635713b93514610a88578063575e609814610aa857600080fd5b80634af9345e14610a055780634c0fb3c014610a255780635073356414610a5557600080fd5b80633ccfd60b116104845780633ccfd60b146109ba57806342842e0e146109cf57806345c0f533146109ef57600080fd5b8063324d15101461093b57806336568abe146109515780633b6914531461097157600080fd5b806318160ddd1161056e57806323b872dd116105175780632a55205a116104f15780632a55205a146108bc5780632c26313a146108fb5780632f2ff15d1461091b57600080fd5b806323b872dd1461084c578063248a9ca31461086c57806324ff766e1461089c57600080fd5b80631fe543e3116105485780631fe543e3146107e557806321dcd43a14610805578063235cea981461082557600080fd5b806318160ddd1461079a57806318935732146107b05780631d89dab2146107d057600080fd5b8063084c4088116105d057806310969523116105aa5780631096952314610741578063148097021461076157806315b58f9c1461078457600080fd5b8063084c4088146106ee578063095ea7b31461070e5780630ea5ff561461072e57600080fd5b806301ffc9a71461060d578063031fdd1f14610642578063046dc1661461067257806306fdde0314610694578063081812fc146106b6575b600080fd5b34801561061957600080fd5b5061062d610628366004614f28565b6112d5565b60405190151581526020015b60405180910390f35b34801561064e57600080fd5b5061062d61065d366004614f45565b60236020526000908152604090205460ff1681565b34801561067e57600080fd5b5061069261068d366004614f73565b6112f5565b005b3480156106a057600080fd5b506106a9611346565b6040516106399190614fe8565b3480156106c257600080fd5b506106d66106d1366004614f45565b6113d8565b6040516001600160a01b039091168152602001610639565b3480156106fa57600080fd5b50610692610709366004614f45565b6113ff565b34801561071a57600080fd5b50610692610729366004614ffb565b61148a565b61069261073c366004615027565b6115a4565b34801561074d57600080fd5b5061069261075c36600461515e565b61180b565b34801561076d57600080fd5b50610776600181565b604051908152602001610639565b34801561079057600080fd5b5061077660145481565b3480156107a657600080fd5b5061077660115481565b3480156107bc57600080fd5b506106926107cb366004614f45565b61182a565b3480156107dc57600080fd5b50610776611837565b3480156107f157600080fd5b50610692610800366004615222565b611a44565b34801561081157600080fd5b50610692610820366004615269565b611ac6565b34801561083157600080fd5b50602a546106d690600160501b90046001600160a01b031681565b34801561085857600080fd5b50610692610867366004615299565b611afc565b34801561087857600080fd5b50610776610887366004614f45565b60009081526009602052604090206001015490565b3480156108a857600080fd5b506106926108b7366004614f73565b611c58565b3480156108c857600080fd5b506108dc6108d73660046152da565b611ca1565b604080516001600160a01b039093168352602083019190915201610639565b34801561090757600080fd5b506106926109163660046152da565b611d4f565b34801561092757600080fd5b50610692610936366004615269565b611dea565b34801561094757600080fd5b5061077660195481565b34801561095d57600080fd5b5061069261096c366004615269565b611e0f565b34801561097d57600080fd5b506109a561098c366004614f45565b601e602052600090815260409020805460019091015482565b60408051928352602083019190915201610639565b3480156109c657600080fd5b50610692611e97565b3480156109db57600080fd5b506106926109ea366004615299565b611f16565b3480156109fb57600080fd5b5061077660105481565b348015610a1157600080fd5b50610692610a203660046152fc565b612067565b348015610a3157600080fd5b5061062d610a40366004614f45565b60246020526000908152604090205460ff1681565b610692610a63366004615027565b6120ae565b348015610a7457600080fd5b50610692610a83366004615333565b6122be565b348015610a9457600080fd5b50610692610aa3366004615333565b61232a565b348015610ab457600080fd5b50610692610ac3366004615358565b612387565b348015610ad457600080fd5b50610692610ae33660046153cd565b612401565b348015610af457600080fd5b50610692610b03366004614f73565b612501565b348015610b1457600080fd5b50600b546106d6906001600160a01b031681565b348015610b3457600080fd5b50610692610b43366004614f45565b612552565b348015610b5457600080fd5b50600b54610b6990600160a01b900460ff1681565b604051610639919061542a565b348015610b8257600080fd5b50610776610b91366004614f73565b6001600160a01b03166000908152600e602052604090205490565b348015610bb857600080fd5b50610692610bc7366004614f45565b61255f565b348015610bd857600080fd5b506106d6610be7366004614f45565b612657565b348015610bf857600080fd5b50610692610c07366004615452565b6126bc565b348015610c1857600080fd5b5061077660135481565b348015610c2e57600080fd5b5061077660185481565b348015610c4457600080fd5b50610c58610c53366004614f73565b612822565b6040516106399190615545565b348015610c7157600080fd5b50610692610c80366004614f45565b61288e565b348015610c9157600080fd5b50610776610ca0366004614f73565b61289b565b348015610cb157600080fd5b50610692612921565b348015610cc657600080fd5b5061062d610cd5366004614f45565b60266020526000908152604090205460ff1681565b348015610cf657600080fd5b50610692610d05366004614f45565b612935565b348015610d1657600080fd5b50602b546106d6906001600160a01b031681565b348015610d3657600080fd5b5061077660165481565b348015610d4c57600080fd5b50610692610d5b366004614f45565b612942565b348015610d6c57600080fd5b50610776610d7b366004614f73565b6001600160a01b03166000908152600d602052604090205490565b348015610da257600080fd5b50610776610db1366004614f73565b6001600160a01b03166000908152600f602052604090205490565b348015610dd857600080fd5b50610776610de7366004614f45565b61294f565b610692610dfa3660046152da565b61297e565b348015610e0b57600080fd5b50610776610e1a366004614f45565b612ada565b348015610e2b57600080fd5b50600a546001600160a01b03166106d6565b348015610e4957600080fd5b50610692612afb565b348015610e5e57600080fd5b5061062d610e6d366004615269565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610ea457600080fd5b506106d6610eb3366004614f45565b6025602052600090815260409020546001600160a01b031681565b348015610eda57600080fd5b506106a9612c3c565b348015610eef57600080fd5b5061077660125481565b348015610f0557600080fd5b50610692610f14366004615358565b612c4b565b348015610f2557600080fd5b506107767f2486b27fa81d5092a513ddb984a65deb0df3f677fc467c072b096791a56773dc81565b348015610f5957600080fd5b50610692610f68366004614f45565b612c8a565b348015610f7957600080fd5b50610fa4610f88366004614f45565b6027602052600090815260409020805460019091015460ff1682565b60408051928352901515602083015201610639565b348015610fc557600080fd5b50610692610fd436600461515e565b612c97565b348015610fe557600080fd5b50610776600081565b348015610ffa57600080fd5b50610692611009366004615558565b612cb2565b34801561101a57600080fd5b506106a9611029366004614f45565b612cbd565b34801561103a57600080fd5b50610692611049366004614f45565b612d57565b34801561105a57600080fd5b50610692611069366004615586565b612d64565b34801561107a57600080fd5b5061108e611089366004614f45565b612ec3565b60408051941515855260208501939093529183015215156060820152608001610639565b3480156110be57600080fd5b5061062d6110cd366004614f45565b612f4e565b3480156110de57600080fd5b506106a9612f64565b3480156110f357600080fd5b506106a9611102366004614f45565b612f71565b34801561111357600080fd5b50610776601d5481565b34801561112957600080fd5b50610776611138366004614f45565b60226020526000908152604090205481565b34801561115657600080fd5b5061077660205481565b34801561116c57600080fd5b5061069261117b366004615269565b613025565b34801561118c57600080fd5b5061077661304a565b3480156111a157600080fd5b506106926111b0366004615606565b613061565b3480156111c157600080fd5b506111d56111d0366004614f45565b613088565b6040516106399392919061564b565b3480156111f057600080fd5b5061077660155481565b610692611208366004615027565b613176565b34801561121957600080fd5b5061077660175481565b610692611231366004615027565b61337a565b34801561124257600080fd5b5061062d611251366004615675565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561128b57600080fd5b5061069261129a366004614f73565b613589565b3480156112ab57600080fd5b506106926112ba366004614f45565b6135ff565b3480156112cb57600080fd5b5061077660295481565b60006112e08261360c565b806112ef57506112ef8261365c565b92915050565b6112fd613681565b6001600160a01b0381166113245760405163d92e233d60e01b815260040160405180910390fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b606060008054611355906156a3565b80601f0160208091040260200160405190810160405280929190818152602001828054611381906156a3565b80156113ce5780601f106113a3576101008083540402835291602001916113ce565b820191906000526020600020905b8154815290600101906020018083116113b157829003601f168201915b5050505050905090565b60006113e3826136db565b506000908152600460205260409020546001600160a01b031690565b611407613681565b80600681111561141957611419615414565b600b805460ff60a01b1916600160a01b83600681111561143b5761143b615414565b0217905550600b54600160a01b900460ff16600681111561145e5761145e615414565b6040517f92a17b827ee9d42ea9454bb4ca941a1800870e6d01c0842d09ba23ccc0190ee190600090a250565b600061149582612657565b9050806001600160a01b0316836001600160a01b0316036115075760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061152357506115238133611251565b6115955760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016114fe565b61159f838361373f565b505050565b60043332146115c657604051637aafae9760e01b815260040160405180910390fd5b8060068111156115d8576115d8615414565b600b54600160a01b900460ff1660068111156115f6576115f6615414565b1461161457604051633482502f60e01b815260040160405180910390fd5b601554600003611637576040516327d9031160e11b815260040160405180910390fd5b6001821080611647575060105482115b156116655760405163744f82e360e01b815260040160405180910390fd5b6116c284848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260068152655075626c696360d01b602082015291506137ad9050565b6116df57604051638baa579f60e01b815260040160405180910390fd5b6116e761304a565b6011546116f59060016156f3565b1115611714576040516352df9fe560e01b815260040160405180910390fd5b6015543414611736576040516399b5cb1d60e01b815260040160405180910390fd5b601854336000908152600f602052604090205410611767576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600f909152812080549091906117a69084906156f3565b909155506117b69050338361384e565b601180549060006117c68361570b565b9091555082905060045b60405134815233907fba4ff9d44bbafa5bd145a99f6e3381a0f9da59c4b68dc8621e54c3d7032f07b49060200160405180910390a450505050565b611813613681565b805161182690601c906020840190614e3f565b5050565b611832613681565b601955565b6000611841613681565b6000601c8054611850906156a3565b905011611870576040516342f1e79360e01b815260040160405180910390fd5b601d5415611891576040516393a79bd960e01b815260040160405180910390fd5b602a546118bf9063ffffffff8082169161ffff640100000000820416916601000000000000909104166139e7565b604080516060810191829052602a546310c1b4d560e21b90925263ffffffff9091166064820152909150807f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df66001600160a01b0316634306d35460848301602060405180830381865afa15801561193a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195e9190615724565b815260006020808301829052604080518381528083018252938101939093528482526027815290829020835181558382015160018201805460ff19169115159190911790559183015180516119b99260028501920190614ec3565b5050602880546001810182556000919091527fe16da923a2d88192e5070f37b4571d58682c0d66212ec634d495f33de3f77ab501829055506029819055602a5460408051838152660100000000000090920463ffffffff1660208301527fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee910160405180910390a190565b336001600160a01b037f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df61614611abc5760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792056524620563220777261707065722063616e2066756c66696c6c0060448201526064016114fe565b6118268282613bc8565b611ace613681565b60009182526025602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b826daaeb6d7670e522a718067333cd4e3b15611c4757336001600160a01b03821603611b3257611b2d848484613cc8565b611c52565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba5919061573d565b8015611c285750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c28919061573d565b611c4757604051633b79c77360e21b81523360048201526024016114fe565b611c52848484613cc8565b50505050565b611c60613681565b602a80546001600160a01b03909216600160501b027fffff0000000000000000000000000000000000000000ffffffffffffffffffff909216919091179055565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291611d165750604080518082019091526006546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611d35906001600160601b03168761575a565b611d3f919061578f565b91519350909150505b9250929050565b611d57613681565b60008281526022602052604090205415611d84576040516347c7b8b560e11b815260040160405180910390fd5b60008111611da55760405163648a146160e01b815260040160405180910390fd5b602054611db39060016156f3565b8214611dd25760405163269a18e560e01b815260040160405180910390fd5b60008281526022602090815260409091209190915555565b600082815260096020526040902060010154611e0581613d3f565b61159f8383613d49565b6001600160a01b0381163314611e8d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016114fe565b6118268282613deb565b611e9f613681565b602b546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611eec576040519150601f19603f3d011682016040523d82523d6000602084013e611ef1565b606091505b5050905080611f13576040516312171d8360e31b815260040160405180910390fd5b50565b826daaeb6d7670e522a718067333cd4e3b1561205c57336001600160a01b03821603611f4757611b2d848484613e6e565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611f96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fba919061573d565b801561203d5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d919061573d565b61205c57604051633b79c77360e21b81523360048201526024016114fe565b611c52848484613e6e565b61206f613681565b602b546001600160a01b03166120985760405163d92e233d60e01b815260040160405180910390fd5b602b54611f13906001600160a01b031682613e89565b60023332146120d057604051637aafae9760e01b815260040160405180910390fd5b8060068111156120e2576120e2615414565b600b54600160a01b900460ff16600681111561210057612100615414565b1461211e57604051633482502f60e01b815260040160405180910390fd5b600182108061212e575060105482115b1561214c5760405163744f82e360e01b815260040160405180910390fd5b6121ac84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526009815268109d59191e531a5cdd60ba1b602082015291506137ad9050565b6121c957604051638baa579f60e01b815260040160405180910390fd5b6121d161304a565b6011546121df9060016156f3565b11156121fe576040516352df9fe560e01b815260040160405180910390fd5b6013543414612220576040516399b5cb1d60e01b815260040160405180910390fd5b601654336000908152600d602052604090205410612251576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600d909152812080549091906122909084906156f3565b909155506122a09050338361384e565b601180549060006122b08361570b565b9091555082905060026117d0565b6122c6613681565b600082116122e757604051638f65cf4160e01b815260040160405180910390fd5b60205482111561230a5760405163f4cb421f60e01b815260040160405180910390fd5b600091825260236020526040909120805460ff1916911515919091179055565b612332613681565b6000828152602560205260409020546001600160a01b031661236757604051631a5a25d360e11b815260040160405180910390fd5b600091825260266020526040909120805460ff1916911515919091179055565b8060005b81811015611c525760006123b68585848181106123aa576123aa6157a3565b9050602002013561294f565b6123c19060016156f3565b905060205481116123ee576123ee8585848181106123e1576123e16157a3565b9050602002013582613f86565b50806123f98161570b565b91505061238b565b612409613681565b600633321461242b57604051637aafae9760e01b815260040160405180910390fd5b80600681111561243d5761243d615414565b600b54600160a01b900460ff16600681111561245b5761245b615414565b1461247957604051633482502f60e01b815260040160405180910390fd5b601054835160115461248b91906156f3565b11156124aa57604051631279e56160e11b815260040160405180910390fd5b60005b8351811015611c52576124d9838583815181106124cc576124cc6157a3565b602002602001015161384e565b601180549060006124e98361570b565b919050555080806124f99061570b565b9150506124ad565b612509613681565b6001600160a01b0381166125305760405163d92e233d60e01b815260040160405180910390fd5b602b80546001600160a01b0319166001600160a01b0392909216919091179055565b61255a613681565b601555565b7f2486b27fa81d5092a513ddb984a65deb0df3f677fc467c072b096791a56773dc61258981613d3f565b60008281526021602052604081205490036125b75760405163290da5e160e01b815260040160405180910390fd5b6125c082612f4e565b156125f0576000828152601f60205260409020546125df8160016156f3565b6000848152601f6020526040902055505b6000828152602160205260408082208290555183917f687f2bdd19dccc556cb5455661050c9b9c1d8e5ea08012290cbeb69da4ec28a891a260405182907f3b834a47ba67ef104aea456265866673a3f6b0a58e7201148d17a57a991892e890600090a25050565b6000818152600260205260408120546001600160a01b0316806112ef5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016114fe565b6126c4613681565b6126cc6140c1565b60053332146126ee57604051637aafae9760e01b815260040160405180910390fd5b80600681111561270057612700615414565b600b54600160a01b900460ff16600681111561271e5761271e615414565b1461273c57604051633482502f60e01b815260040160405180910390fd5b815183511461275e5760405163b3fd7b3b60e01b815260040160405180910390fd5b60005b835181101561281657600084828151811061277e5761277e6157a3565b60200260200101519050600084838151811061279c5761279c6157a3565b602002602001015190506001600d6000846001600160a01b03166001600160a01b0316815260200190815260200160002060008282546127dc91906156f3565b909155506127ec9050828261384e565b601180549060006127fc8361570b565b91905055505050808061280e9061570b565b915050612761565b50506118266001600855565b6001600160a01b0381166000908152600c602090815260409182902080548351818402810184019094528084526060939283018282801561288257602002820191906000526020600020905b81548152602001906001019080831161286e575b50505050509050919050565b612896613681565b601855565b60006001600160a01b0382166129055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016114fe565b506001600160a01b031660009081526003602052604090205490565b612929613681565b612933600061411a565b565b61293d613681565b601255565b61294a613681565b601755565b6000818152601f602052604081205461296783612f4e565b156112ef576129776001826156f3565b9392505050565b3361298882612657565b6001600160a01b0316146129af576040516330cd747160e01b815260040160405180910390fd5b816129b98261294f565b10156129d85760405163d1cb832f60e01b815260040160405180910390fd5b60008181526024602052604090205460ff1615612a0857604051632cfe303760e21b815260040160405180910390fd5b6000828152602560205260409020546001600160a01b0316612a3d57604051631a5a25d360e11b815260040160405180910390fd5b6000818152602460208181526040808420805460ff19166001179055858452602590915291829020549151634d24848760e11b81523360048201529081018390526001600160a01b03909116908190639a49090e90349060440160206040518083038185885af1158015612ab5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611c529190615724565b60288181548110612aea57600080fd5b600091825260209091200154905081565b612b03613681565b602a546040516370a0823160e01b8152306004820152600160501b9091046001600160a01b031690819063a9059cbb90339083906370a0823190602401602060405180830381865afa158015612b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b819190615724565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bf0919061573d565b611f135760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207472616e73666572000000000000000000000000000060448201526064016114fe565b606060018054611355906156a3565b8060005b81811015611c5257612c78848483818110612c6c57612c6c6157a3565b9050602002013561416c565b80612c828161570b565b915050612c4f565b612c92613681565b601655565b612c9f613681565b805161182690601b906020840190614e3f565b61182633838361428b565b601a6020526000908152604090208054612cd6906156a3565b80601f0160208091040260200160405190810160405280929190818152602001828054612d02906156a3565b8015612d4f5780601f10612d2457610100808354040283529160200191612d4f565b820191906000526020600020905b815481529060010190602001808311612d3257829003601f168201915b505050505081565b612d5f613681565b601055565b836daaeb6d7670e522a718067333cd4e3b15612eb057336001600160a01b03821603612d9b57612d9685858585614359565b612ebc565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e0e919061573d565b8015612e915750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e91919061573d565b612eb057604051633b79c77360e21b81523360048201526024016114fe565b612ebc85858585614359565b5050505050565b6000818152602160205260408120548190819081908015612eef5760019450612eec81426157b9565b93505b6000868152601f60205260408120549350602281612f0e8660016156f3565b8152602001908152602001600020549050600081118015612f3b5750612f37816201518061575a565b8510155b15612f4557600192505b50509193509193565b600080612f5a83612ec3565b9695505050505050565b601c8054612cd6906156a3565b6000818152600260205260409020546060906001600160a01b0316612fd85760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f65736e27742065786973742100000000000000000000000060448201526064016114fe565b6000612fe38361294f565b6000818152601a60205260409020909150612ffd846143d1565b60405160200161300e9291906157ec565b604051602081830303815290604052915050919050565b60008281526009602052604090206001015461304081613d3f565b61159f8383613deb565b600060195460105461305c91906157b9565b905090565b613069613681565b6000818152601a60209081526040909120835161159f92850190614e3f565b60008181526027602052604081205481906060906130dc5760405162461bcd60e51b81526020600482015260116024820152701c995c5d595cdd081b9bdd08199bdd5b99607a1b60448201526064016114fe565b6000848152602760209081526040808320815160608101835281548152600182015460ff1615158185015260028201805484518187028101870186528181529295939486019383018282801561315157602002820191906000526020600020905b81548152602001906001019080831161313d575b5050509190925250508151602083015160409093015190989297509550909350505050565b600133321461319857604051637aafae9760e01b815260040160405180910390fd5b8060068111156131aa576131aa615414565b600b54600160a01b900460ff1660068111156131c8576131c8615414565b146131e657604051633482502f60e01b815260040160405180910390fd5b60018210806131f6575060105482115b156132145760405163744f82e360e01b815260040160405180910390fd5b61326e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600381526205649560ec1b602082015291506137ad9050565b61328b57604051638baa579f60e01b815260040160405180910390fd5b60125460115461329c9060016156f3565b11156132bb5760405163664dad0f60e11b815260040160405180910390fd5b60135434146132dd576040516399b5cb1d60e01b815260040160405180910390fd5b336000908152600d602052604090205460011161330d576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600d9091528120805490919061334c9084906156f3565b9091555061335c9050338361384e565b6011805490600061336c8361570b565b9091555082905060016117d0565b600333321461339c57604051637aafae9760e01b815260040160405180910390fd5b8060068111156133ae576133ae615414565b600b54600160a01b900460ff1660068111156133cc576133cc615414565b146133ea57604051633482502f60e01b815260040160405180910390fd5b60018210806133fa575060105482115b156134185760405163744f82e360e01b815260040160405180910390fd5b61347784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600881526715d85a5d131a5cdd60c21b602082015291506137ad9050565b61349457604051638baa579f60e01b815260040160405180910390fd5b61349c61304a565b6011546134aa9060016156f3565b11156134c9576040516352df9fe560e01b815260040160405180910390fd5b60145434146134eb576040516399b5cb1d60e01b815260040160405180910390fd5b601754336000908152600e60205260409020541061351c576040516313f9b25d60e21b815260040160405180910390fd5b336000818152600c6020908152604080832080546001818101835591855283852001879055938352600e9091528120805490919061355b9084906156f3565b9091555061356b9050338361384e565b6011805490600061357b8361570b565b9091555082905060036117d0565b613591613681565b6001600160a01b0381166135f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016114fe565b611f138161411a565b613607613681565b601355565b60006001600160e01b031982166380ac58cd60e01b148061363d57506001600160e01b03198216635b5e139f60e01b145b806112ef57506301ffc9a760e01b6001600160e01b03198316146112ef565b60006001600160e01b0319821663152a902d60e11b14806112ef57506112ef8261360c565b600a546001600160a01b031633146129335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016114fe565b6000818152600260205260409020546001600160a01b0316611f135760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016114fe565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061377482612657565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006138368333846040516020016137c6929190615889565b6040516020818303038152906040526137de906158bc565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810191909152605c016040516020818303038152906040528051906020012061446490919063ffffffff16565b600b546001600160a01b039182169116149392505050565b6001600160a01b0382166138a45760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016114fe565b6000818152600260205260409020546001600160a01b0316156139095760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016114fe565b613917600083836001614488565b6000818152600260205260409020546001600160a01b03161561397c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016114fe565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040516310c1b4d560e21b815263ffffffff841660048201526000906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca811691634000aea0917f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df69190821690634306d35490602401602060405180830381865afa158015613a81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aa59190615724565b6040805163ffffffff808b16602083015261ffff8a169282019290925290871660608201526080016040516020818303038152906040526040518463ffffffff1660e01b8152600401613afa939291906158e0565b6020604051808303816000875af1158015613b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b3d919061573d565b507f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df66001600160a01b031663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bc09190615724565b949350505050565b600082815260276020526040902054613c175760405162461bcd60e51b81526020600482015260116024820152701c995c5d595cdd081b9bdd08199bdd5b99607a1b60448201526064016114fe565b60008281526027602052604081206001908101805460ff19169091179055601054825190918391613c4a57613c4a6157a3565b6020026020010151613c5c9190615908565b601d819055600003613c7a57601d54613c769060016156f3565b601d555b600082815260276020526040908190205490517f147eb1ff0c82f87f2b03e2c43f5a36488ff63ec6b730195fde4605f612f8db5191613cbc918591859161591c565b60405180910390a15050565b613cd233826144b5565b613d345760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b60648201526084016114fe565b61159f838383614533565b611f138133614720565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff166118265760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613da73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16156118265760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61159f83838360405180602001604052806000815250612d64565b6127106001600160601b0382161115613ef75760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016114fe565b6001600160a01b038216613f4d5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016114fe565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b8133613f9182612657565b6001600160a01b03161480613fb6575033613fab826113d8565b6001600160a01b0316145b6140025760405162461bcd60e51b815260206004820152601e60248201527f4552433732313a204e6f7420617070726f766564206e6f72206f776e6572000060448201526064016114fe565b60008281526023602052604090205460ff1661403157604051630f65b44560e01b815260040160405180910390fd5b6000838152602160205260409020541561405e576040516365a2f84360e11b815260040160405180910390fd5b6020548211156140815760405163f4cb421f60e01b815260040160405180910390fd5b60008381526021602052604080822042905551839185917f1595e8771273259bf12e7d81d3e7b998f01eeaca6cd0172b56d01cd966177ab69190a3505050565b6002600854036141135760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016114fe565b6002600855565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b803361417782612657565b6001600160a01b0316148061419c575033614191826113d8565b6001600160a01b0316145b6141e85760405162461bcd60e51b815260206004820152601e60248201527f4552433732313a204e6f7420617070726f766564206e6f72206f776e6572000060448201526064016114fe565b60008281526021602052604081205490036142165760405163290da5e160e01b815260040160405180910390fd5b61421f82612f4e565b1561424f576000828152601f602052604090205461423e8160016156f3565b6000848152601f6020526040902055505b6000828152602160205260408082208290555183917f687f2bdd19dccc556cb5455661050c9b9c1d8e5ea08012290cbeb69da4ec28a891a25050565b816001600160a01b0316836001600160a01b0316036142ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016114fe565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61436333836144b5565b6143c55760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b60648201526084016114fe565b611c5284848484614795565b606060006143de83614813565b600101905060008167ffffffffffffffff8111156143fe576143fe61509f565b6040519080825280601f01601f191660200182016040528015614428576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461443257509392505050565b600080600061447385856148f5565b9150915061448081614937565b509392505050565b60008281526021602052604090205415611c52576040516365a2f84360e11b815260040160405180910390fd5b6000806144c183612657565b9050806001600160a01b0316846001600160a01b0316148061450857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80613bc05750836001600160a01b0316614521846113d8565b6001600160a01b031614949350505050565b826001600160a01b031661454682612657565b6001600160a01b0316146145aa5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016114fe565b6001600160a01b03821661460c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016114fe565b6146198383836001614488565b826001600160a01b031661462c82612657565b6001600160a01b0316146146905760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016114fe565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff166118265761475381614a81565b61475e836020614a93565b60405160200161476f929190615945565b60408051601f198184030181529082905262461bcd60e51b82526114fe91600401614fe8565b6147a0848484614533565b6147ac84848484614c2f565b611c525760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016114fe565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061485c577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310614888576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106148a657662386f26fc10000830492506010015b6305f5e10083106148be576305f5e100830492506008015b61271083106148d257612710830492506004015b606483106148e4576064830492506002015b600a83106112ef5760010192915050565b600080825160410361492b5760208301516040840151606085015160001a61491f87828585614d7b565b94509450505050611d48565b50600090506002611d48565b600081600481111561494b5761494b615414565b036149535750565b600181600481111561496757614967615414565b036149b45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016114fe565b60028160048111156149c8576149c8615414565b03614a155760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016114fe565b6003816004811115614a2957614a29615414565b03611f135760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016114fe565b60606112ef6001600160a01b03831660145b60606000614aa283600261575a565b614aad9060026156f3565b67ffffffffffffffff811115614ac557614ac561509f565b6040519080825280601f01601f191660200182016040528015614aef576020820181803683370190505b509050600360fc1b81600081518110614b0a57614b0a6157a3565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110614b3957614b396157a3565b60200101906001600160f81b031916908160001a9053506000614b5d84600261575a565b614b689060016156f3565b90505b6001811115614be0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614b9c57614b9c6157a3565b1a60f81b828281518110614bb257614bb26157a3565b60200101906001600160f81b031916908160001a90535060049490941c93614bd9816159c6565b9050614b6b565b5083156129775760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016114fe565b60006001600160a01b0384163b15614d7057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614c739033908990889088906004016159dd565b6020604051808303816000875af1925050508015614cae575060408051601f3d908101601f19168201909252614cab91810190615a0f565b60015b614d56573d808015614cdc576040519150601f19603f3d011682016040523d82523d6000602084013e614ce1565b606091505b508051600003614d4e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016114fe565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613bc0565b506001949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614db25750600090506003614e36565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614e06573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614e2f57600060019250925050614e36565b9150600090505b94509492505050565b828054614e4b906156a3565b90600052602060002090601f016020900481019282614e6d5760008555614eb3565b82601f10614e8657805160ff1916838001178555614eb3565b82800160010185558215614eb3579182015b82811115614eb3578251825591602001919060010190614e98565b50614ebf929150614efd565b5090565b828054828255906000526020600020908101928215614eb35791602002820182811115614eb3578251825591602001919060010190614e98565b5b80821115614ebf5760008155600101614efe565b6001600160e01b031981168114611f1357600080fd5b600060208284031215614f3a57600080fd5b813561297781614f12565b600060208284031215614f5757600080fd5b5035919050565b6001600160a01b0381168114611f1357600080fd5b600060208284031215614f8557600080fd5b813561297781614f5e565b60005b83811015614fab578181015183820152602001614f93565b83811115611c525750506000910152565b60008151808452614fd4816020860160208601614f90565b601f01601f19169290920160200192915050565b6020815260006129776020830184614fbc565b6000806040838503121561500e57600080fd5b823561501981614f5e565b946020939093013593505050565b60008060006040848603121561503c57600080fd5b833567ffffffffffffffff8082111561505457600080fd5b818601915086601f83011261506857600080fd5b81358181111561507757600080fd5b87602082850101111561508957600080fd5b6020928301989097509590910135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156150de576150de61509f565b604052919050565b600067ffffffffffffffff8311156151005761510061509f565b615113601f8401601f19166020016150b5565b905082815283838301111561512757600080fd5b828260208301376000602084830101529392505050565b600082601f83011261514f57600080fd5b612977838335602085016150e6565b60006020828403121561517057600080fd5b813567ffffffffffffffff81111561518757600080fd5b613bc08482850161513e565b600067ffffffffffffffff8211156151ad576151ad61509f565b5060051b60200190565b600082601f8301126151c857600080fd5b813560206151dd6151d883615193565b6150b5565b82815260059290921b840181019181810190868411156151fc57600080fd5b8286015b848110156152175780358352918301918301615200565b509695505050505050565b6000806040838503121561523557600080fd5b82359150602083013567ffffffffffffffff81111561525357600080fd5b61525f858286016151b7565b9150509250929050565b6000806040838503121561527c57600080fd5b82359150602083013561528e81614f5e565b809150509250929050565b6000806000606084860312156152ae57600080fd5b83356152b981614f5e565b925060208401356152c981614f5e565b929592945050506040919091013590565b600080604083850312156152ed57600080fd5b50508035926020909101359150565b60006020828403121561530e57600080fd5b81356001600160601b038116811461297757600080fd5b8015158114611f1357600080fd5b6000806040838503121561534657600080fd5b82359150602083013561528e81615325565b6000806020838503121561536b57600080fd5b823567ffffffffffffffff8082111561538357600080fd5b818501915085601f83011261539757600080fd5b8135818111156153a657600080fd5b8660208260051b85010111156153bb57600080fd5b60209290920196919550909350505050565b600080604083850312156153e057600080fd5b823567ffffffffffffffff8111156153f757600080fd5b615403858286016151b7565b925050602083013561528e81614f5e565b634e487b7160e01b600052602160045260246000fd5b602081016007831061544c57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806040838503121561546557600080fd5b823567ffffffffffffffff8082111561547d57600080fd5b818501915085601f83011261549157600080fd5b813560206154a16151d883615193565b82815260059290921b840181019181810190898411156154c057600080fd5b948201945b838610156154e75785356154d881614f5e565b825294820194908201906154c5565b965050860135925050808211156154fd57600080fd5b5061525f858286016151b7565b600081518084526020808501945080840160005b8381101561553a5781518752958201959082019060010161551e565b509495945050505050565b602081526000612977602083018461550a565b6000806040838503121561556b57600080fd5b823561557681614f5e565b9150602083013561528e81615325565b6000806000806080858703121561559c57600080fd5b84356155a781614f5e565b935060208501356155b781614f5e565b925060408501359150606085013567ffffffffffffffff8111156155da57600080fd5b8501601f810187136155eb57600080fd5b6155fa878235602084016150e6565b91505092959194509250565b6000806040838503121561561957600080fd5b823567ffffffffffffffff81111561563057600080fd5b61563c8582860161513e565b95602094909401359450505050565b838152821515602082015260606040820152600061566c606083018461550a565b95945050505050565b6000806040838503121561568857600080fd5b823561569381614f5e565b9150602083013561528e81614f5e565b600181811c908216806156b757607f821691505b6020821081036156d757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615706576157066156dd565b500190565b60006001820161571d5761571d6156dd565b5060010190565b60006020828403121561573657600080fd5b5051919050565b60006020828403121561574f57600080fd5b815161297781615325565b6000816000190483118215151615615774576157746156dd565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261579e5761579e615779565b500490565b634e487b7160e01b600052603260045260246000fd5b6000828210156157cb576157cb6156dd565b500390565b600081516157e2818560208601614f90565b9290920192915050565b600080845481600182811c91508083168061580857607f831692505b6020808410820361582757634e487b7160e01b86526022600452602486fd5b81801561583b576001811461584c57615879565b60ff19861689528489019650615879565b60008b81526020902060005b868110156158715781548b820152908501908301615858565b505084890196505b50505050505061566c81856157d0565b6001600160601b03198360601b168152600082516158ae816014850160208701614f90565b919091016014019392505050565b805160208083015191908110156156d75760001960209190910360031b1b16919050565b6001600160a01b038416815282602082015260606040820152600061566c6060830184614fbc565b60008261591757615917615779565b500690565b838152606060208201526000615935606083018561550a565b9050826040830152949350505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161597d816017850160208801614f90565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516159ba816028840160208801614f90565b01602801949350505050565b6000816159d5576159d56156dd565b506000190190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612f5a6080830184614fbc565b600060208284031215615a2157600080fd5b815161297781614f1256fea26469706673582212206d68727eb3b3ccf8945c530d870e49d9a3330d4048a61729221dfd8c56d1fa1964736f6c634300080d0033

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

00000000000000000000000012367227acba32e16febb990a7a35e61c08664d50000000000000000000000004fb7c9c32017c49cf598a6f9ade7038ef5f6d8dd000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001e

-----Decoded View---------------
Arg [0] : signer_ (address): 0x12367227aCBa32e16FEbb990A7A35E61C08664d5
Arg [1] : origamasksAddress_ (address): 0x4FB7C9C32017c49Cf598a6f9aDe7038EF5F6D8dd
Arg [2] : linkAddress_ (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [3] : wrapperAddress_ (address): 0x5A861794B927983406fCE1D062e00b9368d97Df6
Arg [4] : vipSupply_ (uint256): 50
Arg [5] : minimumReserved_ (uint256): 200
Arg [6] : initialMaxLevel_ (uint256): 1
Arg [7] : initialDaysToLevelUp_ (uint256): 30

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000012367227acba32e16febb990a7a35e61c08664d5
Arg [1] : 0000000000000000000000004fb7c9c32017c49cf598a6f9ade7038ef5f6d8dd
Arg [2] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [3] : 0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 000000000000000000000000000000000000000000000000000000000000001e


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.