ETH Price: $3,671.38 (+0.86%)

Token

ERC-20: Shinsei Galverse (Shinsei Galverse)
 

Overview

Max Total Supply

38 Shinsei Galverse

Holders

37

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 Shinsei Galverse
0x48d207d602875f62cb254194b157d05b9506ca90
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:
GalverseKumade

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : GalverseKumade.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.17;

import "./Kumade.sol";

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                   //
//                                                                                                                   //
//                                    _8888_                      ▄▀▀▀▀▀▌                                            //
//                            ,▀▀▀▀▀▀▀      ▀▀▀▀▀▀▀▀▌ █▀▀▀▀▀▀▀▀▀▀▀     █░                                            //
//                           █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄'░█               ▄█░                                             //
//                             ░░░░░░░░░░░░░░░░░░░░░█   ,████████████▀░                                              //
//                         █▀▀▀▀▀▄       ▄▀▀▀▀▀█   █   ,█░░░░░░░░░░░░░                                               //
//                          █     ▀▄▄▄▄▄▀    ▄█   █    ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄_                                              //
//                       ,▄▄▄█              █▄▄▄ █                  █░                                               //
//                      █                     █░█     █████     ,███░                                                //
//                     ²████████▀    ╓████████░█     █▀░░█     █▀▀░                                                  //
//                       ░░░░░░█    ,█░░░░░░░░█     █▀░ ▐     ██░                                                    //
//                     ,▄▄▄▄▄▄█     █▄▄▄▄▄▄▄▄▄_    █▀░ ▐     ██░   █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀╗           //
//                    ▐                     █▀    █▀░ ▐     ██░   █                                    ██░           //
//                   ²███████▀    ╓█████████░    █▀░ ▐     ██░   █     ,████████████████████████Γ     ██░            //
//                     ░░░░░▀    █░░░░░░░░░█    █▀░ ▐     ██░   █     Æ░░░░░░░░░░░░░░░░░░░░░░░░'     ██░             //
//                  ,▄▄▄▄▄▄█    █▄▄▄▄▄▄   █    █▀░ ▐     ██░   █                                    ██░              //
//                 Æ     ▄▄    ▄▄    █░  █    █▀░ ▐     ██░   █     ,████████████████████████Γ     ██░               //
//               Æ'    ,██¬    ▌░    █░ █    █▀░ ▐     ██░   █      Æ░░░░░░░░░░░░░░░░░░░░░░░'     ██░                //
//             ▄█     ▄██¬    ▌░░▌   └█     █▀░ ▐     ██░   █                                   ▄██░                 //
//            ▌     ▄█░█¬    █░░ ▌        ▄█▀░ ▐     ██░   █████████████████     ╓███████████████▀░                  //
//            ▌▄▄▄▄█░░███████░░   ████████▀░░ ▌███████░     ░░░░░░░░░░░░░░█     █░░░░░░░░░░░░░░░░░                   //
//              ░░░░░   ░░░░░░     ░░░░░░░░░     ░░░░░ ___,▀    j▀▀▀▀▀▀▀▀▀     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█                   //
//                                                    █                                         █░                   //
//                                                   █_      ,▄██████████▀    ╓████████████████▀░                    //
//                                                     █    '░░░░░░░░░░░▄    ,█░░░░░░░░░░░░░░░░░                     //
//                                                    █     ▄▄▄▄▄▄▄▄▄▄▄█    '█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄_                     //
//                                                   █                                       █░                      //
//                                                   █████████████████▀     ╓███████████████▀░                       //
//                                                      ░░░░░░░░░░░░░▀     ,█▌░░░░░░░░░░░░░░░                        //
//                                                █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█     '█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄_                        //
//                                               █                                        █░                         //
//                                              ²████████████████████████████████████████▀░                          //
//                                                ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                           //
//       — Emi, Ayaka, Devin & Jack                                                                                  //
//                                                                                                                   //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

contract GalverseKumade is Kumade {
    string _name = "Shinsei Galverse";
    string _symbol = "Shinsei Galverse";

    constructor() Kumade(_name, _symbol) {}
}

File 2 of 19 : Kumade.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.13;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "@openzeppelin/contracts/utils/Strings.sol";
import "./CollectionManager.sol";
import "./interfaces/IERC2981.sol";
import "./interfaces/IOperatorFilterRegistry.sol";

/// @title Kumade Generic Multi-Collection ERC721
contract Kumade is
    ERC721,
    ERC721Burnable,
    ERC721URIStorage,
    AccessControl,
    CollectionManager,
    IERC2981,
    Ownable
{
    using Strings for uint256;
    uint256 public totalSupply;
    mapping(uint256 => address) public originalOwner;

    constructor(
        string memory _name,
        string memory _symbol
    ) ERC721(_name, _symbol) {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /// @dev Precondition that the caller is an admin or the artist
    modifier onlyCollectionAdmin(uint256 collectionId) override {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, msg.sender) ||
                (collectionId < collections.length &&
                    msg.sender == collections[collectionId].artist),
            "not authorized"
        );
        _;
    }

    /// @dev Precondition that a quantity is not zero
    modifier quantityNonZero(uint256 quantity) {
        require(quantity > 0, "quantity is zero");
        _;
    }

    /// @dev Precondition that the collection is active
    modifier collectionActive(uint256 collectionId) {
        require(collections[collectionId].active, "collection not active");
        _;
    }

    /// @dev Precondition that the collection has started
    modifier collectionStarted(uint256 collectionId) {
        require(
            collections[collectionId].startTime <= block.timestamp,
            "collection not started"
        );
        _;
    }

    /// @dev Precondition that the correct payment is attached
    modifier collectionPaymentAttached(uint256 collectionId) {
        require(
            collections[collectionId].price == msg.value,
            "incorrect payment"
        );
        _;
    }

    /// @dev Precondition that the correct payment is attached
    modifier collectionFriendPaymentAttached(uint256 collectionId) {
        require(
            collections[collectionId].friendPrice == msg.value,
            "incorrect payment"
        );
        _;
    }

    /// @dev Precondition that the payment receiver exists
    modifier collectionPaymentReceiverExists(uint256 collectionId) {
        require(
            collections[collectionId].paymentReceiver != address(0),
            "no payment receiver"
        );
        _;
    }

    /// @notice Mint tokens from a collection to the caller
    /// @param collectionId The id of the collection
    /// @param uri The Token URI
    function safeMint(
        uint256 collectionId,
        string calldata uri
    ) public payable {
        safeMintTo(msg.sender, collectionId, uri);
    }

    /// @notice Mint tokens from a collection to an account
    /// @param to The account to mint to
    /// @param collectionId The id of the collection
    /// @param uri The Token URI
    function safeMintTo(
        address to,
        uint256 collectionId,
        string calldata uri
    )
        public
        payable
        collectionExists(collectionId)
        collectionActive(collectionId)
        collectionStarted(collectionId)
        collectionPaymentAttached(collectionId)
        collectionPaymentReceiverExists(collectionId)
    {
        _safeMintTo(to, collectionId, uri);
        (bool ok, ) = payable(collections[collectionId].paymentReceiver).call{
            value: msg.value
        }("");
        require(ok, "payment failed");
    }

    /// @notice Mint tokens from a collection to the caller, who must be the
    /// collection artist
    /// @param collectionId The id of the collection
    /// @param uri The Token URI
    function artistMint(uint256 collectionId, string calldata uri) public {
        artistMintTo(msg.sender, collectionId, uri);
    }

    /// @notice Mint tokens from a collection to an account, must be called by
    /// the collection artist
    /// @param to The account to mint to
    /// @param collectionId The id of the collection
    /// @param uri The Token URI
    function artistMintTo(
        address to,
        uint256 collectionId,
        string calldata uri
    ) public onlyCollectionAdmin(collectionId) collectionExists(collectionId) {
        _safeMintTo(to, collectionId, uri);
    }

    /// @notice Mint tokens from a collection to an account, must be called by
    /// the collection artist
    /// @param to The account to mint to
    /// @param collectionId The id of the collection
    /// @param uri The Token URI
    function artistMultiMintTo(
        address[] calldata to,
        uint256 collectionId,
        string[] calldata uri
    )
        public
        quantityNonZero(to.length)
        onlyCollectionAdmin(collectionId)
        collectionExists(collectionId)
    {
        _safeMintTos(to, collectionId, uri);
    }

    /// @notice Mint friend tokens from a collection to an account
    /// @param to The account to mint to
    /// @param collectionId The id of the collection
    /// @param originalTokenId The original token id to base the friend mint on
    /// @param uri The Token URI
    function safeFriendMintTo(
        address to,
        uint256 collectionId,
        uint256 originalTokenId,
        string calldata uri
    )
        public
        payable
        collectionExists(collectionId)
        collectionActive(collectionId)
        collectionStarted(collectionId)
        collectionFriendPaymentAttached(collectionId)
        collectionPaymentReceiverExists(collectionId)
    {
        require(_exists(originalTokenId), "nonexistent token");
        require(
            collectionId == _getCollectionId(originalTokenId),
            "token and collection id mismatch"
        );
        require(
            msg.sender == originalOwner[originalTokenId],
            "msg.sender not the original token owner"
        );

        uint256 tokenId = _consumeTokenIds(collectionId, 1);
        _safeMint(to, tokenId);
        _setTokenURI(tokenId, uri);

        (bool ok, ) = payable(collections[collectionId].paymentReceiver).call{
            value: msg.value
        }("");
        require(ok, "payment failed");
    }

    /// @notice Mint tokens from a collection to an address
    /// @param to The address to mint to
    /// @param collectionId The id of the collection
    /// @param uri The Token URI
    function _safeMintTo(
        address to,
        uint256 collectionId,
        string calldata uri
    ) internal {
        uint256 tokenId = _consumeTokenIds(collectionId, 1);
        address artist = collections[collectionId].artist;

        _safeMintInner(to, collectionId, tokenId, artist, uri);
    }

    /// @notice Mint tokens from a collection to an address
    /// @param tos The addresses to mint to
    /// @param collectionId The id of the collection
    /// @param uris The Token URIs
    function _safeMintTos(
        address[] calldata tos,
        uint256 collectionId,
        string[] calldata uris
    ) internal {
        require(tos.length == uris.length, "length mismatch");

        uint256 firstTokenId = _consumeTokenIds(collectionId, tos.length);
        address artist = collections[collectionId].artist;

        for (uint256 i = 0; i < tos.length; i++) {
            _safeMintInner(
                tos[i],
                collectionId,
                firstTokenId + i,
                artist,
                uris[i]
            );
        }
    }

    /// @notice Set the original owner of a token
    /// @param tokenId The token id
    /// @param to Address to set the original owner to
    function setOriginalOwner(
        uint256 tokenId,
        address to
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(
            _exists(tokenId),
            "ERC721URIStorage: URI set of nonexistent token"
        );
        originalOwner[tokenId] = to;
    }

    function _setOriginalOwner(uint256 tokenId, address to) internal {
        originalOwner[tokenId] = to;
    }

    function _safeMintInner(
        address to,
        uint256 collectionId,
        uint256 tokenId,
        address artist,
        string calldata uri
    ) internal {
        bool directMint = collections[collectionId].directMint || to == artist;
        if (directMint) {
            _safeMint(to, tokenId);
        } else {
            _safeMint(artist, tokenId);
            _safeTransfer(artist, to, tokenId, "");
        }
        _setTokenURI(tokenId, uri);
        _setOriginalOwner(tokenId, to);
    }

    function updateTokenURI(
        uint256 tokenId,
        string calldata uri
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setTokenURI(tokenId, uri);
    }

    /// @notice Transfer multiple tokens to multiple accounts
    /// @param to The accounts to transfer to
    /// @param tokenIds The respective ids of the tokens to transfer
    function safeBatchTransfer(
        address[] calldata to,
        uint256[] calldata tokenIds
    ) public {
        require(to.length == tokenIds.length, "array lengths must match");
        for (uint256 i = 0; i < to.length; i++) {
            safeTransferFrom(msg.sender, to[i], tokenIds[i]);
        }
    }

    /// @notice Get the id of a collection for a given token
    /// @param tokenId The id of the token
    /// @return The id of the collection
    function getCollectionIdFromTokenId(
        uint256 tokenId
    ) public view returns (uint256) {
        require(_exists(tokenId), "token does not exist");
        return _getCollectionId(tokenId);
    }

    /// @notice See {IERC165-supportsInterface}.
    function supportsInterface(
        bytes4 interfaceId
    ) public view override(ERC721, AccessControl, IERC165) returns (bool) {
        return
            super.supportsInterface(interfaceId) ||
            interfaceId == type(IERC2981).interfaceId;
    }

    /// @notice See {IERC2981-royaltyInfo}
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) external view returns (address receiver, uint256 royaltyAmount) {
        require(_exists(_tokenId), "token does not exist");
        uint256 collectionId = _getCollectionId(_tokenId);
        return (
            collections[collectionId].paymentReceiver,
            (collections[collectionId].royaltyPercentage * _salePrice) /
                10 ** 18
        );
    }

    /// @notice Transfers ownership of the contract to a new account (`newOwner`).
    /// @param newOwner New owner
    function transferOwnership(
        address newOwner
    ) public virtual override onlyRole(DEFAULT_ADMIN_ROLE) {
        require(newOwner != address(0), "new owner is the zero address");
        _transferOwnership(newOwner);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override {
        super._beforeTokenTransfer(from, to, tokenId);
        if (from == address(0)) {
            totalSupply++;
        }
        if (to == address(0)) {
            totalSupply--;
        }
    }

    // See: https://github.com/ProjectOpenSea/operator-filter-registry

    IOperatorFilterRegistry public operatorFilterRegistry;

    error OperatorNotAllowed(address operator);

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

    event OperatorFilterRegistrySet(address indexed newOperatorFilterRegistry);

    function setOperatorFilterRegistry(
        address _operatorFilterRegistry
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        operatorFilterRegistry = IOperatorFilterRegistry(
            _operatorFilterRegistry
        );
        emit OperatorFilterRegistrySet(_operatorFilterRegistry);
    }

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

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

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

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

    function _burn(
        uint256 _tokenId
    ) internal override(ERC721URIStorage, ERC721) {
        super._burn(_tokenId);
    }

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

File 3 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "../ERC721.sol";

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

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

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

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

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

        return super.tokenURI(tokenId);
    }

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

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

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

