ETH Price: $3,419.83 (-1.06%)
Gas: 5 Gwei

Contract

0xA88b82AF76ecF08cf652846D10857eAeeCa40C97
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Set Approval For...202169762024-07-02 6:15:1115 hrs ago1719900911IN
AnarKey: ANARKEY Token
0 ETH0.00022243.61288566
Set Approval For...202058382024-06-30 16:56:472 days ago1719766607IN
AnarKey: ANARKEY Token
0 ETH0.000275914.4822594
Set Approval For...202012272024-06-30 1:29:232 days ago1719710963IN
AnarKey: ANARKEY Token
0 ETH0.000104711.70108432
Set Approval For...201919032024-06-28 18:13:594 days ago1719598439IN
AnarKey: ANARKEY Token
0 ETH0.000355965.78256947
Set Approval For...201886962024-06-28 7:29:234 days ago1719559763IN
AnarKey: ANARKEY Token
0 ETH0.000206225.1906817
Set Approval For...201191372024-06-18 14:08:4714 days ago1718719727IN
AnarKey: ANARKEY Token
0 ETH0.0009696324.40560425
Set Approval For...200968602024-06-15 11:21:2317 days ago1718450483IN
AnarKey: ANARKEY Token
0 ETH0.000230483.74419089
Set Approval For...200923202024-06-14 20:04:5918 days ago1718395499IN
AnarKey: ANARKEY Token
0 ETH0.000501988.1547084
Set Approval For...200881902024-06-14 6:15:2318 days ago1718345723IN
AnarKey: ANARKEY Token
0 ETH0.000444777.22533258
Set Approval For...200881572024-06-14 6:08:4718 days ago1718345327IN
AnarKey: ANARKEY Token
0 ETH0.000430366.99114676
Set Approval For...200709822024-06-11 20:30:2321 days ago1718137823IN
AnarKey: ANARKEY Token
0 ETH0.0009245715.01951193
Transfer From199934602024-06-01 0:42:5931 days ago1717202579IN
AnarKey: ANARKEY Token
0 ETH0.000285235.59947756
Transfer From199726812024-05-29 2:56:5934 days ago1716951419IN
AnarKey: ANARKEY Token
0 ETH0.000594268.1598487
Set Approval For...198903062024-05-17 14:31:5946 days ago1715956319IN
AnarKey: ANARKEY Token
0 ETH0.0018467430.00000199
Set Approval For...198802842024-05-16 4:54:4747 days ago1715835287IN
AnarKey: ANARKEY Token
0 ETH0.000204583.32344604
Set Approval For...198778242024-05-15 20:39:2348 days ago1715805563IN
AnarKey: ANARKEY Token
0 ETH0.0006791111.01922665
Set Approval For...198687662024-05-14 14:15:1149 days ago1715696111IN
AnarKey: ANARKEY Token
0 ETH0.0009719815.78972499
Set Approval For...198570302024-05-12 22:50:2350 days ago1715554223IN
AnarKey: ANARKEY Token
0 ETH0.000129243.10261064
Set Approval For...198570282024-05-12 22:49:5950 days ago1715554199IN
AnarKey: ANARKEY Token
0 ETH0.000203483.30555745
Set Approval For...198125092024-05-06 17:24:2357 days ago1715016263IN
AnarKey: ANARKEY Token
0 ETH0.00038326.22504497
Safe Transfer Fr...197863692024-05-03 1:40:1160 days ago1714700411IN
AnarKey: ANARKEY Token
0 ETH0.000398665.60310004
Set Approval For...197714132024-04-30 23:30:3562 days ago1714519835IN
AnarKey: ANARKEY Token
0 ETH0.00032385.25300562
Set Approval For...197586022024-04-29 4:32:1164 days ago1714365131IN
AnarKey: ANARKEY Token
0 ETH0.000402846.54421676
Set Approval For...197475142024-04-27 15:18:5966 days ago1714231139IN
AnarKey: ANARKEY Token
0 ETH0.000405776.58280616
Set Approval For...197414752024-04-26 19:01:5967 days ago1714158119IN
AnarKey: ANARKEY Token
0 ETH0.000347725.64098574
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AnarKey

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 26 : Gen2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import {UpdatableOperatorFilterer} from "operator-filter-registry/src/UpdatableOperatorFilterer.sol";
import {RevokableDefaultOperatorFilterer} from "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol";
import "./erc721x/contracts/ERC721X.sol";
import "./libraries/TokenStake.sol";
import "./interfaces/INftCollection.sol";

/**
 * @title AnarKey
 * @notice ANARKEY ERC721X NFT collection
 */

contract AnarKey is Ownable, RevokableDefaultOperatorFilterer, ERC721X, Pausable, IERC2981, TokenStake {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using Strings for uint256;

    IERC20 public USDT; // USDT token

    bool public isMetadataLocked;
    bool public isMaxSupplyLocked;
    bool public autoStageChange;
    uint256 public maxSupply = 1111;
    uint256 private BatchSize = 100;
    string public baseTokenURI;
    address public royalties;
    uint256 public royaltiesPercentage;

    uint256 public MaxMintPerTX = 10;
    uint256 public NFT_PRICE = 5000;
    uint256 public TokenDecimal = 1000000;
    uint256 public saleStage = 0;
    uint256 private publicSaleKey;
    uint256 public CurrentMintIndex = 0;
    uint256 public EndRoundMintIndex = 200;
    uint256 public NextEndRoundMintIndex = 400;
    uint256 public NextRoundMintPrice = 5000;
    uint256 public MaxMintIndex = 750;

    address public immutable withdrawWallet1 = 0x4Da56C7c284d56094b21fCC56888BeeaCac53365;
    address public immutable withdrawWallet2 = 0xac488462d5Ed9a904842e8946290698694B2391f;

    mapping(address => uint256) private _userMints;

    event Withdraw(uint256 amount);
    event LockMetadata();
    event LockMaxSupply();

    constructor() ERC721X("AnarKey", "ANARKEY", BatchSize, maxSupply) {
        autoStageChange = true;
    }

    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }

    /**
     * @notice Allows the owner to lock the contract
     * @dev Callable by owner
     */
    function lockMetadata() external onlyOwner {
        require(!isMetadataLocked, "Contract is locked");
        require(bytes(baseTokenURI).length > 0, "BaseUri not set");
        isMetadataLocked = true;
        emit LockMetadata();
    }

    function setAutoStageChange(bool _stage) external onlyOwner {
        autoStageChange = _stage;
    }

    /**
     * @notice Allows the owner to lock the max supply
     * @dev Callable by owner
     */
    function lockMaxSupply() external onlyOwner {
        require(!isMaxSupplyLocked, "Max supply is locked");
        require(maxSupply > 0, "Max supply not set");
        isMaxSupplyLocked = true;
        emit LockMaxSupply();
    }

    function mint(uint256 _quantity, uint256 _CallerPublicSaleKey) external callerIsUser whenNotPaused {
        uint256 userBalance = USDT.balanceOf(msg.sender);
        uint256 costToMint = NFT_PRICE * TokenDecimal * _quantity;

        require(totalSupply().add(_quantity) <= maxSupply, "NFT: Total supply reached");
        require(totalSupply().add(_quantity) <= MaxMintIndex, "Total supply reached max mint supply");
        require(totalSupply().add(_quantity) <= EndRoundMintIndex, "Your quantity is over than limit");
        require(publicSaleKey == _CallerPublicSaleKey, "Called with incorrect public sale key");
        require(costToMint <= userBalance, "User balance is not enough");
        require(_quantity <= MaxMintPerTX, "Mint exceed the limit per TX");      
        require(saleStage > 0, "Sale is not active at the moment");
        require(CurrentMintIndex + _quantity <= EndRoundMintIndex, "Supply over the swap supply limit");

        USDT.safeTransferFrom(msg.sender, address(this), costToMint); 
        _userMints[msg.sender] = _userMints[msg.sender] + _quantity;
        CurrentMintIndex = CurrentMintIndex + _quantity;
        _safeMint(msg.sender, _quantity);

        if (totalSupply() >= EndRoundMintIndex) {
            if (autoStageChange) {
                EndRoundMintIndex = NextEndRoundMintIndex;
                NFT_PRICE = NextRoundMintPrice;
                saleStage++;
            }       
        }
    }

    function ownerMintBulk(address[] memory _accounts, uint256[] memory _quantity) external onlyOwner{
        require(_accounts.length == _quantity.length,"arrays must have same length");

        for (uint256 i = 0; i < _accounts.length; i++) {
            require(totalSupply().add(_quantity[i]) <= maxSupply, "NFT: Total supply reached");
            CurrentMintIndex = CurrentMintIndex + _quantity[i];
            _safeMint(_accounts[i], _quantity[i]);
        }
    }

    function setMaxSupply(uint256 _maxSupply) external onlyOwner {
        require(!isMaxSupplyLocked, "Operations: Max supply is locked");
        setCollectionSize(_maxSupply);
        maxSupply = _maxSupply;
    }

    /**
     * @notice Allows the owner to set the base URI to be used for all token IDs
     * @param _uri: base URI
     * @dev Callable by owner
     */
    function setBaseURI(string memory _uri) external onlyOwner {
        require(!isMetadataLocked, "Operations: Contract is locked");
        baseTokenURI = _uri;
    }

    /**
     * @notice Returns the Uniform Resource Identifier (URI) for a token ID
     * @param tokenId: token ID
     */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "Invalid tokenId");
        return bytes(baseTokenURI).length > 0 ? string(abi.encodePacked(baseTokenURI, tokenId.toString(), ".json")) : "";
    }


    function setRoyalties(address _royalties) public onlyOwner {
        royalties = _royalties;
    }

    function setRoyaltiesPercentage(uint256 _percentage) public onlyOwner {
        royaltiesPercentage = _percentage;
    }

    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address, uint256 royaltyAmount) {
        _tokenId; // silence solc warning
        royaltyAmount = (_salePrice / 100) * royaltiesPercentage;
        return (royalties, royaltyAmount);
    }


    function setUSDTAddress(IERC20 _address) external onlyOwner {
        USDT = _address;
    }

    function setTokenDecimal(uint256 _tokenDecimal) external onlyOwner {
        TokenDecimal = _tokenDecimal;
    }

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

    function unpause() public onlyOwner {
        _unpause();
    }

    function _withdraw(uint256 amount) private {
        require(amount <= USDT.balanceOf(address(this)), "amount > balance");
        require(amount > 0, "Empty amount");

        uint256 amount1 = amount.mul(50).div(100);
        uint256 amount2 = amount.mul(50).div(100);

        USDT.safeTransfer(withdrawWallet1, amount1);
        USDT.safeTransfer(withdrawWallet2, amount2);
        emit Withdraw(amount);
    }


    function withdraw(uint256 amount) external onlyOwner {
        _withdraw(amount);
    }


    function withdrawAll() external onlyOwner {
        _withdraw(USDT.balanceOf(address(this)));
    }

    function setMaxperTX(uint256 _MaxMintPerTX) external onlyOwner {
        MaxMintPerTX = _MaxMintPerTX;
    }

    function setMintPrice(uint256 _MintPrice) external onlyOwner {
        NFT_PRICE = _MintPrice;
    }

    function setCurrentMintIndex(uint256 _Index) external onlyOwner {
        CurrentMintIndex = _Index;
    }

    function setEndRoundMintIndex(uint256 _Index) external onlyOwner {
        EndRoundMintIndex = _Index;
    }

    function setNextEndRoundMintIndex(uint256 _Index) external onlyOwner {
        NextEndRoundMintIndex = _Index;
    }

    function setNextRoundPrice(uint256 _Index) external onlyOwner {
        NextRoundMintPrice = _Index;
    }

    function setMaxMintIndex(uint256 _Index) external onlyOwner {
        MaxMintIndex = _Index;
    }

    function setSaleStage(uint256 _SaleStage, uint256 _price, uint256 _endIndex) external onlyOwner {
        saleStage = _SaleStage;
        NFT_PRICE = _price;
        EndRoundMintIndex = _endIndex;
    }

    function setPublicSaleKey(uint256 _PublicSaleKey) external onlyOwner {
        publicSaleKey = _PublicSaleKey;
    }

     /// ============ OPERATOR FILTER REGISTRY ============
    function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

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

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

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

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

    function owner() public view override(UpdatableOperatorFilterer, Ownable) returns (address) {
        return Ownable.owner();
    }
}

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

