ETH Price: $3,414.60 (+1.70%)

Token

KRILLER (CASSETTE)
 

Overview

Max Total Supply

3,272 CASSETTE

Holders

777

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
wblut.eth
Balance
1 CASSETTE
0x69e2adf92dd9e69400d6a7ad6247a3d60bbec3af
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Kriller

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 24 : Kriller.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {ERC721Sequential} from "./ERC721Sequential.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {PaymentSplitter} from "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {UpdatableOperatorFilterer} from "operator-filter-registry/src/UpdatableOperatorFilterer.sol";
import {RevokableDefaultOperatorFilterer} from "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

interface IMetadata {
    function getTrait(
        uint256 traitType,
        uint256 tokenId
    ) external view returns (string memory);

    function getTraitTypeName(
        uint256 traitType
    ) external view returns (string memory);
}

/*

◜╭───────────────────────────────────╮◝
 │ ◸    █▄▀ █▀█ █ █  █  ███ █▀█    ◹ │
 │ ◺    █ █ █▀▙ █ █▄ █▄ █▄▄ █▀▙    ◿ │
 ├───┬───────────────────────────┬───┤
 │ ▧ │  ▁▂▃▅▇██▇▅▃▂▁▂▃▅▇██▇▅▃▂▁  │ ▨ │
 │╾─╼│  ╾─────────────────────╼  │╾─╼│
 │ ◰ │  ▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄  │ ◳ │
 │╾─╼│  ╾─────────────────────╼  │╾─╼│
 │ ♯ │  ♩ ♯ ♫ ♬ ♪ ♭ ♭ ♪ ♬ ♫ ♯ ♩  │ ♯ │
 │╾─╼│  ╾─────────────────────╼  │╾─╼│
 │ ▢ │  █▓▓▓▒▓▒▒░▒░░░▒░▒▒▓▒▓▓▓█  │ ▢ │
 ├───┼───────────────────────────┼───┤
 │ $ │  KRILLER.COM @KRILLERXYZ  │ $ │
◟╰───┴───────────────────────────┴───╯◞

*/
/// @title KRILLER NFT
/// @author Jacob DeHart <[email protected]>
/// @notice An ambient audio-visual art project by James, Stephen, Greg, and Jacob
contract Kriller is
    ERC721Sequential,
    ERC2981,
    ReentrancyGuard,
    PaymentSplitter,
    RevokableDefaultOperatorFilterer,
    Ownable
{
    using ECDSA for bytes32;
    using Strings for uint256;

    /*//////////////////////////////////////////////////////////////
                                ERRORS
    //////////////////////////////////////////////////////////////*/

    error ExceedsAllotment();
    error SaleNotStarted();
    error MintingTooMany();
    error SoldOut();
    error InsufficientPayment();
    error InvalidPresalePass();
    error InvalidPresaleBalance();
    error BaseURIIsFrozen();
    error NoTokensOwned();

    /*//////////////////////////////////////////////////////////////
                                EVENTS
    //////////////////////////////////////////////////////////////*/

    /// @dev This event emits when the metadata of a range of tokens is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFTs.
    /// https://eips.ethereum.org/EIPS/eip-4906
    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);

    /*//////////////////////////////////////////////////////////////
                           SUPPLY CONSTANTS
    //////////////////////////////////////////////////////////////*/

    /// @notice Maximum number of cassettes mintable
    uint256 public immutable MAX_SUPPLY;

    /// @notice Price per cassette
    uint256 public immutable MINT_PRICE;

    /// @notice Maximum number of cassettes purchasable per transaction
    uint256 public constant MAX_PURCHASE_COUNT = 63;

    /*//////////////////////////////////////////////////////////////
                              METADATA
    //////////////////////////////////////////////////////////////*/

    /// @notice Base Token URI for each NFT
    string public baseTokenURI;

    /// @notice Whether the Base Token URI has been frozen
    bool public baseTokenURIFrozen;

    /// @notice Future on-chain metadata address
    address public metadataAddress;

    /// @notice Extra token data to store
    mapping(uint256 => uint256) private extraTokenData;

    /// @notice bitmask for the 160 bit minter address
    uint256 private constant BITMASK_MINTER = (1 << 160) - 1;
    /// @notice offset, 0, for the 160 bit minter address
    uint256 private constant BITMASK_MINTER_OFFSET = 0;
    /// @notice bitmask for the 31 bit mint date
    uint256 private constant BITMASK_MINT_DATE = (1 << 31) - 1;
    /// @notice offset, 160,  for the 31 bit mint date
    uint256 private constant BITMASK_MINT_DATE_OFFSET = 160;
    /// @notice bitmask for the 32 bit transfer date
    uint256 private constant BITMASK_TRANSFER_DATE = (1 << 32) - 1;
    /// @notice offset, 191,  for the 32 bit transfer date
    uint256 private constant BITMASK_TRANSFER_DATE_OFFSET = 191;
    /// @notice bitmask for the 33 bit remainder data
    uint256 private constant BITMASK_EXTRA = (1 << 33) - 1;
    /// @notice offset, 223,  for the 33 bit remainder data
    uint256 private constant BITMASK_EXTRA_OFFSET = 223;

    /*//////////////////////////////////////////////////////////////
                           SALE & PRESALE
    //////////////////////////////////////////////////////////////*/

    /// @notice The start of the presale
    uint256 public startPresaleDate = 1685824200;

    /// @notice The start of the public sale
    uint256 public startMintDate = 1685831400;

    /// @notice Mapping to track used presale tickets
    mapping(bytes => uint256) private usedTickets;

    /// @notice Message prefix used before hashing to verify presale tickets
    string public constant HASH_PREFIX = "KRILLER";

    /// @notice Authoritative wallet used for creating presale tickets
    address private presaleSigner;

    /// @notice Free tokens available for the team
    uint256 public availableTokensForTeam = 63;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    /// @notice Sets
    /// @param _name Token Name
    /// @param _symbol Token symbol
    /// @param _baseTokenURI Base Token URI for each NFT
    /// @param _maxSupply Collection size
    /// @param _mintPrice Price per token
    /// @param _presaleSigner Authoritative wallet used for creating presale tickets
    /// @param _payees List of creator wallets for payment splitting
    /// @param _shares Shares for creator wallets for payment splitting
    constructor(
        string memory _name,
        string memory _symbol,
        string memory _baseTokenURI,
        uint256 _maxSupply,
        uint256 _mintPrice,
        address _presaleSigner,
        address[] memory _payees,
        uint256[] memory _shares
    ) ERC721Sequential(_name, _symbol) PaymentSplitter(_payees, _shares) {
        baseTokenURI = _baseTokenURI;
        MAX_SUPPLY = _maxSupply;
        MINT_PRICE = _mintPrice;
        presaleSigner = _presaleSigner;
        _setDefaultRoyalty(address(this), 630);
    }

    /*//////////////////////////////////////////////////////////////
                          EXTRA PACKED DATA
    //////////////////////////////////////////////////////////////*/

    struct TokenDetail {
        address minter;
        uint256 mintDate;
        address owner;
        uint256 transferDate;
        uint256 transferCount;
    }

    function setMinter(uint256 tokenId, address value) internal {
        uint resetMask = BITMASK_MINTER << BITMASK_MINTER_OFFSET;
        extraTokenData[tokenId] &= ~resetMask;
        extraTokenData[tokenId] |=
            uint256(uint160(value)) <<
            BITMASK_MINTER_OFFSET;
    }

    function setMintDate(uint256 tokenId, uint256 value) internal {
        uint resetMask = BITMASK_MINT_DATE << BITMASK_MINT_DATE_OFFSET;
        extraTokenData[tokenId] &= ~resetMask;
        extraTokenData[tokenId] |=
            (value & BITMASK_MINT_DATE) <<
            BITMASK_MINT_DATE_OFFSET;
    }

    function setTransferDate(uint256 tokenId, uint256 value) internal {
        uint resetMask = BITMASK_TRANSFER_DATE << BITMASK_TRANSFER_DATE_OFFSET;
        extraTokenData[tokenId] &= ~resetMask;
        extraTokenData[tokenId] |=
            (value & BITMASK_TRANSFER_DATE) <<
            BITMASK_TRANSFER_DATE_OFFSET;
    }

    function setTransferCount(uint256 tokenId, uint256 value) internal {
        uint resetMask = BITMASK_EXTRA << BITMASK_EXTRA_OFFSET;
        extraTokenData[tokenId] &= ~resetMask;
        extraTokenData[tokenId] |=
            (value & BITMASK_EXTRA) <<
            BITMASK_EXTRA_OFFSET;
    }

    function minterOf(uint256 tokenId) public view returns (address) {
        return address(uint160(extraTokenData[tokenId] & BITMASK_MINTER));
    }

    function mintDateOf(uint256 tokenId) public view returns (uint256) {
        return
            (extraTokenData[tokenId] >> BITMASK_MINT_DATE_OFFSET) &
            BITMASK_MINT_DATE;
    }

    function transferDateOf(uint256 tokenId) public view returns (uint256) {
        return
            (extraTokenData[tokenId] >> BITMASK_TRANSFER_DATE_OFFSET) &
            BITMASK_TRANSFER_DATE;
    }

    function transferCountOf(uint256 tokenId) public view returns (uint256) {
        return
            (extraTokenData[tokenId] >> BITMASK_EXTRA_OFFSET) & BITMASK_EXTRA;
    }

    function extraDataOf(
        uint256 tokenId
    ) public view returns (TokenDetail memory) {
        return
            TokenDetail(
                minterOf(tokenId),
                mintDateOf(tokenId),
                ownerOf(tokenId),
                transferDateOf(tokenId),
                transferCountOf(tokenId)
            );
    }

    /*//////////////////////////////////////////////////////////////
                                MINTING
    //////////////////////////////////////////////////////////////*/

    /// @notice This function will purchase `numberOfTokens` NFT's once the presale has started
    /// @param numberOfTokens The number of tokens to purchase in this transaction
    /// @param pass The authorative signature for this user's presale purchases
    /// @param allotment The total number of presale purchases this user is assigned
    function presaleMint(
        uint256 numberOfTokens,
        bytes memory pass,
        uint256 allotment
    ) external payable nonReentrant {
        if (!presaleActive()) revert SaleNotStarted();
        uint256 mintablePresale = validateTicket(pass, allotment, msg.sender);
        if (numberOfTokens > mintablePresale) revert ExceedsAllotment();
        if (msg.value < numberOfTokens * MINT_PRICE)
            revert InsufficientPayment();
        useTicket(pass, numberOfTokens);
        _mintNFT(numberOfTokens, msg.sender);
    }

    /// @notice This function will purchase `numberOfTokens` NFT's once the presale has started
    /// @param numberOfTokens The number of tokens to purchase in this transaction
    /// @param allotment The total number of presale purchases this user is assigned
    /// @param collection The NFT collection they must hold
    function presaleMintCollection(
        uint256 numberOfTokens,
        bytes memory pass,
        uint256 allotment,
        address collection
    ) external payable nonReentrant {
        if (!presaleActive()) revert SaleNotStarted();
        uint256 mintablePresale = validateTicket(pass, allotment, collection);
        if (numberOfTokens > mintablePresale) revert ExceedsAllotment();
        if (ERC721Sequential(collection).balanceOf(msg.sender) == 0)
            revert InvalidPresaleBalance();
        if (msg.value < numberOfTokens * MINT_PRICE)
            revert InsufficientPayment();
        useTicket(pass, numberOfTokens);
        _mintNFT(numberOfTokens, msg.sender);
    }

    /// @notice This function will purchase `numberOfTokens` NFT's
    /// @param numberOfTokens The number of tokens to purchase in this transaction
    function mint(uint256 numberOfTokens) external payable nonReentrant {
        if (!saleActive()) revert SaleNotStarted();
        if (msg.value < numberOfTokens * MINT_PRICE)
            revert InsufficientPayment();
        _mintNFT(numberOfTokens, msg.sender);
    }

    /// @notice This function will mint `numberOfTokens` to the specified address for free
    /// @param to The receiver of the tokens
    function ownerMint(uint256 numberOfTokens, address to) external onlyOwner {
        if (numberOfTokens > availableTokensForTeam) revert MintingTooMany();
        availableTokensForTeam -= availableTokensForTeam;
        _mintNFT(numberOfTokens, to);
    }

    /// @notice Helper for minting NFT's used by presaleMint and mint
    function _mintNFT(uint256 numberOfTokens, address to) internal {
        if (numberOfTokens > MAX_PURCHASE_COUNT) revert MintingTooMany();
        if (totalMinted() + numberOfTokens > MAX_SUPPLY) revert SoldOut();
        uint256 time = block.timestamp;
        for (uint256 i = 0; i < numberOfTokens; i++) {
            _safeMint(to);
            uint256 tokenId = totalSupply();
            setMinter(tokenId, to);
            setMintDate(tokenId, time);
        }
    }

    /// @notice Helper to determine if the presale is active
    /// @return presaleActive true if active
    function presaleActive() public view returns (bool) {
        return
            startPresaleDate > 0 &&
            startPresaleDate <= block.timestamp &&
            startMintDate > block.timestamp;
    }

    /// @notice Helper to determine if the sale is active
    /// @return saleActive true if active
    function saleActive() public view returns (bool) {
        return startMintDate > 0 && startMintDate <= block.timestamp;
    }

    /// @notice Hashes the custom prefix, sender address, and allotment for presale pass verification
    /// @return hash the 256 bit keccak hash
    function getHash(
        uint256 allotment,
        address addr
    ) internal view returns (bytes32) {
        return
            keccak256(
                abi.encodePacked(HASH_PREFIX, msg.sender, allotment, addr)
            );
    }

    /// @notice Recovers the signer of the presale pass signature for presale authorization
    /// @return address the signer address
    function recover(
        bytes32 hash,
        bytes memory signature
    ) internal pure returns (address) {
        return hash.toEthSignedMessageHash().recover(signature);
    }

    /// @notice Determines if a supplied pass signature and allotment was signed by the correct address
    /// @return remainingAllotment the number of mints still available for this pass
    function validateTicket(
        bytes memory pass,
        uint256 allotment,
        address collection
    ) internal view returns (uint256) {
        bytes32 hash = getHash(allotment, collection);
        address signer = recover(hash, pass);
        if (signer != presaleSigner) revert InvalidPresalePass();
        return allotment - usedTickets[pass];
    }

    /// @notice Updates our record of how many tokens were minted with each pass
    function useTicket(bytes memory pass, uint256 quantity) internal {
        usedTickets[pass] += quantity;
    }

    /// @notice Return the number of NFT's minted with a particular pass
    /// @param pass The claim pass used
    /// @return nftCount The number of NFT's already minted
    function usedTicketCount(
        bytes memory pass
    ) external view returns (uint256) {
        return usedTickets[pass];
    }

    /*//////////////////////////////////////////////////////////////
                          TOKEN METADATA
    //////////////////////////////////////////////////////////////*/

    /// @notice Overrides ERC721S to return our custom baseTokenURI
    /// @return baseTokenURI the current URI
    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    /// @notice Update the base URI to reveal the NFTs
    /// @param _baseTokenURI The new baseTokenURI
    function setBaseURI(string memory _baseTokenURI) external onlyOwner {
        if (baseTokenURIFrozen) revert BaseURIIsFrozen();
        baseTokenURI = _baseTokenURI;
        emit BatchMetadataUpdate(1, totalSupply());
    }

    /// @notice Owner can freeze the base token uri, if not already frozen
    function freezeBaseTokenURI() external onlyOwner {
        baseTokenURIFrozen = true;
    }

    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"))
                : "";
    }

    /// @notice Owner can set the metadata address if the address has not been frozen
    /// @param _metadataAddress The new metadata address
    function setMetadataAddress(address _metadataAddress) external onlyOwner {
        metadataAddress = _metadataAddress;
    }

    /// @notice Get the trait `traitType` value for `tokenId`
    /// @param traitType The trait type
    /// @param tokenId The token to look up
    /// @return trait the trait value of the specified type
    function getTrait(
        uint256 traitType,
        uint256 tokenId
    ) external view returns (string memory) {
        if (metadataAddress == address(0)) {
            return "";
        }
        return IMetadata(metadataAddress).getTrait(traitType, tokenId);
    }

    /// @notice Get the name for trait `traitType`
    /// @param traitType The trait type
    /// @return trait the trait type name of the specified type
    function getTraitTypeName(
        uint256 traitType
    ) external view returns (string memory) {
        if (metadataAddress == address(0)) {
            return "";
        }
        return IMetadata(metadataAddress).getTraitTypeName(traitType);
    }

    /// @notice Owner can update the presale date
    /// @param _startPresaleDate The new presale Start Date
    function setStartPresaleDate(uint256 _startPresaleDate) external onlyOwner {
        startPresaleDate = _startPresaleDate;
    }

    /// @notice Owner can update the public sale date
    /// @param _startMintDate The new public Start Date
    function setStartMintDate(uint256 _startMintDate) external onlyOwner {
        startMintDate = _startMintDate;
    }

    /*//////////////////////////////////////////////////////////////
                              ROYALTIES
    //////////////////////////////////////////////////////////////*/

    // EIP2981 Override
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC721Sequential, ERC2981) returns (bool) {
        // Support EIP-4906
        if (interfaceId == bytes4(0x49064906)) return true;
        return super.supportsInterface(interfaceId);
    }

    /// @notice Set the default royalty values for the collection
    /// @param receiver The receiver of the royalties
    /// @param feeNumerator The royalty amount
    function setDefaultRoyalty(
        address receiver,
        uint96 feeNumerator
    ) external onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    /// @notice Removes default royalty information.
    function deleteDefaultRoyalty() external onlyOwner {
        _deleteDefaultRoyalty();
    }

    /// @notice Sets the royalty information for a specific token id, overriding the global default.
    /// @param tokenId The specific token id
    /// @param receiver The receiver of the royalties
    /// @param feeNumerator The royalty amount
    function setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) external onlyOwner {
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    /// @notice Resets royalty information for the token id back to the global default.
    function resetTokenRoyalty(uint256 tokenId) external onlyOwner {
        _resetTokenRoyalty(tokenId);
    }

    // Operator Filter Overrides

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

    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) {
        setTransferCount(tokenId, transferCountOf(tokenId) + 1);
        setTransferDate(tokenId, block.timestamp);
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public override onlyAllowedOperator(from) {
        setTransferCount(tokenId, transferCountOf(tokenId) + 1);
        setTransferDate(tokenId, block.timestamp);
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public override onlyAllowedOperator(from) {
        setTransferCount(tokenId, transferCountOf(tokenId) + 1);
        setTransferDate(tokenId, block.timestamp);
        super.safeTransferFrom(from, to, tokenId, data);
    }
}

File 2 of 24 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

File 3 of 24 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _totalReleased is the sum of all values in _released.
        // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow.
        _totalReleased += payment;
        unchecked {
            _released[account] += payment;
        }

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(token, account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token].
        // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment"
        // cannot overflow.
        _erc20TotalReleased[token] += payment;
        unchecked {
            _erc20Released[token][account] += payment;
        }

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 4 of 24 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

File 6 of 24 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

File 7 of 24 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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 8 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 9 of 24 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-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;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

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

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    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");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    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");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 11 of 24 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 13 of 24 : 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 14 of 24 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 16 of 24 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 20 of 24 : ERC721Sequential.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.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 extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721Sequential is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Total number of tokens burned
    uint256 internal _burnCount;

    // Array of all tokens storing the owner's address
    address[] internal _tokens = [address(0x0)];

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

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

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

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

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

    function totalMinted() public view returns (uint256) {
        return _tokens.length - 1;
    }

    function totalSupply() public view returns (uint256) {
        return totalMinted() - _burnCount;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This is implementation is O(n) and should not be
     * called by other contracts.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index)
        public
        view
        returns (uint256)
    {
        uint256 currentIndex = 0;
        for (uint256 i = 0; i < _tokens.length; i++) {
            if (_tokens[i] == owner) {
                if (currentIndex == index) {
                    return i;
                }
                currentIndex += 1;
            }
        }
        revert("ERC721Enumerable: owner index out of bounds");
    }

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(operator != _msgSender(), "ERC721: 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 {
        //solhint-disable-next-line max-line-length
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: transfer caller is not owner nor approved"
        );

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

        uint256 tokenId = _tokens.length;
        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _tokens.push(to);

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

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

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

        // Clear approvals
        _approve(address(0), tokenId);
        _burnCount++;
        _balances[owner] -= 1;
        _tokens[tokenId] = address(0);

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

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

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);
        _balances[from] -= 1;
        _balances[to] += 1;
        _tokens[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

/**
 * @title  RevokableDefaultOperatorFilterer
 * @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription.
 *         Note that OpenSea will disable creator fee enforcement if filtered operators begin fulfilling orders
 *         on-chain, eg, if the registry is revoked or bypassed.
 */
abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() RevokableOperatorFilterer(0x000000000000AAeB6D7670E522A718067333cd4E, DEFAULT_SUBSCRIPTION, true) {}
}