File 6 of 19 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 9 of 19 : CollectionManager.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.13;

abstract contract CollectionManager {
    // TYPES -------------------------------------------------------------------

    /// @notice Represents a collection of pieces
    struct Collection {
        /// @notice Artist address
        address artist;
        /// @notice Payment receiver address
        address paymentReceiver;
        /// @notice Price in ETH (wei)
        uint256 price;
        /// @notice Friend price in ETH (wei)
        uint256 friendPrice;
        /// @notice Supply (0 for unlimited, >= 1 for fixed)
        uint128 supply;
        /// @notice Time after which the collection is open for public sale
        uint256 startTime;
        /// @notice Max quantity purchasable per transaction (0 for unlimited)
        uint256 perMintQuantity;
        /// @notice Royalty percentage (0 to 1), 18 decimals
        uint256 royaltyPercentage;
        /// @notice Inactive collections cannot be minted/bought by anyone
        bool active;
        /// @notice If false, then tokens are first minted to the artist's
        /// wallet then transferred to the recipient
        bool directMint;
    }

    /// @notice Contains internal state regarding a collection
    struct CollectionState {
        /// @notice The local ID of the next token in the collection.
        uint256 nextId;
    }

    // STATE -------------------------------------------------------------------

    /// @notice All collections associated with this contract
    Collection[] public collections;

    /// @notice CollectionState for each Collection in collections
    CollectionState[] public collectionStates;

    // MODIFIERS ---------------------------------------------------------------

    /// @dev precondition that the collection must exist
    modifier collectionExists(uint256 collectionId) {
        require(collectionId < collections.length, "invalid collection");
        _;
    }

    /// @dev note: collectionId may be invalid in the case of a new collection
    modifier onlyCollectionAdmin(uint256 collectionId) virtual {
        // Note: These lines do not need to be covered by tests - solidity
        // coverage just fails to compile when a virtual modifier does not have
        // a body.
        require(false, "this is a virtual modifier");
        _;
    }

    // VIEWS -------------------------------------------------------------------

    /// @notice Get the global token id for a given collection and local id
    /// @param collectionId The id of the collection
    /// @param localId The local token id in the collection
    /// @return The global token id for the token in the collection
    function _getGlobalTokenId(
        uint256 collectionId,
        uint256 localId
    ) private pure returns (uint256) {
        return (collectionId << 128) + localId;
    }

    /// @notice Get the id of a collection for a given token id
    /// @param tokenId The id of the token
    /// @return The id of the collection
    function _getCollectionId(uint256 tokenId) internal pure returns (uint256) {
        return tokenId >> 128;
    }

    /// @notice Get the number of collections
    /// @return The number of collections
    function getCollectionCount() external view returns (uint256) {
        return collections.length;
    }

    /// @notice Get the min, next and max token ids for a given collection
    /// @param collectionId The id of the collection
    /// @return min The first token id for the collection
    /// @return next The next token id for the collection
    /// @return max The maximum token id for the collection
    function getCollectionTokenIdRange(
        uint256 collectionId
    )
        public
        view
        collectionExists(collectionId)
        returns (uint256 min, uint256 next, uint256 max)
    {
        if (collections[collectionId].supply == 0) {
            return (
                _getGlobalTokenId(collectionId, 0),
                _getGlobalTokenId(
                    collectionId,
                    collectionStates[collectionId].nextId
                ),
                _getGlobalTokenId(collectionId, type(uint128).max)
            );
        }

        return (
            _getGlobalTokenId(collectionId, 0),
            _getGlobalTokenId(
                collectionId,
                collectionStates[collectionId].nextId
            ),
            _getGlobalTokenId(
                collectionId,
                collections[collectionId].supply - 1
            )
        );
    }

    // EVENTS ------------------------------------------------------------------

    /// @notice Emitted when when a collection is created or updated
    /// @param who The account that updated the collection
    /// @param collectionId The id of the collection that was updated
    event CollectionUpdate(address who, uint256 collectionId);

    /// MUTATIONS (INTERNAL) ---------------------------------------------------

    /// @notice "Use" up the next token ids for a given collection
    /// @dev Precondition: The collection for `collectionId` must exist
    /// @param collectionId The id of the collection
    /// @param count The number of token ids to consume
    function _consumeTokenIds(
        uint256 collectionId,
        uint256 count
    ) internal returns (uint256) {
        require(
            collectionStates[collectionId].nextId + count <=
                (
                    (collections[collectionId].supply > 0)
                        ? (collections[collectionId].supply)
                        : type(uint128).max
                ),
            "not enough supply"
        );
        uint256 firstTokenId = _getGlobalTokenId(
            collectionId,
            collectionStates[collectionId].nextId
        );
        collectionStates[collectionId].nextId += count;
        return firstTokenId;
    }

    /// MUTATIONS (PUBLIC) -----------------------------------------------------

    /// @notice Create a new collection
    /// @param collection The collection data
    function createCollection(
        Collection calldata collection
    ) public onlyCollectionAdmin(collections.length) {
        emit CollectionUpdate(msg.sender, collections.length);
        collections.push(collection);
        collectionStates.push(CollectionState(0));
    }

    /// @notice Update an existing collection
    /// @param collectionId The id of the collection to update
    /// @param collection The new collection data
    function updateCollection(
        uint256 collectionId,
        Collection calldata collection
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId] = collection;
    }

    /// @notice Update the paymentReceiver for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param paymentReceiver The new value for paymentReceiver
    function updateCollectionPaymentReceiver(
        uint256 collectionId,
        address paymentReceiver
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].paymentReceiver = paymentReceiver;
    }

    /// @notice Update the artist for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param artist The new value for artist
    function updateCollectionArtist(
        uint256 collectionId,
        address artist
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].artist = artist;
    }

    /// @notice Update the price for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param price The new value for price
    function updateCollectionPrice(
        uint256 collectionId,
        uint256 price
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].price = price;
    }

    /// @notice Update the friend price for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param price The new value for friend price
    function updateCollectionFriendPrice(
        uint256 collectionId,
        uint256 price
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].friendPrice = price;
    }

    /// @notice Update the supply for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param supply The new value for supply
    function updateCollectionSupply(
        uint256 collectionId,
        uint128 supply
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].supply = supply;
    }

    /// @notice Update the startTime for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param startTime The new value for startTime
    function updateCollectionStartTime(
        uint256 collectionId,
        uint256 startTime
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].startTime = startTime;
    }

    /// @notice Update the perMintQuantity for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param perMintQuantity The new value for perMintQuantity
    function updateCollectionPerMintQuantity(
        uint256 collectionId,
        uint256 perMintQuantity
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].perMintQuantity = perMintQuantity;
    }

    /// @notice Update the royaltyPercentage for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param royaltyPercentage The new value for royaltyPercentage
    function updateCollectionRoyaltyPercentage(
        uint256 collectionId,
        uint256 royaltyPercentage
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].royaltyPercentage = royaltyPercentage;
    }

    /// @notice Update the active value for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param active The new value for active
    function updateCollectionActive(
        uint256 collectionId,
        bool active
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].active = active;
    }

    /// @notice Update the directMint value for an existing collection
    /// @param collectionId The id of the collection to update
    /// @param directMint The new value for directMint
    function updateCollectionDirectMint(
        uint256 collectionId,
        bool directMint
    ) public collectionExists(collectionId) onlyCollectionAdmin(collectionId) {
        emit CollectionUpdate(msg.sender, collectionId);
        collections[collectionId].directMint = directMint;
    }
}

File 10 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.13;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