interface INftCollection {
     /**
     * @dev Stake Token
     */
    function stakeToken(uint256 tokenId) external;

    /**
     * @dev Unstake Token
     */
    function unstakeToken(uint256 tokenId) external;

    /**
     * @dev return Token stake status
     */
    function isTokenStaked(uint256 tokenId) external view returns (bool);
}

File 3 of 26 : TokenStake.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "./../erc721x/contracts/ERC721X.sol";

abstract contract TokenStake is Ownable, ERC721X {
    using EnumerableSet for EnumerableSet.AddressSet;

    EnumerableSet.AddressSet private _tokenStakers;
    mapping(uint256 => address) private _stakedTokens;

    event TokenStaked(address indexed tokenStaker, uint256 tokenId);
    event TokenUnstaked(address indexed tokenStaker, uint256 tokenId);
    event TokenRecoverUnstaked(uint256 tokenId);
    event BatchUpdateTokenStaked(address indexed newTokenStaker, uint256[] tokenIds);

    event TokenStakerAdded(address indexed tokenStaker);
    event TokenStakerRemoved(address indexed tokenStaker);

    modifier tokenStakersOnly() {
        require(_tokenStakers.contains(_msgSender()), "TokenStake: Not staker");
        _;
    }

    modifier whenTokenNotStaked(uint256 tokenId) {
        require(_stakedTokens[tokenId] == address(0), "TokenStake: Token is staked");
        _;
    }

    modifier whenTokenStaked(uint256 tokenId) {
        require(_stakedTokens[tokenId] != address(0), "TokenStake: Token is not staked");
        _;
    }

    /**
     * @notice Returns `true` if token is staked and can't be transfered
     */
    function isTokenStaked(uint256 tokenId) public view returns (bool) {
        return _stakedTokens[tokenId] != address(0);
    }

    /**
     * @notice Returns the address of the staker for a specific `tokenId``
     * Returns 0x0 if token is not staked
     */
    function stakerForToken(uint256 tokenId) public view returns (address) {
        return _stakedTokens[tokenId];
    }

    /**
     * @notice Lock a token for staking
     * only callable by members of the `tokenStakers` list
     * The owner of the token must approve the staking contract prior to call this method
     */
    function stakeToken(uint256 tokenId) external tokenStakersOnly whenTokenNotStaked(tokenId) {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "TokenStake: Staker not approved");
        _stakedTokens[tokenId] = _msgSender();
        emit TokenStaked(_msgSender(), tokenId);
    }

    /**
     * @notice Lock a token for staking
     * only callable by the staker
     */
    function unstakeToken(uint256 tokenId) external whenTokenStaked(tokenId) {
        require(_msgSender() == _stakedTokens[tokenId], "TokenStake: Token not stake by account");
        require(_msgSender() != address(0), "TokenStake: can't unstake from zero address");
        _stakedTokens[tokenId] = address(0);
        emit TokenUnstaked(_msgSender(), tokenId);
    }

    /**
     * @notice Recover a staked token
     * only callable by the owner
     */
    function recoverStakeToken(uint256 tokenId) external onlyOwner whenTokenStaked(tokenId) {
        _stakedTokens[tokenId] = address(0);
        emit TokenRecoverUnstaked(tokenId);
    }

    /**
     * @dev Change the token staker for a list of tokenIds
     * only callable by the owner
     * this is usefull if the staker contract must be updated
     * if `newStaker` is set to 0x0, tokens will be unstaked
     */
    function batchUpdateTokenStake(address newStaker, uint256[] calldata tokenIds) external onlyOwner {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(_stakedTokens[tokenIds[i]] != address(0), "TokenStake: not restakeable");
            if (newStaker != address(0)) {
                require(_isApprovedOrOwner(newStaker, tokenIds[i]), "TokenStake: Staker not approved");
            }
            _stakedTokens[tokenIds[i]] = newStaker;
        }
        emit BatchUpdateTokenStaked(newStaker, tokenIds);
    }

    /**
     * @dev returns true if `account` is a member of the staker group
     */
    function isTokenStaker(address account) public view returns (bool) {
        return _tokenStakers.contains(account);
    }

    /**
     * @dev Add `tokenStaker` to the list of allowed stakers
     * only callable by the owner
     */
    function addTokenStaker(address tokenStaker) external onlyOwner {
        require(!_tokenStakers.contains(tokenStaker), "TokenStake: Already TokenStaker");
        _tokenStakers.add(tokenStaker);
        emit TokenStakerAdded(tokenStaker);
    }

    /**
     * @dev Remove `tokenStaker` from the list of allowed stakers
     * only callable by the owner
     */
    function removeTokenStaker(address tokenStaker) external onlyOwner {
        require(_tokenStakers.contains(tokenStaker), "TokenStake: Not TokenStaker");
        _tokenStakers.remove(tokenStaker);
        emit TokenStakerRemoved(tokenStaker);
    }
}

File 4 of 26 : ERC721X.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
 *
 * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128.
 *
 * Does not support burning tokens to address(0).
 */
contract ERC721X is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    struct TokenOwnership {
        address addr;
        uint64 startTimestamp;
    }

    struct AddressData {
        uint64 balance;
        uint64 numberMinted;
    }

    uint256 private currentIndex = 0;
    uint256 private burnedIndex = 0;

    uint256 internal collectionSize;
    uint256 internal maxBatchSize;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

    /**
    * @dev
    * `maxBatchSize` refers to how much a minter can mint at a time.
    * `collectionSize_` refers to how many tokens are in the collection.
    */
    constructor(
        string memory name_,
        string memory symbol_,
        uint256 maxBatchSize_,
        uint256 collectionSize_
    ) {
        require(collectionSize_ > 0, "ERC721X: collection must have a nonzero supply");
        require(maxBatchSize_ > 0, "ERC721X: max batch size must be nonzero");
        _name = name_;
        _symbol = symbol_;
        maxBatchSize = maxBatchSize_;
        collectionSize = collectionSize_;
    }

    /**
    * @dev See Remove store data in IERC721Enumerable {IERC721Enumerable-totalSupply}.
    */
    function totalSupply() public view returns (uint256) {
        return currentIndex - burnedIndex;
    }

    /**
    * @dev See Remove store data in IERC721Enumerable {IERC721Enumerable-totalSupply}.
    */
    function setCollectionSize(uint256 _collectionSize) internal {
         collectionSize = _collectionSize;
    }

    /**
    * @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 override returns (uint256) {
        require(owner != address(0), "ERC721X: balance query for the zero address");
        return uint256(_addressData[owner].balance);
    }

    function _numberMinted(address owner) internal view returns (uint256) {
        require(owner != address(0), "ERC721X: number minted query for the zero address");
        return uint256(_addressData[owner].numberMinted);
    }

    function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        require(_exists(tokenId), "ERC721X: owner query for nonexistent token");
        uint256 lowestTokenToCheck;
        if (tokenId >= maxBatchSize) {
            lowestTokenToCheck = tokenId - maxBatchSize + 1;
        }

        for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
            TokenOwnership memory ownership = _ownerships[curr];
            if (ownership.addr != address(0)) {
                return ownership;
            }
        }
        revert("ERC721X: unable to determine the owner of token");
    }

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

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

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

    /**
    * @dev See {IERC721Metadata-tokenURI}.
    */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")): "";
    }

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

    /**
    * @dev See {IERC721-approve}.
    */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721X.ownerOf(tokenId);
        require(to != owner, "ERC721X: approval to current owner");
        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),"ERC721X: approve caller is not owner nor approved for all");
        _approve(to, tokenId, owner);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
    * @dev See {IERC721-setApprovalForAll}.
    */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721X: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

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

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

    /**
    * @dev See {IERC721-safeTransferFrom}.
    */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721X: transfer to non ERC721Receiver implementer");
    }

    /**
    * @dev Returns whether `tokenId` exists.
    *
    * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
    *
    * Tokens start existing when they are minted (`_mint`),
    */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return tokenId < currentIndex;
    }

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

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
    * @dev Mints `quantity` tokens and transfers them to `to`.
    *
    * Requirements:
    *
    * - there must be `quantity` tokens remaining unminted in the total collection.
    * - `to` cannot be the zero address.
    * - `quantity` cannot be larger than the max batch size.
    *
    * Emits a {Transfer} event.
    */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "ERC721X: mint to the zero address");
        require(!_exists(startTokenId), "ERC721X: token already minted");
        require(quantity <= maxBatchSize, "ERC721X: quantity to mint over than max batch size");

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

        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

            uint256 updatedIndex = startTokenId;

            for (uint256 i = 0; i < quantity; i++) {
                emit Transfer(address(0), to, updatedIndex);
                require(_checkOnERC721Received(address(0), to, updatedIndex, _data), "ERC721X: transfer to non ERC721Receiver implementer");
                updatedIndex++;
            }
            currentIndex = updatedIndex;
            _afterTokenTransfers(address(0), to, startTokenId, quantity);
        }
    }

    /**
    * @dev burn function Transfers `tokenId` from `from` to `unused address`.
    *
    * Requirements:
    *
    * - `to` cannot be the zero address and fix to unused address.
    * - `tokenId` token must be owned by `from`.
    *
    * Emits a {Transfer} event.
    */

    function _burn(
        address from,
        uint256 tokenId
        ) internal virtual {
        address to = 0x000000000000000000000000000000000000dEaD;
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        //bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
        //getApproved(tokenId) == _msgSender() ||
        //isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721X: burn caller is not owner nor approved");
        require(prevOwnership.addr == from, "ERC721X: burn from incorrect owner");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));

        // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
        // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
        uint256 nextTokenId = tokenId + 1;
        if (_ownerships[nextTokenId].addr == address(0)) {
            if (_exists(nextTokenId)) {
                _ownerships[nextTokenId] = TokenOwnership(
                prevOwnership.addr,
                prevOwnership.startTimestamp
                );
            }
        }
        emit Transfer(from, to, tokenId);
        burnedIndex++;
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
    * @dev Transfers `tokenId` from `from` to `to`.
    *
    * Requirements:
    *
    * - `to` cannot be the zero address.
    * - `tokenId` token must be owned by `from`.
    *
    * Emits a {Transfer} event.
    */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        //bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
        //getApproved(tokenId) == _msgSender() ||
        //isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721X: transfer caller is not owner nor approved");
        require(prevOwnership.addr == from, "ERC721X: transfer from incorrect owner");
        require(to != address(0), "ERC721X: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));

        // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
        // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
        uint256 nextTokenId = tokenId + 1;
        if (_ownerships[nextTokenId].addr == address(0)) {
            if (_exists(nextTokenId)) {
                _ownerships[nextTokenId] = TokenOwnership(
                prevOwnership.addr,
                prevOwnership.startTimestamp
                );
            }
        }

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

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

    uint256 public nextOwnerToExplicitlySet = 0;

    /**
    * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
    */
    function _setOwnersExplicit(uint256 quantity) internal {
        uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
        require(quantity > 0, "quantity must be nonzero");
        uint256 endIndex = oldNextOwnerToSet + quantity - 1;
        if (endIndex > collectionSize - 1) {
            endIndex = collectionSize - 1;
        }
        // We know if the last one in the group exists, all in the group exist, due to serial ordering.
        require(_exists(endIndex), "not enough minted yet for this cleanup");
        for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
            if (_ownerships[i].addr == address(0)) {
                TokenOwnership memory ownership = ownershipOf(i);
                _ownerships[i] = TokenOwnership(
                ownership.addr,
                ownership.startTimestamp
                );
            }
        }
        nextOwnerToExplicitlySet = endIndex + 1;
    }

    /**
    * @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(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721X: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 5 of 26 : RevokableDefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {RevokableOperatorFilterer} from "./RevokableOperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION, CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  RevokableDefaultOperatorFilterer
 * @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription.
 *         Note that OpenSea will disable creator earnings enforcement if filtered operators begin fulfilling orders
 *         on-chain, eg, if the registry is revoked or bypassed.
 */

abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer {
    /// @dev The constructor that is called when the contract is being deployed.
    constructor()
        RevokableOperatorFilterer(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS, CANONICAL_CORI_SUBSCRIPTION, true)
    {}
}

File 6 of 26 : UpdatableOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

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

/**
 * @title  UpdatableOperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry. This contract allows the Owner to update the
 *         OperatorFilterRegistry address via updateOperatorFilterRegistryAddress, including to the zero address,
 *         which will bypass registry checks.
 *         Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders
 *         on-chain, eg, if the registry is revoked or bypassed.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract UpdatableOperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);
    /// @dev Emitted when someone other than the owner is trying to call an only owner function.
    error OnlyOwner();

    event OperatorFilterRegistryAddressUpdated(address newRegistry);

    IOperatorFilterRegistry public operatorFilterRegistry;

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) {
        IOperatorFilterRegistry registry = IOperatorFilterRegistry(_registry);
        operatorFilterRegistry = registry;
        // 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(registry).code.length > 0) {
            if (subscribe) {
                registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    registry.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if the operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // 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) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if the operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero
     *         address, checks will be bypassed. OnlyOwner.
     */
    function updateOperatorFilterRegistryAddress(address newRegistry) public virtual {
        if (msg.sender != owner()) {
            revert OnlyOwner();
        }
        operatorFilterRegistry = IOperatorFilterRegistry(newRegistry);
        emit OperatorFilterRegistryAddressUpdated(newRegistry);
    }

    /**
     * @dev Assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract.
     */
    function owner() public view virtual returns (address);

    /**
     * @dev A helper function to check if the operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        IOperatorFilterRegistry registry = operatorFilterRegistry;
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(registry) != address(0) && address(registry).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!registry.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

File 7 of 26 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

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

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

File 8 of 26 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 26 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 10 of 26 : 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 11 of 26 : 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 12 of 26 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 13 of 26 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 14 of 26 : RevokableOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

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

/**
 * @title  RevokableOperatorFilterer
 * @notice This contract is meant to allow contracts to permanently skip OperatorFilterRegistry checks if desired. The
 *         Registry itself has an "unregister" function, but if the contract is ownable, the owner can re-register at
 *         any point. As implemented, this abstract contract allows the contract owner to permanently skip the
 *         OperatorFilterRegistry checks by calling revokeOperatorFilterRegistry. Once done, the registry
 *         address cannot be further updated.
 *         Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders
 *         on-chain, eg, if the registry is revoked or bypassed.
 */
abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer {
    /// @dev Emitted when the registry has already been revoked.
    error RegistryHasBeenRevoked();
    /// @dev Emitted when the initial registry address is attempted to be set to the zero address.
    error InitialRegistryAddressCannotBeZeroAddress();

    event OperatorFilterRegistryRevoked();

    bool public isOperatorFilterRegistryRevoked;

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe)
        UpdatableOperatorFilterer(_registry, subscriptionOrRegistrantToCopy, subscribe)
    {
        // don't allow creating a contract with a permanently revoked registry
        if (_registry == address(0)) {
            revert InitialRegistryAddressCannotBeZeroAddress();
        }
    }

    /**
     * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero
     *         address, checks will be permanently bypassed, and the address cannot be updated again. OnlyOwner.
     */
    function updateOperatorFilterRegistryAddress(address newRegistry) public override {
        if (msg.sender != owner()) {
            revert OnlyOwner();
        }
        // if registry has been revoked, do not allow further updates
        if (isOperatorFilterRegistryRevoked) {
            revert RegistryHasBeenRevoked();
        }

        operatorFilterRegistry = IOperatorFilterRegistry(newRegistry);
        emit OperatorFilterRegistryAddressUpdated(newRegistry);
    }

    /**
     * @notice Revoke the OperatorFilterRegistry address, permanently bypassing checks. OnlyOwner.
     */
    function revokeOperatorFilterRegistry() public {
        if (msg.sender != owner()) {
            revert OnlyOwner();
        }
        // if registry has been revoked, do not allow further updates
        if (isOperatorFilterRegistryRevoked) {
            revert RegistryHasBeenRevoked();
        }

        // set to zero address to bypass checks
        operatorFilterRegistry = IOperatorFilterRegistry(address(0));
        isOperatorFilterRegistryRevoked = true;
        emit OperatorFilterRegistryRevoked();
    }
}

File 15 of 26 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }
}