File 23 of 24 : 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 fee enforcement if filtered operators begin fulfilling orders
 *         on-chain, eg, if the registry is revoked or bypassed.
 */
abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer {
    error RegistryHasBeenRevoked();
    error InitialRegistryAddressCannotBeZeroAddress();

    bool public isOperatorFilterRegistryRevoked;

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

    function _checkFilterOperator(address operator) internal view virtual override {
        if (address(operatorFilterRegistry) != address(0)) {
            super._checkFilterOperator(operator);
        }
    }

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

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

File 24 of 24 : 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 fee 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 {
    error OperatorNotAllowed(address operator);
    error OnlyOwner();

    IOperatorFilterRegistry public operatorFilterRegistry;

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

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

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

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

    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) {
            if (!registry.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"address","name":"_presaleSigner","type":"address"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BaseURIIsFrozen","type":"error"},{"inputs":[],"name":"ExceedsAllotment","type":"error"},{"inputs":[],"name":"InitialRegistryAddressCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"InsufficientPayment","type":"error"},{"inputs":[],"name":"InvalidPresaleBalance","type":"error"},{"inputs":[],"name":"InvalidPresalePass","type":"error"},{"inputs":[],"name":"MintingTooMany","type":"error"},{"inputs":[],"name":"NoTokensOwned","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"RegistryHasBeenRevoked","type":"error"},{"inputs":[],"name":"SaleNotStarted","type":"error"},{"inputs":[],"name":"SoldOut","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":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","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"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"HASH_PREFIX","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PURCHASE_COUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableTokensForTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURIFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"extraDataOf","outputs":[{"components":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"mintDate","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"transferDate","type":"uint256"},{"internalType":"uint256","name":"transferCount","type":"uint256"}],"internalType":"struct Kriller.TokenDetail","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeBaseTokenURI","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":"uint256","name":"traitType","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTrait","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"traitType","type":"uint256"}],"name":"getTraitTypeName","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"isOperatorFilterRegistryRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintDateOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"minterOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"ownerMint","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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes","name":"pass","type":"bytes"},{"internalType":"uint256","name":"allotment","type":"uint256"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes","name":"pass","type":"bytes"},{"internalType":"uint256","name":"allotment","type":"uint256"},{"internalType":"address","name":"collection","type":"address"}],"name":"presaleMintCollection","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeOperatorFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_metadataAddress","type":"address"}],"name":"setMetadataAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startMintDate","type":"uint256"}],"name":"setStartMintDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startPresaleDate","type":"uint256"}],"name":"setStartPresaleDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startMintDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startPresaleDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferCountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferDateOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistry","type":"address"}],"name":"updateOperatorFilterRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"pass","type":"bytes"}],"name":"usedTicketCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e0604052600060c09081526200001b906003906001620006ff565b5063647ba2c860165563647bbee8601755603f601a553480156200003e57600080fd5b50604051620052c3380380620052c3833981016040819052620000619162000977565b6daaeb6d7670e522a718067333cd4e733cc6cdda760b79bafa08df41ecfa224f810dceb6600182828287878f8f60006200009c838262000b0d565b506001620000ab828262000b0d565b50506001600955508051825114620001255760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001785760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200011c565b60005b8251811015620001e457620001cf8382815181106200019e576200019e62000bd9565b6020026020010151838381518110620001bb57620001bb62000bd9565b6020026020010151620003ba60201b60201c565b80620001db8162000c05565b9150506200017b565b5050601180546001600160a01b0319166001600160a01b0386169081179091558491503b15620003205781156200027f57604051633e9f1edf60e11b81523060048201526001600160a01b038481166024830152821690637d3e3dbe906044015b600060405180830381600087803b1580156200026057600080fd5b505af115801562000275573d6000803e3d6000fd5b5050505062000320565b6001600160a01b03831615620002c45760405163a0af290360e01b81523060048201526001600160a01b03848116602483015282169063a0af29039060440162000245565b604051632210724360e11b81523060048201526001600160a01b03821690634420e48690602401600060405180830381600087803b1580156200030657600080fd5b505af11580156200031b573d6000803e3d6000fd5b505050505b5050506001600160a01b03841690506200034d5760405163c49d17ad60e01b815260040160405180910390fd5b5050506200036a62000364620005a860201b60201c565b620005ac565b601362000378878262000b0d565b50608085905260a0849052601980546001600160a01b0319166001600160a01b038516179055620003ac30610276620005fe565b505050505050505062000c3d565b6001600160a01b038216620004275760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200011c565b60008111620004795760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200011c565b6001600160a01b0382166000908152600c602052604090205415620004f55760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200011c565b600e8054600181019091557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0384169081179091556000908152600c60205260409020819055600a546200055f90829062000c21565b600a55604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b3390565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b03821611156200066e5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016200011c565b6001600160a01b038216620006c65760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200011c565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600755565b82805482825590600052602060002090810192821562000757579160200282015b828111156200075757825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000720565b506200076592915062000769565b5090565b5b808211156200076557600081556001016200076a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620007c157620007c162000780565b604052919050565b600082601f830112620007db57600080fd5b81516001600160401b03811115620007f757620007f762000780565b60206200080d601f8301601f1916820162000796565b82815285828487010111156200082257600080fd5b60005b838110156200084257858101830151828201840152820162000825565b506000928101909101919091529392505050565b80516001600160a01b03811681146200086e57600080fd5b919050565b60006001600160401b038211156200088f576200088f62000780565b5060051b60200190565b600082601f830112620008ab57600080fd5b81516020620008c4620008be8362000873565b62000796565b82815260059290921b84018101918181019086841115620008e457600080fd5b8286015b848110156200090a57620008fc8162000856565b8352918301918301620008e8565b509695505050505050565b600082601f8301126200092757600080fd5b815160206200093a620008be8362000873565b82815260059290921b840181019181810190868411156200095a57600080fd5b8286015b848110156200090a57805183529183019183016200095e565b600080600080600080600080610100898b0312156200099557600080fd5b88516001600160401b0380821115620009ad57600080fd5b620009bb8c838d01620007c9565b995060208b0151915080821115620009d257600080fd5b620009e08c838d01620007c9565b985060408b0151915080821115620009f757600080fd5b62000a058c838d01620007c9565b975060608b0151965060808b0151955062000a2360a08c0162000856565b945060c08b015191508082111562000a3a57600080fd5b62000a488c838d0162000899565b935060e08b015191508082111562000a5f57600080fd5b5062000a6e8b828c0162000915565b9150509295985092959890939650565b600181811c9082168062000a9357607f821691505b60208210810362000ab457634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000b0857600081815260208120601f850160051c8101602086101562000ae35750805b601f850160051c820191505b8181101562000b045782815560010162000aef565b5050505b505050565b81516001600160401b0381111562000b295762000b2962000780565b62000b418162000b3a845462000a7e565b8462000aba565b602080601f83116001811462000b79576000841562000b605750858301515b600019600386901b1c1916600185901b17855562000b04565b600085815260208120601f198616915b8281101562000baa5788860151825594840194600190910190840162000b89565b508582101562000bc95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000c1a5762000c1a62000bef565b5060010190565b8082018082111562000c375762000c3762000bef565b92915050565b60805160a05161464462000c7f60003960008181610b7501528181611a4001528181611ae5015261204801526000818161066b0152612b2c01526146446000f3fe6080604052600436106104335760003560e01c80638b83209b11610228578063c45ac05011610128578063d547cfb7116100bb578063e17b25af1161008a578063e985e9c51161006f578063e985e9c514610d5c578063ecba222a14610da5578063f2fde38b14610dc657600080fd5b8063e17b25af14610d27578063e33b7de314610d4757600080fd5b8063d547cfb714610cb0578063d79779b214610cc5578063da67e22a14610cfb578063e08a5f9e14610d1157600080fd5b8063ce9c6053116100f7578063ce9c605314610c20578063d10f99cb14610c3a578063d51be0df14610c5a578063d52c57e014610c9057600080fd5b8063c45ac05014610b97578063c87b56dd14610bb7578063caa875bb14610bd7578063ce7c2ac214610bea57600080fd5b8063a2309ff8116101bb578063b88d4fde1161018a578063bad656241161016f578063bad6562414610b23578063bb08d1cd14610b43578063c002d23d14610b6357600080fd5b8063b88d4fde14610ae3578063b8d1e53214610b0357600080fd5b8063a2309ff814610a79578063a3f8eace14610a8e578063aa1b103f14610aae578063b0ccc31e14610ac357600080fd5b80639852595c116101f75780639852595c146109da5780639e942ace14610a10578063a0712d6814610a46578063a22cb46514610a5957600080fd5b80638b83209b1461097d5780638da5cb5b1461099d5780639593b23b146109b257806395d89b41146109c557600080fd5b806348b75044116103335780636352211e116102c65780636eb3500d11610295578063715018a61161027a578063715018a614610933578063752c0ace146109485780638a616bc01461095d57600080fd5b80636eb3500d146108ee57806370a082311461091357600080fd5b80636352211e1461086357806365a4234c1461088357806368428a1b146108b95780636d44aef5146108ce57600080fd5b80635944c753116103025780635944c753146107935780635a53cc3d146107b35780635ef9432a1461081b5780636272c8d51461083057600080fd5b806348b750441461071e578063493143e41461073e57806353135ca01461075e57806355f804b31461077357600080fd5b806323b872dd116103c657806332cb6b0c11610395578063406072a91161037a578063406072a9146106a257806342842e0e146106e8578063470038191461070857600080fd5b806332cb6b0c146106595780633a98ef391461068d57600080fd5b806323b872dd146105aa5780632a55205a146105ca5780632db4d811146106095780632f745c591461063957600080fd5b8063095ea7b311610402578063095ea7b31461053257806318160ddd146105525780631916558714610575578063197b83141461059557600080fd5b806301ffc9a71461048157806304634d8d146104b657806306fdde03146104d8578063081812fc146104fa57600080fd5b3661047c577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561048d57600080fd5b506104a161049c366004613d63565b610de6565b60405190151581526020015b60405180910390f35b3480156104c257600080fd5b506104d66104d1366004613db6565b610e30565b005b3480156104e457600080fd5b506104ed610e46565b6040516104ad9190613e3b565b34801561050657600080fd5b5061051a610515366004613e4e565b610ed8565b6040516001600160a01b0390911681526020016104ad565b34801561053e57600080fd5b506104d661054d366004613e67565b610f65565b34801561055e57600080fd5b50610567610f7e565b6040519081526020016104ad565b34801561058157600080fd5b506104d6610590366004613e93565b610f9a565b3480156105a157600080fd5b506104d6611104565b3480156105b657600080fd5b506104d66105c5366004613eb0565b61111b565b3480156105d657600080fd5b506105ea6105e5366004613ef1565b6111fa565b604080516001600160a01b0390931683526020830191909152016104ad565b34801561061557600080fd5b50610567610624366004613e4e565b60009081526015602052604090205460df1c90565b34801561064557600080fd5b50610567610654366004613e67565b6112b7565b34801561066557600080fd5b506105677f000000000000000000000000000000000000000000000000000000000000000081565b34801561069957600080fd5b50600a54610567565b3480156106ae57600080fd5b506105676106bd366004613f13565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205490565b3480156106f457600080fd5b506104d6610703366004613eb0565b61139c565b34801561071457600080fd5b50610567601a5481565b34801561072a57600080fd5b506104d6610739366004613f13565b611408565b34801561074a57600080fd5b506104d6610759366004613e4e565b61159c565b34801561076a57600080fd5b506104a16115a9565b34801561077f57600080fd5b506104d661078e366004613ff9565b6115cf565b34801561079f57600080fd5b506104d66107ae366004614042565b611667565b3480156107bf57600080fd5b506107d36107ce366004613e4e565b61167a565b6040805182516001600160a01b03908116825260208085015190830152838301511691810191909152606080830151908201526080918201519181019190915260a0016104ad565b34801561082757600080fd5b506104d6611776565b34801561083c57600080fd5b506104ed6040518060400160405280600781526020016625a924a62622a960c91b81525081565b34801561086f57600080fd5b5061051a61087e366004613e4e565b61180a565b34801561088f57600080fd5b5061056761089e366004613e4e565b60009081526015602052604090205460bf1c63ffffffff1690565b3480156108c557600080fd5b506104a16118aa565b3480156108da57600080fd5b506104d66108e9366004613e4e565b6118c3565b3480156108fa57600080fd5b5060145461051a9061010090046001600160a01b031681565b34801561091f57600080fd5b5061056761092e366004613e93565b6118d0565b34801561093f57600080fd5b506104d661196a565b34801561095457600080fd5b50610567603f81565b34801561096957600080fd5b506104d6610978366004613e4e565b61197e565b34801561098957600080fd5b5061051a610998366004613e4e565b61199a565b3480156109a957600080fd5b5061051a6119ca565b6104d66109c03660046140a0565b6119de565b3480156109d157600080fd5b506104ed611aa4565b3480156109e657600080fd5b506105676109f5366004613e93565b6001600160a01b03166000908152600d602052604090205490565b348015610a1c57600080fd5b5061051a610a2b366004613e4e565b6000908152601560205260409020546001600160a01b031690565b6104d6610a54366004613e4e565b611ab3565b348015610a6557600080fd5b506104d6610a743660046140fe565b611b3e565b348015610a8557600080fd5b50610567611b52565b348015610a9a57600080fd5b50610567610aa9366004613e93565b611b64565b348015610aba57600080fd5b506104d6611bac565b348015610acf57600080fd5b5060115461051a906001600160a01b031681565b348015610aef57600080fd5b506104d6610afe36600461412c565b611bbe565b348015610b0f57600080fd5b506104d6610b1e366004613e93565b611c32565b348015610b2f57600080fd5b50610567610b3e366004614198565b611cb8565b348015610b4f57600080fd5b506104ed610b5e366004613ef1565b611ce0565b348015610b6f57600080fd5b506105677f000000000000000000000000000000000000000000000000000000000000000081565b348015610ba357600080fd5b50610567610bb2366004613f13565b611da2565b348015610bc357600080fd5b506104ed610bd2366004613e4e565b611e6d565b6104d6610be53660046141cd565b611f45565b348015610bf657600080fd5b50610567610c05366004613e93565b6001600160a01b03166000908152600c602052604090205490565b348015610c2c57600080fd5b506014546104a19060ff1681565b348015610c4657600080fd5b506104ed610c55366004613e4e565b6120ac565b348015610c6657600080fd5b50610567610c75366004613e4e565b60009081526015602052604090205460a01c637fffffff1690565b348015610c9c57600080fd5b506104d6610cab366004614230565b612166565b348015610cbc57600080fd5b506104ed6121b2565b348015610cd157600080fd5b50610567610ce0366004613e93565b6001600160a01b03166000908152600f602052604090205490565b348015610d0757600080fd5b5061056760175481565b348015610d1d57600080fd5b5061056760165481565b348015610d3357600080fd5b506104d6610d42366004613e93565b612240565b348015610d5357600080fd5b50600b54610567565b348015610d6857600080fd5b506104a1610d77366004613f13565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610db157600080fd5b506011546104a190600160a01b900460ff1681565b348015610dd257600080fd5b506104d6610de1366004613e93565b612287565b60007fb6f9b6fa000000000000000000000000000000000000000000000000000000006001600160e01b0319831601610e2157506001919050565b610e2a82612314565b92915050565b610e38612352565b610e4282826123b1565b5050565b606060008054610e5590614255565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8190614255565b8015610ece5780601f10610ea357610100808354040283529160200191610ece565b820191906000526020600020905b815481529060010190602001808311610eb157829003601f168201915b5050505050905090565b6000610ee3826124b8565b610f495760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b81610f6f816124f4565b610f79838361250e565b505050565b6000600254610f8b611b52565b610f9591906142a5565b905090565b6001600160a01b0381166000908152600c602052604090205461100e5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610f40565b600061101982611b64565b90508060000361107f5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610f40565b80600b600082825461109191906142b8565b90915550506001600160a01b0382166000908152600d602052604090208054820190556110be828261263a565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b61110c612352565b6014805460ff19166001179055565b826001600160a01b038116331461113557611135336124f4565b6111bf826111528460009081526015602052604090205460df1c90565b61115d9060016142b8565b600091825260156020526040909120805460df9290921b7fffffffff80000000000000000000000000000000000000000000000000000000167b7fffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000828152601560205260409020805463ffffffff60bf1b191663ffffffff60bf1b4260bf1b161790556111f4848484612753565b50505050565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916112795750604080518082019091526007546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b60208101516000906127109061129d906bffffffffffffffffffffffff16876142cb565b6112a791906142e2565b91519350909150505b9250929050565b600080805b60035481101561132d57846001600160a01b0316600382815481106112e3576112e3614304565b6000918252602090912001546001600160a01b03160361131b5783820361130d579150610e2a9050565b6113186001836142b8565b91505b806113258161431a565b9150506112bc565b5060405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610f40565b826001600160a01b03811633146113b6576113b6336124f4565b6113d3826111528460009081526015602052604090205460df1c90565b6000828152601560205260409020805463ffffffff60bf1b191663ffffffff60bf1b4260bf1b161790556111f48484846127da565b6001600160a01b0381166000908152600c602052604090205461147c5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610f40565b60006114888383611da2565b9050806000036114ee5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610f40565b6001600160a01b0383166000908152600f6020526040812080548392906115169084906142b8565b90915550506001600160a01b0380841660009081526010602090815260408083209386168352929052208054820190556115518383836127f5565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6115a4612352565b601755565b6000806016541180156115be57504260165411155b8015610f9557504260175411905090565b6115d7612352565b60145460ff1615611614576040517f18c3d33800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60136116208282614381565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600161164c610f7e565b6040805192835260208301919091520160405180910390a150565b61166f612352565b610f79838383612875565b6116be6040518060a0016040528060006001600160a01b031681526020016000815260200160006001600160a01b0316815260200160008152602001600081525090565b6040518060a001604052806116e8846000908152601560205260409020546001600160a01b031690565b6001600160a01b031681526020016117158460009081526015602052604090205460a01c637fffffff1690565b81526020016117238461180a565b6001600160a01b031681526020016117508460009081526015602052604090205460bf1c63ffffffff1690565b815260200161176e8460009081526015602052604090205460df1c90565b905292915050565b61177e6119ca565b6001600160a01b0316336001600160a01b0316146117af57604051635fc483c560e01b815260040160405180910390fd5b601154600160a01b900460ff16156117da57604051631551a48f60e11b815260040160405180910390fd5b601180547fffffffffffffffffffffff00000000000000000000000000000000000000000016600160a01b179055565b6000806003838154811061182057611820614304565b6000918252602090912001546001600160a01b0316905080610e2a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610f40565b600080601754118015610f955750426017541115905090565b6118cb612352565b601655565b60006001600160a01b03821661194e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610f40565b506001600160a01b031660009081526004602052604090205490565b611972612352565b61197c600061298d565b565b611986612352565b600090815260086020526040812055565b50565b6000600e82815481106119af576119af614304565b6000918252602090912001546001600160a01b031692915050565b6000610f956012546001600160a01b031690565b6119e66129df565b6119ee6115a9565b611a0b576040516316851a3760e11b815260040160405180910390fd5b6000611a18838333612a38565b905080841115611a3b5760405163248716bf60e21b815260040160405180910390fd5b611a657f0000000000000000000000000000000000000000000000000000000000000000856142cb565b341015611a855760405163cd1c886760e01b815260040160405180910390fd5b611a8f8385612ad1565b611a998433612b08565b50610f796001600955565b606060018054610e5590614255565b611abb6129df565b611ac36118aa565b611ae0576040516316851a3760e11b815260040160405180910390fd5b611b0a7f0000000000000000000000000000000000000000000000000000000000000000826142cb565b341015611b2a5760405163cd1c886760e01b815260040160405180910390fd5b611b348133612b08565b6119976001600955565b81611b48816124f4565b610f798383612c29565b600354600090610f95906001906142a5565b600080611b70600b5490565b611b7a90476142b8565b9050611ba58382611ba0866001600160a01b03166000908152600d602052604090205490565b612ced565b9392505050565b611bb4612352565b61197c6000600755565b836001600160a01b0381163314611bd857611bd8336124f4565b611bf5836111528560009081526015602052604090205460df1c90565b6000838152601560205260409020805463ffffffff60bf1b191663ffffffff60bf1b4260bf1b16179055611c2b85858585612d2b565b5050505050565b611c3a6119ca565b6001600160a01b0316336001600160a01b031614611c6b57604051635fc483c560e01b815260040160405180910390fd5b601154600160a01b900460ff1615611c9657604051631551a48f60e11b815260040160405180910390fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000601882604051611cca9190614441565b9081526020016040518091039020549050919050565b60145460609061010090046001600160a01b0316611d0d5750604080516020810190915260008152610e2a565b6014546040517fbb08d1cd00000000000000000000000000000000000000000000000000000000815260048101859052602481018490526101009091046001600160a01b03169063bb08d1cd90604401600060405180830381865afa158015611d7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ba5919081019061445d565b6001600160a01b0382166000908152600f602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2591906144d4565b611e2f91906142b8565b6001600160a01b03808616600090815260106020908152604080832093881683529290522054909150611e659084908390612ced565b949350505050565b6060611e78826124b8565b611eea5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610f40565b6000611ef4612db3565b90506000815111611f145760405180602001604052806000815250611ba5565b80611f1e84612dc2565b604051602001611f2f9291906144ed565b6040516020818303038152906040529392505050565b611f4d6129df565b611f556115a9565b611f72576040516316851a3760e11b815260040160405180910390fd5b6000611f7f848484612a38565b905080851115611fa25760405163248716bf60e21b815260040160405180910390fd5b6040516370a0823160e01b81523360048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015611fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200a91906144d4565b600003612043576040517ff2b1343f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61206d7f0000000000000000000000000000000000000000000000000000000000000000866142cb565b34101561208d5760405163cd1c886760e01b815260040160405180910390fd5b6120978486612ad1565b6120a18533612b08565b506111f46001600955565b60145460609061010090046001600160a01b03166120d857505060408051602081019091526000815290565b6014546040517fd10f99cb000000000000000000000000000000000000000000000000000000008152600481018490526101009091046001600160a01b03169063d10f99cb90602401600060405180830381865afa15801561213e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e2a919081019061445d565b61216e612352565b601a5482111561219157604051633e29b4fb60e11b815260040160405180910390fd5b601a80549060006121a283806142a5565b90915550610e4290508282612b08565b601380546121bf90614255565b80601f01602080910402602001604051908101604052809291908181526020018280546121eb90614255565b80156122385780601f1061220d57610100808354040283529160200191612238565b820191906000526020600020905b81548152906001019060200180831161221b57829003601f168201915b505050505081565b612248612352565b601480546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b61228f612352565b6001600160a01b03811661230b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f40565b6119978161298d565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610e2a5750610e2a82612e62565b3361235b6119ca565b6001600160a01b03161461197c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f40565b6127106bffffffffffffffffffffffff821611156124245760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f40565b6001600160a01b03821661247a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f40565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600755565b6000806001600160a01b0316600383815481106124d7576124d7614304565b6000918252602090912001546001600160a01b0316141592915050565b6011546001600160a01b0316156119975761199781612efd565b60006125198261180a565b9050806001600160a01b0316836001600160a01b0316036125a25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610f40565b336001600160a01b03821614806125be57506125be8133610d77565b6126305760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610f40565b610f798383612ff1565b8047101561268a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610f40565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126d7576040519150601f19603f3d011682016040523d82523d6000602084013e6126dc565b606091505b5050905080610f795760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610f40565b61275d338261305f565b6127cf5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610f40565b610f79838383613145565b610f7983838360405180602001604052806000815250611bbe565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610f79908490613326565b6127106bffffffffffffffffffffffff821611156128e85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f40565b6001600160a01b03821661293e5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610f40565b6040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182526000968752600890529190942093519051909116600160a01b029116179055565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260095403612a315760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f40565b6002600955565b600080612a45848461340b565b90506000612a538287613461565b6019549091506001600160a01b03808316911614612a9d576040517f52fdb07200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601886604051612aad9190614441565b90815260200160405180910390205485612ac791906142a5565b9695505050505050565b80601883604051612ae29190614441565b90815260200160405180910390206000828254612aff91906142b8565b90915550505050565b603f821115612b2a57604051633e29b4fb60e11b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000082612b54611b52565b612b5e91906142b8565b1115612b96576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4260005b838110156111f457612bab836134c4565b6000612bb5610f7e565b6000908152601560205260409020805460a085901b777fffffff0000000000000000000000000000000000000000167fffffffffffffffff8000000000000000000000000000000000000000000000009091166001600160a01b038716171790555080612c218161431a565b915050612b9a565b336001600160a01b03831603612c815760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f40565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b0384166000908152600c602052604081205490918391612d1790866142cb565b612d2191906142e2565b611e6591906142a5565b612d35338361305f565b612da75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610f40565b6111f4848484846134dd565b606060138054610e5590614255565b60606000612dcf8361355b565b600101905060008167ffffffffffffffff811115612def57612def613f4c565b6040519080825280601f01601f191660200182016040528015612e19576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084612e2357509392505050565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612ec557506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610e2a57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610e2a565b6011546001600160a01b03168015801590612f2257506000816001600160a01b03163b115b15610e42576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015612f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb09190614544565b610e42576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610f40565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906130268261180a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061306a826124b8565b6130cb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610f40565b60006130d68361180a565b9050806001600160a01b0316846001600160a01b031614806131115750836001600160a01b031661310684610ed8565b6001600160a01b0316145b80611e6557506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff16611e65565b826001600160a01b03166131588261180a565b6001600160a01b0316146131d45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610f40565b6001600160a01b03821661324f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610f40565b61325a600082612ff1565b6001600160a01b03831660009081526004602052604081208054600192906132839084906142a5565b90915550506001600160a01b03821660009081526004602052604081208054600192906132b19084906142b8565b9250508190555081600382815481106132cc576132cc614304565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600061337b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661363d9092919063ffffffff16565b805190915015610f7957808060200190518101906133999190614544565b610f795760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610f40565b60006040518060400160405280600781526020016625a924a62622a960c91b8152503384846040516020016134439493929190614561565b60405160208183030381529060405280519060200120905092915050565b6000611ba5826134be856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9061364c565b6119978160405180602001604052806000815250613670565b6134e8848484613145565b6134f4848484846136fe565b6111f45760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f40565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106135a4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106135d0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106135ee57662386f26fc10000830492506010015b6305f5e1008310613606576305f5e100830492506008015b612710831061361a57612710830492506004015b6064831061362c576064830492506002015b600a8310610e2a5760010192915050565b6060611e65848460008561384a565b600080600061365b858561393c565b915091506136688161397e565b509392505050565b61367982613ae3565b613697600083600160038054905061369191906142a5565b846136fe565b610e425760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f40565b60006001600160a01b0384163b1561383f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137429033908990889088906004016145a9565b6020604051808303816000875af192505050801561377d575060408051601f3d908101601f1916820190925261377a918101906145db565b60015b613825573d8080156137ab576040519150601f19603f3d011682016040523d82523d6000602084013e6137b0565b606091505b50805160000361381d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f40565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e65565b506001949350505050565b6060824710156138c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610f40565b600080866001600160a01b031685876040516138de9190614441565b60006040518083038185875af1925050503d806000811461391b576040519150601f19603f3d011682016040523d82523d6000602084013e613920565b606091505b509150915061393187838387613be6565b979650505050505050565b60008082516041036139725760208301516040840151606085015160001a61396687828585613c5f565b945094505050506112b0565b506000905060026112b0565b6000816004811115613992576139926145f8565b0361399a5750565b60018160048111156139ae576139ae6145f8565b036139fb5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f40565b6002816004811115613a0f57613a0f6145f8565b03613a5c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f40565b6003816004811115613a7057613a706145f8565b036119975760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f40565b6001600160a01b038116613b395760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f40565b6003546001600160a01b0382166000908152600460205260408120805460019290613b659084906142b8565b90915550506003805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608315613c55578251600003613c4e576001600160a01b0385163b613c4e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f40565b5081611e65565b611e658383613d23565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613c965750600090506003613d1a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613cea573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613d1357600060019250925050613d1a565b9150600090505b94509492505050565b815115613d335781518083602001fd5b8060405162461bcd60e51b8152600401610f409190613e3b565b6001600160e01b03198116811461199757600080fd5b600060208284031215613d7557600080fd5b8135611ba581613d4d565b6001600160a01b038116811461199757600080fd5b80356bffffffffffffffffffffffff81168114613db157600080fd5b919050565b60008060408385031215613dc957600080fd5b8235613dd481613d80565b9150613de260208401613d95565b90509250929050565b60005b83811015613e06578181015183820152602001613dee565b50506000910152565b60008151808452613e27816020860160208601613deb565b601f01601f19169290920160200192915050565b602081526000611ba56020830184613e0f565b600060208284031215613e6057600080fd5b5035919050565b60008060408385031215613e7a57600080fd5b8235613e8581613d80565b946020939093013593505050565b600060208284031215613ea557600080fd5b8135611ba581613d80565b600080600060608486031215613ec557600080fd5b8335613ed081613d80565b92506020840135613ee081613d80565b929592945050506040919091013590565b60008060408385031215613f0457600080fd5b50508035926020909101359150565b60008060408385031215613f2657600080fd5b8235613f3181613d80565b91506020830135613f4181613d80565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f8b57613f8b613f4c565b604052919050565b600067ffffffffffffffff821115613fad57613fad613f4c565b50601f01601f191660200190565b6000613fce613fc984613f93565b613f62565b9050828152838383011115613fe257600080fd5b828260208301376000602084830101529392505050565b60006020828403121561400b57600080fd5b813567ffffffffffffffff81111561402257600080fd5b8201601f8101841361403357600080fd5b611e6584823560208401613fbb565b60008060006060848603121561405757600080fd5b83359250602084013561406981613d80565b915061407760408501613d95565b90509250925092565b600082601f83011261409157600080fd5b611ba583833560208501613fbb565b6000806000606084860312156140b557600080fd5b83359250602084013567ffffffffffffffff8111156140d357600080fd5b6140df86828701614080565b925050604084013590509250925092565b801515811461199757600080fd5b6000806040838503121561411157600080fd5b823561411c81613d80565b91506020830135613f41816140f0565b6000806000806080858703121561414257600080fd5b843561414d81613d80565b9350602085013561415d81613d80565b925060408501359150606085013567ffffffffffffffff81111561418057600080fd5b61418c87828801614080565b91505092959194509250565b6000602082840312156141aa57600080fd5b813567ffffffffffffffff8111156141c157600080fd5b611e6584828501614080565b600080600080608085870312156141e357600080fd5b84359350602085013567ffffffffffffffff81111561420157600080fd5b61420d87828801614080565b93505060408501359150606085013561422581613d80565b939692955090935050565b6000806040838503121561424357600080fd5b823591506020830135613f4181613d80565b600181811c9082168061426957607f821691505b60208210810361428957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e2a57610e2a61428f565b80820180821115610e2a57610e2a61428f565b8082028115828204841417610e2a57610e2a61428f565b6000826142ff57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006001820161432c5761432c61428f565b5060010190565b601f821115610f7957600081815260208120601f850160051c8101602086101561435a5750805b601f850160051c820191505b8181101561437957828155600101614366565b505050505050565b815167ffffffffffffffff81111561439b5761439b613f4c565b6143af816143a98454614255565b84614333565b602080601f8311600181146143e457600084156143cc5750858301515b600019600386901b1c1916600185901b178555614379565b600085815260208120601f198616915b82811015614413578886015182559484019460019091019084016143f4565b50858210156144315787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251614453818460208701613deb565b9190910192915050565b60006020828403121561446f57600080fd5b815167ffffffffffffffff81111561448657600080fd5b8201601f8101841361449757600080fd5b80516144a5613fc982613f93565b8181528560208385010111156144ba57600080fd5b6144cb826020830160208601613deb565b95945050505050565b6000602082840312156144e657600080fd5b5051919050565b600083516144ff818460208801613deb565b835190830190614513818360208801613deb565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60006020828403121561455657600080fd5b8151611ba5816140f0565b60008551614573818460208a01613deb565b606095861b6bffffffffffffffffffffffff1990811693909101928352601483019490945250921b166034820152604801919050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ac76080830184613e0f565b6000602082840312156145ed57600080fd5b8151611ba581613d4d565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220d7e0e54dcefb5014e720d113e149baa62a0c44db8c3728e1490735ced3c9643264736f6c63430008110033000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000189c00000000000000000000000000000000000000000000000000dfd22a8cd9800000000000000000000000000016e3b84e33fa34a1b51fd1264822dd145418c27c00000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000074b52494c4c45520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084341535345545445000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d68747470733a2f2f6b72696c6c65722e636f6d2f63617373657474652f000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000015d9bba44eb85bb57b5fb413079d348db5cc478e000000000000000000000000e748007b9a9e58f768baf165a0be88788e230b4e000000000000000000000000145a4771b5c256069aa9974bc5d473f802e69f8a000000000000000000000000ecaa643997033b1ba605d32748cfe9bdad14188000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000019