///
/// @dev Interface for the NFT Royalty Standard
///
interface IERC2981 is IERC165 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
    /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
    /// _registerInterface(_INTERFACE_ID_ERC2981);

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) external view returns (
        address receiver,
        uint256 royaltyAmount
    );
}

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

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    function register(address registrant) external;

    function registerAndSubscribe(address registrant, address subscription) external;

    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    function updateOperator(
        address registrant,
        address operator,
        bool filtered
    ) external;

    function updateOperators(
        address registrant,
        address[] calldata operators,
        bool filtered
    ) external;

    function updateCodeHash(
        address registrant,
        bytes32 codehash,
        bool filtered
    ) external;

    function updateCodeHashes(
        address registrant,
        bytes32[] calldata codeHashes,
        bool filtered
    ) external;

    function subscribe(address registrant, address registrantToSubscribe) external;

    function unsubscribe(address registrant, bool copyExistingEntries) external;

    function subscriptionOf(address addr) external returns (address registrant);

    function subscribers(address registrant) external returns (address[] memory);

    function subscriberAt(address registrant, uint256 index) external returns (address);

    function copyEntriesOf(address registrant, address registrantToCopy) external;

    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    function isCodeHashOfFiltered(address registrant, address operatorWithCode)
        external
        returns (bool);

    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    function filteredOperators(address addr) external returns (address[] memory);

    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    function isRegistered(address addr) external returns (bool);

    function codeHashOf(address addr) external returns (bytes32);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 14 of 19 : 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 15 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 17 of 19 : 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 18 of 19 : 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 19 of 19 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":"address","name":"who","type":"address"},{"indexed":false,"internalType":"uint256","name":"collectionId","type":"uint256"}],"name":"CollectionUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOperatorFilterRegistry","type":"address"}],"name":"OperatorFilterRegistrySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"artistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"artistMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"string[]","name":"uri","type":"string[]"}],"name":"artistMultiMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionStates","outputs":[{"internalType":"uint256","name":"nextId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collections","outputs":[{"internalType":"address","name":"artist","type":"address"},{"internalType":"address","name":"paymentReceiver","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"friendPrice","type":"uint256"},{"internalType":"uint128","name":"supply","type":"uint128"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"perMintQuantity","type":"uint256"},{"internalType":"uint256","name":"royaltyPercentage","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"directMint","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"artist","type":"address"},{"internalType":"address","name":"paymentReceiver","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"friendPrice","type":"uint256"},{"internalType":"uint128","name":"supply","type":"uint128"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"perMintQuantity","type":"uint256"},{"internalType":"uint256","name":"royaltyPercentage","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"directMint","type":"bool"}],"internalType":"struct CollectionManager.Collection","name":"collection","type":"tuple"}],"name":"createCollection","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":[],"name":"getCollectionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCollectionIdFromTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"}],"name":"getCollectionTokenIdRange","outputs":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"next","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"originalOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"safeBatchTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"originalTokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"safeFriendMintTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"safeMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"safeMintTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operatorFilterRegistry","type":"address"}],"name":"setOperatorFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"setOriginalOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subscriptionOrRegistrantToCopy","type":"address"},{"internalType":"bool","name":"subscribe","type":"bool"}],"name":"subscribeToFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"components":[{"internalType":"address","name":"artist","type":"address"},{"internalType":"address","name":"paymentReceiver","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"friendPrice","type":"uint256"},{"internalType":"uint128","name":"supply","type":"uint128"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"perMintQuantity","type":"uint256"},{"internalType":"uint256","name":"royaltyPercentage","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"directMint","type":"bool"}],"internalType":"struct CollectionManager.Collection","name":"collection","type":"tuple"}],"name":"updateCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"name":"updateCollectionActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"address","name":"artist","type":"address"}],"name":"updateCollectionArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"bool","name":"directMint","type":"bool"}],"name":"updateCollectionDirectMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"updateCollectionFriendPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"address","name":"paymentReceiver","type":"address"}],"name":"updateCollectionPaymentReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"perMintQuantity","type":"uint256"}],"name":"updateCollectionPerMintQuantity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"updateCollectionPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"royaltyPercentage","type":"uint256"}],"name":"updateCollectionRoyaltyPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"updateCollectionStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint128","name":"supply","type":"uint128"}],"name":"updateCollectionSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"updateTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052601060809081526f5368696e7365692047616c766572736560801b60a052600e90620000319082620003a0565b5060408051808201909152601081526f5368696e7365692047616c766572736560801b6020820152600f90620000689082620003a0565b503480156200007657600080fd5b50600e8054620000869062000311565b80601f0160208091040260200160405190810160405280929190818152602001828054620000b49062000311565b8015620001055780601f10620000d95761010080835404028352916020019162000105565b820191906000526020600020905b815481529060010190602001808311620000e757829003601f168201915b5050505050600f8054620001199062000311565b80601f0160208091040260200160405190810160405280929190818152602001828054620001479062000311565b8015620001985780601f106200016c5761010080835404028352916020019162000198565b820191906000526020600020905b8154815290600101906020018083116200017a57829003601f168201915b505050505081818160009081620001b09190620003a0565b506001620001bf8282620003a0565b505050620001dc620001d6620001f160201b60201c565b620001f5565b620001e960003362000247565b50506200046c565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000253828262000257565b5050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16620002535760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002b73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200032657607f821691505b6020821081036200034757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039b57600081815260208120601f850160051c81016020861015620003765750805b601f850160051c820191505b81811015620003975782815560010162000382565b5050505b505050565b81516001600160401b03811115620003bc57620003bc620002fb565b620003d481620003cd845462000311565b846200034d565b602080601f8311600181146200040c5760008415620003f35750858301515b600019600386901b1c1916600185901b17855562000397565b600085815260208120601f198616915b828110156200043d578886015182559484019460019091019084016200041c565b50858210156200045c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b614e5f806200047c6000396000f3fe6080604052600436106103505760003560e01c806379993988116101c6578063b1c8414c116100f7578063c87b56dd11610095578063e985e9c51161006f578063e985e9c5146109e4578063f2fde38b14610a2d578063f9c4289b14610a4d578063fdbda0ec14610a6d57600080fd5b8063c87b56dd14610969578063d410bc8b14610989578063d547741f146109c457600080fd5b8063bb96e082116100d1578063bb96e08214610903578063c085a5e214610916578063c0a1549e14610936578063c7c9c15f1461094957600080fd5b8063b1c8414c146108a3578063b28f5485146108c3578063b88d4fde146108e357600080fd5b806393f7afc411610164578063a1646ee41161013e578063a1646ee41461082e578063a217fddf1461084e578063a22cb46514610863578063b0ccc31e1461088357600080fd5b806393f7afc4146107d957806395d89b41146107f95780639f110e021461080e57600080fd5b806383cbd14f116101a057806383cbd14f146107685780638517456f146107885780638da5cb5b1461079b57806391d14854146107b957600080fd5b806379993988146107085780637c5508b3146107285780637fcb15e81461074857600080fd5b80632f2ff15d116102a05780634cb1fa3b1161023e5780636352211e116102185780636352211e1461069357806368fa7e64146106b357806370a08231146106d3578063715018a6146106f357600080fd5b80634cb1fa3b14610633578063550091fb146106535780635e39de6a1461067357600080fd5b806342842e0e1161027a57806342842e0e146105b357806342966c68146105d357806342b9ed84146105f35780634996527c1461061357600080fd5b80632f2ff15d1461053d57806336568abe1461055d57806340bb154d1461057d57600080fd5b806318e97fd11161030d57806323b872dd116102e757806323b872dd1461049f578063248a9ca3146104bf5780632a55205a146104ef5780632abca09e1461051d57600080fd5b806318e97fd11461044a5780631c10106f1461046a5780631d993a171461047f57600080fd5b806301ffc9a71461035557806306fdde031461038a578063081812fc146103ac578063095ea7b3146103e457806314dc43fc1461040657806318160ddd14610426575b600080fd5b34801561036157600080fd5b506103756103703660046141c3565b610aee565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b5061039f610b1a565b6040516103819190614230565b3480156103b857600080fd5b506103cc6103c7366004614243565b610bac565b6040516001600160a01b039091168152602001610381565b3480156103f057600080fd5b506104046103ff366004614271565b610c39565b005b34801561041257600080fd5b506104046104213660046142e2565b610d4e565b34801561043257600080fd5b5061043c600b5481565b604051908152602001610381565b34801561045657600080fd5b50610404610465366004614390565b610e0a565b34801561047657600080fd5b5060085461043c565b34801561048b57600080fd5b5061040461049a3660046143f5565b610e5c565b3480156104ab57600080fd5b506104046104ba366004614423565b610f46565b3480156104cb57600080fd5b5061043c6104da366004614243565b60009081526007602052604090206001015490565b3480156104fb57600080fd5b5061050f61050a366004614464565b611091565b604051610381929190614486565b34801561052957600080fd5b50610404610538366004614464565b611176565b34801561054957600080fd5b5061040461055836600461449f565b611259565b34801561056957600080fd5b5061040461057836600461449f565b61127f565b34801561058957600080fd5b506103cc610598366004614243565b600c602052600090815260409020546001600160a01b031681565b3480156105bf57600080fd5b506104046105ce366004614423565b6112fd565b3480156105df57600080fd5b506104046105ee366004614243565b611443565b3480156105ff57600080fd5b5061040461060e366004614464565b6114bf565b34801561061f57600080fd5b5061040461062e3660046144cf565b6115a2565b34801561063f57600080fd5b5061040461064e3660046144ec565b6115f9565b34801561065f57600080fd5b5061043c61066e366004614243565b611719565b34801561067f57600080fd5b5061043c61068e366004614243565b61173a565b34801561069f57600080fd5b506103cc6106ae366004614243565b611792565b3480156106bf57600080fd5b506104046106ce366004614517565b611809565b3480156106df57600080fd5b5061043c6106ee3660046144cf565b6118f9565b3480156106ff57600080fd5b50610404611980565b34801561071457600080fd5b5061040461072336600461453c565b6119e6565b34801561073457600080fd5b5061040461074336600461456a565b611ae4565b34801561075457600080fd5b50610404610763366004614464565b611bc9565b34801561077457600080fd5b50610404610783366004614390565b611cac565b6104046107963660046145e4565b611cb8565b3480156107a757600080fd5b50600a546001600160a01b03166103cc565b3480156107c557600080fd5b506103756107d436600461449f565b611f6f565b3480156107e557600080fd5b506104046107f4366004614464565b611f9a565b34801561080557600080fd5b5061039f61207d565b34801561081a57600080fd5b506104046108293660046145e4565b61208c565b34801561083a57600080fd5b5061040461084936600461449f565b612125565b34801561085a57600080fd5b5061043c600081565b34801561086f57600080fd5b5061040461087e36600461453c565b612185565b34801561088f57600080fd5b50600d546103cc906001600160a01b031681565b3480156108af57600080fd5b506104046108be36600461449f565b612190565b3480156108cf57600080fd5b506104046108de366004614649565b61228c565b3480156108ef57600080fd5b506104046108fe366004614684565b61238f565b610404610911366004614390565b6124dc565b34801561092257600080fd5b50610404610931366004614517565b6124e8565b610404610944366004614764565b6125de565b34801561095557600080fd5b50610404610964366004614464565b6129fb565b34801561097557600080fd5b5061039f610984366004614243565b612ade565b34801561099557600080fd5b506109a96109a4366004614243565b612ae9565b60408051938452602084019290925290820152606001610381565b3480156109d057600080fd5b506104046109df36600461449f565b612c18565b3480156109f057600080fd5b506103756109ff3660046147bd565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a3957600080fd5b50610404610a483660046144cf565b612c3e565b348015610a5957600080fd5b50610404610a6836600461449f565b612ca9565b348015610a7957600080fd5b50610a8d610a88366004614243565b612dac565b604080516001600160a01b039b8c1681529a90991660208b01529789019690965260608801949094526001600160801b03909216608087015260a086015260c085015260e08401521515610100830152151561012082015261014001610381565b6000610af982612e2a565b80610b1457506001600160e01b0319821663152a902d60e11b145b92915050565b606060008054610b29906147eb565b80601f0160208091040260200160405190810160405280929190818152602001828054610b55906147eb565b8015610ba25780601f10610b7757610100808354040283529160200191610ba2565b820191906000526020600020905b815481529060010190602001808311610b8557829003601f168201915b5050505050905090565b6000610bb782612e4f565b610c1d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c4482611792565b9050806001600160a01b0316836001600160a01b031603610cb15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c14565b336001600160a01b0382161480610ccd5750610ccd81336109ff565b610d3f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c14565b610d498383612e6c565b505050565b828114610d9d5760405162461bcd60e51b815260206004820152601860248201527f6172726179206c656e67746873206d757374206d6174636800000000000000006044820152606401610c14565b60005b83811015610e0357610df133868684818110610dbe57610dbe61481f565b9050602002016020810190610dd391906144cf565b858585818110610de557610de561481f565b905060200201356112fd565b80610dfb8161484b565b915050610da0565b5050505050565b6000610e168133612eda565b610e568484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f3e92505050565b50505050565b60085482908110610e7f5760405162461bcd60e51b8152600401610c1490614864565b82610e8b600033611f6f565b80610ecd575060085481108015610ecd575060088181548110610eb057610eb061481f565b60009182526020909120600990910201546001600160a01b031633145b610ee95760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051610f08929190614486565b60405180910390a18260088581548110610f2457610f2461481f565b90600052602060002090600902018181610f3e91906148ff565b505050505050565b600d5483906001600160a01b03163b1561108657336001600160a01b03821603610f7a57610f75848484612f7b565b610e56565b600d54604051633185c44d60e21b81526001600160a01b039091169063c617113490610fac90309033906004016149dd565b602060405180830381865afa158015610fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fed91906149f7565b80156110675750600d54604051633185c44d60e21b81526001600160a01b039091169063c61711349061102690309085906004016149dd565b602060405180830381865afa158015611043573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106791906149f7565b61108657604051633b79c77360e21b8152336004820152602401610c14565b610e56848484612f7b565b60008061109d84612e4f565b6110e05760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610c14565b60006110ec8560801c90565b9050600881815481106111015761110161481f565b906000526020600020906009020160010160009054906101000a90046001600160a01b0316670de0b6b3a764000085600884815481106111435761114361481f565b90600052602060002090600902016007015461115f9190614a14565b6111699190614a41565b92509250505b9250929050565b600854829081106111995760405162461bcd60e51b8152600401610c1490614864565b826111a5600033611f6f565b806111e75750600854811080156111e75750600881815481106111ca576111ca61481f565b60009182526020909120600990910201546001600160a01b031633145b6112035760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051611222929190614486565b60405180910390a1826008858154811061123e5761123e61481f565b90600052602060002090600902016006018190555050505050565b6000828152600760205260409020600101546112758133612eda565b610d498383612fab565b6001600160a01b03811633146112ef5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c14565b6112f98282613031565b5050565b600d5483906001600160a01b03163b1561143857336001600160a01b0382160361132c57610f75848484613098565b600d54604051633185c44d60e21b81526001600160a01b039091169063c61711349061135e90309033906004016149dd565b602060405180830381865afa15801561137b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139f91906149f7565b80156114195750600d54604051633185c44d60e21b81526001600160a01b039091169063c6171134906113d890309085906004016149dd565b602060405180830381865afa1580156113f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141991906149f7565b61143857604051633b79c77360e21b8152336004820152602401610c14565b610e56848484613098565b61144e335b826130b3565b6114b35760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610c14565b6114bc8161319d565b50565b600854829081106114e25760405162461bcd60e51b8152600401610c1490614864565b826114ee600033611f6f565b806115305750600854811080156115305750600881815481106115135761151361481f565b60009182526020909120600990910201546001600160a01b031633145b61154c5760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a833981519152338560405161156b929190614486565b60405180910390a182600885815481106115875761158761481f565b90600052602060002090600902016003018190555050505050565b60006115ae8133612eda565b600d80546001600160a01b0319166001600160a01b0384169081179091556040517fe9919957d871eafd2de063f58e6c3015bdee186c8a161b85d6173122db2210f890600090a25050565b600854611607600033611f6f565b8061164957506008548110801561164957506008818154811061162c5761162c61481f565b60009182526020909120600990910201546001600160a01b031633145b6116655760405162461bcd60e51b8152600401610c1490614890565b600854604051600080516020614e0a8339815191529161168791339190614486565b60405180910390a16008805460018101825560009190915282906009027ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3016116d082826148ff565b50506040805160208101909152600080825260098054600181018255915290517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af909101555050565b6009818154811061172957600080fd5b600091825260209091200154905081565b600061174582612e4f565b6117885760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610c14565b610b148260801c90565b6000818152600260205260408120546001600160a01b031680610b145760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c14565b6008548290811061182c5760405162461bcd60e51b8152600401610c1490614864565b82611838600033611f6f565b8061187a57506008548110801561187a57506008818154811061185d5761185d61481f565b60009182526020909120600990910201546001600160a01b031633145b6118965760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a83398151915233856040516118b5929190614486565b60405180910390a182600885815481106118d1576118d161481f565b60009182526020909120600990910201600801805460ff191691151591909117905550505050565b60006001600160a01b0382166119645760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c14565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119da5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c14565b6119e460006131a6565b565b60006119f28133612eda565b600d546001600160a01b03163b15610d49578115611a7357600d54604051633e9f1edf60e11b81526001600160a01b0390911690637d3e3dbe90611a3c90309087906004016149dd565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b50505050505050565b6001600160a01b03831615611ab457600d5460405163a0af290360e01b81526001600160a01b039091169063a0af290390611a3c90309087906004016149dd565b600d54604051632210724360e11b81523060048201526001600160a01b0390911690634420e48690602401611a3c565b8380611b255760405162461bcd60e51b815260206004820152601060248201526f7175616e74697479206973207a65726f60801b6044820152606401610c14565b83611b31600033611f6f565b80611b73575060085481108015611b73575060088181548110611b5657611b5661481f565b60009182526020909120600990910201546001600160a01b031633145b611b8f5760405162461bcd60e51b8152600401610c1490614890565b60085485908110611bb25760405162461bcd60e51b8152600401610c1490614864565b611bbf88888888886131f8565b5050505050505050565b60085482908110611bec5760405162461bcd60e51b8152600401610c1490614864565b82611bf8600033611f6f565b80611c3a575060085481108015611c3a575060088181548110611c1d57611c1d61481f565b60009182526020909120600990910201546001600160a01b031633145b611c565760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051611c75929190614486565b60405180910390a18260088581548110611c9157611c9161481f565b90600052602060002090600902016007018190555050505050565b610d493384848461208c565b60085483908110611cdb5760405162461bcd60e51b8152600401610c1490614864565b8360088181548110611cef57611cef61481f565b600091825260209091206008600990920201015460ff16611d4a5760405162461bcd60e51b8152602060048201526015602482015274636f6c6c656374696f6e206e6f742061637469766560581b6044820152606401610c14565b844260088281548110611d5f57611d5f61481f565b9060005260206000209060090201600501541115611db85760405162461bcd60e51b815260206004820152601660248201527518dbdb1b1958dd1a5bdb881b9bdd081cdd185c9d195960521b6044820152606401610c14565b853460088281548110611dcd57611dcd61481f565b90600052602060002090600902016002015414611e205760405162461bcd60e51b81526020600482015260116024820152701a5b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610c14565b8660006001600160a01b031660088281548110611e3f57611e3f61481f565b60009182526020909120600160099092020101546001600160a01b031603611e9f5760405162461bcd60e51b81526020600482015260136024820152723737903830bcb6b2b73a103932b1b2b4bb32b960691b6044820152606401610c14565b611eab898989896132f1565b600060088981548110611ec057611ec061481f565b600091825260208220600990910201600101546040516001600160a01b039091169134919081818185875af1925050503d8060008114611f1c576040519150601f19603f3d011682016040523d82523d6000602084013e611f21565b606091505b5050905080611f635760405162461bcd60e51b815260206004820152600e60248201526d1c185e5b595b9d0819985a5b195960921b6044820152606401610c14565b50505050505050505050565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60085482908110611fbd5760405162461bcd60e51b8152600401610c1490614864565b82611fc9600033611f6f565b8061200b57506008548110801561200b575060088181548110611fee57611fee61481f565b60009182526020909120600990910201546001600160a01b031633145b6120275760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612046929190614486565b60405180910390a182600885815481106120625761206261481f565b90600052602060002090600902016005018190555050505050565b606060018054610b29906147eb565b82612098600033611f6f565b806120da5750600854811080156120da5750600881815481106120bd576120bd61481f565b60009182526020909120600990910201546001600160a01b031633145b6120f65760405162461bcd60e51b8152600401610c1490614890565b600854849081106121195760405162461bcd60e51b8152600401610c1490614864565b610f3e868686866132f1565b60006121318133612eda565b61213a83612e4f565b6121565760405162461bcd60e51b8152600401610c1490614a55565b506000918252600c602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6112f933838361333f565b600854829081106121b35760405162461bcd60e51b8152600401610c1490614864565b826121bf600033611f6f565b806122015750600854811080156122015750600881815481106121e4576121e461481f565b60009182526020909120600990910201546001600160a01b031633145b61221d5760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a833981519152338560405161223c929190614486565b60405180910390a182600885815481106122585761225861481f565b6000918252602090912060099091020180546001600160a01b0319166001600160a01b039290921691909117905550505050565b600854829081106122af5760405162461bcd60e51b8152600401610c1490614864565b826122bb600033611f6f565b806122fd5750600854811080156122fd5750600881815481106122e0576122e061481f565b60009182526020909120600990910201546001600160a01b031633145b6123195760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612338929190614486565b60405180910390a182600885815481106123545761235461481f565b906000526020600020906009020160040160006101000a8154816001600160801b0302191690836001600160801b0316021790555050505050565b600d5484906001600160a01b03163b156124d057336001600160a01b038216036123c4576123bf8585858561340d565b610e03565b600d54604051633185c44d60e21b81526001600160a01b039091169063c6171134906123f690309033906004016149dd565b602060405180830381865afa158015612413573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243791906149f7565b80156124b15750600d54604051633185c44d60e21b81526001600160a01b039091169063c61711349061247090309085906004016149dd565b602060405180830381865afa15801561248d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b191906149f7565b6124d057604051633b79c77360e21b8152336004820152602401610c14565b610e038585858561340d565b610d4933848484611cb8565b6008548290811061250b5760405162461bcd60e51b8152600401610c1490614864565b82612517600033611f6f565b8061255957506008548110801561255957506008818154811061253c5761253c61481f565b60009182526020909120600990910201546001600160a01b031633145b6125755760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612594929190614486565b60405180910390a182600885815481106125b0576125b061481f565b906000526020600020906009020160080160016101000a81548160ff02191690831515021790555050505050565b600854849081106126015760405162461bcd60e51b8152600401610c1490614864565b84600881815481106126155761261561481f565b600091825260209091206008600990920201015460ff166126705760405162461bcd60e51b8152602060048201526015602482015274636f6c6c656374696f6e206e6f742061637469766560581b6044820152606401610c14565b8542600882815481106126855761268561481f565b90600052602060002090600902016005015411156126de5760405162461bcd60e51b815260206004820152601660248201527518dbdb1b1958dd1a5bdb881b9bdd081cdd185c9d195960521b6044820152606401610c14565b8634600882815481106126f3576126f361481f565b906000526020600020906009020160030154146127465760405162461bcd60e51b81526020600482015260116024820152701a5b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610c14565b8760006001600160a01b0316600882815481106127655761276561481f565b60009182526020909120600160099092020101546001600160a01b0316036127c55760405162461bcd60e51b81526020600482015260136024820152723737903830bcb6b2b73a103932b1b2b4bb32b960691b6044820152606401610c14565b6127ce88612e4f565b61280e5760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610c14565b6128188860801c90565b89146128665760405162461bcd60e51b815260206004820181905260248201527f746f6b656e20616e6420636f6c6c656374696f6e206964206d69736d617463686044820152606401610c14565b6000888152600c60205260409020546001600160a01b031633146128dc5760405162461bcd60e51b815260206004820152602760248201527f6d73672e73656e646572206e6f7420746865206f726967696e616c20746f6b65604482015266371037bbb732b960c91b6064820152608401610c14565b60006128e98a600161343f565b90506128f58b82613584565b6129358189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f3e92505050565b600060088b8154811061294a5761294a61481f565b600091825260208220600990910201600101546040516001600160a01b039091169134919081818185875af1925050503d80600081146129a6576040519150601f19603f3d011682016040523d82523d6000602084013e6129ab565b606091505b50509050806129ed5760405162461bcd60e51b815260206004820152600e60248201526d1c185e5b595b9d0819985a5b195960921b6044820152606401610c14565b505050505050505050505050565b60085482908110612a1e5760405162461bcd60e51b8152600401610c1490614864565b82612a2a600033611f6f565b80612a6c575060085481108015612a6c575060088181548110612a4f57612a4f61481f565b60009182526020909120600990910201546001600160a01b031633145b612a885760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612aa7929190614486565b60405180910390a18260088581548110612ac357612ac361481f565b90600052602060002090600902016002018190555050505050565b6060610b148261359e565b6000806000836008805490508110612b135760405162461bcd60e51b8152600401610c1490614864565b60088581548110612b2657612b2661481f565b600091825260208220600460099092020101546001600160801b03169003612b9957612b5385600061370c565b612b7d8660098881548110612b6a57612b6a61481f565b906000526020600020016000015461370c565b612b8e876001600160801b0361370c565b935093509350612c10565b612ba485600061370c565b612bbb8660098881548110612b6a57612b6a61481f565b612c0987600160088a81548110612bd457612bd461481f565b6000918252602090912060046009909202010154612bfb91906001600160801b0316614aa3565b6001600160801b031661370c565b9350935093505b509193909250565b600082815260076020526040902060010154612c348133612eda565b610d498383613031565b6000612c4a8133612eda565b6001600160a01b038216612ca05760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610c14565b6112f9826131a6565b60085482908110612ccc5760405162461bcd60e51b8152600401610c1490614864565b82612cd8600033611f6f565b80612d1a575060085481108015612d1a575060088181548110612cfd57612cfd61481f565b60009182526020909120600990910201546001600160a01b031633145b612d365760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612d55929190614486565b60405180910390a18260088581548110612d7157612d7161481f565b906000526020600020906009020160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050505050565b60088181548110612dbc57600080fd5b60009182526020909120600990910201805460018201546002830154600384015460048501546005860154600687015460078801546008909801546001600160a01b0397881699509690951696939592946001600160801b0390921693909260ff808216916101009004168a565b60006001600160e01b03198216637965db0b60e01b1480610b145750610b1482613723565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ea182611792565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612ee48282611f6f565b6112f957612efc816001600160a01b03166014613773565b612f07836020613773565b604051602001612f18929190614aca565b60408051601f198184030181529082905262461bcd60e51b8252610c1491600401614230565b612f4782612e4f565b612f635760405162461bcd60e51b8152600401610c1490614a55565b6000828152600660205260409020610d498282614b85565b612f8433611448565b612fa05760405162461bcd60e51b8152600401610c1490614c45565b610d4983838361390f565b612fb58282611f6f565b6112f95760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612fed3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61303b8282611f6f565b156112f95760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610d498383836040518060200160405280600081525061238f565b60006130be82612e4f565b61311f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c14565b600061312a83611792565b9050806001600160a01b0316846001600160a01b031614806131655750836001600160a01b031661315a84610bac565b6001600160a01b0316145b8061319557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b6114bc81613ab6565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8381146132395760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610c14565b6000613245848661343f565b905060006008858154811061325c5761325c61481f565b600091825260208220600990910201546001600160a01b031691505b86811015611bbf576132df8888838181106132955761329561481f565b90506020020160208101906132aa91906144cf565b876132b58487614c96565b858989878181106132c8576132c861481f565b90506020028101906132da9190614ca9565b613af6565b806132e98161484b565b915050613278565b60006132fe84600161343f565b90506000600885815481106133155761331561481f565b60009182526020909120600990910201546001600160a01b03169050610f3e868684848888613af6565b816001600160a01b0316836001600160a01b0316036133a05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c14565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61341733836130b3565b6134335760405162461bcd60e51b8152600401610c1490614c45565b610e5684848484613bee565b600080600884815481106134555761345561481f565b60009182526020909120600460099092020101546001600160801b031611613484576001600160801b036134b5565b600883815481106134975761349761481f565b60009182526020909120600460099092020101546001600160801b03165b6001600160801b031682600985815481106134d2576134d261481f565b90600052602060002001600001546134ea9190614c96565b111561352c5760405162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820737570706c7960781b6044820152606401610c14565b60006135458460098681548110612b6a57612b6a61481f565b9050826009858154811061355b5761355b61481f565b9060005260206000200160000160008282546135779190614c96565b9091555090949350505050565b6112f9828260405180602001604052806000815250613c21565b60606135a982612e4f565b61360f5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610c14565b60008281526006602052604081208054613628906147eb565b80601f0160208091040260200160405190810160405280929190818152602001828054613654906147eb565b80156136a15780601f10613676576101008083540402835291602001916136a1565b820191906000526020600020905b81548152906001019060200180831161368457829003601f168201915b5050505050905060006136bf60408051602081019091526000815290565b905080516000036136d1575092915050565b8151156137035780826040516020016136eb929190614cf0565b60405160208183030381529060405292505050919050565b61319584613c54565b600061371c82608085901b614c96565b9392505050565b60006001600160e01b031982166380ac58cd60e01b148061375457506001600160e01b03198216635b5e139f60e01b145b80610b1457506301ffc9a760e01b6001600160e01b0319831614610b14565b60606000613782836002614a14565b61378d906002614c96565b67ffffffffffffffff8111156137a5576137a561466e565b6040519080825280601f01601f1916602001820160405280156137cf576020820181803683370190505b509050600360fc1b816000815181106137ea576137ea61481f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106138195761381961481f565b60200101906001600160f81b031916908160001a905350600061383d846002614a14565b613848906001614c96565b90505b60018111156138c0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061387c5761387c61481f565b1a60f81b8282815181106138925761389261481f565b60200101906001600160f81b031916908160001a90535060049490941c936138b981614d1f565b905061384b565b50831561371c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c14565b826001600160a01b031661392282611792565b6001600160a01b0316146139865760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610c14565b6001600160a01b0382166139e85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c14565b6139f3838383613d2b565b6139fe600082612e6c565b6001600160a01b0383166000908152600360205260408120805460019290613a27908490614d36565b90915550506001600160a01b0382166000908152600360205260408120805460019290613a55908490614c96565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613abf81613d77565b60008181526006602052604090208054613ad8906147eb565b1590506114bc5760008181526006602052604081206114bc9161415f565b600060088681548110613b0b57613b0b61481f565b906000526020600020906009020160080160019054906101000a900460ff1680613b465750836001600160a01b0316876001600160a01b0316145b90508015613b5d57613b588786613584565b613b82565b613b678486613584565b613b8284888760405180602001604052806000815250613bee565b613bc28584848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f3e92505050565b6000858152600c6020526040902080546001600160a01b0319166001600160a01b038916179055611a6a565b613bf984848461390f565b613c0584848484613e1e565b610e565760405162461bcd60e51b8152600401610c1490614d49565b613c2b8383613f1f565b613c386000848484613e1e565b610d495760405162461bcd60e51b8152600401610c1490614d49565b6060613c5f82612e4f565b613cc35760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c14565b6000613cda60408051602081019091526000815290565b90506000815111613cfa576040518060200160405280600081525061371c565b80613d048461405e565b604051602001613d15929190614cf0565b6040516020818303038152906040529392505050565b6001600160a01b038316613d4f57600b8054906000613d498361484b565b91905055505b6001600160a01b038216610d4957600b8054906000613d6d83614d1f565b9190505550505050565b6000613d8282611792565b9050613d9081600084613d2b565b613d9b600083612e6c565b6001600160a01b0381166000908152600360205260408120805460019290613dc4908490614d36565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15613f1457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613e62903390899088908890600401614d9b565b6020604051808303816000875af1925050508015613e9d575060408051601f3d908101601f19168201909252613e9a91810190614dd8565b60015b613efa573d808015613ecb576040519150601f19603f3d011682016040523d82523d6000602084013e613ed0565b606091505b508051600003613ef25760405162461bcd60e51b8152600401610c1490614d49565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613195565b506001949350505050565b6001600160a01b038216613f755760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c14565b613f7e81612e4f565b15613fcb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c14565b613fd760008383613d2b565b6001600160a01b0382166000908152600360205260408120805460019290614000908490614c96565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060816000036140855750506040805180820190915260018152600360fc1b602082015290565b8160005b81156140af57806140998161484b565b91506140a89050600a83614a41565b9150614089565b60008167ffffffffffffffff8111156140ca576140ca61466e565b6040519080825280601f01601f1916602001820160405280156140f4576020820181803683370190505b5090505b841561319557614109600183614d36565b9150614116600a86614df5565b614121906030614c96565b60f81b8183815181106141365761413661481f565b60200101906001600160f81b031916908160001a905350614158600a86614a41565b94506140f8565b50805461416b906147eb565b6000825580601f1061417b575050565b601f0160209004906000526020600020908101906114bc91905b808211156141a95760008155600101614195565b5090565b6001600160e01b0319811681146114bc57600080fd5b6000602082840312156141d557600080fd5b813561371c816141ad565b60005b838110156141fb5781810151838201526020016141e3565b50506000910152565b6000815180845261421c8160208601602086016141e0565b601f01601f19169290920160200192915050565b60208152600061371c6020830184614204565b60006020828403121561425557600080fd5b5035919050565b6001600160a01b03811681146114bc57600080fd5b6000806040838503121561428457600080fd5b823561428f8161425c565b946020939093013593505050565b60008083601f8401126142af57600080fd5b50813567ffffffffffffffff8111156142c757600080fd5b6020830191508360208260051b850101111561116f57600080fd5b600080600080604085870312156142f857600080fd5b843567ffffffffffffffff8082111561431057600080fd5b61431c8883890161429d565b9096509450602087013591508082111561433557600080fd5b506143428782880161429d565b95989497509550505050565b60008083601f84011261436057600080fd5b50813567ffffffffffffffff81111561437857600080fd5b60208301915083602082850101111561116f57600080fd5b6000806000604084860312156143a557600080fd5b83359250602084013567ffffffffffffffff8111156143c357600080fd5b6143cf8682870161434e565b9497909650939450505050565b600061014082840312156143ef57600080fd5b50919050565b600080610160838503121561440957600080fd5b8235915061441a84602085016143dc565b90509250929050565b60008060006060848603121561443857600080fd5b83356144438161425c565b925060208401356144538161425c565b929592945050506040919091013590565b6000806040838503121561447757600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b600080604083850312156144b257600080fd5b8235915060208301356144c48161425c565b809150509250929050565b6000602082840312156144e157600080fd5b813561371c8161425c565b600061014082840312156144ff57600080fd5b61371c83836143dc565b80151581146114bc57600080fd5b6000806040838503121561452a57600080fd5b8235915060208301356144c481614509565b6000806040838503121561454f57600080fd5b823561455a8161425c565b915060208301356144c481614509565b60008060008060006060868803121561458257600080fd5b853567ffffffffffffffff8082111561459a57600080fd5b6145a689838a0161429d565b90975095506020880135945060408801359150808211156145c657600080fd5b506145d38882890161429d565b969995985093965092949392505050565b600080600080606085870312156145fa57600080fd5b84356146058161425c565b935060208501359250604085013567ffffffffffffffff81111561462857600080fd5b6143428782880161434e565b6001600160801b03811681146114bc57600080fd5b6000806040838503121561465c57600080fd5b8235915060208301356144c481614634565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561469a57600080fd5b84356146a58161425c565b935060208501356146b58161425c565b925060408501359150606085013567ffffffffffffffff808211156146d957600080fd5b818701915087601f8301126146ed57600080fd5b8135818111156146ff576146ff61466e565b604051601f8201601f19908116603f011681019083821181831017156147275761472761466e565b816040528281528a602084870101111561474057600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060008060006080868803121561477c57600080fd5b85356147878161425c565b94506020860135935060408601359250606086013567ffffffffffffffff8111156147b157600080fd5b6145d38882890161434e565b600080604083850312156147d057600080fd5b82356147db8161425c565b915060208301356144c48161425c565b600181811c908216806147ff57607f821691505b6020821081036143ef57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161485d5761485d614835565b5060010190565b60208082526012908201527134b73b30b634b21031b7b63632b1ba34b7b760711b604082015260600190565b6020808252600e908201526d1b9bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60008135610b148161425c565b80546001600160a01b0319166001600160a01b0392909216919091179055565b60008135610b1481614634565b60008135610b1481614509565b61491161490b836148b8565b826148c5565b614929614920602084016148b8565b600183016148c5565b604082013560028201556060820135600382015561496d61494c608084016148e5565b600483016001600160801b0382166001600160801b03198254161781555050565b60a0820135600582015560c0820135600682015560e08201356007820155600881016149b361499f61010085016148f2565b825490151560ff1660ff1991909116178255565b610d496149c361012085016148f2565b82805461ff00191691151560081b61ff0016919091179055565b6001600160a01b0392831681529116602082015260400190565b600060208284031215614a0957600080fd5b815161371c81614509565b8082028115828204841417610b1457610b14614835565b634e487b7160e01b600052601260045260246000fd5b600082614a5057614a50614a2b565b500490565b6020808252602e908201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60408201526d32bc34b9ba32b73a103a37b5b2b760911b606082015260800190565b6001600160801b03828116828216039080821115614ac357614ac3614835565b5092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b028160178501602088016141e0565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614b338160288401602088016141e0565b01602801949350505050565b601f821115610d4957600081815260208120601f850160051c81016020861015614b665750805b601f850160051c820191505b81811015610f3e57828155600101614b72565b815167ffffffffffffffff811115614b9f57614b9f61466e565b614bb381614bad84546147eb565b84614b3f565b602080601f831160018114614be85760008415614bd05750858301515b600019600386901b1c1916600185901b178555610f3e565b600085815260208120601f198616915b82811015614c1757888601518255948401946001909101908401614bf8565b5085821015614c355787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b80820180821115610b1457610b14614835565b6000808335601e19843603018112614cc057600080fd5b83018035915067ffffffffffffffff821115614cdb57600080fd5b60200191503681900382131561116f57600080fd5b60008351614d028184602088016141e0565b835190830190614d168183602088016141e0565b01949350505050565b600081614d2e57614d2e614835565b506000190190565b81810381811115610b1457610b14614835565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614dce90830184614204565b9695505050505050565b600060208284031215614dea57600080fd5b815161371c816141ad565b600082614e0457614e04614a2b565b50069056fe598e15fb67723e51493bab1cfbdeb4b4c4b139bd212e1a208ef588474a4bd3e4a2646970667358221220d55daba2dfc3abd6a145ca31eb8664e71b1e4aa915b38a4bb69404a42802323b64736f6c63430008110033