File 16 of 26 : 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 17 of 26 : 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 26 : 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 19 of 26 : 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 20 of 26 : 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 21 of 26 : 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 22 of 26 : 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 23 of 26 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 24 of 26 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InitialRegistryAddressCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"RegistryHasBeenRevoked","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":"address","name":"newTokenStaker","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"BatchUpdateTokenStaked","type":"event"},{"anonymous":false,"inputs":[],"name":"LockMaxSupply","type":"event"},{"anonymous":false,"inputs":[],"name":"LockMetadata","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRegistry","type":"address"}],"name":"OperatorFilterRegistryAddressUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"OperatorFilterRegistryRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenRecoverUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"}],"name":"TokenStakerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"}],"name":"TokenStakerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenStaker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CurrentMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EndRoundMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxMintPerTX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NextEndRoundMintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NextRoundMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TokenDecimal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenStaker","type":"address"}],"name":"addTokenStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoStageChange","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newStaker","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchUpdateTokenStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMaxSupplyLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMetadataLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperatorFilterRegistryRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTokenStaker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_CallerPublicSaleKey","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilterRegistry","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"uint256[]","name":"_quantity","type":"uint256[]"}],"name":"ownerMintBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"recoverStakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenStaker","type":"address"}],"name":"removeTokenStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeOperatorFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalties","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltiesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleStage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"bool","name":"_stage","type":"bool"}],"name":"setAutoStageChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setCurrentMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setEndRoundMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setMaxMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MaxMintPerTX","type":"uint256"}],"name":"setMaxperTX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setNextEndRoundMintIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_Index","type":"uint256"}],"name":"setNextRoundPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_PublicSaleKey","type":"uint256"}],"name":"setPublicSaleKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royalties","type":"address"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setRoyaltiesPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_SaleStage","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_endIndex","type":"uint256"}],"name":"setSaleStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenDecimal","type":"uint256"}],"name":"setTokenDecimal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_address","type":"address"}],"name":"setUSDTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakerForToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistry","type":"address"}],"name":"updateOperatorFilterRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawWallet1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawWallet2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c0604052600060028190556003819055600c8190556104576012556064601355600a6017556113886018819055620f4240601955601a829055601c9190915560c8601d55610190601e55601f556102ee602055734da56c7c284d56094b21fcc56888beeacac5336560805273ac488462d5ed9a904842e8946290698694b2391f60a0523480156200009057600080fd5b50604080518082018252600780825266416e61724b657960c81b602080840191909152835180850190945290835266414e41524b455960c81b90830152601354601254600080546001600160a01b0319166daaeb6d7670e522a718067333cd4e908117909155929392733cc6cdda760b79bafa08df41ecfa224f810dceb6600182828282803b156200022e5781156200018d57604051633e9f1edf60e11b81523060048201526001600160a01b038481166024830152821690637d3e3dbe906044015b600060405180830381600087803b1580156200016e57600080fd5b505af115801562000183573d6000803e3d6000fd5b505050506200022e565b6001600160a01b03831615620001d25760405163a0af290360e01b81523060048201526001600160a01b03848116602483015282169063a0af29039060440162000153565b604051632210724360e11b81523060048201526001600160a01b03821690634420e48690602401600060405180830381600087803b1580156200021457600080fd5b505af115801562000229573d6000803e3d6000fd5b505050505b5050506001600160a01b03841690506200025b5760405163c49d17ad60e01b815260040160405180910390fd5b50505062000278620002726200039360201b60201c565b62000397565b60008111620002e55760405162461bcd60e51b815260206004820152602e60248201527f455243373231583a20636f6c6c656374696f6e206d757374206861766520612060448201526d6e6f6e7a65726f20737570706c7960901b60648201526084015b60405180910390fd5b60008211620003475760405162461bcd60e51b815260206004820152602760248201527f455243373231583a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b6064820152608401620002dc565b60066200035585826200048e565b5060076200036484826200048e565b506005919091556004555050600d805460ff191690556011805460ff60b01b1916600160b01b1790556200055a565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200041457607f821691505b6020821081036200043557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200048957600081815260208120601f850160051c81016020861015620004645750805b601f850160051c820191505b81811015620004855782815560010162000470565b5050505b505050565b81516001600160401b03811115620004aa57620004aa620003e9565b620004c281620004bb8454620003ff565b846200043b565b602080601f831160018114620004fa5760008415620004e15750858301515b600019600386901b1c1916600185901b17855562000485565b600085815260208120601f198616915b828110156200052b578886015182559484019460019091019084016200050a565b50858210156200054a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a0516141366200058e6000396000818161099a0152612653015260008181610883015261261c01526141366000f3fe608060405234801561001057600080fd5b50600436106104545760003560e01c8063715018a611610241578063cafa8dfe1161013b578063e985e9c5116100c3578063f2fde38b11610087578063f2fde38b1461095e578063f4a0a52814610971578063f8d8b8d814610984578063fca76c261461098d578063ffeea2731461099557600080fd5b8063e985e9c5146108e6578063ecba222a146108f9578063f053dc5c1461090d578063f0a5242414610920578063f2b916c31461094b57600080fd5b8063d547cfb71161010a578063d547cfb7146108a5578063d5abeb01146108ad578063d7224ba0146108b6578063d7e45cd7146108bf578063df0995f7146108d357600080fd5b8063cafa8dfe1461084f578063cb4644ff14610858578063cda6b8471461086b578063ce3be6bb1461087e57600080fd5b8063a22cb465116101c9578063b88d4fde1161018d578063b88d4fde146107ef578063b8d1e53214610802578063b8ffc96214610815578063c54e44eb14610829578063c87b56dd1461083c57600080fd5b8063a22cb465146107a4578063a969d1de146107b7578063acca6fe4146107c0578063b0916f03146107c9578063b0ccc31e146107dc57600080fd5b80638da5cb5b116102105780638da5cb5b146107665780638db29eb21461076e5780639466d2061461078157806395d89b4114610794578063989bdbb61461079c57600080fd5b8063715018a6146107455780638456cb591461074d578063853828b6146107555780638a0313b91461075d57600080fd5b80633ad0b9711161035257806355eba868116102da5780636352211e1161029e5780636352211e146106f0578063676dd563146107035780636d3f8edd1461070c5780636f8b44b01461071f57806370a082311461073257600080fd5b806355eba868146106a457806355f804b3146106b75780635c975abb146106ca5780635ec73fdc146106d55780635ef9432a146106e857600080fd5b80634125062c116103215780634125062c1461063957806342842e0e1461066257806347d3a991146106755780634aaca86d146106885780634f1afc4e1461069157600080fd5b80633ad0b971146106025780633ba230b1146106155780633cda6147146106285780633f4ba83a1461063157600080fd5b806323b872dd116103e05780632e1a7d4d116103a45780632e1a7d4d146105ac57806330581d8a146105bf5780633140909f146105d2578063396f650d146105e65780633a07e840146105f957600080fd5b806323b872dd1461052e5780632a09f2f2146105415780632a55205a146105545780632a9e63c6146105865780632cfb66881461059957600080fd5b8063095ea7b311610427578063095ea7b3146104d85780630cd9c899146104ed5780631134cfff1461050057806318160ddd146105135780631b2ef1ca1461051b57600080fd5b806301ffc9a71461045957806306fdde031461048157806307f3934714610496578063081812fc146104ad575b600080fd5b61046c610467366004613758565b6109bc565b60405190151581526020015b60405180910390f35b610489610a0e565b60405161047891906137c5565b61049f601e5481565b604051908152602001610478565b6104c06104bb3660046137d8565b610aa0565b6040516001600160a01b039091168152602001610478565b6104eb6104e6366004613806565b610b30565b005b61046c6104fb366004613832565b610b49565b6104eb61050e3660046137d8565b610b56565b61049f610b63565b6104eb61052936600461384f565b610b7a565b6104eb61053c366004613871565b610fe8565b6104eb61054f3660046137d8565b61104b565b61056761056236600461384f565b611058565b604080516001600160a01b039093168352602083019190915201610478565b6104eb610594366004613832565b61108b565b6104eb6105a73660046137d8565b6110b5565b6104eb6105ba3660046137d8565b61125d565b6104eb6105cd3660046137d8565b611271565b60115461046c90600160b01b900460ff1681565b6104eb6105f4366004613832565b61127e565b61049f60205481565b6104eb6106103660046137d8565b611321565b6104eb6106233660046137d8565b61132e565b61049f601c5481565b6104eb61133b565b6104c06106473660046137d8565b6000908152601060205260409020546001600160a01b031690565b6104eb610670366004613871565b61134d565b6104eb6106833660046137d8565b6113a9565b61049f601a5481565b6104eb61069f3660046138b2565b6113b6565b6104eb6106b2366004613832565b6113cc565b6104eb6106c536600461397b565b6113f6565b600d5460ff1661046c565b6104eb6106e3366004613a51565b611468565b6104eb6115ba565b6104c06106fe3660046137d8565b61165d565b61049f60185481565b6104eb61071a366004613b20565b61166f565b6104eb61072d3660046137d8565b611695565b61049f610740366004613832565b611705565b6104eb611796565b6104eb6117a8565b6104eb6117b8565b61049f601f5481565b6104c0611833565b6104eb61077c3660046137d8565b611847565b6104eb61078f3660046137d8565b611854565b610489611861565b6104eb611870565b6104eb6107b2366004613b3d565b611955565b61049f60195481565b61049f60175481565b6104eb6107d73660046137d8565b611969565b6000546104c0906001600160a01b031681565b6104eb6107fd366004613b76565b611a31565b6104eb610810366004613832565b611a96565b60115461046c90600160a81b900460ff1681565b6011546104c0906001600160a01b031681565b61048961084a3660046137d8565b611b4e565b61049f60165481565b6104eb610866366004613832565b611bf5565b6104eb6108793660046137d8565b611c97565b6104c07f000000000000000000000000000000000000000000000000000000000000000081565b610489611dc7565b61049f60125481565b61049f600c5481565b60115461046c90600160a01b900460ff1681565b6104eb6108e13660046137d8565b611e55565b61046c6108f4366004613bf5565b611e62565b60005461046c90600160a01b900460ff1681565b6015546104c0906001600160a01b031681565b61046c61092e3660046137d8565b6000908152601060205260409020546001600160a01b0316151590565b6104eb610959366004613c23565b611e90565b6104eb61096c366004613832565b612053565b6104eb61097f3660046137d8565b6120c9565b61049f601d5481565b6104eb6120d6565b6104c07f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b031982166380ac58cd60e01b14806109ed57506001600160e01b03198216635b5e139f60e01b145b80610a0857506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060068054610a1d90613caa565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4990613caa565b8015610a965780601f10610a6b57610100808354040283529160200191610a96565b820191906000526020600020905b815481529060010190602001808311610a7957829003601f168201915b5050505050905090565b6000610aad826002541190565b610b145760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b81610b3a816121b4565b610b448383612276565b505050565b6000610a08600e83612388565b610b5e6123ad565b601d55565b6000600354600254610b759190613cfa565b905090565b323314610bc95760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610b0b565b610bd161240c565b6011546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610c1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3e9190613d0d565b9050600083601954601854610c539190613d26565b610c5d9190613d26565b9050601254610c7485610c6e610b63565b90612452565b1115610cbe5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610b0b565b602054610ccd85610c6e610b63565b1115610d275760405162461bcd60e51b8152602060048201526024808201527f546f74616c20737570706c792072656163686564206d6178206d696e7420737560448201526370706c7960e01b6064820152608401610b0b565b601d54610d3685610c6e610b63565b1115610d845760405162461bcd60e51b815260206004820181905260248201527f596f7572207175616e74697479206973206f766572207468616e206c696d69746044820152606401610b0b565b82601b5414610de35760405162461bcd60e51b815260206004820152602560248201527f43616c6c6564207769746820696e636f7272656374207075626c69632073616c60448201526465206b657960d81b6064820152608401610b0b565b81811115610e335760405162461bcd60e51b815260206004820152601a60248201527f557365722062616c616e6365206973206e6f7420656e6f7567680000000000006044820152606401610b0b565b601754841115610e855760405162461bcd60e51b815260206004820152601c60248201527f4d696e742065786365656420746865206c696d697420706572205458000000006044820152606401610b0b565b6000601a5411610ed75760405162461bcd60e51b815260206004820181905260248201527f53616c65206973206e6f742061637469766520617420746865206d6f6d656e746044820152606401610b0b565b601d5484601c54610ee89190613d3d565b1115610f405760405162461bcd60e51b815260206004820152602160248201527f537570706c79206f76657220746865207377617020737570706c79206c696d696044820152601d60fa1b6064820152608401610b0b565b601154610f58906001600160a01b031633308461245e565b33600090815260216020526040902054610f73908590613d3d565b33600090815260216020526040902055601c54610f91908590613d3d565b601c55610f9e33856124c9565b601d54610fa9610b63565b10610fe257601154600160b01b900460ff1615610fe257601e54601d55601f54601855601a8054906000610fdc83613d50565b91905055505b50505050565b826001600160a01b038116331461100257611002336121b4565b60008281526010602052604090205482906001600160a01b0316156110395760405162461bcd60e51b8152600401610b0b90613d69565b6110448585856124e3565b5050505050565b6110536123ad565b601b55565b60008060165460648461106b9190613da0565b6110759190613d26565b6015546001600160a01b03169590945092505050565b6110936123ad565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526010602052604090205481906001600160a01b031661111b5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610b0b565b6000828152601060205260409020546001600160a01b0316336001600160a01b0316146111995760405162461bcd60e51b815260206004820152602660248201527f546f6b656e5374616b653a20546f6b656e206e6f74207374616b65206279206160448201526518d8dbdd5b9d60d21b6064820152608401610b0b565b336111fa5760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e5374616b653a2063616e277420756e7374616b652066726f6d207a60448201526a65726f206164647265737360a81b6064820152608401610b0b565b600082815260106020526040902080546001600160a01b0319169055336001600160a01b03167ff0dbb2abe50e936f0d3720a39c0debe7706007b2c50286a913f24298e9be36ba8360405161125191815260200190565b60405180910390a25050565b6112656123ad565b61126e816124ee565b50565b6112796123ad565b601955565b6112866123ad565b611291600e82612388565b156112de5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20416c726561647920546f6b656e5374616b6572006044820152606401610b0b565b6112e9600e826126b0565b506040516001600160a01b038216907fb0d0a630f2db36143e1613d24b818312e1b0f13888e8dae939d016cc81c1c91490600090a250565b6113296123ad565b601f55565b6113366123ad565b601c55565b6113436123ad565b61134b6126c5565b565b826001600160a01b038116331461136757611367336121b4565b60008281526010602052604090205482906001600160a01b03161561139e5760405162461bcd60e51b8152600401610b0b90613d69565b611044858585612717565b6113b16123ad565b601e55565b6113be6123ad565b601a92909255601855601d55565b6113d46123ad565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6113fe6123ad565b601154600160a01b900460ff16156114585760405162461bcd60e51b815260206004820152601e60248201527f4f7065726174696f6e733a20436f6e7472616374206973206c6f636b656400006044820152606401610b0b565b60146114648282613e08565b5050565b6114706123ad565b80518251146114c15760405162461bcd60e51b815260206004820152601c60248201527f617272617973206d75737420686176652073616d65206c656e677468000000006044820152606401610b0b565b60005b8251811015610b44576012546114f58383815181106114e5576114e5613ec7565b6020026020010151610c6e610b63565b111561153f5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610b0b565b81818151811061155157611551613ec7565b6020026020010151601c546115669190613d3d565b601c819055506115a883828151811061158157611581613ec7565b602002602001015183838151811061159b5761159b613ec7565b60200260200101516124c9565b806115b281613d50565b9150506114c4565b6115c2611833565b6001600160a01b0316336001600160a01b0316146115f357604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff161561161e57604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a81b031916600160a01b1781556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad169190a1565b600061166882612732565b5192915050565b6116776123ad565b60118054911515600160b01b0260ff60b01b19909216919091179055565b61169d6123ad565b601154600160a81b900460ff16156116f75760405162461bcd60e51b815260206004820181905260248201527f4f7065726174696f6e733a204d617820737570706c79206973206c6f636b65646044820152606401610b0b565b61170081600455565b601255565b60006001600160a01b0382166117715760405162461bcd60e51b815260206004820152602b60248201527f455243373231583a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610b0b565b506001600160a01b03166000908152600960205260409020546001600160401b031690565b61179e6123ad565b61134b60006128a0565b6117b06123ad565b61134b6128f2565b6117c06123ad565b6011546040516370a0823160e01b815230600482015261134b916001600160a01b0316906370a0823190602401602060405180830381865afa15801561180a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182e9190613d0d565b6124ee565b6000610b756001546001600160a01b031690565b61184f6123ad565b602055565b61185c6123ad565b601655565b606060078054610a1d90613caa565b6118786123ad565b601154600160a01b900460ff16156118c75760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610b0b565b6000601480546118d690613caa565b9050116119175760405162461bcd60e51b815260206004820152600f60248201526e10985cd9555c9a481b9bdd081cd95d608a1b6044820152606401610b0b565b6011805460ff60a01b1916600160a01b1790556040517f95a231e0e633252fd44273c53079a71e951df22e856f058d0114c54c6430e81c90600090a1565b8161195f816121b4565b610b44838361292f565b6119716123ad565b60008181526010602052604090205481906001600160a01b03166119d75760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610b0b565b6000828152601060205260409081902080546001600160a01b0319169055517f27862ebdcaf1c94ba2342cdeb5d6c140b8fde6b95a3921802445834577312ef490611a259084815260200190565b60405180910390a15050565b836001600160a01b0381163314611a4b57611a4b336121b4565b60008381526010602052604090205483906001600160a01b031615611a825760405162461bcd60e51b8152600401610b0b90613d69565b611a8e868686866129f3565b505050505050565b611a9e611833565b6001600160a01b0316336001600160a01b031614611acf57604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff1615611afa57604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b6060611b5b826002541190565b611b995760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610b0b565b600060148054611ba890613caa565b905011611bc45760405180602001604052806000815250610a08565b6014611bcf83612a26565b604051602001611be0929190613edd565b60405160208183030381529060405292915050565b611bfd6123ad565b611c08600e82612388565b611c545760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a204e6f7420546f6b656e5374616b657200000000006044820152606401610b0b565b611c5f600e82612ab8565b506040516001600160a01b038216907f1d1e5fd08acb9bc25c0dd45c0561cfb6e086312e6960eb801333c3ae19eda07c90600090a250565b611ca2600e33612388565b611ce75760405162461bcd60e51b81526020600482015260166024820152752a37b5b2b729ba30b5b29d102737ba1039ba30b5b2b960511b6044820152606401610b0b565b60008181526010602052604090205481906001600160a01b031615611d1e5760405162461bcd60e51b8152600401610b0b90613d69565b611d29335b83612acd565b611d755760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610b0b565b60008281526010602090815260409182902080546001600160a01b0319163390811790915591518481527f1fdab8a8457aaf782e4b6217d6ffa6f5006eda7e50922dd092b2e1524275d7749101611251565b60148054611dd490613caa565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0090613caa565b8015611e4d5780601f10611e2257610100808354040283529160200191611e4d565b820191906000526020600020905b815481529060010190602001808311611e3057829003601f168201915b505050505081565b611e5d6123ad565b601755565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b611e986123ad565b60005b8181101561200a576000601081858585818110611eba57611eba613ec7565b60209081029290920135835250810191909152604001600020546001600160a01b031603611f2a5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a206e6f742072657374616b6561626c6500000000006044820152606401610b0b565b6001600160a01b03841615611fa757611f5b84848484818110611f4f57611f4f613ec7565b90506020020135612acd565b611fa75760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610b0b565b8360106000858585818110611fbe57611fbe613ec7565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061200290613d50565b915050611e9b565b50826001600160a01b03167f43b05a7e48dc5c22c2f56fa403cb8271d8a4e97f09548d2161cdd7bb3f9c7cbc8383604051612046929190613f74565b60405180910390a2505050565b61205b6123ad565b6001600160a01b0381166120c05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b0b565b61126e816128a0565b6120d16123ad565b601855565b6120de6123ad565b601154600160a81b900460ff161561212f5760405162461bcd60e51b815260206004820152601460248201527313585e081cdd5c1c1b1e481a5cc81b1bd8dad95960621b6044820152606401610b0b565b6000601254116121765760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481b9bdd081cd95d60721b6044820152606401610b0b565b6011805460ff60a81b1916600160a81b1790556040517fcb05127102e959540e425cdbe8127c6ae5cdff90f0ba6763e98b7ddc818f7fb890600090a1565b6000546001600160a01b031680158015906121d957506000816001600160a01b03163b115b1561146457604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa15801561222a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224e9190613fad565b61146457604051633b79c77360e21b81526001600160a01b0383166004820152602401610b0b565b60006122818261165d565b9050806001600160a01b0316836001600160a01b0316036122ef5760405162461bcd60e51b815260206004820152602260248201527f455243373231583a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610b0b565b336001600160a01b038216148061230b575061230b8133611e62565b61237d5760405162461bcd60e51b815260206004820152603960248201527f455243373231583a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610b0b565b610b44838383612ba0565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b336123b6611833565b6001600160a01b03161461134b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b0b565b600d5460ff161561134b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b0b565b60006123a68284613d3d565b6040516001600160a01b0380851660248301528316604482015260648101829052610fe29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612bfc565b611464828260405180602001604052806000815250612cd1565b610b44838383612f31565b6011546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255a9190613d0d565b81111561259c5760405162461bcd60e51b815260206004820152601060248201526f616d6f756e74203e2062616c616e636560801b6044820152606401610b0b565b600081116125db5760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b6044820152606401610b0b565b60006125f360646125ed84603261326c565b90613278565b9050600061260760646125ed85603261326c565b601154909150612641906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000084613284565b601154612678906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083613284565b6040518381527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a1505050565b60006123a6836001600160a01b0384166132b4565b6126cd613303565b600d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610b4483838360405180602001604052806000815250611a31565b6040805180820190915260008082526020820152612751826002541190565b6127b05760405162461bcd60e51b815260206004820152602a60248201527f455243373231583a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610b0b565b600060055483106127d6576005546127c89084613cfa565b6127d3906001613d3d565b90505b825b81811061283f576000818152600860209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561282c57949350505050565b508061283781613fca565b9150506127d8565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231583a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610b0b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6128fa61240c565b600d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126fa3390565b336001600160a01b038316036129875760405162461bcd60e51b815260206004820152601a60248201527f455243373231583a20617070726f766520746f2063616c6c65720000000000006044820152606401610b0b565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6129fe848484612f31565b612a0a8484848461334c565b610fe25760405162461bcd60e51b8152600401610b0b90613fe1565b60606000612a338361344d565b60010190506000816001600160401b03811115612a5257612a526138de565b6040519080825280601f01601f191660200182016040528015612a7c576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612a8657509392505050565b60006123a6836001600160a01b038416613525565b6000612ada826002541190565b612b3c5760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a206f70657261746f7220717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610b0b565b6000612b4783612732565b905080600001516001600160a01b0316846001600160a01b03161480612b865750836001600160a01b0316612b7b84610aa0565b6001600160a01b0316145b80612b9857508051612b989085611e62565b949350505050565b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000612c51826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661361f9092919063ffffffff16565b9050805160001480612c72575080806020019051810190612c729190613fad565b610b445760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b0b565b6002546001600160a01b038416612d345760405162461bcd60e51b815260206004820152602160248201527f455243373231583a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b0b565b612d3f816002541190565b15612d8c5760405162461bcd60e51b815260206004820152601d60248201527f455243373231583a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610b0b565b600554831115612df95760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207175616e7469747920746f206d696e74206f766572207460448201527168616e206d61782062617463682073697a6560701b6064820152608401610b0b565b6001600160a01b0380851660008181526009602090815260408083208054680100000000000000006001600160401b038083168c01811667ffffffffffffffff198416811783900482168d0182169092026fffffffffffffffffffffffffffffffff1990931690911791909117909155815180830183529485524281168584019081528785526008909352908320935184549251909116600160a01b026001600160e01b031990921694169390931792909217905581905b84811015612f265760405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612efe600087848761334c565b612f1a5760405162461bcd60e51b8152600401610b0b90613fe1565b60019182019101612eb1565b506002819055611044565b6000612f3c82612732565b9050612f4733611d23565b612fae5760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610b0b565b836001600160a01b031681600001516001600160a01b0316146130225760405162461bcd60e51b815260206004820152602660248201527f455243373231583a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610b0b565b6001600160a01b0383166130865760405162461bcd60e51b815260206004820152602560248201527f455243373231583a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b0b565b6130966000838360000151612ba0565b6001600160a01b03841660009081526009602052604081208054600192906130c89084906001600160401b0316614034565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b0385166000908152600960205260408120805460019450909261311491859116614054565b82546101009290920a6001600160401b038181021990931691831602179091556040805180820182526001600160a01b03878116825242841660208084019182526000898152600890915293842092518354915192166001600160e01b031990911617600160a01b9190941602929092179091559050613195836001613d3d565b6000818152600860205260409020549091506001600160a01b0316613226576131bf816002541190565b156132265760408051808201825283516001600160a01b0390811682526020808601516001600160401b039081168285019081526000878152600890935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611044565b60006123a68284613d26565b60006123a68284613da0565b6040516001600160a01b038316602482015260448101829052610b4490849063a9059cbb60e01b90606401612492565b60008181526001830160205260408120546132fb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a08565b506000610a08565b600d5460ff1661134b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b0b565b60006001600160a01b0384163b1561344257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613390903390899088908890600401614074565b6020604051808303816000875af19250505080156133cb575060408051601f3d908101601f191682019092526133c8918101906140b1565b60015b613428573d8080156133f9576040519150601f19603f3d011682016040523d82523d6000602084013e6133fe565b606091505b5080516000036134205760405162461bcd60e51b8152600401610b0b90613fe1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b98565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061348c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106134b8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106134d657662386f26fc10000830492506010015b6305f5e10083106134ee576305f5e100830492506008015b612710831061350257612710830492506004015b60648310613514576064830492506002015b600a8310610a085760010192915050565b6000818152600183016020526040812054801561360e576000613549600183613cfa565b855490915060009061355d90600190613cfa565b90508181146135c257600086600001828154811061357d5761357d613ec7565b90600052602060002001549050808760000184815481106135a0576135a0613ec7565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135d3576135d36140ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a08565b6000915050610a08565b5092915050565b6060612b98848460008585600080866001600160a01b0316858760405161364691906140e4565b60006040518083038185875af1925050503d8060008114613683576040519150601f19603f3d011682016040523d82523d6000602084013e613688565b606091505b5091509150613699878383876136a4565b979650505050505050565b6060831561371357825160000361370c576001600160a01b0385163b61370c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b0b565b5081612b98565b612b9883838151156137285781518083602001fd5b8060405162461bcd60e51b8152600401610b0b91906137c5565b6001600160e01b03198116811461126e57600080fd5b60006020828403121561376a57600080fd5b81356123a681613742565b60005b83811015613790578181015183820152602001613778565b50506000910152565b600081518084526137b1816020860160208601613775565b601f01601f19169290920160200192915050565b6020815260006123a66020830184613799565b6000602082840312156137ea57600080fd5b5035919050565b6001600160a01b038116811461126e57600080fd5b6000806040838503121561381957600080fd5b8235613824816137f1565b946020939093013593505050565b60006020828403121561384457600080fd5b81356123a6816137f1565b6000806040838503121561386257600080fd5b50508035926020909101359150565b60008060006060848603121561388657600080fd5b8335613891816137f1565b925060208401356138a1816137f1565b929592945050506040919091013590565b6000806000606084860312156138c757600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561391c5761391c6138de565b604052919050565b60006001600160401b0383111561393d5761393d6138de565b613950601f8401601f19166020016138f4565b905082815283838301111561396457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561398d57600080fd5b81356001600160401b038111156139a357600080fd5b8201601f810184136139b457600080fd5b612b9884823560208401613924565b60006001600160401b038211156139dc576139dc6138de565b5060051b60200190565b600082601f8301126139f757600080fd5b81356020613a0c613a07836139c3565b6138f4565b82815260059290921b84018101918181019086841115613a2b57600080fd5b8286015b84811015613a465780358352918301918301613a2f565b509695505050505050565b60008060408385031215613a6457600080fd5b82356001600160401b0380821115613a7b57600080fd5b818501915085601f830112613a8f57600080fd5b81356020613a9f613a07836139c3565b82815260059290921b84018101918181019089841115613abe57600080fd5b948201945b83861015613ae5578535613ad6816137f1565b82529482019490820190613ac3565b96505086013592505080821115613afb57600080fd5b50613b08858286016139e6565b9150509250929050565b801515811461126e57600080fd5b600060208284031215613b3257600080fd5b81356123a681613b12565b60008060408385031215613b5057600080fd5b8235613b5b816137f1565b91506020830135613b6b81613b12565b809150509250929050565b60008060008060808587031215613b8c57600080fd5b8435613b97816137f1565b93506020850135613ba7816137f1565b92506040850135915060608501356001600160401b03811115613bc957600080fd5b8501601f81018713613bda57600080fd5b613be987823560208401613924565b91505092959194509250565b60008060408385031215613c0857600080fd5b8235613c13816137f1565b91506020830135613b6b816137f1565b600080600060408486031215613c3857600080fd5b8335613c43816137f1565b925060208401356001600160401b0380821115613c5f57600080fd5b818601915086601f830112613c7357600080fd5b813581811115613c8257600080fd5b8760208260051b8501011115613c9757600080fd5b6020830194508093505050509250925092565b600181811c90821680613cbe57607f821691505b602082108103613cde57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a0857610a08613ce4565b600060208284031215613d1f57600080fd5b5051919050565b8082028115828204841417610a0857610a08613ce4565b80820180821115610a0857610a08613ce4565b600060018201613d6257613d62613ce4565b5060010190565b6020808252601b908201527f546f6b656e5374616b653a20546f6b656e206973207374616b65640000000000604082015260600190565b600082613dbd57634e487b7160e01b600052601260045260246000fd5b500490565b601f821115610b4457600081815260208120601f850160051c81016020861015613de95750805b601f850160051c820191505b81811015611a8e57828155600101613df5565b81516001600160401b03811115613e2157613e216138de565b613e3581613e2f8454613caa565b84613dc2565b602080601f831160018114613e6a5760008415613e525750858301515b600019600386901b1c1916600185901b178555611a8e565b600085815260208120601f198616915b82811015613e9957888601518255948401946001909101908401613e7a565b5085821015613eb75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b6000808454613eeb81613caa565b60018281168015613f035760018114613f1857613f47565b60ff1984168752821515830287019450613f47565b8860005260208060002060005b85811015613f3e5781548a820152908401908201613f25565b50505082870194505b505050508351613f5b818360208801613775565b64173539b7b760d91b9101908152600501949350505050565b6020808252810182905260006001600160fb1b03831115613f9457600080fd5b8260051b80856040850137919091016040019392505050565b600060208284031215613fbf57600080fd5b81516123a681613b12565b600081613fd957613fd9613ce4565b506000190190565b60208082526033908201527f455243373231583a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b6001600160401b0382811682821603908082111561361857613618613ce4565b6001600160401b0381811683821601908082111561361857613618613ce4565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140a790830184613799565b9695505050505050565b6000602082840312156140c357600080fd5b81516123a681613742565b634e487b7160e01b600052603160045260246000fd5b600082516140f6818460208701613775565b919091019291505056fea2646970667358221220a07d5608b5d4cb801465e6eb374efaf0ff21e298863c94d22096dd87ada7082464736f6c63430008120033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106104545760003560e01c8063715018a611610241578063cafa8dfe1161013b578063e985e9c5116100c3578063f2fde38b11610087578063f2fde38b1461095e578063f4a0a52814610971578063f8d8b8d814610984578063fca76c261461098d578063ffeea2731461099557600080fd5b8063e985e9c5146108e6578063ecba222a146108f9578063f053dc5c1461090d578063f0a5242414610920578063f2b916c31461094b57600080fd5b8063d547cfb71161010a578063d547cfb7146108a5578063d5abeb01146108ad578063d7224ba0146108b6578063d7e45cd7146108bf578063df0995f7146108d357600080fd5b8063cafa8dfe1461084f578063cb4644ff14610858578063cda6b8471461086b578063ce3be6bb1461087e57600080fd5b8063a22cb465116101c9578063b88d4fde1161018d578063b88d4fde146107ef578063b8d1e53214610802578063b8ffc96214610815578063c54e44eb14610829578063c87b56dd1461083c57600080fd5b8063a22cb465146107a4578063a969d1de146107b7578063acca6fe4146107c0578063b0916f03146107c9578063b0ccc31e146107dc57600080fd5b80638da5cb5b116102105780638da5cb5b146107665780638db29eb21461076e5780639466d2061461078157806395d89b4114610794578063989bdbb61461079c57600080fd5b8063715018a6146107455780638456cb591461074d578063853828b6146107555780638a0313b91461075d57600080fd5b80633ad0b9711161035257806355eba868116102da5780636352211e1161029e5780636352211e146106f0578063676dd563146107035780636d3f8edd1461070c5780636f8b44b01461071f57806370a082311461073257600080fd5b806355eba868146106a457806355f804b3146106b75780635c975abb146106ca5780635ec73fdc146106d55780635ef9432a146106e857600080fd5b80634125062c116103215780634125062c1461063957806342842e0e1461066257806347d3a991146106755780634aaca86d146106885780634f1afc4e1461069157600080fd5b80633ad0b971146106025780633ba230b1146106155780633cda6147146106285780633f4ba83a1461063157600080fd5b806323b872dd116103e05780632e1a7d4d116103a45780632e1a7d4d146105ac57806330581d8a146105bf5780633140909f146105d2578063396f650d146105e65780633a07e840146105f957600080fd5b806323b872dd1461052e5780632a09f2f2146105415780632a55205a146105545780632a9e63c6146105865780632cfb66881461059957600080fd5b8063095ea7b311610427578063095ea7b3146104d85780630cd9c899146104ed5780631134cfff1461050057806318160ddd146105135780631b2ef1ca1461051b57600080fd5b806301ffc9a71461045957806306fdde031461048157806307f3934714610496578063081812fc146104ad575b600080fd5b61046c610467366004613758565b6109bc565b60405190151581526020015b60405180910390f35b610489610a0e565b60405161047891906137c5565b61049f601e5481565b604051908152602001610478565b6104c06104bb3660046137d8565b610aa0565b6040516001600160a01b039091168152602001610478565b6104eb6104e6366004613806565b610b30565b005b61046c6104fb366004613832565b610b49565b6104eb61050e3660046137d8565b610b56565b61049f610b63565b6104eb61052936600461384f565b610b7a565b6104eb61053c366004613871565b610fe8565b6104eb61054f3660046137d8565b61104b565b61056761056236600461384f565b611058565b604080516001600160a01b039093168352602083019190915201610478565b6104eb610594366004613832565b61108b565b6104eb6105a73660046137d8565b6110b5565b6104eb6105ba3660046137d8565b61125d565b6104eb6105cd3660046137d8565b611271565b60115461046c90600160b01b900460ff1681565b6104eb6105f4366004613832565b61127e565b61049f60205481565b6104eb6106103660046137d8565b611321565b6104eb6106233660046137d8565b61132e565b61049f601c5481565b6104eb61133b565b6104c06106473660046137d8565b6000908152601060205260409020546001600160a01b031690565b6104eb610670366004613871565b61134d565b6104eb6106833660046137d8565b6113a9565b61049f601a5481565b6104eb61069f3660046138b2565b6113b6565b6104eb6106b2366004613832565b6113cc565b6104eb6106c536600461397b565b6113f6565b600d5460ff1661046c565b6104eb6106e3366004613a51565b611468565b6104eb6115ba565b6104c06106fe3660046137d8565b61165d565b61049f60185481565b6104eb61071a366004613b20565b61166f565b6104eb61072d3660046137d8565b611695565b61049f610740366004613832565b611705565b6104eb611796565b6104eb6117a8565b6104eb6117b8565b61049f601f5481565b6104c0611833565b6104eb61077c3660046137d8565b611847565b6104eb61078f3660046137d8565b611854565b610489611861565b6104eb611870565b6104eb6107b2366004613b3d565b611955565b61049f60195481565b61049f60175481565b6104eb6107d73660046137d8565b611969565b6000546104c0906001600160a01b031681565b6104eb6107fd366004613b76565b611a31565b6104eb610810366004613832565b611a96565b60115461046c90600160a81b900460ff1681565b6011546104c0906001600160a01b031681565b61048961084a3660046137d8565b611b4e565b61049f60165481565b6104eb610866366004613832565b611bf5565b6104eb6108793660046137d8565b611c97565b6104c07f0000000000000000000000004da56c7c284d56094b21fcc56888beeacac5336581565b610489611dc7565b61049f60125481565b61049f600c5481565b60115461046c90600160a01b900460ff1681565b6104eb6108e13660046137d8565b611e55565b61046c6108f4366004613bf5565b611e62565b60005461046c90600160a01b900460ff1681565b6015546104c0906001600160a01b031681565b61046c61092e3660046137d8565b6000908152601060205260409020546001600160a01b0316151590565b6104eb610959366004613c23565b611e90565b6104eb61096c366004613832565b612053565b6104eb61097f3660046137d8565b6120c9565b61049f601d5481565b6104eb6120d6565b6104c07f000000000000000000000000ac488462d5ed9a904842e8946290698694b2391f81565b60006001600160e01b031982166380ac58cd60e01b14806109ed57506001600160e01b03198216635b5e139f60e01b145b80610a0857506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060068054610a1d90613caa565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4990613caa565b8015610a965780601f10610a6b57610100808354040283529160200191610a96565b820191906000526020600020905b815481529060010190602001808311610a7957829003601f168201915b5050505050905090565b6000610aad826002541190565b610b145760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b81610b3a816121b4565b610b448383612276565b505050565b6000610a08600e83612388565b610b5e6123ad565b601d55565b6000600354600254610b759190613cfa565b905090565b323314610bc95760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610b0b565b610bd161240c565b6011546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610c1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3e9190613d0d565b9050600083601954601854610c539190613d26565b610c5d9190613d26565b9050601254610c7485610c6e610b63565b90612452565b1115610cbe5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610b0b565b602054610ccd85610c6e610b63565b1115610d275760405162461bcd60e51b8152602060048201526024808201527f546f74616c20737570706c792072656163686564206d6178206d696e7420737560448201526370706c7960e01b6064820152608401610b0b565b601d54610d3685610c6e610b63565b1115610d845760405162461bcd60e51b815260206004820181905260248201527f596f7572207175616e74697479206973206f766572207468616e206c696d69746044820152606401610b0b565b82601b5414610de35760405162461bcd60e51b815260206004820152602560248201527f43616c6c6564207769746820696e636f7272656374207075626c69632073616c60448201526465206b657960d81b6064820152608401610b0b565b81811115610e335760405162461bcd60e51b815260206004820152601a60248201527f557365722062616c616e6365206973206e6f7420656e6f7567680000000000006044820152606401610b0b565b601754841115610e855760405162461bcd60e51b815260206004820152601c60248201527f4d696e742065786365656420746865206c696d697420706572205458000000006044820152606401610b0b565b6000601a5411610ed75760405162461bcd60e51b815260206004820181905260248201527f53616c65206973206e6f742061637469766520617420746865206d6f6d656e746044820152606401610b0b565b601d5484601c54610ee89190613d3d565b1115610f405760405162461bcd60e51b815260206004820152602160248201527f537570706c79206f76657220746865207377617020737570706c79206c696d696044820152601d60fa1b6064820152608401610b0b565b601154610f58906001600160a01b031633308461245e565b33600090815260216020526040902054610f73908590613d3d565b33600090815260216020526040902055601c54610f91908590613d3d565b601c55610f9e33856124c9565b601d54610fa9610b63565b10610fe257601154600160b01b900460ff1615610fe257601e54601d55601f54601855601a8054906000610fdc83613d50565b91905055505b50505050565b826001600160a01b038116331461100257611002336121b4565b60008281526010602052604090205482906001600160a01b0316156110395760405162461bcd60e51b8152600401610b0b90613d69565b6110448585856124e3565b5050505050565b6110536123ad565b601b55565b60008060165460648461106b9190613da0565b6110759190613d26565b6015546001600160a01b03169590945092505050565b6110936123ad565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526010602052604090205481906001600160a01b031661111b5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610b0b565b6000828152601060205260409020546001600160a01b0316336001600160a01b0316146111995760405162461bcd60e51b815260206004820152602660248201527f546f6b656e5374616b653a20546f6b656e206e6f74207374616b65206279206160448201526518d8dbdd5b9d60d21b6064820152608401610b0b565b336111fa5760405162461bcd60e51b815260206004820152602b60248201527f546f6b656e5374616b653a2063616e277420756e7374616b652066726f6d207a60448201526a65726f206164647265737360a81b6064820152608401610b0b565b600082815260106020526040902080546001600160a01b0319169055336001600160a01b03167ff0dbb2abe50e936f0d3720a39c0debe7706007b2c50286a913f24298e9be36ba8360405161125191815260200190565b60405180910390a25050565b6112656123ad565b61126e816124ee565b50565b6112796123ad565b601955565b6112866123ad565b611291600e82612388565b156112de5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20416c726561647920546f6b656e5374616b6572006044820152606401610b0b565b6112e9600e826126b0565b506040516001600160a01b038216907fb0d0a630f2db36143e1613d24b818312e1b0f13888e8dae939d016cc81c1c91490600090a250565b6113296123ad565b601f55565b6113366123ad565b601c55565b6113436123ad565b61134b6126c5565b565b826001600160a01b038116331461136757611367336121b4565b60008281526010602052604090205482906001600160a01b03161561139e5760405162461bcd60e51b8152600401610b0b90613d69565b611044858585612717565b6113b16123ad565b601e55565b6113be6123ad565b601a92909255601855601d55565b6113d46123ad565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6113fe6123ad565b601154600160a01b900460ff16156114585760405162461bcd60e51b815260206004820152601e60248201527f4f7065726174696f6e733a20436f6e7472616374206973206c6f636b656400006044820152606401610b0b565b60146114648282613e08565b5050565b6114706123ad565b80518251146114c15760405162461bcd60e51b815260206004820152601c60248201527f617272617973206d75737420686176652073616d65206c656e677468000000006044820152606401610b0b565b60005b8251811015610b44576012546114f58383815181106114e5576114e5613ec7565b6020026020010151610c6e610b63565b111561153f5760405162461bcd60e51b81526020600482015260196024820152781391950e88151bdd185b081cdd5c1c1b1e481c995858da1959603a1b6044820152606401610b0b565b81818151811061155157611551613ec7565b6020026020010151601c546115669190613d3d565b601c819055506115a883828151811061158157611581613ec7565b602002602001015183838151811061159b5761159b613ec7565b60200260200101516124c9565b806115b281613d50565b9150506114c4565b6115c2611833565b6001600160a01b0316336001600160a01b0316146115f357604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff161561161e57604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a81b031916600160a01b1781556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad169190a1565b600061166882612732565b5192915050565b6116776123ad565b60118054911515600160b01b0260ff60b01b19909216919091179055565b61169d6123ad565b601154600160a81b900460ff16156116f75760405162461bcd60e51b815260206004820181905260248201527f4f7065726174696f6e733a204d617820737570706c79206973206c6f636b65646044820152606401610b0b565b61170081600455565b601255565b60006001600160a01b0382166117715760405162461bcd60e51b815260206004820152602b60248201527f455243373231583a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610b0b565b506001600160a01b03166000908152600960205260409020546001600160401b031690565b61179e6123ad565b61134b60006128a0565b6117b06123ad565b61134b6128f2565b6117c06123ad565b6011546040516370a0823160e01b815230600482015261134b916001600160a01b0316906370a0823190602401602060405180830381865afa15801561180a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182e9190613d0d565b6124ee565b6000610b756001546001600160a01b031690565b61184f6123ad565b602055565b61185c6123ad565b601655565b606060078054610a1d90613caa565b6118786123ad565b601154600160a01b900460ff16156118c75760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606401610b0b565b6000601480546118d690613caa565b9050116119175760405162461bcd60e51b815260206004820152600f60248201526e10985cd9555c9a481b9bdd081cd95d608a1b6044820152606401610b0b565b6011805460ff60a01b1916600160a01b1790556040517f95a231e0e633252fd44273c53079a71e951df22e856f058d0114c54c6430e81c90600090a1565b8161195f816121b4565b610b44838361292f565b6119716123ad565b60008181526010602052604090205481906001600160a01b03166119d75760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a20546f6b656e206973206e6f74207374616b6564006044820152606401610b0b565b6000828152601060205260409081902080546001600160a01b0319169055517f27862ebdcaf1c94ba2342cdeb5d6c140b8fde6b95a3921802445834577312ef490611a259084815260200190565b60405180910390a15050565b836001600160a01b0381163314611a4b57611a4b336121b4565b60008381526010602052604090205483906001600160a01b031615611a825760405162461bcd60e51b8152600401610b0b90613d69565b611a8e868686866129f3565b505050505050565b611a9e611833565b6001600160a01b0316336001600160a01b031614611acf57604051635fc483c560e01b815260040160405180910390fd5b600054600160a01b900460ff1615611afa57604051631551a48f60e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b6060611b5b826002541190565b611b995760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b6044820152606401610b0b565b600060148054611ba890613caa565b905011611bc45760405180602001604052806000815250610a08565b6014611bcf83612a26565b604051602001611be0929190613edd565b60405160208183030381529060405292915050565b611bfd6123ad565b611c08600e82612388565b611c545760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a204e6f7420546f6b656e5374616b657200000000006044820152606401610b0b565b611c5f600e82612ab8565b506040516001600160a01b038216907f1d1e5fd08acb9bc25c0dd45c0561cfb6e086312e6960eb801333c3ae19eda07c90600090a250565b611ca2600e33612388565b611ce75760405162461bcd60e51b81526020600482015260166024820152752a37b5b2b729ba30b5b29d102737ba1039ba30b5b2b960511b6044820152606401610b0b565b60008181526010602052604090205481906001600160a01b031615611d1e5760405162461bcd60e51b8152600401610b0b90613d69565b611d29335b83612acd565b611d755760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610b0b565b60008281526010602090815260409182902080546001600160a01b0319163390811790915591518481527f1fdab8a8457aaf782e4b6217d6ffa6f5006eda7e50922dd092b2e1524275d7749101611251565b60148054611dd490613caa565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0090613caa565b8015611e4d5780601f10611e2257610100808354040283529160200191611e4d565b820191906000526020600020905b815481529060010190602001808311611e3057829003601f168201915b505050505081565b611e5d6123ad565b601755565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b611e986123ad565b60005b8181101561200a576000601081858585818110611eba57611eba613ec7565b60209081029290920135835250810191909152604001600020546001600160a01b031603611f2a5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e5374616b653a206e6f742072657374616b6561626c6500000000006044820152606401610b0b565b6001600160a01b03841615611fa757611f5b84848484818110611f4f57611f4f613ec7565b90506020020135612acd565b611fa75760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e5374616b653a205374616b6572206e6f7420617070726f766564006044820152606401610b0b565b8360106000858585818110611fbe57611fbe613ec7565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061200290613d50565b915050611e9b565b50826001600160a01b03167f43b05a7e48dc5c22c2f56fa403cb8271d8a4e97f09548d2161cdd7bb3f9c7cbc8383604051612046929190613f74565b60405180910390a2505050565b61205b6123ad565b6001600160a01b0381166120c05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b0b565b61126e816128a0565b6120d16123ad565b601855565b6120de6123ad565b601154600160a81b900460ff161561212f5760405162461bcd60e51b815260206004820152601460248201527313585e081cdd5c1c1b1e481a5cc81b1bd8dad95960621b6044820152606401610b0b565b6000601254116121765760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481b9bdd081cd95d60721b6044820152606401610b0b565b6011805460ff60a81b1916600160a81b1790556040517fcb05127102e959540e425cdbe8127c6ae5cdff90f0ba6763e98b7ddc818f7fb890600090a1565b6000546001600160a01b031680158015906121d957506000816001600160a01b03163b115b1561146457604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa15801561222a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224e9190613fad565b61146457604051633b79c77360e21b81526001600160a01b0383166004820152602401610b0b565b60006122818261165d565b9050806001600160a01b0316836001600160a01b0316036122ef5760405162461bcd60e51b815260206004820152602260248201527f455243373231583a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610b0b565b336001600160a01b038216148061230b575061230b8133611e62565b61237d5760405162461bcd60e51b815260206004820152603960248201527f455243373231583a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610b0b565b610b44838383612ba0565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b336123b6611833565b6001600160a01b03161461134b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b0b565b600d5460ff161561134b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610b0b565b60006123a68284613d3d565b6040516001600160a01b0380851660248301528316604482015260648101829052610fe29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612bfc565b611464828260405180602001604052806000815250612cd1565b610b44838383612f31565b6011546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255a9190613d0d565b81111561259c5760405162461bcd60e51b815260206004820152601060248201526f616d6f756e74203e2062616c616e636560801b6044820152606401610b0b565b600081116125db5760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b6044820152606401610b0b565b60006125f360646125ed84603261326c565b90613278565b9050600061260760646125ed85603261326c565b601154909150612641906001600160a01b03167f0000000000000000000000004da56c7c284d56094b21fcc56888beeacac5336584613284565b601154612678906001600160a01b03167f000000000000000000000000ac488462d5ed9a904842e8946290698694b2391f83613284565b6040518381527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a1505050565b60006123a6836001600160a01b0384166132b4565b6126cd613303565b600d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610b4483838360405180602001604052806000815250611a31565b6040805180820190915260008082526020820152612751826002541190565b6127b05760405162461bcd60e51b815260206004820152602a60248201527f455243373231583a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610b0b565b600060055483106127d6576005546127c89084613cfa565b6127d3906001613d3d565b90505b825b81811061283f576000818152600860209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561282c57949350505050565b508061283781613fca565b9150506127d8565b5060405162461bcd60e51b815260206004820152602f60248201527f455243373231583a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610b0b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6128fa61240c565b600d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126fa3390565b336001600160a01b038316036129875760405162461bcd60e51b815260206004820152601a60248201527f455243373231583a20617070726f766520746f2063616c6c65720000000000006044820152606401610b0b565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6129fe848484612f31565b612a0a8484848461334c565b610fe25760405162461bcd60e51b8152600401610b0b90613fe1565b60606000612a338361344d565b60010190506000816001600160401b03811115612a5257612a526138de565b6040519080825280601f01601f191660200182016040528015612a7c576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612a8657509392505050565b60006123a6836001600160a01b038416613525565b6000612ada826002541190565b612b3c5760405162461bcd60e51b815260206004820152602d60248201527f455243373231583a206f70657261746f7220717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401610b0b565b6000612b4783612732565b905080600001516001600160a01b0316846001600160a01b03161480612b865750836001600160a01b0316612b7b84610aa0565b6001600160a01b0316145b80612b9857508051612b989085611e62565b949350505050565b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000612c51826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661361f9092919063ffffffff16565b9050805160001480612c72575080806020019051810190612c729190613fad565b610b445760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b0b565b6002546001600160a01b038416612d345760405162461bcd60e51b815260206004820152602160248201527f455243373231583a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b0b565b612d3f816002541190565b15612d8c5760405162461bcd60e51b815260206004820152601d60248201527f455243373231583a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610b0b565b600554831115612df95760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207175616e7469747920746f206d696e74206f766572207460448201527168616e206d61782062617463682073697a6560701b6064820152608401610b0b565b6001600160a01b0380851660008181526009602090815260408083208054680100000000000000006001600160401b038083168c01811667ffffffffffffffff198416811783900482168d0182169092026fffffffffffffffffffffffffffffffff1990931690911791909117909155815180830183529485524281168584019081528785526008909352908320935184549251909116600160a01b026001600160e01b031990921694169390931792909217905581905b84811015612f265760405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612efe600087848761334c565b612f1a5760405162461bcd60e51b8152600401610b0b90613fe1565b60019182019101612eb1565b506002819055611044565b6000612f3c82612732565b9050612f4733611d23565b612fae5760405162461bcd60e51b815260206004820152603260248201527f455243373231583a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610b0b565b836001600160a01b031681600001516001600160a01b0316146130225760405162461bcd60e51b815260206004820152602660248201527f455243373231583a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610b0b565b6001600160a01b0383166130865760405162461bcd60e51b815260206004820152602560248201527f455243373231583a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b0b565b6130966000838360000151612ba0565b6001600160a01b03841660009081526009602052604081208054600192906130c89084906001600160401b0316614034565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b0385166000908152600960205260408120805460019450909261311491859116614054565b82546101009290920a6001600160401b038181021990931691831602179091556040805180820182526001600160a01b03878116825242841660208084019182526000898152600890915293842092518354915192166001600160e01b031990911617600160a01b9190941602929092179091559050613195836001613d3d565b6000818152600860205260409020549091506001600160a01b0316613226576131bf816002541190565b156132265760408051808201825283516001600160a01b0390811682526020808601516001600160401b039081168285019081526000878152600890935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611044565b60006123a68284613d26565b60006123a68284613da0565b6040516001600160a01b038316602482015260448101829052610b4490849063a9059cbb60e01b90606401612492565b60008181526001830160205260408120546132fb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a08565b506000610a08565b600d5460ff1661134b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610b0b565b60006001600160a01b0384163b1561344257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613390903390899088908890600401614074565b6020604051808303816000875af19250505080156133cb575060408051601f3d908101601f191682019092526133c8918101906140b1565b60015b613428573d8080156133f9576040519150601f19603f3d011682016040523d82523d6000602084013e6133fe565b606091505b5080516000036134205760405162461bcd60e51b8152600401610b0b90613fe1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b98565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061348c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106134b8576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106134d657662386f26fc10000830492506010015b6305f5e10083106134ee576305f5e100830492506008015b612710831061350257612710830492506004015b60648310613514576064830492506002015b600a8310610a085760010192915050565b6000818152600183016020526040812054801561360e576000613549600183613cfa565b855490915060009061355d90600190613cfa565b90508181146135c257600086600001828154811061357d5761357d613ec7565b90600052602060002001549050808760000184815481106135a0576135a0613ec7565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135d3576135d36140ce565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a08565b6000915050610a08565b5092915050565b6060612b98848460008585600080866001600160a01b0316858760405161364691906140e4565b60006040518083038185875af1925050503d8060008114613683576040519150601f19603f3d011682016040523d82523d6000602084013e613688565b606091505b5091509150613699878383876136a4565b979650505050505050565b6060831561371357825160000361370c576001600160a01b0385163b61370c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b0b565b5081612b98565b612b9883838151156137285781518083602001fd5b8060405162461bcd60e51b8152600401610b0b91906137c5565b6001600160e01b03198116811461126e57600080fd5b60006020828403121561376a57600080fd5b81356123a681613742565b60005b83811015613790578181015183820152602001613778565b50506000910152565b600081518084526137b1816020860160208601613775565b601f01601f19169290920160200192915050565b6020815260006123a66020830184613799565b6000602082840312156137ea57600080fd5b5035919050565b6001600160a01b038116811461126e57600080fd5b6000806040838503121561381957600080fd5b8235613824816137f1565b946020939093013593505050565b60006020828403121561384457600080fd5b81356123a6816137f1565b6000806040838503121561386257600080fd5b50508035926020909101359150565b60008060006060848603121561388657600080fd5b8335613891816137f1565b925060208401356138a1816137f1565b929592945050506040919091013590565b6000806000606084860312156138c757600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561391c5761391c6138de565b604052919050565b60006001600160401b0383111561393d5761393d6138de565b613950601f8401601f19166020016138f4565b905082815283838301111561396457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561398d57600080fd5b81356001600160401b038111156139a357600080fd5b8201601f810184136139b457600080fd5b612b9884823560208401613924565b60006001600160401b038211156139dc576139dc6138de565b5060051b60200190565b600082601f8301126139f757600080fd5b81356020613a0c613a07836139c3565b6138f4565b82815260059290921b84018101918181019086841115613a2b57600080fd5b8286015b84811015613a465780358352918301918301613a2f565b509695505050505050565b60008060408385031215613a6457600080fd5b82356001600160401b0380821115613a7b57600080fd5b818501915085601f830112613a8f57600080fd5b81356020613a9f613a07836139c3565b82815260059290921b84018101918181019089841115613abe57600080fd5b948201945b83861015613ae5578535613ad6816137f1565b82529482019490820190613ac3565b96505086013592505080821115613afb57600080fd5b50613b08858286016139e6565b9150509250929050565b801515811461126e57600080fd5b600060208284031215613b3257600080fd5b81356123a681613b12565b60008060408385031215613b5057600080fd5b8235613b5b816137f1565b91506020830135613b6b81613b12565b809150509250929050565b60008060008060808587031215613b8c57600080fd5b8435613b97816137f1565b93506020850135613ba7816137f1565b92506040850135915060608501356001600160401b03811115613bc957600080fd5b8501601f81018713613bda57600080fd5b613be987823560208401613924565b91505092959194509250565b60008060408385031215613c0857600080fd5b8235613c13816137f1565b91506020830135613b6b816137f1565b600080600060408486031215613c3857600080fd5b8335613c43816137f1565b925060208401356001600160401b0380821115613c5f57600080fd5b818601915086601f830112613c7357600080fd5b813581811115613c8257600080fd5b8760208260051b8501011115613c9757600080fd5b6020830194508093505050509250925092565b600181811c90821680613cbe57607f821691505b602082108103613cde57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610a0857610a08613ce4565b600060208284031215613d1f57600080fd5b5051919050565b8082028115828204841417610a0857610a08613ce4565b80820180821115610a0857610a08613ce4565b600060018201613d6257613d62613ce4565b5060010190565b6020808252601b908201527f546f6b656e5374616b653a20546f6b656e206973207374616b65640000000000604082015260600190565b600082613dbd57634e487b7160e01b600052601260045260246000fd5b500490565b601f821115610b4457600081815260208120601f850160051c81016020861015613de95750805b601f850160051c820191505b81811015611a8e57828155600101613df5565b81516001600160401b03811115613e2157613e216138de565b613e3581613e2f8454613caa565b84613dc2565b602080601f831160018114613e6a5760008415613e525750858301515b600019600386901b1c1916600185901b178555611a8e565b600085815260208120601f198616915b82811015613e9957888601518255948401946001909101908401613e7a565b5085821015613eb75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b6000808454613eeb81613caa565b60018281168015613f035760018114613f1857613f47565b60ff1984168752821515830287019450613f47565b8860005260208060002060005b85811015613f3e5781548a820152908401908201613f25565b50505082870194505b505050508351613f5b818360208801613775565b64173539b7b760d91b9101908152600501949350505050565b6020808252810182905260006001600160fb1b03831115613f9457600080fd5b8260051b80856040850137919091016040019392505050565b600060208284031215613fbf57600080fd5b81516123a681613b12565b600081613fd957613fd9613ce4565b506000190190565b60208082526033908201527f455243373231583a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b6001600160401b0382811682821603908082111561361857613618613ce4565b6001600160401b0381811683821601908082111561361857613618613ce4565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140a790830184613799565b9695505050505050565b6000602082840312156140c357600080fd5b81516123a681613742565b634e487b7160e01b600052603160045260246000fd5b600082516140f6818460208701613775565b919091019291505056fea2646970667358221220a07d5608b5d4cb801465e6eb374efaf0ff21e298863c94d22096dd87ada7082464736f6c63430008120033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

ANARKEY is an innovative Genesis collection of 1,111 Hybrid NFTs that grant holders access to the TradeAI SaaS Platform, unleashing a wide range of utilities and benefits.

Validator Index Block Amount
View All Withdrawals

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

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