Deployed Bytecode

0x6080604052600436106104335760003560e01c80638b83209b11610228578063c45ac05011610128578063d547cfb7116100bb578063e17b25af1161008a578063e985e9c51161006f578063e985e9c514610d5c578063ecba222a14610da5578063f2fde38b14610dc657600080fd5b8063e17b25af14610d27578063e33b7de314610d4757600080fd5b8063d547cfb714610cb0578063d79779b214610cc5578063da67e22a14610cfb578063e08a5f9e14610d1157600080fd5b8063ce9c6053116100f7578063ce9c605314610c20578063d10f99cb14610c3a578063d51be0df14610c5a578063d52c57e014610c9057600080fd5b8063c45ac05014610b97578063c87b56dd14610bb7578063caa875bb14610bd7578063ce7c2ac214610bea57600080fd5b8063a2309ff8116101bb578063b88d4fde1161018a578063bad656241161016f578063bad6562414610b23578063bb08d1cd14610b43578063c002d23d14610b6357600080fd5b8063b88d4fde14610ae3578063b8d1e53214610b0357600080fd5b8063a2309ff814610a79578063a3f8eace14610a8e578063aa1b103f14610aae578063b0ccc31e14610ac357600080fd5b80639852595c116101f75780639852595c146109da5780639e942ace14610a10578063a0712d6814610a46578063a22cb46514610a5957600080fd5b80638b83209b1461097d5780638da5cb5b1461099d5780639593b23b146109b257806395d89b41146109c557600080fd5b806348b75044116103335780636352211e116102c65780636eb3500d11610295578063715018a61161027a578063715018a614610933578063752c0ace146109485780638a616bc01461095d57600080fd5b80636eb3500d146108ee57806370a082311461091357600080fd5b80636352211e1461086357806365a4234c1461088357806368428a1b146108b95780636d44aef5146108ce57600080fd5b80635944c753116103025780635944c753146107935780635a53cc3d146107b35780635ef9432a1461081b5780636272c8d51461083057600080fd5b806348b750441461071e578063493143e41461073e57806353135ca01461075e57806355f804b31461077357600080fd5b806323b872dd116103c657806332cb6b0c11610395578063406072a91161037a578063406072a9146106a257806342842e0e146106e8578063470038191461070857600080fd5b806332cb6b0c146106595780633a98ef391461068d57600080fd5b806323b872dd146105aa5780632a55205a146105ca5780632db4d811146106095780632f745c591461063957600080fd5b8063095ea7b311610402578063095ea7b31461053257806318160ddd146105525780631916558714610575578063197b83141461059557600080fd5b806301ffc9a71461048157806304634d8d146104b657806306fdde03146104d8578063081812fc146104fa57600080fd5b3661047c577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561048d57600080fd5b506104a161049c366004613d63565b610de6565b60405190151581526020015b60405180910390f35b3480156104c257600080fd5b506104d66104d1366004613db6565b610e30565b005b3480156104e457600080fd5b506104ed610e46565b6040516104ad9190613e3b565b34801561050657600080fd5b5061051a610515366004613e4e565b610ed8565b6040516001600160a01b0390911681526020016104ad565b34801561053e57600080fd5b506104d661054d366004613e67565b610f65565b34801561055e57600080fd5b50610567610f7e565b6040519081526020016104ad565b34801561058157600080fd5b506104d6610590366004613e93565b610f9a565b3480156105a157600080fd5b506104d6611104565b3480156105b657600080fd5b506104d66105c5366004613eb0565b61111b565b3480156105d657600080fd5b506105ea6105e5366004613ef1565b6111fa565b604080516001600160a01b0390931683526020830191909152016104ad565b34801561061557600080fd5b50610567610624366004613e4e565b60009081526015602052604090205460df1c90565b34801561064557600080fd5b50610567610654366004613e67565b6112b7565b34801561066557600080fd5b506105677f000000000000000000000000000000000000000000000000000000000000189c81565b34801561069957600080fd5b50600a54610567565b3480156106ae57600080fd5b506105676106bd366004613f13565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205490565b3480156106f457600080fd5b506104d6610703366004613eb0565b61139c565b34801561071457600080fd5b50610567601a5481565b34801561072a57600080fd5b506104d6610739366004613f13565b611408565b34801561074a57600080fd5b506104d6610759366004613e4e565b61159c565b34801561076a57600080fd5b506104a16115a9565b34801561077f57600080fd5b506104d661078e366004613ff9565b6115cf565b34801561079f57600080fd5b506104d66107ae366004614042565b611667565b3480156107bf57600080fd5b506107d36107ce366004613e4e565b61167a565b6040805182516001600160a01b03908116825260208085015190830152838301511691810191909152606080830151908201526080918201519181019190915260a0016104ad565b34801561082757600080fd5b506104d6611776565b34801561083c57600080fd5b506104ed6040518060400160405280600781526020016625a924a62622a960c91b81525081565b34801561086f57600080fd5b5061051a61087e366004613e4e565b61180a565b34801561088f57600080fd5b5061056761089e366004613e4e565b60009081526015602052604090205460bf1c63ffffffff1690565b3480156108c557600080fd5b506104a16118aa565b3480156108da57600080fd5b506104d66108e9366004613e4e565b6118c3565b3480156108fa57600080fd5b5060145461051a9061010090046001600160a01b031681565b34801561091f57600080fd5b5061056761092e366004613e93565b6118d0565b34801561093f57600080fd5b506104d661196a565b34801561095457600080fd5b50610567603f81565b34801561096957600080fd5b506104d6610978366004613e4e565b61197e565b34801561098957600080fd5b5061051a610998366004613e4e565b61199a565b3480156109a957600080fd5b5061051a6119ca565b6104d66109c03660046140a0565b6119de565b3480156109d157600080fd5b506104ed611aa4565b3480156109e657600080fd5b506105676109f5366004613e93565b6001600160a01b03166000908152600d602052604090205490565b348015610a1c57600080fd5b5061051a610a2b366004613e4e565b6000908152601560205260409020546001600160a01b031690565b6104d6610a54366004613e4e565b611ab3565b348015610a6557600080fd5b506104d6610a743660046140fe565b611b3e565b348015610a8557600080fd5b50610567611b52565b348015610a9a57600080fd5b50610567610aa9366004613e93565b611b64565b348015610aba57600080fd5b506104d6611bac565b348015610acf57600080fd5b5060115461051a906001600160a01b031681565b348015610aef57600080fd5b506104d6610afe36600461412c565b611bbe565b348015610b0f57600080fd5b506104d6610b1e366004613e93565b611c32565b348015610b2f57600080fd5b50610567610b3e366004614198565b611cb8565b348015610b4f57600080fd5b506104ed610b5e366004613ef1565b611ce0565b348015610b6f57600080fd5b506105677f00000000000000000000000000000000000000000000000000dfd22a8cd9800081565b348015610ba357600080fd5b50610567610bb2366004613f13565b611da2565b348015610bc357600080fd5b506104ed610bd2366004613e4e565b611e6d565b6104d6610be53660046141cd565b611f45565b348015610bf657600080fd5b50610567610c05366004613e93565b6001600160a01b03166000908152600c602052604090205490565b348015610c2c57600080fd5b506014546104a19060ff1681565b348015610c4657600080fd5b506104ed610c55366004613e4e565b6120ac565b348015610c6657600080fd5b50610567610c75366004613e4e565b60009081526015602052604090205460a01c637fffffff1690565b348015610c9c57600080fd5b506104d6610cab366004614230565b612166565b348015610cbc57600080fd5b506104ed6121b2565b348015610cd157600080fd5b50610567610ce0366004613e93565b6001600160a01b03166000908152600f602052604090205490565b348015610d0757600080fd5b5061056760175481565b348015610d1d57600080fd5b5061056760165481565b348015610d3357600080fd5b506104d6610d42366004613e93565b612240565b348015610d5357600080fd5b50600b54610567565b348015610d6857600080fd5b506104a1610d77366004613f13565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610db157600080fd5b506011546104a190600160a01b900460ff1681565b348015610dd257600080fd5b506104d6610de1366004613e93565b612287565b60007fb6f9b6fa000000000000000000000000000000000000000000000000000000006001600160e01b0319831601610e2157506001919050565b610e2a82612314565b92915050565b610e38612352565b610e4282826123b1565b5050565b606060008054610e5590614255565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8190614255565b8015610ece5780601f10610ea357610100808354040283529160200191610ece565b820191906000526020600020905b815481529060010190602001808311610eb157829003601f168201915b5050505050905090565b6000610ee3826124b8565b610f495760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b81610f6f816124f4565b610f79838361250e565b505050565b6000600254610f8b611b52565b610f9591906142a5565b905090565b6001600160a01b0381166000908152600c602052604090205461100e5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610f40565b600061101982611b64565b90508060000361107f5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610f40565b80600b600082825461109191906142b8565b90915550506001600160a01b0382166000908152600d602052604090208054820190556110be828261263a565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b61110c612352565b6014805460ff19166001179055565b826001600160a01b038116331461113557611135336124f4565b6111bf826111528460009081526015602052604090205460df1c90565b61115d9060016142b8565b600091825260156020526040909120805460df9290921b7fffffffff80000000000000000000000000000000000000000000000000000000167b7fffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000828152601560205260409020805463ffffffff60bf1b191663ffffffff60bf1b4260bf1b161790556111f4848484612753565b50505050565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916112795750604080518082019091526007546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b60208101516000906127109061129d906bffffffffffffffffffffffff16876142cb565b6112a791906142e2565b91519350909150505b9250929050565b600080805b60035481101561132d57846001600160a01b0316600382815481106112e3576112e3614304565b6000918252602090912001546001600160a01b03160361131b5783820361130d579150610e2a9050565b6113186001836142b8565b91505b806113258161431a565b9150506112bc565b5060405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610f40565b826001600160a01b03811633146113b6576113b6336124f4565b6113d3826111528460009081526015602052604090205460df1c90565b6000828152601560205260409020805463ffffffff60bf1b191663ffffffff60bf1b4260bf1b161790556111f48484846127da565b6001600160a01b0381166000908152600c602052604090205461147c5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610f40565b60006114888383611da2565b9050806000036114ee5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610f40565b6001600160a01b0383166000908152600f6020526040812080548392906115169084906142b8565b90915550506001600160a01b0380841660009081526010602090815260408083209386168352929052208054820190556115518383836127f5565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6115a4612352565b601755565b6000806016541180156115be57504260165411155b8015610f9557504260175411905090565b6115d7612352565b60145460ff1615611614576040517f18c3d33800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60136116208282614381565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600161164c610f7e565b6040805192835260208301919091520160405180910390a150565b61166f612352565b610f79838383612875565b6116be6040518060a0016040528060006001600160a01b031681526020016000815260200160006001600160a01b0316815260200160008152602001600081525090565b6040518060a001604052806116e8846000908152601560205260409020546001600160a01b031690565b6001600160a01b031681526020016117158460009081526015602052604090205460a01c637fffffff1690565b81526020016117238461180a565b6001600160a01b031681526020016117508460009081526015602052604090205460bf1c63ffffffff1690565b815260200161176e8460009081526015602052604090205460df1c90565b905292915050565b61177e6119ca565b6001600160a01b0316336001600160a01b0316146117af57604051635fc483c560e01b815260040160405180910390fd5b601154600160a01b900460ff16156117da57604051631551a48f60e11b815260040160405180910390fd5b601180547fffffffffffffffffffffff00000000000000000000000000000000000000000016600160a01b179055565b6000806003838154811061182057611820614304565b6000918252602090912001546001600160a01b0316905080610e2a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610f40565b600080601754118015610f955750426017541115905090565b6118cb612352565b601655565b60006001600160a01b03821661194e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610f40565b506001600160a01b031660009081526004602052604090205490565b611972612352565b61197c600061298d565b565b611986612352565b600090815260086020526040812055565b50565b6000600e82815481106119af576119af614304565b6000918252602090912001546001600160a01b031692915050565b6000610f956012546001600160a01b031690565b6119e66129df565b6119ee6115a9565b611a0b576040516316851a3760e11b815260040160405180910390fd5b6000611a18838333612a38565b905080841115611a3b5760405163248716bf60e21b815260040160405180910390fd5b611a657f00000000000000000000000000000000000000000000000000dfd22a8cd98000856142cb565b341015611a855760405163cd1c886760e01b815260040160405180910390fd5b611a8f8385612ad1565b611a998433612b08565b50610f796001600955565b606060018054610e5590614255565b611abb6129df565b611ac36118aa565b611ae0576040516316851a3760e11b815260040160405180910390fd5b611b0a7f00000000000000000000000000000000000000000000000000dfd22a8cd98000826142cb565b341015611b2a5760405163cd1c886760e01b815260040160405180910390fd5b611b348133612b08565b6119976001600955565b81611b48816124f4565b610f798383612c29565b600354600090610f95906001906142a5565b600080611b70600b5490565b611b7a90476142b8565b9050611ba58382611ba0866001600160a01b03166000908152600d602052604090205490565b612ced565b9392505050565b611bb4612352565b61197c6000600755565b836001600160a01b0381163314611bd857611bd8336124f4565b611bf5836111528560009081526015602052604090205460df1c90565b6000838152601560205260409020805463ffffffff60bf1b191663ffffffff60bf1b4260bf1b16179055611c2b85858585612d2b565b5050505050565b611c3a6119ca565b6001600160a01b0316336001600160a01b031614611c6b57604051635fc483c560e01b815260040160405180910390fd5b601154600160a01b900460ff1615611c9657604051631551a48f60e11b815260040160405180910390fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6000601882604051611cca9190614441565b9081526020016040518091039020549050919050565b60145460609061010090046001600160a01b0316611d0d5750604080516020810190915260008152610e2a565b6014546040517fbb08d1cd00000000000000000000000000000000000000000000000000000000815260048101859052602481018490526101009091046001600160a01b03169063bb08d1cd90604401600060405180830381865afa158015611d7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ba5919081019061445d565b6001600160a01b0382166000908152600f602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2591906144d4565b611e2f91906142b8565b6001600160a01b03808616600090815260106020908152604080832093881683529290522054909150611e659084908390612ced565b949350505050565b6060611e78826124b8565b611eea5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610f40565b6000611ef4612db3565b90506000815111611f145760405180602001604052806000815250611ba5565b80611f1e84612dc2565b604051602001611f2f9291906144ed565b6040516020818303038152906040529392505050565b611f4d6129df565b611f556115a9565b611f72576040516316851a3760e11b815260040160405180910390fd5b6000611f7f848484612a38565b905080851115611fa25760405163248716bf60e21b815260040160405180910390fd5b6040516370a0823160e01b81523360048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015611fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200a91906144d4565b600003612043576040517ff2b1343f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61206d7f00000000000000000000000000000000000000000000000000dfd22a8cd98000866142cb565b34101561208d5760405163cd1c886760e01b815260040160405180910390fd5b6120978486612ad1565b6120a18533612b08565b506111f46001600955565b60145460609061010090046001600160a01b03166120d857505060408051602081019091526000815290565b6014546040517fd10f99cb000000000000000000000000000000000000000000000000000000008152600481018490526101009091046001600160a01b03169063d10f99cb90602401600060405180830381865afa15801561213e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e2a919081019061445d565b61216e612352565b601a5482111561219157604051633e29b4fb60e11b815260040160405180910390fd5b601a80549060006121a283806142a5565b90915550610e4290508282612b08565b601380546121bf90614255565b80601f01602080910402602001604051908101604052809291908181526020018280546121eb90614255565b80156122385780601f1061220d57610100808354040283529160200191612238565b820191906000526020600020905b81548152906001019060200180831161221b57829003601f168201915b505050505081565b612248612352565b601480546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b61228f612352565b6001600160a01b03811661230b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f40565b6119978161298d565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610e2a5750610e2a82612e62565b3361235b6119ca565b6001600160a01b03161461197c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f40565b6127106bffffffffffffffffffffffff821611156124245760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f40565b6001600160a01b03821661247a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f40565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600755565b6000806001600160a01b0316600383815481106124d7576124d7614304565b6000918252602090912001546001600160a01b0316141592915050565b6011546001600160a01b0316156119975761199781612efd565b60006125198261180a565b9050806001600160a01b0316836001600160a01b0316036125a25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610f40565b336001600160a01b03821614806125be57506125be8133610d77565b6126305760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610f40565b610f798383612ff1565b8047101561268a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610f40565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126d7576040519150601f19603f3d011682016040523d82523d6000602084013e6126dc565b606091505b5050905080610f795760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610f40565b61275d338261305f565b6127cf5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610f40565b610f79838383613145565b610f7983838360405180602001604052806000815250611bbe565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610f79908490613326565b6127106bffffffffffffffffffffffff821611156128e85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f40565b6001600160a01b03821661293e5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610f40565b6040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182526000968752600890529190942093519051909116600160a01b029116179055565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260095403612a315760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f40565b6002600955565b600080612a45848461340b565b90506000612a538287613461565b6019549091506001600160a01b03808316911614612a9d576040517f52fdb07200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601886604051612aad9190614441565b90815260200160405180910390205485612ac791906142a5565b9695505050505050565b80601883604051612ae29190614441565b90815260200160405180910390206000828254612aff91906142b8565b90915550505050565b603f821115612b2a57604051633e29b4fb60e11b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000189c82612b54611b52565b612b5e91906142b8565b1115612b96576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4260005b838110156111f457612bab836134c4565b6000612bb5610f7e565b6000908152601560205260409020805460a085901b777fffffff0000000000000000000000000000000000000000167fffffffffffffffff8000000000000000000000000000000000000000000000009091166001600160a01b038716171790555080612c218161431a565b915050612b9a565b336001600160a01b03831603612c815760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610f40565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b0384166000908152600c602052604081205490918391612d1790866142cb565b612d2191906142e2565b611e6591906142a5565b612d35338361305f565b612da75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610f40565b6111f4848484846134dd565b606060138054610e5590614255565b60606000612dcf8361355b565b600101905060008167ffffffffffffffff811115612def57612def613f4c565b6040519080825280601f01601f191660200182016040528015612e19576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084612e2357509392505050565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612ec557506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610e2a57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610e2a565b6011546001600160a01b03168015801590612f2257506000816001600160a01b03163b115b15610e42576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015612f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb09190614544565b610e42576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610f40565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906130268261180a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061306a826124b8565b6130cb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610f40565b60006130d68361180a565b9050806001600160a01b0316846001600160a01b031614806131115750836001600160a01b031661310684610ed8565b6001600160a01b0316145b80611e6557506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff16611e65565b826001600160a01b03166131588261180a565b6001600160a01b0316146131d45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610f40565b6001600160a01b03821661324f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610f40565b61325a600082612ff1565b6001600160a01b03831660009081526004602052604081208054600192906132839084906142a5565b90915550506001600160a01b03821660009081526004602052604081208054600192906132b19084906142b8565b9250508190555081600382815481106132cc576132cc614304565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600061337b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661363d9092919063ffffffff16565b805190915015610f7957808060200190518101906133999190614544565b610f795760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610f40565b60006040518060400160405280600781526020016625a924a62622a960c91b8152503384846040516020016134439493929190614561565b60405160208183030381529060405280519060200120905092915050565b6000611ba5826134be856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9061364c565b6119978160405180602001604052806000815250613670565b6134e8848484613145565b6134f4848484846136fe565b6111f45760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f40565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106135a4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106135d0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106135ee57662386f26fc10000830492506010015b6305f5e1008310613606576305f5e100830492506008015b612710831061361a57612710830492506004015b6064831061362c576064830492506002015b600a8310610e2a5760010192915050565b6060611e65848460008561384a565b600080600061365b858561393c565b915091506136688161397e565b509392505050565b61367982613ae3565b613697600083600160038054905061369191906142a5565b846136fe565b610e425760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f40565b60006001600160a01b0384163b1561383f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137429033908990889088906004016145a9565b6020604051808303816000875af192505050801561377d575060408051601f3d908101601f1916820190925261377a918101906145db565b60015b613825573d8080156137ab576040519150601f19603f3d011682016040523d82523d6000602084013e6137b0565b606091505b50805160000361381d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610f40565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e65565b506001949350505050565b6060824710156138c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610f40565b600080866001600160a01b031685876040516138de9190614441565b60006040518083038185875af1925050503d806000811461391b576040519150601f19603f3d011682016040523d82523d6000602084013e613920565b606091505b509150915061393187838387613be6565b979650505050505050565b60008082516041036139725760208301516040840151606085015160001a61396687828585613c5f565b945094505050506112b0565b506000905060026112b0565b6000816004811115613992576139926145f8565b0361399a5750565b60018160048111156139ae576139ae6145f8565b036139fb5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f40565b6002816004811115613a0f57613a0f6145f8565b03613a5c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f40565b6003816004811115613a7057613a706145f8565b036119975760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f40565b6001600160a01b038116613b395760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610f40565b6003546001600160a01b0382166000908152600460205260408120805460019290613b659084906142b8565b90915550506003805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608315613c55578251600003613c4e576001600160a01b0385163b613c4e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f40565b5081611e65565b611e658383613d23565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613c965750600090506003613d1a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613cea573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613d1357600060019250925050613d1a565b9150600090505b94509492505050565b815115613d335781518083602001fd5b8060405162461bcd60e51b8152600401610f409190613e3b565b6001600160e01b03198116811461199757600080fd5b600060208284031215613d7557600080fd5b8135611ba581613d4d565b6001600160a01b038116811461199757600080fd5b80356bffffffffffffffffffffffff81168114613db157600080fd5b919050565b60008060408385031215613dc957600080fd5b8235613dd481613d80565b9150613de260208401613d95565b90509250929050565b60005b83811015613e06578181015183820152602001613dee565b50506000910152565b60008151808452613e27816020860160208601613deb565b601f01601f19169290920160200192915050565b602081526000611ba56020830184613e0f565b600060208284031215613e6057600080fd5b5035919050565b60008060408385031215613e7a57600080fd5b8235613e8581613d80565b946020939093013593505050565b600060208284031215613ea557600080fd5b8135611ba581613d80565b600080600060608486031215613ec557600080fd5b8335613ed081613d80565b92506020840135613ee081613d80565b929592945050506040919091013590565b60008060408385031215613f0457600080fd5b50508035926020909101359150565b60008060408385031215613f2657600080fd5b8235613f3181613d80565b91506020830135613f4181613d80565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f8b57613f8b613f4c565b604052919050565b600067ffffffffffffffff821115613fad57613fad613f4c565b50601f01601f191660200190565b6000613fce613fc984613f93565b613f62565b9050828152838383011115613fe257600080fd5b828260208301376000602084830101529392505050565b60006020828403121561400b57600080fd5b813567ffffffffffffffff81111561402257600080fd5b8201601f8101841361403357600080fd5b611e6584823560208401613fbb565b60008060006060848603121561405757600080fd5b83359250602084013561406981613d80565b915061407760408501613d95565b90509250925092565b600082601f83011261409157600080fd5b611ba583833560208501613fbb565b6000806000606084860312156140b557600080fd5b83359250602084013567ffffffffffffffff8111156140d357600080fd5b6140df86828701614080565b925050604084013590509250925092565b801515811461199757600080fd5b6000806040838503121561411157600080fd5b823561411c81613d80565b91506020830135613f41816140f0565b6000806000806080858703121561414257600080fd5b843561414d81613d80565b9350602085013561415d81613d80565b925060408501359150606085013567ffffffffffffffff81111561418057600080fd5b61418c87828801614080565b91505092959194509250565b6000602082840312156141aa57600080fd5b813567ffffffffffffffff8111156141c157600080fd5b611e6584828501614080565b600080600080608085870312156141e357600080fd5b84359350602085013567ffffffffffffffff81111561420157600080fd5b61420d87828801614080565b93505060408501359150606085013561422581613d80565b939692955090935050565b6000806040838503121561424357600080fd5b823591506020830135613f4181613d80565b600181811c9082168061426957607f821691505b60208210810361428957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610e2a57610e2a61428f565b80820180821115610e2a57610e2a61428f565b8082028115828204841417610e2a57610e2a61428f565b6000826142ff57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006001820161432c5761432c61428f565b5060010190565b601f821115610f7957600081815260208120601f850160051c8101602086101561435a5750805b601f850160051c820191505b8181101561437957828155600101614366565b505050505050565b815167ffffffffffffffff81111561439b5761439b613f4c565b6143af816143a98454614255565b84614333565b602080601f8311600181146143e457600084156143cc5750858301515b600019600386901b1c1916600185901b178555614379565b600085815260208120601f198616915b82811015614413578886015182559484019460019091019084016143f4565b50858210156144315787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251614453818460208701613deb565b9190910192915050565b60006020828403121561446f57600080fd5b815167ffffffffffffffff81111561448657600080fd5b8201601f8101841361449757600080fd5b80516144a5613fc982613f93565b8181528560208385010111156144ba57600080fd5b6144cb826020830160208601613deb565b95945050505050565b6000602082840312156144e657600080fd5b5051919050565b600083516144ff818460208801613deb565b835190830190614513818360208801613deb565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60006020828403121561455657600080fd5b8151611ba5816140f0565b60008551614573818460208a01613deb565b606095861b6bffffffffffffffffffffffff1990811693909101928352601483019490945250921b166034820152604801919050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ac76080830184613e0f565b6000602082840312156145ed57600080fd5b8151611ba581613d4d565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220d7e0e54dcefb5014e720d113e149baa62a0c44db8c3728e1490735ced3c9643264736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000189c00000000000000000000000000000000000000000000000000dfd22a8cd9800000000000000000000000000016e3b84e33fa34a1b51fd1264822dd145418c27c00000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000074b52494c4c45520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084341535345545445000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d68747470733a2f2f6b72696c6c65722e636f6d2f63617373657474652f000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000015d9bba44eb85bb57b5fb413079d348db5cc478e000000000000000000000000e748007b9a9e58f768baf165a0be88788e230b4e000000000000000000000000145a4771b5c256069aa9974bc5d473f802e69f8a000000000000000000000000ecaa643997033b1ba605d32748cfe9bdad14188000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000019