Deployed Bytecode

0x6080604052600436106103505760003560e01c806379993988116101c6578063b1c8414c116100f7578063c87b56dd11610095578063e985e9c51161006f578063e985e9c5146109e4578063f2fde38b14610a2d578063f9c4289b14610a4d578063fdbda0ec14610a6d57600080fd5b8063c87b56dd14610969578063d410bc8b14610989578063d547741f146109c457600080fd5b8063bb96e082116100d1578063bb96e08214610903578063c085a5e214610916578063c0a1549e14610936578063c7c9c15f1461094957600080fd5b8063b1c8414c146108a3578063b28f5485146108c3578063b88d4fde146108e357600080fd5b806393f7afc411610164578063a1646ee41161013e578063a1646ee41461082e578063a217fddf1461084e578063a22cb46514610863578063b0ccc31e1461088357600080fd5b806393f7afc4146107d957806395d89b41146107f95780639f110e021461080e57600080fd5b806383cbd14f116101a057806383cbd14f146107685780638517456f146107885780638da5cb5b1461079b57806391d14854146107b957600080fd5b806379993988146107085780637c5508b3146107285780637fcb15e81461074857600080fd5b80632f2ff15d116102a05780634cb1fa3b1161023e5780636352211e116102185780636352211e1461069357806368fa7e64146106b357806370a08231146106d3578063715018a6146106f357600080fd5b80634cb1fa3b14610633578063550091fb146106535780635e39de6a1461067357600080fd5b806342842e0e1161027a57806342842e0e146105b357806342966c68146105d357806342b9ed84146105f35780634996527c1461061357600080fd5b80632f2ff15d1461053d57806336568abe1461055d57806340bb154d1461057d57600080fd5b806318e97fd11161030d57806323b872dd116102e757806323b872dd1461049f578063248a9ca3146104bf5780632a55205a146104ef5780632abca09e1461051d57600080fd5b806318e97fd11461044a5780631c10106f1461046a5780631d993a171461047f57600080fd5b806301ffc9a71461035557806306fdde031461038a578063081812fc146103ac578063095ea7b3146103e457806314dc43fc1461040657806318160ddd14610426575b600080fd5b34801561036157600080fd5b506103756103703660046141c3565b610aee565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b5061039f610b1a565b6040516103819190614230565b3480156103b857600080fd5b506103cc6103c7366004614243565b610bac565b6040516001600160a01b039091168152602001610381565b3480156103f057600080fd5b506104046103ff366004614271565b610c39565b005b34801561041257600080fd5b506104046104213660046142e2565b610d4e565b34801561043257600080fd5b5061043c600b5481565b604051908152602001610381565b34801561045657600080fd5b50610404610465366004614390565b610e0a565b34801561047657600080fd5b5060085461043c565b34801561048b57600080fd5b5061040461049a3660046143f5565b610e5c565b3480156104ab57600080fd5b506104046104ba366004614423565b610f46565b3480156104cb57600080fd5b5061043c6104da366004614243565b60009081526007602052604090206001015490565b3480156104fb57600080fd5b5061050f61050a366004614464565b611091565b604051610381929190614486565b34801561052957600080fd5b50610404610538366004614464565b611176565b34801561054957600080fd5b5061040461055836600461449f565b611259565b34801561056957600080fd5b5061040461057836600461449f565b61127f565b34801561058957600080fd5b506103cc610598366004614243565b600c602052600090815260409020546001600160a01b031681565b3480156105bf57600080fd5b506104046105ce366004614423565b6112fd565b3480156105df57600080fd5b506104046105ee366004614243565b611443565b3480156105ff57600080fd5b5061040461060e366004614464565b6114bf565b34801561061f57600080fd5b5061040461062e3660046144cf565b6115a2565b34801561063f57600080fd5b5061040461064e3660046144ec565b6115f9565b34801561065f57600080fd5b5061043c61066e366004614243565b611719565b34801561067f57600080fd5b5061043c61068e366004614243565b61173a565b34801561069f57600080fd5b506103cc6106ae366004614243565b611792565b3480156106bf57600080fd5b506104046106ce366004614517565b611809565b3480156106df57600080fd5b5061043c6106ee3660046144cf565b6118f9565b3480156106ff57600080fd5b50610404611980565b34801561071457600080fd5b5061040461072336600461453c565b6119e6565b34801561073457600080fd5b5061040461074336600461456a565b611ae4565b34801561075457600080fd5b50610404610763366004614464565b611bc9565b34801561077457600080fd5b50610404610783366004614390565b611cac565b6104046107963660046145e4565b611cb8565b3480156107a757600080fd5b50600a546001600160a01b03166103cc565b3480156107c557600080fd5b506103756107d436600461449f565b611f6f565b3480156107e557600080fd5b506104046107f4366004614464565b611f9a565b34801561080557600080fd5b5061039f61207d565b34801561081a57600080fd5b506104046108293660046145e4565b61208c565b34801561083a57600080fd5b5061040461084936600461449f565b612125565b34801561085a57600080fd5b5061043c600081565b34801561086f57600080fd5b5061040461087e36600461453c565b612185565b34801561088f57600080fd5b50600d546103cc906001600160a01b031681565b3480156108af57600080fd5b506104046108be36600461449f565b612190565b3480156108cf57600080fd5b506104046108de366004614649565b61228c565b3480156108ef57600080fd5b506104046108fe366004614684565b61238f565b610404610911366004614390565b6124dc565b34801561092257600080fd5b50610404610931366004614517565b6124e8565b610404610944366004614764565b6125de565b34801561095557600080fd5b50610404610964366004614464565b6129fb565b34801561097557600080fd5b5061039f610984366004614243565b612ade565b34801561099557600080fd5b506109a96109a4366004614243565b612ae9565b60408051938452602084019290925290820152606001610381565b3480156109d057600080fd5b506104046109df36600461449f565b612c18565b3480156109f057600080fd5b506103756109ff3660046147bd565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a3957600080fd5b50610404610a483660046144cf565b612c3e565b348015610a5957600080fd5b50610404610a6836600461449f565b612ca9565b348015610a7957600080fd5b50610a8d610a88366004614243565b612dac565b604080516001600160a01b039b8c1681529a90991660208b01529789019690965260608801949094526001600160801b03909216608087015260a086015260c085015260e08401521515610100830152151561012082015261014001610381565b6000610af982612e2a565b80610b1457506001600160e01b0319821663152a902d60e11b145b92915050565b606060008054610b29906147eb565b80601f0160208091040260200160405190810160405280929190818152602001828054610b55906147eb565b8015610ba25780601f10610b7757610100808354040283529160200191610ba2565b820191906000526020600020905b815481529060010190602001808311610b8557829003601f168201915b5050505050905090565b6000610bb782612e4f565b610c1d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c4482611792565b9050806001600160a01b0316836001600160a01b031603610cb15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c14565b336001600160a01b0382161480610ccd5750610ccd81336109ff565b610d3f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c14565b610d498383612e6c565b505050565b828114610d9d5760405162461bcd60e51b815260206004820152601860248201527f6172726179206c656e67746873206d757374206d6174636800000000000000006044820152606401610c14565b60005b83811015610e0357610df133868684818110610dbe57610dbe61481f565b9050602002016020810190610dd391906144cf565b858585818110610de557610de561481f565b905060200201356112fd565b80610dfb8161484b565b915050610da0565b5050505050565b6000610e168133612eda565b610e568484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f3e92505050565b50505050565b60085482908110610e7f5760405162461bcd60e51b8152600401610c1490614864565b82610e8b600033611f6f565b80610ecd575060085481108015610ecd575060088181548110610eb057610eb061481f565b60009182526020909120600990910201546001600160a01b031633145b610ee95760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051610f08929190614486565b60405180910390a18260088581548110610f2457610f2461481f565b90600052602060002090600902018181610f3e91906148ff565b505050505050565b600d5483906001600160a01b03163b1561108657336001600160a01b03821603610f7a57610f75848484612f7b565b610e56565b600d54604051633185c44d60e21b81526001600160a01b039091169063c617113490610fac90309033906004016149dd565b602060405180830381865afa158015610fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fed91906149f7565b80156110675750600d54604051633185c44d60e21b81526001600160a01b039091169063c61711349061102690309085906004016149dd565b602060405180830381865afa158015611043573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106791906149f7565b61108657604051633b79c77360e21b8152336004820152602401610c14565b610e56848484612f7b565b60008061109d84612e4f565b6110e05760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610c14565b60006110ec8560801c90565b9050600881815481106111015761110161481f565b906000526020600020906009020160010160009054906101000a90046001600160a01b0316670de0b6b3a764000085600884815481106111435761114361481f565b90600052602060002090600902016007015461115f9190614a14565b6111699190614a41565b92509250505b9250929050565b600854829081106111995760405162461bcd60e51b8152600401610c1490614864565b826111a5600033611f6f565b806111e75750600854811080156111e75750600881815481106111ca576111ca61481f565b60009182526020909120600990910201546001600160a01b031633145b6112035760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051611222929190614486565b60405180910390a1826008858154811061123e5761123e61481f565b90600052602060002090600902016006018190555050505050565b6000828152600760205260409020600101546112758133612eda565b610d498383612fab565b6001600160a01b03811633146112ef5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c14565b6112f98282613031565b5050565b600d5483906001600160a01b03163b1561143857336001600160a01b0382160361132c57610f75848484613098565b600d54604051633185c44d60e21b81526001600160a01b039091169063c61711349061135e90309033906004016149dd565b602060405180830381865afa15801561137b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139f91906149f7565b80156114195750600d54604051633185c44d60e21b81526001600160a01b039091169063c6171134906113d890309085906004016149dd565b602060405180830381865afa1580156113f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141991906149f7565b61143857604051633b79c77360e21b8152336004820152602401610c14565b610e56848484613098565b61144e335b826130b3565b6114b35760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610c14565b6114bc8161319d565b50565b600854829081106114e25760405162461bcd60e51b8152600401610c1490614864565b826114ee600033611f6f565b806115305750600854811080156115305750600881815481106115135761151361481f565b60009182526020909120600990910201546001600160a01b031633145b61154c5760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a833981519152338560405161156b929190614486565b60405180910390a182600885815481106115875761158761481f565b90600052602060002090600902016003018190555050505050565b60006115ae8133612eda565b600d80546001600160a01b0319166001600160a01b0384169081179091556040517fe9919957d871eafd2de063f58e6c3015bdee186c8a161b85d6173122db2210f890600090a25050565b600854611607600033611f6f565b8061164957506008548110801561164957506008818154811061162c5761162c61481f565b60009182526020909120600990910201546001600160a01b031633145b6116655760405162461bcd60e51b8152600401610c1490614890565b600854604051600080516020614e0a8339815191529161168791339190614486565b60405180910390a16008805460018101825560009190915282906009027ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3016116d082826148ff565b50506040805160208101909152600080825260098054600181018255915290517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af909101555050565b6009818154811061172957600080fd5b600091825260209091200154905081565b600061174582612e4f565b6117885760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610c14565b610b148260801c90565b6000818152600260205260408120546001600160a01b031680610b145760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c14565b6008548290811061182c5760405162461bcd60e51b8152600401610c1490614864565b82611838600033611f6f565b8061187a57506008548110801561187a57506008818154811061185d5761185d61481f565b60009182526020909120600990910201546001600160a01b031633145b6118965760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a83398151915233856040516118b5929190614486565b60405180910390a182600885815481106118d1576118d161481f565b60009182526020909120600990910201600801805460ff191691151591909117905550505050565b60006001600160a01b0382166119645760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c14565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119da5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c14565b6119e460006131a6565b565b60006119f28133612eda565b600d546001600160a01b03163b15610d49578115611a7357600d54604051633e9f1edf60e11b81526001600160a01b0390911690637d3e3dbe90611a3c90309087906004016149dd565b600060405180830381600087803b158015611a5657600080fd5b505af1158015611a6a573d6000803e3d6000fd5b50505050505050565b6001600160a01b03831615611ab457600d5460405163a0af290360e01b81526001600160a01b039091169063a0af290390611a3c90309087906004016149dd565b600d54604051632210724360e11b81523060048201526001600160a01b0390911690634420e48690602401611a3c565b8380611b255760405162461bcd60e51b815260206004820152601060248201526f7175616e74697479206973207a65726f60801b6044820152606401610c14565b83611b31600033611f6f565b80611b73575060085481108015611b73575060088181548110611b5657611b5661481f565b60009182526020909120600990910201546001600160a01b031633145b611b8f5760405162461bcd60e51b8152600401610c1490614890565b60085485908110611bb25760405162461bcd60e51b8152600401610c1490614864565b611bbf88888888886131f8565b5050505050505050565b60085482908110611bec5760405162461bcd60e51b8152600401610c1490614864565b82611bf8600033611f6f565b80611c3a575060085481108015611c3a575060088181548110611c1d57611c1d61481f565b60009182526020909120600990910201546001600160a01b031633145b611c565760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051611c75929190614486565b60405180910390a18260088581548110611c9157611c9161481f565b90600052602060002090600902016007018190555050505050565b610d493384848461208c565b60085483908110611cdb5760405162461bcd60e51b8152600401610c1490614864565b8360088181548110611cef57611cef61481f565b600091825260209091206008600990920201015460ff16611d4a5760405162461bcd60e51b8152602060048201526015602482015274636f6c6c656374696f6e206e6f742061637469766560581b6044820152606401610c14565b844260088281548110611d5f57611d5f61481f565b9060005260206000209060090201600501541115611db85760405162461bcd60e51b815260206004820152601660248201527518dbdb1b1958dd1a5bdb881b9bdd081cdd185c9d195960521b6044820152606401610c14565b853460088281548110611dcd57611dcd61481f565b90600052602060002090600902016002015414611e205760405162461bcd60e51b81526020600482015260116024820152701a5b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610c14565b8660006001600160a01b031660088281548110611e3f57611e3f61481f565b60009182526020909120600160099092020101546001600160a01b031603611e9f5760405162461bcd60e51b81526020600482015260136024820152723737903830bcb6b2b73a103932b1b2b4bb32b960691b6044820152606401610c14565b611eab898989896132f1565b600060088981548110611ec057611ec061481f565b600091825260208220600990910201600101546040516001600160a01b039091169134919081818185875af1925050503d8060008114611f1c576040519150601f19603f3d011682016040523d82523d6000602084013e611f21565b606091505b5050905080611f635760405162461bcd60e51b815260206004820152600e60248201526d1c185e5b595b9d0819985a5b195960921b6044820152606401610c14565b50505050505050505050565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60085482908110611fbd5760405162461bcd60e51b8152600401610c1490614864565b82611fc9600033611f6f565b8061200b57506008548110801561200b575060088181548110611fee57611fee61481f565b60009182526020909120600990910201546001600160a01b031633145b6120275760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612046929190614486565b60405180910390a182600885815481106120625761206261481f565b90600052602060002090600902016005018190555050505050565b606060018054610b29906147eb565b82612098600033611f6f565b806120da5750600854811080156120da5750600881815481106120bd576120bd61481f565b60009182526020909120600990910201546001600160a01b031633145b6120f65760405162461bcd60e51b8152600401610c1490614890565b600854849081106121195760405162461bcd60e51b8152600401610c1490614864565b610f3e868686866132f1565b60006121318133612eda565b61213a83612e4f565b6121565760405162461bcd60e51b8152600401610c1490614a55565b506000918252600c602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6112f933838361333f565b600854829081106121b35760405162461bcd60e51b8152600401610c1490614864565b826121bf600033611f6f565b806122015750600854811080156122015750600881815481106121e4576121e461481f565b60009182526020909120600990910201546001600160a01b031633145b61221d5760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a833981519152338560405161223c929190614486565b60405180910390a182600885815481106122585761225861481f565b6000918252602090912060099091020180546001600160a01b0319166001600160a01b039290921691909117905550505050565b600854829081106122af5760405162461bcd60e51b8152600401610c1490614864565b826122bb600033611f6f565b806122fd5750600854811080156122fd5750600881815481106122e0576122e061481f565b60009182526020909120600990910201546001600160a01b031633145b6123195760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612338929190614486565b60405180910390a182600885815481106123545761235461481f565b906000526020600020906009020160040160006101000a8154816001600160801b0302191690836001600160801b0316021790555050505050565b600d5484906001600160a01b03163b156124d057336001600160a01b038216036123c4576123bf8585858561340d565b610e03565b600d54604051633185c44d60e21b81526001600160a01b039091169063c6171134906123f690309033906004016149dd565b602060405180830381865afa158015612413573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243791906149f7565b80156124b15750600d54604051633185c44d60e21b81526001600160a01b039091169063c61711349061247090309085906004016149dd565b602060405180830381865afa15801561248d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b191906149f7565b6124d057604051633b79c77360e21b8152336004820152602401610c14565b610e038585858561340d565b610d4933848484611cb8565b6008548290811061250b5760405162461bcd60e51b8152600401610c1490614864565b82612517600033611f6f565b8061255957506008548110801561255957506008818154811061253c5761253c61481f565b60009182526020909120600990910201546001600160a01b031633145b6125755760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612594929190614486565b60405180910390a182600885815481106125b0576125b061481f565b906000526020600020906009020160080160016101000a81548160ff02191690831515021790555050505050565b600854849081106126015760405162461bcd60e51b8152600401610c1490614864565b84600881815481106126155761261561481f565b600091825260209091206008600990920201015460ff166126705760405162461bcd60e51b8152602060048201526015602482015274636f6c6c656374696f6e206e6f742061637469766560581b6044820152606401610c14565b8542600882815481106126855761268561481f565b90600052602060002090600902016005015411156126de5760405162461bcd60e51b815260206004820152601660248201527518dbdb1b1958dd1a5bdb881b9bdd081cdd185c9d195960521b6044820152606401610c14565b8634600882815481106126f3576126f361481f565b906000526020600020906009020160030154146127465760405162461bcd60e51b81526020600482015260116024820152701a5b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610c14565b8760006001600160a01b0316600882815481106127655761276561481f565b60009182526020909120600160099092020101546001600160a01b0316036127c55760405162461bcd60e51b81526020600482015260136024820152723737903830bcb6b2b73a103932b1b2b4bb32b960691b6044820152606401610c14565b6127ce88612e4f565b61280e5760405162461bcd60e51b81526020600482015260116024820152703737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610c14565b6128188860801c90565b89146128665760405162461bcd60e51b815260206004820181905260248201527f746f6b656e20616e6420636f6c6c656374696f6e206964206d69736d617463686044820152606401610c14565b6000888152600c60205260409020546001600160a01b031633146128dc5760405162461bcd60e51b815260206004820152602760248201527f6d73672e73656e646572206e6f7420746865206f726967696e616c20746f6b65604482015266371037bbb732b960c91b6064820152608401610c14565b60006128e98a600161343f565b90506128f58b82613584565b6129358189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f3e92505050565b600060088b8154811061294a5761294a61481f565b600091825260208220600990910201600101546040516001600160a01b039091169134919081818185875af1925050503d80600081146129a6576040519150601f19603f3d011682016040523d82523d6000602084013e6129ab565b606091505b50509050806129ed5760405162461bcd60e51b815260206004820152600e60248201526d1c185e5b595b9d0819985a5b195960921b6044820152606401610c14565b505050505050505050505050565b60085482908110612a1e5760405162461bcd60e51b8152600401610c1490614864565b82612a2a600033611f6f565b80612a6c575060085481108015612a6c575060088181548110612a4f57612a4f61481f565b60009182526020909120600990910201546001600160a01b031633145b612a885760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612aa7929190614486565b60405180910390a18260088581548110612ac357612ac361481f565b90600052602060002090600902016002018190555050505050565b6060610b148261359e565b6000806000836008805490508110612b135760405162461bcd60e51b8152600401610c1490614864565b60088581548110612b2657612b2661481f565b600091825260208220600460099092020101546001600160801b03169003612b9957612b5385600061370c565b612b7d8660098881548110612b6a57612b6a61481f565b906000526020600020016000015461370c565b612b8e876001600160801b0361370c565b935093509350612c10565b612ba485600061370c565b612bbb8660098881548110612b6a57612b6a61481f565b612c0987600160088a81548110612bd457612bd461481f565b6000918252602090912060046009909202010154612bfb91906001600160801b0316614aa3565b6001600160801b031661370c565b9350935093505b509193909250565b600082815260076020526040902060010154612c348133612eda565b610d498383613031565b6000612c4a8133612eda565b6001600160a01b038216612ca05760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610c14565b6112f9826131a6565b60085482908110612ccc5760405162461bcd60e51b8152600401610c1490614864565b82612cd8600033611f6f565b80612d1a575060085481108015612d1a575060088181548110612cfd57612cfd61481f565b60009182526020909120600990910201546001600160a01b031633145b612d365760405162461bcd60e51b8152600401610c1490614890565b600080516020614e0a8339815191523385604051612d55929190614486565b60405180910390a18260088581548110612d7157612d7161481f565b906000526020600020906009020160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050505050565b60088181548110612dbc57600080fd5b60009182526020909120600990910201805460018201546002830154600384015460048501546005860154600687015460078801546008909801546001600160a01b0397881699509690951696939592946001600160801b0390921693909260ff808216916101009004168a565b60006001600160e01b03198216637965db0b60e01b1480610b145750610b1482613723565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ea182611792565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612ee48282611f6f565b6112f957612efc816001600160a01b03166014613773565b612f07836020613773565b604051602001612f18929190614aca565b60408051601f198184030181529082905262461bcd60e51b8252610c1491600401614230565b612f4782612e4f565b612f635760405162461bcd60e51b8152600401610c1490614a55565b6000828152600660205260409020610d498282614b85565b612f8433611448565b612fa05760405162461bcd60e51b8152600401610c1490614c45565b610d4983838361390f565b612fb58282611f6f565b6112f95760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612fed3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61303b8282611f6f565b156112f95760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610d498383836040518060200160405280600081525061238f565b60006130be82612e4f565b61311f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c14565b600061312a83611792565b9050806001600160a01b0316846001600160a01b031614806131655750836001600160a01b031661315a84610bac565b6001600160a01b0316145b8061319557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b6114bc81613ab6565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8381146132395760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610c14565b6000613245848661343f565b905060006008858154811061325c5761325c61481f565b600091825260208220600990910201546001600160a01b031691505b86811015611bbf576132df8888838181106132955761329561481f565b90506020020160208101906132aa91906144cf565b876132b58487614c96565b858989878181106132c8576132c861481f565b90506020028101906132da9190614ca9565b613af6565b806132e98161484b565b915050613278565b60006132fe84600161343f565b90506000600885815481106133155761331561481f565b60009182526020909120600990910201546001600160a01b03169050610f3e868684848888613af6565b816001600160a01b0316836001600160a01b0316036133a05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c14565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61341733836130b3565b6134335760405162461bcd60e51b8152600401610c1490614c45565b610e5684848484613bee565b600080600884815481106134555761345561481f565b60009182526020909120600460099092020101546001600160801b031611613484576001600160801b036134b5565b600883815481106134975761349761481f565b60009182526020909120600460099092020101546001600160801b03165b6001600160801b031682600985815481106134d2576134d261481f565b90600052602060002001600001546134ea9190614c96565b111561352c5760405162461bcd60e51b81526020600482015260116024820152706e6f7420656e6f75676820737570706c7960781b6044820152606401610c14565b60006135458460098681548110612b6a57612b6a61481f565b9050826009858154811061355b5761355b61481f565b9060005260206000200160000160008282546135779190614c96565b9091555090949350505050565b6112f9828260405180602001604052806000815250613c21565b60606135a982612e4f565b61360f5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610c14565b60008281526006602052604081208054613628906147eb565b80601f0160208091040260200160405190810160405280929190818152602001828054613654906147eb565b80156136a15780601f10613676576101008083540402835291602001916136a1565b820191906000526020600020905b81548152906001019060200180831161368457829003601f168201915b5050505050905060006136bf60408051602081019091526000815290565b905080516000036136d1575092915050565b8151156137035780826040516020016136eb929190614cf0565b60405160208183030381529060405292505050919050565b61319584613c54565b600061371c82608085901b614c96565b9392505050565b60006001600160e01b031982166380ac58cd60e01b148061375457506001600160e01b03198216635b5e139f60e01b145b80610b1457506301ffc9a760e01b6001600160e01b0319831614610b14565b60606000613782836002614a14565b61378d906002614c96565b67ffffffffffffffff8111156137a5576137a561466e565b6040519080825280601f01601f1916602001820160405280156137cf576020820181803683370190505b509050600360fc1b816000815181106137ea576137ea61481f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106138195761381961481f565b60200101906001600160f81b031916908160001a905350600061383d846002614a14565b613848906001614c96565b90505b60018111156138c0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061387c5761387c61481f565b1a60f81b8282815181106138925761389261481f565b60200101906001600160f81b031916908160001a90535060049490941c936138b981614d1f565b905061384b565b50831561371c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c14565b826001600160a01b031661392282611792565b6001600160a01b0316146139865760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610c14565b6001600160a01b0382166139e85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c14565b6139f3838383613d2b565b6139fe600082612e6c565b6001600160a01b0383166000908152600360205260408120805460019290613a27908490614d36565b90915550506001600160a01b0382166000908152600360205260408120805460019290613a55908490614c96565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613abf81613d77565b60008181526006602052604090208054613ad8906147eb565b1590506114bc5760008181526006602052604081206114bc9161415f565b600060088681548110613b0b57613b0b61481f565b906000526020600020906009020160080160019054906101000a900460ff1680613b465750836001600160a01b0316876001600160a01b0316145b90508015613b5d57613b588786613584565b613b82565b613b678486613584565b613b8284888760405180602001604052806000815250613bee565b613bc28584848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f3e92505050565b6000858152600c6020526040902080546001600160a01b0319166001600160a01b038916179055611a6a565b613bf984848461390f565b613c0584848484613e1e565b610e565760405162461bcd60e51b8152600401610c1490614d49565b613c2b8383613f1f565b613c386000848484613e1e565b610d495760405162461bcd60e51b8152600401610c1490614d49565b6060613c5f82612e4f565b613cc35760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c14565b6000613cda60408051602081019091526000815290565b90506000815111613cfa576040518060200160405280600081525061371c565b80613d048461405e565b604051602001613d15929190614cf0565b6040516020818303038152906040529392505050565b6001600160a01b038316613d4f57600b8054906000613d498361484b565b91905055505b6001600160a01b038216610d4957600b8054906000613d6d83614d1f565b9190505550505050565b6000613d8282611792565b9050613d9081600084613d2b565b613d9b600083612e6c565b6001600160a01b0381166000908152600360205260408120805460019290613dc4908490614d36565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15613f1457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613e62903390899088908890600401614d9b565b6020604051808303816000875af1925050508015613e9d575060408051601f3d908101601f19168201909252613e9a91810190614dd8565b60015b613efa573d808015613ecb576040519150601f19603f3d011682016040523d82523d6000602084013e613ed0565b606091505b508051600003613ef25760405162461bcd60e51b8152600401610c1490614d49565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613195565b506001949350505050565b6001600160a01b038216613f755760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c14565b613f7e81612e4f565b15613fcb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c14565b613fd760008383613d2b565b6001600160a01b0382166000908152600360205260408120805460019290614000908490614c96565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060816000036140855750506040805180820190915260018152600360fc1b602082015290565b8160005b81156140af57806140998161484b565b91506140a89050600a83614a41565b9150614089565b60008167ffffffffffffffff8111156140ca576140ca61466e565b6040519080825280601f01601f1916602001820160405280156140f4576020820181803683370190505b5090505b841561319557614109600183614d36565b9150614116600a86614df5565b614121906030614c96565b60f81b8183815181106141365761413661481f565b60200101906001600160f81b031916908160001a905350614158600a86614a41565b94506140f8565b50805461416b906147eb565b6000825580601f1061417b575050565b601f0160209004906000526020600020908101906114bc91905b808211156141a95760008155600101614195565b5090565b6001600160e01b0319811681146114bc57600080fd5b6000602082840312156141d557600080fd5b813561371c816141ad565b60005b838110156141fb5781810151838201526020016141e3565b50506000910152565b6000815180845261421c8160208601602086016141e0565b601f01601f19169290920160200192915050565b60208152600061371c6020830184614204565b60006020828403121561425557600080fd5b5035919050565b6001600160a01b03811681146114bc57600080fd5b6000806040838503121561428457600080fd5b823561428f8161425c565b946020939093013593505050565b60008083601f8401126142af57600080fd5b50813567ffffffffffffffff8111156142c757600080fd5b6020830191508360208260051b850101111561116f57600080fd5b600080600080604085870312156142f857600080fd5b843567ffffffffffffffff8082111561431057600080fd5b61431c8883890161429d565b9096509450602087013591508082111561433557600080fd5b506143428782880161429d565b95989497509550505050565b60008083601f84011261436057600080fd5b50813567ffffffffffffffff81111561437857600080fd5b60208301915083602082850101111561116f57600080fd5b6000806000604084860312156143a557600080fd5b83359250602084013567ffffffffffffffff8111156143c357600080fd5b6143cf8682870161434e565b9497909650939450505050565b600061014082840312156143ef57600080fd5b50919050565b600080610160838503121561440957600080fd5b8235915061441a84602085016143dc565b90509250929050565b60008060006060848603121561443857600080fd5b83356144438161425c565b925060208401356144538161425c565b929592945050506040919091013590565b6000806040838503121561447757600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b600080604083850312156144b257600080fd5b8235915060208301356144c48161425c565b809150509250929050565b6000602082840312156144e157600080fd5b813561371c8161425c565b600061014082840312156144ff57600080fd5b61371c83836143dc565b80151581146114bc57600080fd5b6000806040838503121561452a57600080fd5b8235915060208301356144c481614509565b6000806040838503121561454f57600080fd5b823561455a8161425c565b915060208301356144c481614509565b60008060008060006060868803121561458257600080fd5b853567ffffffffffffffff8082111561459a57600080fd5b6145a689838a0161429d565b90975095506020880135945060408801359150808211156145c657600080fd5b506145d38882890161429d565b969995985093965092949392505050565b600080600080606085870312156145fa57600080fd5b84356146058161425c565b935060208501359250604085013567ffffffffffffffff81111561462857600080fd5b6143428782880161434e565b6001600160801b03811681146114bc57600080fd5b6000806040838503121561465c57600080fd5b8235915060208301356144c481614634565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561469a57600080fd5b84356146a58161425c565b935060208501356146b58161425c565b925060408501359150606085013567ffffffffffffffff808211156146d957600080fd5b818701915087601f8301126146ed57600080fd5b8135818111156146ff576146ff61466e565b604051601f8201601f19908116603f011681019083821181831017156147275761472761466e565b816040528281528a602084870101111561474057600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060008060006080868803121561477c57600080fd5b85356147878161425c565b94506020860135935060408601359250606086013567ffffffffffffffff8111156147b157600080fd5b6145d38882890161434e565b600080604083850312156147d057600080fd5b82356147db8161425c565b915060208301356144c48161425c565b600181811c908216806147ff57607f821691505b6020821081036143ef57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161485d5761485d614835565b5060010190565b60208082526012908201527134b73b30b634b21031b7b63632b1ba34b7b760711b604082015260600190565b6020808252600e908201526d1b9bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60008135610b148161425c565b80546001600160a01b0319166001600160a01b0392909216919091179055565b60008135610b1481614634565b60008135610b1481614509565b61491161490b836148b8565b826148c5565b614929614920602084016148b8565b600183016148c5565b604082013560028201556060820135600382015561496d61494c608084016148e5565b600483016001600160801b0382166001600160801b03198254161781555050565b60a0820135600582015560c0820135600682015560e08201356007820155600881016149b361499f61010085016148f2565b825490151560ff1660ff1991909116178255565b610d496149c361012085016148f2565b82805461ff00191691151560081b61ff0016919091179055565b6001600160a01b0392831681529116602082015260400190565b600060208284031215614a0957600080fd5b815161371c81614509565b8082028115828204841417610b1457610b14614835565b634e487b7160e01b600052601260045260246000fd5b600082614a5057614a50614a2b565b500490565b6020808252602e908201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60408201526d32bc34b9ba32b73a103a37b5b2b760911b606082015260800190565b6001600160801b03828116828216039080821115614ac357614ac3614835565b5092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b028160178501602088016141e0565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614b338160288401602088016141e0565b01602801949350505050565b601f821115610d4957600081815260208120601f850160051c81016020861015614b665750805b601f850160051c820191505b81811015610f3e57828155600101614b72565b815167ffffffffffffffff811115614b9f57614b9f61466e565b614bb381614bad84546147eb565b84614b3f565b602080601f831160018114614be85760008415614bd05750858301515b600019600386901b1c1916600185901b178555610f3e565b600085815260208120601f198616915b82811015614c1757888601518255948401946001909101908401614bf8565b5085821015614c355787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b80820180821115610b1457610b14614835565b6000808335601e19843603018112614cc057600080fd5b83018035915067ffffffffffffffff821115614cdb57600080fd5b60200191503681900382131561116f57600080fd5b60008351614d028184602088016141e0565b835190830190614d168183602088016141e0565b01949350505050565b600081614d2e57614d2e614835565b506000190190565b81810381811115610b1457610b14614835565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614dce90830184614204565b9695505050505050565b600060208284031215614dea57600080fd5b815161371c816141ad565b600082614e0457614e04614a2b565b50069056fe598e15fb67723e51493bab1cfbdeb4b4c4b139bd212e1a208ef588474a4bd3e4a2646970667358221220d55daba2dfc3abd6a145ca31eb8664e71b1e4aa915b38a4bb69404a42802323b64736f6c63430008110033

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.