-----Decoded View---------------
Arg [0] : _name (string): KRILLER
Arg [1] : _symbol (string): CASSETTE
Arg [2] : _baseTokenURI (string): https://kriller.com/cassette/
Arg [3] : _maxSupply (uint256): 6300
Arg [4] : _mintPrice (uint256): 63000000000000000
Arg [5] : _presaleSigner (address): 0x16E3B84E33fA34a1b51fD1264822DD145418C27C
Arg [6] : _payees (address[]): 0x15d9BBa44eb85BB57B5FB413079d348db5CC478E,0xe748007b9a9E58F768baF165A0be88788E230B4e,0x145A4771b5C256069Aa9974BC5D473F802E69f8a,0xECaA643997033B1bA605D32748cfE9bdAd141880
Arg [7] : _shares (uint256[]): 25,25,25,25

-----Encoded View---------------
24 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [3] : 000000000000000000000000000000000000000000000000000000000000189c
Arg [4] : 00000000000000000000000000000000000000000000000000dfd22a8cd98000
Arg [5] : 00000000000000000000000016e3b84e33fa34a1b51fd1264822dd145418c27c
Arg [6] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [9] : 4b52494c4c455200000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [11] : 4341535345545445000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [13] : 68747470733a2f2f6b72696c6c65722e636f6d2f63617373657474652f000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [15] : 00000000000000000000000015d9bba44eb85bb57b5fb413079d348db5cc478e
Arg [16] : 000000000000000000000000e748007b9a9e58f768baf165a0be88788e230b4e
Arg [17] : 000000000000000000000000145a4771b5c256069aa9974bc5d473f802e69f8a
Arg [18] : 000000000000000000000000ecaa643997033b1ba605d32748cfe9bdad141880
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000019


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

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