ETH Price: $3,799.68 (+6.11%)

Token

x0r Community Creations (x0rCC)
 

Overview

Max Total Supply

135 x0rCC

Holders

49

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
lanaling.eth
0xDA675a9888e16595C66C6c1DA684dF4e26f8aB69
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:
CommunityCreations1155

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 125 runs

Other Settings:
default evmVersion
File 1 of 29 : CommunityCreations1155.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

/// @title: Community Creations 1155
/// @author: x0r (Michael Blau)

import {ERC1155Creator} from "@manifoldxyz/creator-core-solidity/contracts/ERC1155Creator.sol";
import {LicenseVersion, CantBeEvil, ICantBeEvil} from "@a16z/contracts/licenses/CantBeEvil.sol";

contract CommunityCreations1155 is
    ERC1155Creator,
    CantBeEvil(LicenseVersion.PUBLIC)
{
    // =================== CUSTOM ERRORS =================== //
    error NonTransferableToken();

    constructor() ERC1155Creator("x0r Community Creations", "x0rCC") {}

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

    /**
     * @notice override to make NFTs non-transferable.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal override {
        if (from != address(0) && to != address(0)) {
            revert NonTransferableToken();
        }
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
    }
}

File 2 of 29 : ERC1155Creator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";

import "./core/ERC1155CreatorCore.sol";

/**
 * @dev ERC1155Creator implementation
 */
contract ERC1155Creator is AdminControl, ERC1155, ERC1155CreatorCore {

    mapping(uint256 => uint256) private _totalSupply;

    constructor (string memory _name, string memory _symbol) ERC1155("") {
        name = _name;
        symbol = _symbol;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC1155CreatorCore, AdminControl) returns (bool) {
        return ERC1155CreatorCore.supportsInterface(interfaceId) || ERC1155.supportsInterface(interfaceId) || AdminControl.supportsInterface(interfaceId);
    }

    function _beforeTokenTransfer(address, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory) internal virtual override {
        _approveTransfer(from, to, ids, amounts);
    }

    /**
     * @dev See {ICreatorCore-registerExtension}.
     */
    function registerExtension(address extension, string calldata baseURI) external override adminRequired {
        requireNonBlacklist(extension);
        _registerExtension(extension, baseURI, false);
    }

    /**
     * @dev See {ICreatorCore-registerExtension}.
     */
    function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external override adminRequired {
        requireNonBlacklist(extension);
        _registerExtension(extension, baseURI, baseURIIdentical);
    }


    /**
     * @dev See {ICreatorCore-unregisterExtension}.
     */
    function unregisterExtension(address extension) external override adminRequired {
        _unregisterExtension(extension);
    }

    /**
     * @dev See {ICreatorCore-blacklistExtension}.
     */
    function blacklistExtension(address extension) external override adminRequired {
        _blacklistExtension(extension);
    }

    /**
     * @dev See {ICreatorCore-setBaseTokenURIExtension}.
     */
    function setBaseTokenURIExtension(string calldata uri_) external override {
        requireExtension();
        _setBaseTokenURIExtension(uri_, false);
    }

    /**
     * @dev See {ICreatorCore-setBaseTokenURIExtension}.
     */
    function setBaseTokenURIExtension(string calldata uri_, bool identical) external override {
        requireExtension();
        _setBaseTokenURIExtension(uri_, identical);
    }

    /**
     * @dev See {ICreatorCore-setTokenURIPrefixExtension}.
     */
    function setTokenURIPrefixExtension(string calldata prefix) external override {
        requireExtension();
        _setTokenURIPrefixExtension(prefix);
    }

    /**
     * @dev See {ICreatorCore-setTokenURIExtension}.
     */
    function setTokenURIExtension(uint256 tokenId, string calldata uri_) external override {
        requireExtension();
        _setTokenURIExtension(tokenId, uri_);
    }

    /**
     * @dev See {ICreatorCore-setTokenURIExtension}.
     */
    function setTokenURIExtension(uint256[] memory tokenIds, string[] calldata uris) external override {
        requireExtension();
        require(tokenIds.length == uris.length, "Invalid input");
        for (uint i; i < tokenIds.length;) {
            _setTokenURIExtension(tokenIds[i], uris[i]);
            unchecked { ++i; }
        }
    }

    /**
     * @dev See {ICreatorCore-setBaseTokenURI}.
     */
    function setBaseTokenURI(string calldata uri_) external override adminRequired {
        _setBaseTokenURI(uri_);
    }

    /**
     * @dev See {ICreatorCore-setTokenURIPrefix}.
     */
    function setTokenURIPrefix(string calldata prefix) external override adminRequired {
        _setTokenURIPrefix(prefix);
    }

    /**
     * @dev See {ICreatorCore-setTokenURI}.
     */
    function setTokenURI(uint256 tokenId, string calldata uri_) external override adminRequired {
        _setTokenURI(tokenId, uri_);
    }

    /**
     * @dev See {ICreatorCore-setTokenURI}.
     */
    function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external override adminRequired {
        require(tokenIds.length == uris.length, "Invalid input");
        for (uint i; i < tokenIds.length;) {
            _setTokenURI(tokenIds[i], uris[i]);
            unchecked { ++i; }
        }
    }

    /**
     * @dev See {ICreatorCore-setMintPermissions}.
     */
    function setMintPermissions(address extension, address permissions) external override adminRequired {
        _setMintPermissions(extension, permissions);
    }

    /**
     * @dev See {IERC1155CreatorCore-mintBaseNew}.
     */
    function mintBaseNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) public virtual override nonReentrant adminRequired returns(uint256[] memory) {
        return _mintNew(address(0), to, amounts, uris);
    }

    /**
     * @dev See {IERC1155CreatorCore-mintBaseExisting}.
     */
    function mintBaseExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) public virtual override nonReentrant adminRequired {
        for (uint i; i < tokenIds.length;) {
            uint256 tokenId = tokenIds[i];
            require(tokenId > 0 && tokenId <= _tokenCount, "Invalid token");
            require(_tokensExtension[tokenId] == address(0), "Token created by extension");
            unchecked { ++i; }
        }
        _mintExisting(address(0), to, tokenIds, amounts);
    }

    /**
     * @dev See {IERC1155CreatorCore-mintExtensionNew}.
     */
    function mintExtensionNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) public virtual override nonReentrant returns(uint256[] memory tokenIds) {
        requireExtension();
        return _mintNew(msg.sender, to, amounts, uris);
    }

    /**
     * @dev See {IERC1155CreatorCore-mintExtensionExisting}.
     */
    function mintExtensionExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) public virtual override nonReentrant {
        requireExtension();
        for (uint i; i < tokenIds.length;) {
            require(_tokensExtension[tokenIds[i]] == address(msg.sender), "Token not created by this extension");
            unchecked { ++i; }
        }
        _mintExisting(msg.sender, to, tokenIds, amounts);
    }

    /**
     * @dev Mint new tokens
     */
    function _mintNew(address extension, address[] memory to, uint256[] memory amounts, string[] memory uris) internal returns(uint256[] memory tokenIds) {
        if (to.length > 1) {
            // Multiple receiver.  Give every receiver the same new token
            tokenIds = new uint256[](1);
            require(uris.length <= 1 && (amounts.length == 1 || to.length == amounts.length), "Invalid input");
        } else {
            // Single receiver.  Generating multiple tokens
            tokenIds = new uint256[](amounts.length);
            require(uris.length == 0 || amounts.length == uris.length, "Invalid input");
        }

        // Assign tokenIds
        for (uint i; i < tokenIds.length;) {
            ++_tokenCount;
            tokenIds[i] = _tokenCount;
            // Track the extension that minted the token
            _tokensExtension[_tokenCount] = extension;
            unchecked { ++i; }
        }

        if (extension != address(0)) {
            _checkMintPermissions(to, tokenIds, amounts);
        }

        if (to.length == 1 && tokenIds.length == 1) {
           // Single mint
           _mint(to[0], tokenIds[0], amounts[0], new bytes(0));
        } else if (to.length > 1) {
            // Multiple receivers.  Receiving the same token
            if (amounts.length == 1) {
                // Everyone receiving the same amount
                for (uint i; i < to.length;) {
                    _mint(to[i], tokenIds[0], amounts[0], new bytes(0));
                    unchecked { ++i; }
                }
            } else {
                // Everyone receiving different amounts
                for (uint i; i < to.length;) {
                    _mint(to[i], tokenIds[0], amounts[i], new bytes(0));
                    unchecked { ++i; }
                }
            }
        } else {
            _mintBatch(to[0], tokenIds, amounts, new bytes(0));
        }

        for (uint i; i < tokenIds.length;) {
            if (i < uris.length && bytes(uris[i]).length > 0) {
                _tokenURIs[tokenIds[i]] = uris[i];
            }
            unchecked { ++i; }
        }
    }

    /**
     * @dev Mint existing tokens
     */
    function _mintExisting(address extension, address[] memory to, uint256[] memory tokenIds, uint256[] memory amounts) internal {
        if (extension != address(0)) {
            _checkMintPermissions(to, tokenIds, amounts);
        }

        if (to.length == 1 && tokenIds.length == 1 && amounts.length == 1) {
             // Single mint
            _mint(to[0], tokenIds[0], amounts[0], new bytes(0));            
        } else if (to.length == 1 && tokenIds.length == amounts.length) {
            // Batch mint to same receiver
            _mintBatch(to[0], tokenIds, amounts, new bytes(0));
        } else if (tokenIds.length == 1 && amounts.length == 1) {
            // Mint of the same token/token amounts to various receivers
            for (uint i; i < to.length;) {
                _mint(to[i], tokenIds[0], amounts[0], new bytes(0));
                unchecked { ++i; }
            }
        } else if (tokenIds.length == 1 && to.length == amounts.length) {
            // Mint of the same token with different amounts to different receivers
            for (uint i; i < to.length;) {
                _mint(to[i], tokenIds[0], amounts[i], new bytes(0));
                unchecked { ++i; }
            }
        } else if (to.length == tokenIds.length && to.length == amounts.length) {
            // Mint of different tokens and different amounts to different receivers
            for (uint i; i < to.length;) {
                _mint(to[i], tokenIds[i], amounts[i], new bytes(0));
                unchecked { ++i; }
            }
        } else {
            revert("Invalid input");
        }
    }

    /**
     * @dev See {IERC1155CreatorCore-tokenExtension}.
     */
    function tokenExtension(uint256 tokenId) public view virtual override returns (address) {
        return _tokenExtension(tokenId);
    }

    /**
     * @dev See {IERC1155CreatorCore-burn}.
     */
    function burn(address account, uint256[] memory tokenIds, uint256[] memory amounts) public virtual override nonReentrant {
        require(account == msg.sender || isApprovedForAll(account, msg.sender), "Caller is not owner nor approved");
        require(tokenIds.length == amounts.length, "Invalid input");
        if (tokenIds.length == 1) {
            _burn(account, tokenIds[0], amounts[0]);
        } else {
            _burnBatch(account, tokenIds, amounts);
        }
        _postBurn(account, tokenIds, amounts);
    }

    /**
     * @dev See {ICreatorCore-setRoyalties}.
     */
    function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        _setRoyaltiesExtension(address(0), receivers, basisPoints);
    }

    /**
     * @dev See {ICreatorCore-setRoyalties}.
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        _setRoyalties(tokenId, receivers, basisPoints);
    }

    /**
     * @dev See {ICreatorCore-setRoyaltiesExtension}.
     */
    function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        _setRoyaltiesExtension(extension, receivers, basisPoints);
    }

    /**
     * @dev See {ICreatorCore-getRoyalties}.
     */
    function getRoyalties(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) {
        return _getRoyalties(tokenId);
    }

    /**
     * @dev See {ICreatorCore-getFees}.
     */
    function getFees(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) {
        return _getRoyalties(tokenId);
    }

    /**
     * @dev See {ICreatorCore-getFeeRecipients}.
     */
    function getFeeRecipients(uint256 tokenId) external view virtual override returns (address payable[] memory) {
        return _getRoyaltyReceivers(tokenId);
    }

    /**
     * @dev See {ICreatorCore-getFeeBps}.
     */
    function getFeeBps(uint256 tokenId) external view virtual override returns (uint[] memory) {
        return _getRoyaltyBPS(tokenId);
    }
    
    /**
     * @dev See {ICreatorCore-royaltyInfo}.
     */
    function royaltyInfo(uint256 tokenId, uint256 value) external view virtual override returns (address, uint256) {
        return _getRoyaltyInfo(tokenId, value);
    } 

    /**
     * @dev See {IERC1155-uri}.
     */
    function uri(uint256 tokenId) public view virtual override returns (string memory) {
        return _tokenURI(tokenId);
    }
    
    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 tokenId) external view virtual override returns (uint256) {
        return _totalSupply[tokenId];
    }

    /**
     * @dev See {ERC1155-_mint}.
     */
    function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual override {
        super._mint(account, id, amount, data);
        _totalSupply[id] += amount;
    }

    /**
     * @dev See {ERC1155-_mintBatch}.
     */
    function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual override {
        super._mintBatch(to, ids, amounts, data);
        for (uint i; i < ids.length;) {
            _totalSupply[ids[i]] += amounts[i];
            unchecked { ++i; }
        }
    }

    /**
     * @dev See {ERC1155-_burn}.
     */
    function _burn(address account, uint256 id, uint256 amount) internal virtual override {
        super._burn(account, id, amount);
        _totalSupply[id] -= amount;
    }

    /**
     * @dev See {ERC1155-_burnBatch}.
     */
    function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual override {
        super._burnBatch(account, ids, amounts);
        for (uint i; i < ids.length;) {
            _totalSupply[ids[i]] -= amounts[i];
            unchecked { ++i; }
        }
    }

    /**
     * @dev See {ICreatorCore-setApproveTransfer}.
     */
    function setApproveTransfer(address extension) external override adminRequired {
        _setApproveTransferBase(extension);
    }
}

File 3 of 29 : CantBeEvil.sol
// SPDX-License-Identifier: MIT
// a16z Contracts v0.0.1 (CantBeEvil.sol)
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./ICantBeEvil.sol";

enum LicenseVersion {
    PUBLIC,
    EXCLUSIVE,
    COMMERCIAL,
    COMMERCIAL_NO_HATE,
    PERSONAL,
    PERSONAL_NO_HATE
}

contract CantBeEvil is ERC165, ICantBeEvil {
    using Strings for uint;
    string internal constant _BASE_LICENSE_URI = "ar://zmc1WTspIhFyVY82bwfAIcIExLFH5lUcHHUN0wXg4W8/";
    LicenseVersion internal licenseVersion;
    constructor(LicenseVersion _licenseVersion) {
        licenseVersion = _licenseVersion;
    }

    function getLicenseURI() public view returns (string memory) {
        return string.concat(_BASE_LICENSE_URI, uint(licenseVersion).toString());
    }

    function getLicenseName() public view returns (string memory) {
        return _getLicenseVersionKeyByValue(licenseVersion);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) {
        return
            interfaceId == type(ICantBeEvil).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function _getLicenseVersionKeyByValue(LicenseVersion _licenseVersion) internal pure returns (string memory) {
        require(uint8(_licenseVersion) <= 6);
        if (LicenseVersion.PUBLIC == _licenseVersion) return "PUBLIC";
        if (LicenseVersion.EXCLUSIVE == _licenseVersion) return "EXCLUSIVE";
        if (LicenseVersion.COMMERCIAL == _licenseVersion) return "COMMERCIAL";
        if (LicenseVersion.COMMERCIAL_NO_HATE == _licenseVersion) return "COMMERCIAL_NO_HATE";
        if (LicenseVersion.PERSONAL == _licenseVersion) return "PERSONAL";
        else return "PERSONAL_NO_HATE";
    }
}

File 4 of 29 : AdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IAdminControl.sol";

abstract contract AdminControl is Ownable, IAdminControl, ERC165 {
    using EnumerableSet for EnumerableSet.AddressSet;

    // Track registered admins
    EnumerableSet.AddressSet private _admins;

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

    /**
     * @dev Only allows approved admins to call the specified function
     */
    modifier adminRequired() {
        require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin");
        _;
    }   

    /**
     * @dev See {IAdminControl-getAdmins}.
     */
    function getAdmins() external view override returns (address[] memory admins) {
        admins = new address[](_admins.length());
        for (uint i = 0; i < _admins.length(); i++) {
            admins[i] = _admins.at(i);
        }
        return admins;
    }

    /**
     * @dev See {IAdminControl-approveAdmin}.
     */
    function approveAdmin(address admin) external override onlyOwner {
        if (!_admins.contains(admin)) {
            emit AdminApproved(admin, msg.sender);
            _admins.add(admin);
        }
    }

    /**
     * @dev See {IAdminControl-revokeAdmin}.
     */
    function revokeAdmin(address admin) external override onlyOwner {
        if (_admins.contains(admin)) {
            emit AdminRevoked(admin, msg.sender);
            _admins.remove(admin);
        }
    }

    /**
     * @dev See {IAdminControl-isAdmin}.
     */
    function isAdmin(address admin) public override view returns (bool) {
        return (owner() == admin || _admins.contains(admin));
    }

}

File 5 of 29 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

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

        address operator = _msgSender();

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

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

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

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

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

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

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

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

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

        return array;
    }
}

File 6 of 29 : ERC1155CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import "../extensions/ERC1155/IERC1155CreatorExtensionApproveTransfer.sol";
import "../extensions/ERC1155/IERC1155CreatorExtensionBurnable.sol";
import "../permissions/ERC1155/IERC1155CreatorMintPermissions.sol";
import "./IERC1155CreatorCore.sol";
import "./CreatorCore.sol";

/**
 * @dev Core ERC1155 creator implementation
 */
abstract contract ERC1155CreatorCore is CreatorCore, IERC1155CreatorCore {

    uint256 constant public VERSION = 2;

    using EnumerableSet for EnumerableSet.AddressSet;
    string public name;
    string public symbol;

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

    /**
     * @dev See {CreatorCore-_setApproveTransferExtension}
     */
    function _setApproveTransferExtension(address extension, bool enabled) internal override {
        if (ERC165Checker.supportsInterface(extension, type(IERC1155CreatorExtensionApproveTransfer).interfaceId)) {
            _extensionApproveTransfers[extension] = enabled;
            emit ExtensionApproveTransferUpdated(extension, enabled);
        }
    }

    /**
     * @dev Set the base contract's approve transfer contract location
     */
    function _setApproveTransferBase(address extension) internal {
        _approveTransferBase = extension;
        emit ApproveTransferUpdated(extension);
    }

    /**
     * @dev Set mint permissions for an extension
     */
    function _setMintPermissions(address extension, address permissions) internal {
        require(_extensions.contains(extension), "Invalid extension");
        require(permissions == address(0) || ERC165Checker.supportsInterface(permissions, type(IERC1155CreatorMintPermissions).interfaceId), "Invalid address");
        if (_extensionPermissions[extension] != permissions) {
            _extensionPermissions[extension] = permissions;
            emit MintPermissionsUpdated(extension, permissions, msg.sender);
        }
    }

    /**
     * Check if an extension can mint
     */
    function _checkMintPermissions(address[] memory to, uint256[] memory tokenIds, uint256[] memory amounts) internal {
        if (_extensionPermissions[msg.sender] != address(0)) {
            IERC1155CreatorMintPermissions(_extensionPermissions[msg.sender]).approveMint(msg.sender, to, tokenIds, amounts);
        }
    }

    /**
     * Post burn actions
     */
    function _postBurn(address owner, uint256[] memory tokenIds, uint256[] memory amounts) internal virtual {
        require(tokenIds.length > 0, "Invalid input");
        address extension = _tokensExtension[tokenIds[0]];
        for (uint i; i < tokenIds.length;) {
            require(_tokensExtension[tokenIds[i]] == extension, "Mismatched token originators");
            unchecked { ++i; }
        }
        // Callback to originating extension if needed
        if (extension != address(0)) {
           if (ERC165Checker.supportsInterface(extension, type(IERC1155CreatorExtensionBurnable).interfaceId)) {
               IERC1155CreatorExtensionBurnable(extension).onBurn(owner, tokenIds, amounts);
           }
        }
    }

    /**
     * Approve a transfer
     */
    function _approveTransfer(address from, address to, uint256[] memory tokenIds, uint256[] memory amounts) internal {
        require(tokenIds.length > 0, "Invalid input");
        address extension = _tokensExtension[tokenIds[0]];
        for (uint i; i < tokenIds.length;) {
            require(_tokensExtension[tokenIds[i]] == extension, "Mismatched token originators");
            unchecked { ++i; }
        }
        if (_extensionApproveTransfers[extension]) {
            require(IERC1155CreatorExtensionApproveTransfer(extension).approveTransfer(msg.sender, from, to, tokenIds, amounts), "Extension approval failure");
        } else if (_approveTransferBase != address(0)) {
            require(IERC1155CreatorExtensionApproveTransfer(_approveTransferBase).approveTransfer(msg.sender, from, to, tokenIds, amounts), "Extension approval failure");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 9 of 29 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }
}

File 10 of 29 : IAdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Interface for admin control
 */
interface IAdminControl is IERC165 {

    event AdminApproved(address indexed account, address indexed sender);
    event AdminRevoked(address indexed account, address indexed sender);

    /**
     * @dev gets address of all admins
     */
    function getAdmins() external view returns (address[] memory);

    /**
     * @dev add an admin.  Can only be called by contract owner.
     */
    function approveAdmin(address admin) external;

    /**
     * @dev remove an admin.  Can only be called by contract owner.
     */
    function revokeAdmin(address admin) external;

    /**
     * @dev checks whether or not given address is an admin
     * Returns True if they are
     */
    function isAdmin(address admin) external view returns (bool);

}

File 11 of 29 : 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 12 of 29 : 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 13 of 29 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 29 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

File 17 of 29 : CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";

import "../extensions/ICreatorExtensionTokenURI.sol";
import "../extensions/ICreatorExtensionRoyalties.sol";

import "./ICreatorCore.sol";

/**
 * @dev Core creator implementation
 */
abstract contract CreatorCore is ReentrancyGuard, ICreatorCore, ERC165 {
    using Strings for uint256;
    using EnumerableSet for EnumerableSet.AddressSet;
    using AddressUpgradeable for address;

    uint256 internal _tokenCount = 0;

    // Base approve transfers address location
    address internal _approveTransferBase;

    // Track registered extensions data
    EnumerableSet.AddressSet internal _extensions;
    EnumerableSet.AddressSet internal _blacklistedExtensions;
    mapping (address => address) internal _extensionPermissions;
    mapping (address => bool) internal _extensionApproveTransfers;
    
    // For tracking which extension a token was minted by
    mapping (uint256 => address) internal _tokensExtension;

    // The baseURI for a given extension
    mapping (address => string) private _extensionBaseURI;
    mapping (address => bool) private _extensionBaseURIIdentical;

    // The prefix for any tokens with a uri configured
    mapping (address => string) private _extensionURIPrefix;

    // Mapping for individual token URIs
    mapping (uint256 => string) internal _tokenURIs;

    // Royalty configurations
    struct RoyaltyConfig {
        address payable receiver;
        uint16 bps;
    }
    mapping (address => RoyaltyConfig[]) internal _extensionRoyalty;
    mapping (uint256 => RoyaltyConfig[]) internal _tokenRoyalty;

    bytes4 private constant _CREATOR_CORE_V1 = 0x28f10a21;

    /**
     * External interface identifiers for royalties
     */

    /**
     *  @dev CreatorCore
     *
     *  bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6
     *
     *  => 0xbb3bafd6 = 0xbb3bafd6
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;

    /**
     *  @dev Rarible: RoyaltiesV1
     *
     *  bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb
     *  bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f
     *
     *  => 0xb9c4d9fb ^ 0x0ebd4c7f = 0xb7799584
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;

    /**
     *  @dev Foundation
     *
     *  bytes4(keccak256('getFees(uint256)')) == 0xd5a06d4c
     *
     *  => 0xd5a06d4c = 0xd5a06d4c
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_FOUNDATION = 0xd5a06d4c;

    /**
     *  @dev EIP-2981
     *
     * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
     *
     * => 0x2a55205a = 0x2a55205a
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;

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

    /**
     * @dev Only allows registered extensions to call the specified function
     */
    function requireExtension() internal view {
        require(_extensions.contains(msg.sender), "Must be registered extension");
    }

    /**
     * @dev Only allows non-blacklisted extensions
     */
    function requireNonBlacklist(address extension) internal view {
        require(!_blacklistedExtensions.contains(extension), "Extension blacklisted");
    }   

    /**
     * @dev See {ICreatorCore-getExtensions}.
     */
    function getExtensions() external view override returns (address[] memory extensions) {
        extensions = new address[](_extensions.length());
        for (uint i; i < _extensions.length();) {
            extensions[i] = _extensions.at(i);
            unchecked { ++i; }
        }
        return extensions;
    }

    /**
     * @dev Register an extension
     */
    function _registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) internal {
        require(extension != address(this) && extension.isContract(), "Invalid");
        emit ExtensionRegistered(extension, msg.sender);
        _extensionBaseURI[extension] = baseURI;
        _extensionBaseURIIdentical[extension] = baseURIIdentical;
        _extensions.add(extension);
        _setApproveTransferExtension(extension, true);
    }

    /**
     * @dev See {ICreatorCore-setApproveTransferExtension}.
     */
    function setApproveTransferExtension(bool enabled) external override {
        requireExtension();
        _setApproveTransferExtension(msg.sender, enabled);
    }

    /**
     * @dev Set whether or not tokens minted by the extension defers transfer approvals to the extension
     */
    function _setApproveTransferExtension(address extension, bool enabled) internal virtual;

    /**
     * @dev Unregister an extension
     */
    function _unregisterExtension(address extension) internal {
        emit ExtensionUnregistered(extension, msg.sender);
        _extensions.remove(extension);
    }

    /**
     * @dev Blacklist an extension
     */
    function _blacklistExtension(address extension) internal {
       require(extension != address(0) && extension != address(this), "Cannot blacklist yourself");
       if (_extensions.contains(extension)) {
           emit ExtensionUnregistered(extension, msg.sender);
           _extensions.remove(extension);
       }
       if (!_blacklistedExtensions.contains(extension)) {
           emit ExtensionBlacklisted(extension, msg.sender);
           _blacklistedExtensions.add(extension);
       }
    }

    /**
     * @dev Set base token uri for an extension
     */
    function _setBaseTokenURIExtension(string calldata uri, bool identical) internal {
        _extensionBaseURI[msg.sender] = uri;
        _extensionBaseURIIdentical[msg.sender] = identical;
    }

    /**
     * @dev Set token uri prefix for an extension
     */
    function _setTokenURIPrefixExtension(string calldata prefix) internal {
        _extensionURIPrefix[msg.sender] = prefix;
    }

    /**
     * @dev Set token uri for a token of an extension
     */
    function _setTokenURIExtension(uint256 tokenId, string calldata uri) internal {
        require(_tokensExtension[tokenId] == msg.sender, "Invalid token");
        _tokenURIs[tokenId] = uri;
    }

    /**
     * @dev Set base token uri for tokens with no extension
     */
    function _setBaseTokenURI(string memory uri) internal {
        _extensionBaseURI[address(0)] = uri;
    }

    /**
     * @dev Set token uri prefix for tokens with no extension
     */
    function _setTokenURIPrefix(string calldata prefix) internal {
        _extensionURIPrefix[address(0)] = prefix;
    }


    /**
     * @dev Set token uri for a token with no extension
     */
    function _setTokenURI(uint256 tokenId, string calldata uri) internal {
        require(tokenId > 0 && tokenId <= _tokenCount && _tokensExtension[tokenId] == address(0), "Invalid token");
        _tokenURIs[tokenId] = uri;
    }

    /**
     * @dev Retrieve a token's URI
     */
    function _tokenURI(uint256 tokenId) internal view returns (string memory) {
        require(tokenId > 0 && tokenId <= _tokenCount, "Invalid token");

        address extension = _tokensExtension[tokenId];
        require(!_blacklistedExtensions.contains(extension), "Extension blacklisted");

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            if (bytes(_extensionURIPrefix[extension]).length != 0) {
                return string(abi.encodePacked(_extensionURIPrefix[extension],_tokenURIs[tokenId]));
            }
            return _tokenURIs[tokenId];
        }

        if (ERC165Checker.supportsInterface(extension, type(ICreatorExtensionTokenURI).interfaceId)) {
            return ICreatorExtensionTokenURI(extension).tokenURI(address(this), tokenId);
        }

        if (!_extensionBaseURIIdentical[extension]) {
            return string(abi.encodePacked(_extensionBaseURI[extension], tokenId.toString()));
        } else {
            return _extensionBaseURI[extension];
        }
    }

    /**
     * Get token extension
     */
    function _tokenExtension(uint256 tokenId) internal view returns (address extension) {
        extension = _tokensExtension[tokenId];

        require(extension != address(0), "No extension for token");
        require(!_blacklistedExtensions.contains(extension), "Extension blacklisted");

        return extension;
    }

    /**
     * Helper to get royalties for a token
     */
    function _getRoyalties(uint256 tokenId) view internal returns (address payable[] memory receivers, uint256[] memory bps) {

        // Get token level royalties
        RoyaltyConfig[] memory royalties = _tokenRoyalty[tokenId];
        if (royalties.length == 0) {
            // Get extension specific royalties
            address extension = _tokensExtension[tokenId];
            if (extension != address(0)) {
                if (ERC165Checker.supportsInterface(extension, type(ICreatorExtensionRoyalties).interfaceId)) {
                    (receivers, bps) = ICreatorExtensionRoyalties(extension).getRoyalties(address(this), tokenId);
                    // Extension override exists, just return that
                    if (receivers.length > 0) return (receivers, bps);
                }
                royalties = _extensionRoyalty[extension];
            }
        }
        if (royalties.length == 0) {
            // Get the default royalty
            royalties = _extensionRoyalty[address(0)];
        }
        
        if (royalties.length > 0) {
            receivers = new address payable[](royalties.length);
            bps = new uint256[](royalties.length);
            for (uint i; i < royalties.length;) {
                receivers[i] = royalties[i].receiver;
                bps[i] = royalties[i].bps;
                unchecked { ++i; }
            }
        }
    }

    /**
     * Helper to get royalty receivers for a token
     */
    function _getRoyaltyReceivers(uint256 tokenId) view internal returns (address payable[] memory recievers) {
        (recievers, ) = _getRoyalties(tokenId);
    }

    /**
     * Helper to get royalty basis points for a token
     */
    function _getRoyaltyBPS(uint256 tokenId) view internal returns (uint256[] memory bps) {
        (, bps) = _getRoyalties(tokenId);
    }

    function _getRoyaltyInfo(uint256 tokenId, uint256 value) view internal returns (address receiver, uint256 amount){
        (address payable[] memory receivers, uint256[] memory bps) = _getRoyalties(tokenId);
        require(receivers.length <= 1, "More than 1 royalty receiver");
        
        if (receivers.length == 0) {
            return (address(this), 0);
        }
        return (receivers[0], bps[0]*value/10000);
    }

    /**
     * Set royalties for a token
     */
    function _setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) internal {
       _checkRoyalties(receivers, basisPoints);
        delete _tokenRoyalty[tokenId];
        _setRoyalties(receivers, basisPoints, _tokenRoyalty[tokenId]);
        emit RoyaltiesUpdated(tokenId, receivers, basisPoints);
    }

    /**
     * Set royalties for all tokens of an extension
     */
    function _setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) internal {
        _checkRoyalties(receivers, basisPoints);
        delete _extensionRoyalty[extension];
        _setRoyalties(receivers, basisPoints, _extensionRoyalty[extension]);
        if (extension == address(0)) {
            emit DefaultRoyaltiesUpdated(receivers, basisPoints);
        } else {
            emit ExtensionRoyaltiesUpdated(extension, receivers, basisPoints);
        }
    }

    /**
     * Helper function to check that royalties provided are valid
     */
    function _checkRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) private pure {
        require(receivers.length == basisPoints.length, "Invalid input");
        uint256 totalBasisPoints;
        for (uint i; i < basisPoints.length;) {
            totalBasisPoints += basisPoints[i];
            unchecked { ++i; }
        }
        require(totalBasisPoints < 10000, "Invalid total royalties");
    }

    /**
     * Helper function to set royalties
     */
    function _setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints, RoyaltyConfig[] storage royalties) private {
        for (uint i; i < basisPoints.length;) {
            royalties.push(
                RoyaltyConfig(
                    {
                        receiver: receivers[i],
                        bps: uint16(basisPoints[i])
                    }
                )
            );
            unchecked { ++i; }
        }
    }

    /**
     * @dev See {ICreatorCore-getApproveTransfer}.
     */
    function getApproveTransfer() external view override returns (address) {
        return _approveTransferBase;
    }
}

File 18 of 29 : IERC1155CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "./CreatorCore.sol";

/**
 * @dev Core ERC1155 creator interface
 */
interface IERC1155CreatorCore is ICreatorCore {

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     *
     * @param to       - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients)
     * @param amounts  - Can be a single element array (all recipients get the same amount) or a multi-element array
     * @param uris     - If no elements, all tokens use the default uri.
     *                   If any element is an empty string, the corresponding token uses the default uri.
     *
     *
     * Requirements: If to is a multi-element array, then uris must be empty or single element array
     *               If to is a multi-element array, then amounts must be a single element array or a multi-element array of the same size
     *               If to is a single element array, uris must be empty or the same length as amounts
     *
     * Examples:
     *    mintBaseNew(['0x....1', '0x....2'], [1], [])
     *        Mints a single new token, and gives 1 each to '0x....1' and '0x....2'.  Token uses default uri.
     *    
     *    mintBaseNew(['0x....1', '0x....2'], [1, 2], [])
     *        Mints a single new token, and gives 1 to '0x....1' and 2 to '0x....2'.  Token uses default uri.
     *    
     *    mintBaseNew(['0x....1'], [1, 2], ["", "http://token2.com"])
     *        Mints two new tokens to '0x....1'. 1 of the first token, 2 of the second.  1st token uses default uri, second uses "http://token2.com".
     *    
     * @return Returns list of tokenIds minted
     */
    function mintBaseNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev batch mint existing token with no extension. Can only be called by an admin.
     *
     * @param to        - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients)
     * @param tokenIds  - Can be a single element array (all recipients get the same token) or a multi-element array
     * @param amounts   - Can be a single element array (all recipients get the same amount) or a multi-element array
     *
     * Requirements: If any of the parameters are multi-element arrays, they need to be the same length as other multi-element arrays
     *
     * Examples:
     *    mintBaseExisting(['0x....1', '0x....2'], [1], [10])
     *        Mints 10 of tokenId 1 to each of '0x....1' and '0x....2'.
     *    
     *    mintBaseExisting(['0x....1', '0x....2'], [1, 2], [10, 20])
     *        Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 2 to '0x....2'.
     *    
     *    mintBaseExisting(['0x....1'], [1, 2], [10, 20])
     *        Mints 10 of tokenId 1 and 20 of tokenId 2 to '0x....1'.
     *    
     *    mintBaseExisting(['0x....1', '0x....2'], [1], [10, 20])
     *        Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 1 to '0x....2'.
     *    
     */
    function mintBaseExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev mint a token from an extension. Can only be called by a registered extension.
     *
     * @param to       - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients)
     * @param amounts  - Can be a single element array (all recipients get the same amount) or a multi-element array
     * @param uris     - If no elements, all tokens use the default uri.
     *                   If any element is an empty string, the corresponding token uses the default uri.
     *
     *
     * Requirements: If to is a multi-element array, then uris must be empty or single element array
     *               If to is a multi-element array, then amounts must be a single element array or a multi-element array of the same size
     *               If to is a single element array, uris must be empty or the same length as amounts
     *
     * Examples:
     *    mintExtensionNew(['0x....1', '0x....2'], [1], [])
     *        Mints a single new token, and gives 1 each to '0x....1' and '0x....2'.  Token uses default uri.
     *    
     *    mintExtensionNew(['0x....1', '0x....2'], [1, 2], [])
     *        Mints a single new token, and gives 1 to '0x....1' and 2 to '0x....2'.  Token uses default uri.
     *    
     *    mintExtensionNew(['0x....1'], [1, 2], ["", "http://token2.com"])
     *        Mints two new tokens to '0x....1'. 1 of the first token, 2 of the second.  1st token uses default uri, second uses "http://token2.com".
     *    
     * @return Returns list of tokenIds minted
     */
    function mintExtensionNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev batch mint existing token from extension. Can only be called by a registered extension.
     *
     * @param to        - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients)
     * @param tokenIds  - Can be a single element array (all recipients get the same token) or a multi-element array
     * @param amounts   - Can be a single element array (all recipients get the same amount) or a multi-element array
     *
     * Requirements: If any of the parameters are multi-element arrays, they need to be the same length as other multi-element arrays
     *
     * Examples:
     *    mintExtensionExisting(['0x....1', '0x....2'], [1], [10])
     *        Mints 10 of tokenId 1 to each of '0x....1' and '0x....2'.
     *    
     *    mintExtensionExisting(['0x....1', '0x....2'], [1, 2], [10, 20])
     *        Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 2 to '0x....2'.
     *    
     *    mintExtensionExisting(['0x....1'], [1, 2], [10, 20])
     *        Mints 10 of tokenId 1 and 20 of tokenId 2 to '0x....1'.
     *    
     *    mintExtensionExisting(['0x....1', '0x....2'], [1], [10, 20])
     *        Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 1 to '0x....2'.
     *    
     */
    function mintExtensionExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev burn tokens. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(address account, uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev Total amount of tokens in with a given tokenId.
     */
    function totalSupply(uint256 tokenId) external view returns (uint256);
}

File 19 of 29 : IERC1155CreatorExtensionApproveTransfer.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * Implement this if you want your extension to approve a transfer
 */
interface IERC1155CreatorExtensionApproveTransfer is IERC165 {

    /**
     * @dev Set whether or not the creator contract will check the extension for approval of token transfer
     */
    function setApproveTransfer(address creator, bool enabled) external;

    /**
     * @dev Called by creator contract to approve a transfer
     */
    function approveTransfer(address operator, address from, address to, uint256[] calldata tokenIds, uint256[] calldata amounts) external returns (bool);
}

File 20 of 29 : IERC1155CreatorMintPermissions.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Required interface of an ERC1155Creator compliant extension contracts.
 */
interface IERC1155CreatorMintPermissions is IERC165 {

    /**
     * @dev get approval to mint
     */
    function approveMint(address extension, address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) external;
}

File 21 of 29 : IERC1155CreatorExtensionBurnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Your extension is required to implement this interface if it wishes
 * to receive the onBurn callback whenever a token the extension created is
 * burned
 */
interface IERC1155CreatorExtensionBurnable is IERC165 {
    /**
     * @dev callback handler for burn events
     */
    function onBurn(address owner, uint256[] calldata tokenIds, uint256[] calldata amounts) external;
}

File 22 of 29 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

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

File 23 of 29 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 24 of 29 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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 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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 25 of 29 : ERC165Checker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.2) (utils/introspection/ERC165Checker.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface,
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            _supportsERC165Interface(account, type(IERC165).interfaceId) &&
            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
        internal
        view
        returns (bool[] memory)
    {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in _interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!_supportsERC165Interface(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     * Interface identification is specified in ERC-165.
     */
    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
        // prepare call
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);

        // perform static call
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly {
            success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0x00)
        }

        return success && returnSize >= 0x20 && returnValue > 0;
    }
}

File 26 of 29 : ICreatorExtensionTokenURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Implement this if you want your extension to have overloadable URI's
 */
interface ICreatorExtensionTokenURI is IERC165 {

    /**
     * Get the uri for a given creator/tokenId
     */
    function tokenURI(address creator, uint256 tokenId) external view returns (string memory);
}

File 27 of 29 : ICreatorExtensionRoyalties.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Implement this if you want your extension to have overloadable royalties
 */
interface ICreatorExtensionRoyalties is IERC165 {

    /**
     * Get the royalties for a given creator/tokenId
     */
    function getRoyalties(address creator, uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
}

File 28 of 29 : ICreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Core creator interface
 */
interface ICreatorCore is IERC165 {

    event ExtensionRegistered(address indexed extension, address indexed sender);
    event ExtensionUnregistered(address indexed extension, address indexed sender);
    event ExtensionBlacklisted(address indexed extension, address indexed sender);
    event MintPermissionsUpdated(address indexed extension, address indexed permissions, address indexed sender);
    event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints);
    event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints);
    event ApproveTransferUpdated(address extension);
    event ExtensionRoyaltiesUpdated(address indexed extension, address payable[] receivers, uint256[] basisPoints);
    event ExtensionApproveTransferUpdated(address indexed extension, bool enabled);

    /**
     * @dev gets address of all extensions
     */
    function getExtensions() external view returns (address[] memory);

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * extension address must point to a contract implementing ICreatorExtension.
     * Returns True if newly added, False if already added.
     */
    function registerExtension(address extension, string calldata baseURI) external;

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * extension address must point to a contract implementing ICreatorExtension.
     * Returns True if newly added, False if already added.
     */
    function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external;

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * Returns True if removed, False if already removed.
     */
    function unregisterExtension(address extension) external;

    /**
     * @dev blacklist an extension.  Can only be called by contract owner or admin.
     * This function will destroy all ability to reference the metadata of any tokens created
     * by the specified extension. It will also unregister the extension if needed.
     * Returns True if removed, False if already removed.
     */
    function blacklistExtension(address extension) external;

    /**
     * @dev set the baseTokenURI of an extension.  Can only be called by extension.
     */
    function setBaseTokenURIExtension(string calldata uri) external;

    /**
     * @dev set the baseTokenURI of an extension.  Can only be called by extension.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURIExtension(string calldata uri, bool identical) external;

    /**
     * @dev set the common prefix of an extension.  Can only be called by extension.
     * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI"
     * Useful if you want to use ipfs/arweave
     */
    function setTokenURIPrefixExtension(string calldata prefix) external;

    /**
     * @dev set the tokenURI of a token extension.  Can only be called by extension that minted token.
     */
    function setTokenURIExtension(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of a token extension for multiple tokens.  Can only be called by extension that minted token.
     */
    function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri) external;

    /**
     * @dev set the baseTokenURI for tokens with no extension.  Can only be called by owner/admin.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURI(string calldata uri) external;

    /**
     * @dev set the common prefix for tokens with no extension.  Can only be called by owner/admin.
     * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI"
     * Useful if you want to use ipfs/arweave
     */
    function setTokenURIPrefix(string calldata prefix) external;

    /**
     * @dev set the tokenURI of a token with no extension.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of multiple tokens with no extension.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external;

    /**
     * @dev set a permissions contract for an extension.  Used to control minting.
     */
    function setMintPermissions(address extension, address permissions) external;

    /**
     * @dev Configure so transfers of tokens created by the caller (must be extension) gets approval
     * from the extension before transferring
     */
    function setApproveTransferExtension(bool enabled) external;

    /**
     * @dev get the extension of a given token
     */
    function tokenExtension(uint256 tokenId) external view returns (address);

    /**
     * @dev Set default royalties
     */
    function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of a token
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of an extension
     */
    function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     */
    function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    
    // Royalty support for various other standards
    function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);
    function getFeeBps(uint256 tokenId) external view returns (uint[] memory);
    function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);

    /**
     * @dev Set the default approve transfer contract location.
     */
    function setApproveTransfer(address extension) external; 

    /**
     * @dev Get the default approve transfer contract location.
     */
    function getApproveTransfer() external view returns (address);
}

File 29 of 29 : ICantBeEvil.sol
// SPDX-License-Identifier: MIT
// a16z Contracts v0.0.1 (ICantBeEvil.sol)
pragma solidity ^0.8.13;

interface ICantBeEvil {
    function getLicenseURI() external view returns (string memory);
    function getLicenseName() external view returns (string memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NonTransferableToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"extension","type":"address"}],"name":"ApproveTransferUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"DefaultRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"ExtensionApproveTransferUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"ExtensionRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionUnregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"permissions","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"MintPermissionsUpdated","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"RoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"blacklistExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getApproveTransfer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExtensions","outputs":[{"internalType":"address[]","name":"extensions","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFees","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLicenseName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLicenseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintBaseExisting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintBaseNew","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintExtensionExisting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintExtensionNew","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"string","name":"baseURI","type":"string"}],"name":"registerExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"baseURIIdentical","type":"bool"}],"name":"registerExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":"extension","type":"address"}],"name":"setApproveTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setApproveTransferExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setBaseTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"},{"internalType":"bool","name":"identical","type":"bool"}],"name":"setBaseTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"address","name":"permissions","type":"address"}],"name":"setMintPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyaltiesExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri_","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri_","type":"string"}],"name":"setTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"setTokenURIPrefixExtension","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":"tokenExtension","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"unregisterExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

608060405260006007553480156200001657600080fd5b5060006040518060400160405280601781526020017f78307220436f6d6d756e697479204372656174696f6e7300000000000000000081525060405180604001604052806005815260200164783072434360d81b8152506040518060200160405280600081525062000097620000916200010260201b60201c565b62000106565b60018055620000a68162000156565b508151620000bc9060169060208501906200016f565b508051620000d29060179060208401906200016f565b50506019805483925060ff19166001836005811115620000f657620000f662000215565b02179055505062000267565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516200016b9060069060208401906200016f565b5050565b8280546200017d906200022b565b90600052602060002090601f016020900481019282620001a15760008555620001ec565b82601f10620001bc57805160ff1916838001178555620001ec565b82800160010185558215620001ec579182015b82811115620001ec578251825591602001919060010190620001cf565b50620001fa929150620001fe565b5090565b5b80821115620001fa5760008155600101620001ff565b634e487b7160e01b600052602160045260246000fd5b600181811c908216806200024057607f821691505b6020821081036200026157634e487b7160e01b600052602260045260246000fd5b50919050565b615ff180620002776000396000f3fe608060405234801561001057600080fd5b50600436106102d65760003560e01c80636d73e66911610188578063b9c4d9fb116100e4578063e92a89f611610092578063e92a89f614610661578063e985e9c514610674578063f0cdc49914610687578063f242432a1461069a578063f2fde38b146106ad578063feeb5a9a146106c0578063ffa1ad74146106d357600080fd5b8063b9c4d9fb146105df578063bb3bafd6146105f2578063bd85b03914610613578063c7db289314610633578063ce8aee9d1461063b578063d5a06d4c146105f2578063e6c884dc1461064e57600080fd5b806395d89b411161014157806395d89b411461057057806399e0dd7c14610578578063a22cb4651461058b578063a341793b1461059e578063aafb2d44146105a6578063ac0c8cfa146105b9578063b0fe87c9146105cc57600080fd5b80636d73e6691461051f578063715018a61461053257806382dcc0c81461053a57806383b7db631461054d5780638c6e8472146105555780638da5cb5b1461056857600080fd5b80632eb2c2d6116102375780633e6134b8116101f05780633e6134b81461049a5780633f0f37f6146104ad5780634e1273f4146104c0578063596798ad146104d357806361e5bc6b146104e657806366d1e9d0146104f9578063695c96e61461050c57600080fd5b80632eb2c2d61461042657806330176e13146104395780633071a0f91461044c57806331ae450b1461045f578063332dd1ae146104745780633db0f8ab1461048757600080fd5b8063162094c411610294578063162094c41461038157806320e4afe21461039457806322f374d0146103a7578063239be317146103cc57806324d7806c146103df5780632a55205a146103f25780632d3456701461041357600080fd5b8062fdd58e146102db57806301ffc9a71461030157806302e7afb71461032457806306fdde03146103395780630e89341c1461034e5780630ebd4c7f14610361575b600080fd5b6102ee6102e93660046149bf565b6106db565b6040519081526020015b60405180910390f35b61031461030f366004614a01565b610776565b60405190151581526020016102f8565b610337610332366004614a1e565b610790565b005b6103416107dc565b6040516102f89190614a93565b61034161035c366004614aa6565b61086a565b61037461036f366004614aa6565b610875565b6040516102f89190614afa565b61033761038f366004614b4e565b610880565b6103376103a2366004614bdd565b6108d0565b6008546001600160a01b03165b6040516001600160a01b0390911681526020016102f8565b6103b46103da366004614aa6565b610924565b6103146103ed366004614a1e565b61092f565b610405610400366004614c56565b61095e565b6040516102f8929190614c78565b610337610421366004614a1e565b610977565b610337610434366004614df4565b6109d4565b610337610447366004614ea1565b610a19565b61033761045a366004614ee2565b610a98565b610467610aee565b6040516102f89190614f56565b610337610482366004614f69565b610b9c565b610337610495366004614fd4565b610bf0565b6103376104a8366004614ea1565b610d0c565b6103376104bb366004615057565b610d20565b6103746104ce3660046150be565b610d75565b6103376104e1366004614a1e565b610e9e565b6103376104f436600461518a565b610ee7565b610337610507366004614ea1565b610f69565b61033761051a3660046151e5565b610f7b565b61033761052d366004614a1e565b611153565b6103376111ab565b61033761054836600461527e565b6111bf565b6104676111d2565b6103746105633660046151e5565b611272565b6103b461132c565b61034161133b565b610337610586366004614ea1565b611348565b6103376105993660046152d4565b611392565b61034161139d565b6103376105b436600461518a565b6113b4565b6103376105c736600461530d565b61146e565b6103376105da36600461532a565b611480565b6104676105ed366004614aa6565b6114cd565b610605610600366004614aa6565b6114d8565b6040516102f8929190615369565b6102ee610621366004614aa6565b60009081526018602052604090205490565b6103416114ed565b610337610649366004614a1e565b61154d565b61033761065c3660046151e5565b611596565b61033761066f366004614b4e565b61170b565b610314610682366004615397565b61171e565b610337610695366004615397565b61174c565b6103376106a83660046153c5565b611796565b6103376106bb366004614a1e565b6117db565b6103746106ce3660046151e5565b611851565b6102ee600281565b60006001600160a01b03831661074b5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526004602090815260408083206001600160a01b03861684529091529020545b92915050565b600061078182611930565b80610770575061077082611959565b3361079961132c565b6001600160a01b031614806107b457506107b460023361197e565b6107d05760405162461bcd60e51b81526004016107429061542d565b6107d9816119a3565b50565b601680546107e990615471565b80601f016020809104026020016040519081016040528092919081815260200182805461081590615471565b80156108625780601f1061083757610100808354040283529160200191610862565b820191906000526020600020905b81548152906001019060200180831161084557829003601f168201915b505050505081565b606061077082611aaf565b606061077082611d56565b3361088961132c565b6001600160a01b031614806108a457506108a460023361197e565b6108c05760405162461bcd60e51b81526004016107429061542d565b6108cb838383611d61565b505050565b336108d961132c565b6001600160a01b031614806108f457506108f460023361197e565b6109105760405162461bcd60e51b81526004016107429061542d565b61091d8585858585611dc9565b5050505050565b600061077082611e50565b6000816001600160a01b031661094361132c565b6001600160a01b03161480610770575061077060028361197e565b60008061096b8484611edb565b915091505b9250929050565b61097f611fb2565b61098a60028261197e565b156107d95760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36109d0600282612011565b5050565b6001600160a01b0385163314806109f057506109f0853361171e565b610a0c5760405162461bcd60e51b8152600401610742906154a5565b61091d8585858585612026565b33610a2261132c565b6001600160a01b03161480610a3d5750610a3d60023361197e565b610a595760405162461bcd60e51b81526004016107429061542d565b6109d082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121c192505050565b33610aa161132c565b6001600160a01b03161480610abc5750610abc60023361197e565b610ad85760405162461bcd60e51b81526004016107429061542d565b610ae1836121fd565b6108cb8383836000612225565b6060610afa6002612312565b6001600160401b03811115610b1157610b11614c91565b604051908082528060200260200182016040528015610b3a578160200160208202803683370190505b50905060005b610b4a6002612312565b811015610b9857610b5c60028261231c565b828281518110610b6e57610b6e6154f4565b6001600160a01b039092166020928302919091019091015280610b9081615520565b915050610b40565b5090565b33610ba561132c565b6001600160a01b03161480610bc05750610bc060023361197e565b610bdc5760405162461bcd60e51b81526004016107429061542d565b610bea600085858585612328565b50505050565b600260015403610c125760405162461bcd60e51b815260040161074290615539565b60026001556001600160a01b038316331480610c335750610c33833361171e565b610c7f5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610742565b8051825114610ca05760405162461bcd60e51b815260040161074290615570565b8151600103610ced57610ce88383600081518110610cc057610cc06154f4565b602002602001015183600081518110610cdb57610cdb6154f4565b6020026020010151612415565b610cf8565b610cf8838383612448565b610d038383836124c1565b50506001805550565b610d1461262a565b6109d082826000612681565b33610d2961132c565b6001600160a01b03161480610d445750610d4460023361197e565b610d605760405162461bcd60e51b81526004016107429061542d565b610d69846121fd565b610bea84848484612225565b60608151835114610dda5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610742565b600083516001600160401b03811115610df557610df5614c91565b604051908082528060200260200182016040528015610e1e578160200160208202803683370190505b50905060005b8451811015610e9657610e69858281518110610e4257610e426154f4565b6020026020010151858381518110610e5c57610e5c6154f4565b60200260200101516106db565b828281518110610e7b57610e7b6154f4565b6020908102919091010152610e8f81615520565b9050610e24565b509392505050565b33610ea761132c565b6001600160a01b03161480610ec25750610ec260023361197e565b610ede5760405162461bcd60e51b81526004016107429061542d565b6107d9816126be565b610eef61262a565b82518114610f0f5760405162461bcd60e51b815260040161074290615570565b60005b8351811015610bea57610f61848281518110610f3057610f306154f4565b6020026020010151848484818110610f4a57610f4a6154f4565b9050602002810190610f5c9190615597565b612712565b600101610f12565b610f7161262a565b6109d08282612748565b600260015403610f9d5760405162461bcd60e51b815260040161074290615539565b600260015533610fab61132c565b6001600160a01b03161480610fc65750610fc660023361197e565b610fe25760405162461bcd60e51b81526004016107429061542d565b60005b838110156110a6576000858583818110611001576110016154f4565b90506020020135905060008111801561101c57506007548111155b6110385760405162461bcd60e51b8152600401610742906155dd565b6000818152600f60205260409020546001600160a01b03161561109d5760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e206372656174656420627920657874656e73696f6e0000000000006044820152606401610742565b50600101610fe5565b50611147600087878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061276292505050565b50506001805550505050565b61115b611fb2565b61116660028261197e565b6107d95760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36109d0600282612a25565b6111b3611fb2565b6111bd6000612a3a565b565b6111c761262a565b6108cb838383612681565b60606111de6009612312565b6001600160401b038111156111f5576111f5614c91565b60405190808252806020026020018201604052801561121e578160200160208202803683370190505b50905060005b61122e6009612312565b811015610b985761124060098261231c565b828281518110611252576112526154f4565b6001600160a01b0390921660209283029190910190910152600101611224565b60606002600154036112965760405162461bcd60e51b815260040161074290615539565b60026001556112a361262a565b61131d3388888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a9182918501908490808284376000920191909152506113189250889150899050615604565b612a8a565b60018055979650505050505050565b6000546001600160a01b031690565b601780546107e990615471565b3361135161132c565b6001600160a01b0316148061136c575061136c60023361197e565b6113885760405162461bcd60e51b81526004016107429061542d565b6109d08282612e17565b6109d0338383612e4b565b6019546060906113af9060ff16612f2b565b905090565b336113bd61132c565b6001600160a01b031614806113d857506113d860023361197e565b6113f45760405162461bcd60e51b81526004016107429061542d565b825181146114145760405162461bcd60e51b815260040161074290615570565b60005b8351811015610bea57611466848281518110611435576114356154f4565b602002602001015184848481811061144f5761144f6154f4565b90506020028101906114619190615597565b611d61565b600101611417565b61147661262a565b6107d933826130b7565b3361148961132c565b6001600160a01b031614806114a457506114a460023361197e565b6114c05760405162461bcd60e51b81526004016107429061542d565b61091d8585858585612328565b60606107708261312f565b6060806114e483613141565b91509150915091565b6060604051806060016040528060318152602001615f8b603191396019546115289060ff16600581111561152357611523615695565b6134f1565b6040516020016115399291906156ab565b604051602081830303815290604052905090565b3361155661132c565b6001600160a01b03161480611571575061157160023361197e565b61158d5760405162461bcd60e51b81526004016107429061542d565b6107d9816135f9565b6002600154036115b85760405162461bcd60e51b815260040161074290615539565b60026001556115c561262a565b60005b8381101561166b5733600f60008787858181106115e7576115e76154f4565b60209081029290920135835250810191909152604001600020546001600160a01b0316146116635760405162461bcd60e51b815260206004820152602360248201527f546f6b656e206e6f742063726561746564206279207468697320657874656e7360448201526234b7b760e91b6064820152608401610742565b6001016115c8565b506111473387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061276292505050565b61171361262a565b6108cb838383612712565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3361175561132c565b6001600160a01b03161480611770575061177060023361197e565b61178c5760405162461bcd60e51b81526004016107429061542d565b6109d0828261363a565b6001600160a01b0385163314806117b257506117b2853361171e565b6117ce5760405162461bcd60e51b8152600401610742906154a5565b61091d8585858585613763565b6117e3611fb2565b6001600160a01b0381166118485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610742565b6107d981612a3a565b60606002600154036118755760405162461bcd60e51b815260040161074290615539565b60026001553361188361132c565b6001600160a01b0316148061189e575061189e60023361197e565b6118ba5760405162461bcd60e51b81526004016107429061542d565b61131d600088888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a9182918501908490808284376000920191909152506113189250889150899050615604565b600061193b8261388d565b8061194a575061194a826138b2565b806107705750610770826138ed565b60006001600160e01b03198216630c934a3560e31b1480610770575061077082611930565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6001600160a01b038116158015906119c457506001600160a01b0381163014155b611a0c5760405162461bcd60e51b815260206004820152601960248201527821b0b73737ba10313630b1b5b634b9ba103cb7bab939b2b63360391b6044820152606401610742565b611a1760098261197e565b15611a5f5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a3611a5d600982612011565b505b611a6a600b8261197e565b6107d95760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a36109d0600b82612a25565b6060600082118015611ac357506007548211155b611adf5760405162461bcd60e51b8152600401610742906155dd565b6000828152600f60205260409020546001600160a01b0316611b02600b8261197e565b15611b1f5760405162461bcd60e51b8152600401610742906156da565b60008381526013602052604090208054611b3890615471565b159050611c52576001600160a01b03811660009081526012602052604090208054611b6290615471565b159050611bb3576001600160a01b038116600090815260126020908152604080832086845260138352928190209051611b9c9392016157a2565b604051602081830303815290604052915050919050565b60008381526013602052604090208054611bcc90615471565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf890615471565b8015611c455780601f10611c1a57610100808354040283529160200191611c45565b820191906000526020600020905b815481529060010190602001808311611c2857829003601f168201915b5050505050915050919050565b611c638163e9dc637560e01b613922565b15611cdb5760405163e9dc637560e01b81526001600160a01b0382169063e9dc637590611c969030908790600401614c78565b600060405180830381865afa158015611cb3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261199c91908101906157b7565b6001600160a01b03811660009081526011602052604090205460ff16611d2d576001600160a01b0381166000908152601060205260409020611d1c846134f1565b604051602001611b9c929190615838565b6001600160a01b03811660009081526010602052604090208054611bcc90615471565b50919050565b606061199c82613141565b600083118015611d7357506007548311155b8015611d9457506000838152600f60205260409020546001600160a01b0316155b611db05760405162461bcd60e51b8152600401610742906155dd565b6000838152601360205260409020610bea908383614864565b611dd58484848461393e565b6000858152601560205260408120611dec916148e4565b611e0b84848484601560008b81526020019081526020016000206139e3565b847fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee85858585604051611e419493929190615854565b60405180910390a25050505050565b6000818152600f60205260409020546001600160a01b031680611eae5760405162461bcd60e51b815260206004820152601660248201527527379032bc3a32b739b4b7b7103337b9103a37b5b2b760511b6044820152606401610742565b611eb9600b8261197e565b15611ed65760405162461bcd60e51b8152600401610742906156da565b919050565b600080600080611eea86613141565b91509150600182511115611f405760405162461bcd60e51b815260206004820152601c60248201527f4d6f7265207468616e203120726f79616c7479207265636569766572000000006044820152606401610742565b8151600003611f5757306000935093505050610970565b81600081518110611f6a57611f6a6154f4565b60200260200101516127108683600081518110611f8957611f896154f4565b6020026020010151611f9b91906158d8565b611fa5919061590d565b9350935050509250929050565b33611fbb61132c565b6001600160a01b0316146111bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610742565b600061199c836001600160a01b038416613a9e565b81518351146120475760405162461bcd60e51b815260040161074290615921565b6001600160a01b03841661206d5760405162461bcd60e51b815260040161074290615969565b3361207c818787878787613b91565b60005b845181101561216557600085828151811061209c5761209c6154f4565b6020026020010151905060008583815181106120ba576120ba6154f4565b60209081029190910181015160008481526004835260408082206001600160a01b038e16835290935291909120549091508181101561210b5760405162461bcd60e51b8152600401610742906159ae565b60008381526004602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061214a9084906159f8565b925050819055505050508061215e90615520565b905061207f565b50846001600160a01b0316866001600160a01b0316826001600160a01b0316600080516020615f4b83398151915287876040516121a3929190615a10565b60405180910390a46121b9818787878787613bdd565b505050505050565b600080526010602090815281516109d0917f6e0956cda88cad152e89927e53611735b61a5c762d1428573c6931b0a5efcb019190840190614902565b612208600b8261197e565b156107d95760405162461bcd60e51b8152600401610742906156da565b6001600160a01b038416301480159061224757506001600160a01b0384163b15155b61227d5760405162461bcd60e51b8152602060048201526007602482015266125b9d985b1a5960ca1b6044820152606401610742565b60405133906001600160a01b038616907fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a90600090a36001600160a01b03841660009081526010602052604090206122d6908484614864565b506001600160a01b0384166000908152601160205260409020805460ff1916821515179055612306600985612a25565b50610bea8460016130b7565b6000610770825490565b600061199c8383613d41565b6123348484848461393e565b6001600160a01b0385166000908152601460205260408120612355916148e4565b61238684848484601460008b6001600160a01b03166001600160a01b031681526020019081526020016000206139e3565b6001600160a01b0385166123d6577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b848484846040516123c99493929190615854565b60405180910390a161091d565b846001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f85858585604051611e419493929190615854565b612420838383613d6b565b6000828152601860205260408120805483929061243e908490615a23565b9091555050505050565b612453838383613e75565b60005b8251811015610bea57818181518110612471576124716154f4565b60200260200101516018600085848151811061248f5761248f6154f4565b6020026020010151815260200190815260200160002060008282546124b49190615a23565b9091555050600101612456565b60008251116124e25760405162461bcd60e51b815260040161074290615570565b6000600f6000846000815181106124fb576124fb6154f4565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b835181101561259c57816001600160a01b0316600f6000868481518110612553576125536154f4565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146125945760405162461bcd60e51b815260040161074290615a3a565b60010161252a565b506001600160a01b03811615610bea576125bd816303dc6f6560e51b613922565b15610bea576040516303dc6f6560e51b81526001600160a01b03821690637b8deca0906125f290879087908790600401615a71565b600060405180830381600087803b15801561260c57600080fd5b505af1158015612620573d6000803e3d6000fd5b5050505050505050565b61263560093361197e565b6111bd5760405162461bcd60e51b815260206004820152601c60248201527f4d757374206265207265676973746572656420657874656e73696f6e000000006044820152606401610742565b33600090815260106020526040902061269b908484614864565b50336000908152601160205260409020805460ff19169115159190911790555050565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f959c0e47a2fe3cf01e237ba4892e2cc3194d77cbfb33e434e40873225d6b595f9060200160405180910390a150565b6000838152600f60205260409020546001600160a01b03163314611db05760405162461bcd60e51b8152600401610742906155dd565b3360009081526012602052604090206108cb908383614864565b6001600160a01b0384161561277c5761277c838383614002565b8251600114801561278e575081516001145b801561279b575080516001145b156128425761283d836000815181106127b6576127b66154f4565b6020026020010151836000815181106127d1576127d16154f4565b6020026020010151836000815181106127ec576127ec6154f4565b602002602001015160006001600160401b0381111561280d5761280d614c91565b6040519080825280601f01601f191660200182016040528015612837576020820181803683370190505b50614091565b610bea565b82516001148015612854575080518251145b156128c25761283d8360008151811061286f5761286f6154f4565b6020026020010151838360006001600160401b0381111561289257612892614c91565b6040519080825280601f01601f1916602001820160405280156128bc576020820181803683370190505b506140c6565b815160011480156128d4575080516001145b1561293e5760005b8351811015612938576129308482815181106128fa576128fa6154f4565b602002602001015184600081518110612915576129156154f4565b6020026020010151846000815181106127ec576127ec6154f4565b6001016128dc565b50610bea565b81516001148015612950575080518351145b156129b35760005b8351811015612938576129ab848281518110612976576129766154f4565b602002602001015184600081518110612991576129916154f4565b60200260200101518484815181106127ec576127ec6154f4565b600101612958565b815183511480156129c5575080518351145b15612a0d5760005b835181101561293857612a058482815181106129eb576129eb6154f4565b6020026020010151848381518110612991576129916154f4565b6001016129cd565b60405162461bcd60e51b815260040161074290615570565b600061199c836001600160a01b038416614140565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600184511115612af55760408051600180825281830190925290602080830190803683370190505090506001825111158015612ad45750825160011480612ad4575082518451145b612af05760405162461bcd60e51b815260040161074290615570565b612b67565b82516001600160401b03811115612b0e57612b0e614c91565b604051908082528060200260200182016040528015612b37578160200160208202803683370190505b509050815160001480612b4b575081518351145b612b675760405162461bcd60e51b815260040161074290615570565b60005b8151811015612bde57600760008154612b8290615520565b909155506007548251839083908110612b9d57612b9d6154f4565b6020908102919091018101919091526007546000908152600f9091526040902080546001600160a01b0319166001600160a01b038816179055600101612b6a565b506001600160a01b03851615612bf957612bf9848285614002565b83516001148015612c0b575080516001145b15612c6157612c5c84600081518110612c2657612c266154f4565b602002602001015182600081518110612c4157612c416154f4565b6020026020010151856000815181106127ec576127ec6154f4565b612d70565b600184511115612d37578251600103612cd95760005b8451811015612cd357612ccb858281518110612c9557612c956154f4565b602002602001015183600081518110612cb057612cb06154f4565b6020026020010151866000815181106127ec576127ec6154f4565b600101612c77565b50612d70565b60005b8451811015612cd357612d2f858281518110612cfa57612cfa6154f4565b602002602001015183600081518110612d1557612d156154f4565b60200260200101518684815181106127ec576127ec6154f4565b600101612cdc565b612d7084600081518110612d4d57612d4d6154f4565b6020026020010151828560006001600160401b0381111561289257612892614c91565b60005b8151811015612e0e57825181108015612da657506000838281518110612d9b57612d9b6154f4565b602002602001015151115b15612e0657828181518110612dbd57612dbd6154f4565b602002602001015160136000848481518110612ddb57612ddb6154f4565b602002602001015181526020019081526020016000209080519060200190612e04929190614902565b505b600101612d73565b50949350505050565b6000805260126020526108cb7f7e7fa33969761a458e04f477e039a608702b4f924981d6653935a8319a08ad7b8383614864565b816001600160a01b0316836001600160a01b031603612ebe5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610742565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606006826005811115612f4157612f41615695565b60ff161115612f4f57600080fd5b816005811115612f6157612f61615695565b600003612f8a5750506040805180820190915260068152655055424c494360d01b602082015290565b816005811115612f9c57612f9c615695565b600103612fc85750506040805180820190915260098152684558434c555349564560b81b602082015290565b816005811115612fda57612fda615695565b60020361300757505060408051808201909152600a81526910d3d353515490d2505360b21b602082015290565b81600581111561301957613019615695565b60030361304e575050604080518082019091526012815271434f4d4d45524349414c5f4e4f5f4841544560701b602082015290565b81600581111561306057613060615695565b60040361308b57505060408051808201909152600881526714115494d3d3905360c21b602082015290565b505060408051808201909152601081526f504552534f4e414c5f4e4f5f4841544560801b602082015290565b6130cb826001620e90cb60e41b0319613922565b156109d0576001600160a01b0382166000818152600e6020908152604091829020805460ff191685151590811790915591519182527f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a36910160405180910390a25050565b606061313a82613141565b5092915050565b606080600060156000858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156131c357600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b900461ffff1681830152825260019092019101613179565b5050505090508051600003613312576000848152600f60205260409020546001600160a01b031680156133105761320181634e53ee3d60e11b613922565b1561328c57604051634e53ee3d60e11b81526001600160a01b03821690639ca7dc7a906132349030908990600401614c78565b600060405180830381865afa158015613251573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526132799190810190615b0d565b815191955093501561328c575050915091565b6001600160a01b038116600090815260146020908152604080832080548251818502810185019093528083529193909284015b8282101561330957600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b900461ffff16818301528252600190920191016132bf565b5050505091505b505b80516000036133b5576000808052601460209081527f4f26c3876aa9f4b92579780beea1161a61f87ebf1ec6ee865b299e447ecba99c8054604080518285028101850190915281815293919290919084015b828210156133ae57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b900461ffff1681830152825260019092019101613364565b5050505090505b8051156134eb5780516001600160401b038111156133d5576133d5614c91565b6040519080825280602002602001820160405280156133fe578160200160208202803683370190505b50925080516001600160401b0381111561341a5761341a614c91565b604051908082528060200260200182016040528015613443578160200160208202803683370190505b50915060005b81518110156134e957818181518110613464576134646154f4565b602002602001015160000151848281518110613482576134826154f4565b60200260200101906001600160a01b031690816001600160a01b0316815250508181815181106134b4576134b46154f4565b60200260200101516020015161ffff168382815181106134d6576134d66154f4565b6020908102919091010152600101613449565b505b50915091565b6060816000036135185750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613542578061352c81615520565b915061353b9050600a8361590d565b915061351c565b6000816001600160401b0381111561355c5761355c614c91565b6040519080825280601f01601f191660200182016040528015613586576020820181803683370190505b5090505b84156135f15761359b600183615a23565b91506135a8600a86615bd2565b6135b39060306159f8565b60f81b8183815181106135c8576135c86154f4565b60200101906001600160f81b031916908160001a9053506135ea600a8661590d565b945061358a565b949350505050565b60405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a36109d0600982612011565b61364560098361197e565b6136855760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21032bc3a32b739b4b7b760791b6044820152606401610742565b6001600160a01b03811615806136a757506136a7816378ea2a9760e11b613922565b6136e55760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610742565b6001600160a01b038281166000908152600d60205260409020548116908216146109d0576001600160a01b038281166000818152600d602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b6001600160a01b0384166137895760405162461bcd60e51b815260040161074290615969565b3360006137958561418f565b905060006137a28561418f565b90506137b2838989858589613b91565b60008681526004602090815260408083206001600160a01b038c168452909152902054858110156137f55760405162461bcd60e51b8152600401610742906159ae565b60008781526004602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906138349084906159f8565b909155505060408051888152602081018890526001600160a01b03808b16928c82169291881691600080516020615f6b833981519152910160405180910390a4613882848a8a8a8a8a6141da565b505050505050505050565b60006001600160e01b031982166301f4921160e61b1480610770575061077082614295565b60006001600160e01b03198216636cdb3d1360e11b148061194a57506001600160e01b031982166303a24d0760e21b14806107705750610770825b60006001600160e01b03198216632a9f3abf60e11b148061077057506301ffc9a760e01b6001600160e01b0319831614610770565b600061392d83614346565b801561199c575061199c8383614379565b82811461395d5760405162461bcd60e51b815260040161074290615570565b6000805b828110156139975783838281811061397b5761397b6154f4565b905060200201358261398d91906159f8565b9150600101613961565b50612710811061091d5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b6044820152606401610742565b60005b828110156121b957816040518060400160405280888885818110613a0c57613a0c6154f4565b9050602002016020810190613a219190614a1e565b6001600160a01b03168152602001868685818110613a4157613a416154f4565b61ffff602091820293909301358316909352508354600181810186556000958652948390208451910180549490930151909116600160a01b026001600160b01b03199093166001600160a01b0390911617919091179055016139e6565b60008181526001830160205260408120548015613b87576000613ac2600183615a23565b8554909150600090613ad690600190615a23565b9050818114613b3b576000866000018281548110613af657613af66154f4565b9060005260206000200154905080876000018481548110613b1957613b196154f4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b4c57613b4c615be6565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610770565b6000915050610770565b6001600160a01b03851615801590613bb157506001600160a01b03841615155b15613bcf576040516330d4e75d60e01b815260040160405180910390fd5b6121b9868686868686614402565b6001600160a01b0384163b156121b95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613c219089908990889088908890600401615bfc565b6020604051808303816000875af1925050508015613c5c575060408051601f3d908101601f19168201909252613c5991810190615c5a565b60015b613d0857613c68615c77565b806308c379a003613ca15750613c7c615c93565b80613c875750613ca3565b8060405162461bcd60e51b81526004016107429190614a93565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610742565b6001600160e01b0319811663bc197c8160e01b14613d385760405162461bcd60e51b815260040161074290615d1c565b50505050505050565b6000826000018281548110613d5857613d586154f4565b9060005260206000200154905092915050565b6001600160a01b038316613d915760405162461bcd60e51b815260040161074290615d64565b336000613d9d8461418f565b90506000613daa8461418f565b9050613dca83876000858560405180602001604052806000815250613b91565b60008581526004602090815260408083206001600160a01b038a16845290915290205484811015613e0d5760405162461bcd60e51b815260040161074290615da7565b60008681526004602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a9052909290881691600080516020615f6b833981519152910160405180910390a4604080516020810190915260009052613d38565b6001600160a01b038316613e9b5760405162461bcd60e51b815260040161074290615d64565b8051825114613ebc5760405162461bcd60e51b815260040161074290615921565b6000339050613edf81856000868660405180602001604052806000815250613b91565b60005b8351811015613fa7576000848281518110613eff57613eff6154f4565b602002602001015190506000848381518110613f1d57613f1d6154f4565b60209081029190910181015160008481526004835260408082206001600160a01b038c168352909352919091205490915081811015613f6e5760405162461bcd60e51b815260040161074290615da7565b60009283526004602090815260408085206001600160a01b038b1686529091529092209103905580613f9f81615520565b915050613ee2565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020615f4b8339815191528686604051613fe6929190615a10565b60405180910390a4604080516020810190915260009052610bea565b336000908152600d60205260409020546001600160a01b0316156108cb57336000818152600d6020526040908190205490516378ea2a9760e11b81526001600160a01b039091169163f1d4552e916140639190879087908790600401615deb565b600060405180830381600087803b15801561407d57600080fd5b505af1158015613d38573d6000803e3d6000fd5b61409d8484848461440e565b600083815260186020526040812080548492906140bb9084906159f8565b909155505050505050565b6140d2848484846144de565b60005b835181101561091d578281815181106140f0576140f06154f4565b60200260200101516018600086848151811061410e5761410e6154f4565b60200260200101518152602001908152602001600020600082825461413391906159f8565b90915550506001016140d5565b600081815260018301602052604081205461418757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610770565b506000610770565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106141c9576141c96154f4565b602090810291909101015292915050565b6001600160a01b0384163b156121b95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061421e9089908990889088908890600401615e35565b6020604051808303816000875af1925050508015614259575060408051601f3d908101601f1916820190925261425691810190615c5a565b60015b61426557613c68615c77565b6001600160e01b0319811663f23a6e6160e01b14613d385760405162461bcd60e51b815260040161074290615d1c565b60006001600160e01b031982166314d9799760e21b14806142c657506001600160e01b031982166328f10a2160e01b145b806142d557506142d5826138b2565b806142f057506001600160e01b03198216635d9dd7eb60e11b145b8061430b57506001600160e01b03198216632dde656160e21b145b8061432657506001600160e01b031982166335681b5360e21b145b8061077057506001600160e01b0319821663152a902d60e11b1492915050565b6000614359826301ffc9a760e01b614379565b80156107705750614372826001600160e01b0319614379565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d915060005190508280156143eb575060208210155b80156143f75750600081115b979650505050505050565b6121b985858585614627565b6001600160a01b0384166144345760405162461bcd60e51b815260040161074290615e6f565b3360006144408561418f565b9050600061444d8561418f565b905061445e83600089858589613b91565b60008681526004602090815260408083206001600160a01b038b168452909152812080548792906144909084906159f8565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020615f6b833981519152910160405180910390a4613d38836000898989896141da565b6001600160a01b0384166145045760405162461bcd60e51b815260040161074290615e6f565b81518351146145255760405162461bcd60e51b815260040161074290615921565b3361453581600087878787613b91565b60005b84518110156145d157838181518110614553576145536154f4565b602002602001015160046000878481518110614571576145716154f4565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546145b991906159f8565b909155508190506145c981615520565b915050614538565b50846001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020615f4b8339815191528787604051614610929190615a10565b60405180910390a461091d81600087878787613bdd565b60008251116146485760405162461bcd60e51b815260040161074290615570565b6000600f600084600081518110614661576146616154f4565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b835181101561470257816001600160a01b0316600f60008684815181106146b9576146b96154f4565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146146fa5760405162461bcd60e51b815260040161074290615a3a565b600101614690565b506001600160a01b0381166000908152600e602052604090205460ff16156147bc5760405163e483517760e01b81526001600160a01b0382169063e4835177906147589033908990899089908990600401615eb0565b6020604051808303816000875af1158015614777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061479b9190615ef6565b6147b75760405162461bcd60e51b815260040161074290615f13565b61091d565b6008546001600160a01b03161561091d5760085460405163e483517760e01b81526001600160a01b039091169063e4835177906148059033908990899089908990600401615eb0565b6020604051808303816000875af1158015614824573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148489190615ef6565b61091d5760405162461bcd60e51b815260040161074290615f13565b82805461487090615471565b90600052602060002090601f01602090048101928261489257600085556148d8565b82601f106148ab5782800160ff198235161785556148d8565b828001600101855582156148d8579182015b828111156148d85782358255916020019190600101906148bd565b50610b98929150614976565b50805460008255906000526020600020908101906107d9919061498b565b82805461490e90615471565b90600052602060002090601f01602090048101928261493057600085556148d8565b82601f1061494957805160ff19168380011785556148d8565b828001600101855582156148d8579182015b828111156148d857825182559160200191906001019061495b565b5b80821115610b985760008155600101614977565b5b80821115610b985780546001600160b01b031916815560010161498c565b6001600160a01b03811681146107d957600080fd5b600080604083850312156149d257600080fd5b82356149dd816149aa565b946020939093013593505050565b6001600160e01b0319811681146107d957600080fd5b600060208284031215614a1357600080fd5b813561199c816149eb565b600060208284031215614a3057600080fd5b813561199c816149aa565b60005b83811015614a56578181015183820152602001614a3e565b83811115610bea5750506000910152565b60008151808452614a7f816020860160208601614a3b565b601f01601f19169290920160200192915050565b60208152600061199c6020830184614a67565b600060208284031215614ab857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015614aef57815187529582019590820190600101614ad3565b509495945050505050565b60208152600061199c6020830184614abf565b60008083601f840112614b1f57600080fd5b5081356001600160401b03811115614b3657600080fd5b60208301915083602082850101111561097057600080fd5b600080600060408486031215614b6357600080fd5b8335925060208401356001600160401b03811115614b8057600080fd5b614b8c86828701614b0d565b9497909650939450505050565b60008083601f840112614bab57600080fd5b5081356001600160401b03811115614bc257600080fd5b6020830191508360208260051b850101111561097057600080fd5b600080600080600060608688031215614bf557600080fd5b8535945060208601356001600160401b0380821115614c1357600080fd5b614c1f89838a01614b99565b90965094506040880135915080821115614c3857600080fd5b50614c4588828901614b99565b969995985093965092949392505050565b60008060408385031215614c6957600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614ccc57614ccc614c91565b6040525050565b60006001600160401b03821115614cec57614cec614c91565b5060051b60200190565b600082601f830112614d0757600080fd5b81356020614d1482614cd3565b604051614d218282614ca7565b83815260059390931b8501820192828101915086841115614d4157600080fd5b8286015b84811015614d5c5780358352918301918301614d45565b509695505050505050565b60006001600160401b03821115614d8057614d80614c91565b50601f01601f191660200190565b6000614d9983614d67565b604051614da68282614ca7565b809250848152858585011115614dbb57600080fd5b8484602083013760006020868301015250509392505050565b600082601f830112614de557600080fd5b61199c83833560208501614d8e565b600080600080600060a08688031215614e0c57600080fd5b8535614e17816149aa565b94506020860135614e27816149aa565b935060408601356001600160401b0380821115614e4357600080fd5b614e4f89838a01614cf6565b94506060880135915080821115614e6557600080fd5b614e7189838a01614cf6565b93506080880135915080821115614e8757600080fd5b50614e9488828901614dd4565b9150509295509295909350565b60008060208385031215614eb457600080fd5b82356001600160401b03811115614eca57600080fd5b614ed685828601614b0d565b90969095509350505050565b600080600060408486031215614ef757600080fd5b8335614f02816149aa565b925060208401356001600160401b03811115614b8057600080fd5b600081518084526020808501945080840160005b83811015614aef5781516001600160a01b031687529582019590820190600101614f31565b60208152600061199c6020830184614f1d565b60008060008060408587031215614f7f57600080fd5b84356001600160401b0380821115614f9657600080fd5b614fa288838901614b99565b90965094506020870135915080821115614fbb57600080fd5b50614fc887828801614b99565b95989497509550505050565b600080600060608486031215614fe957600080fd5b8335614ff4816149aa565b925060208401356001600160401b038082111561501057600080fd5b61501c87838801614cf6565b9350604086013591508082111561503257600080fd5b5061503f86828701614cf6565b9150509250925092565b80151581146107d957600080fd5b6000806000806060858703121561506d57600080fd5b8435615078816149aa565b935060208501356001600160401b0381111561509357600080fd5b61509f87828801614b0d565b90945092505060408501356150b381615049565b939692955090935050565b600080604083850312156150d157600080fd5b82356001600160401b03808211156150e857600080fd5b818501915085601f8301126150fc57600080fd5b8135602061510982614cd3565b6040516151168282614ca7565b83815260059390931b850182019282810191508984111561513657600080fd5b948201945b8386101561515d57853561514e816149aa565b8252948201949082019061513b565b9650508601359250508082111561517357600080fd5b5061518085828601614cf6565b9150509250929050565b60008060006040848603121561519f57600080fd5b83356001600160401b03808211156151b657600080fd5b6151c287838801614cf6565b945060208601359150808211156151d857600080fd5b50614b8c86828701614b99565b600080600080600080606087890312156151fe57600080fd5b86356001600160401b038082111561521557600080fd5b6152218a838b01614b99565b9098509650602089013591508082111561523a57600080fd5b6152468a838b01614b99565b9096509450604089013591508082111561525f57600080fd5b5061526c89828a01614b99565b979a9699509497509295939492505050565b60008060006040848603121561529357600080fd5b83356001600160401b038111156152a957600080fd5b6152b586828701614b0d565b90945092505060208401356152c981615049565b809150509250925092565b600080604083850312156152e757600080fd5b82356152f2816149aa565b9150602083013561530281615049565b809150509250929050565b60006020828403121561531f57600080fd5b813561199c81615049565b60008060008060006060868803121561534257600080fd5b853561534d816149aa565b945060208601356001600160401b0380821115614c1357600080fd5b60408152600061537c6040830185614f1d565b828103602084015261538e8185614abf565b95945050505050565b600080604083850312156153aa57600080fd5b82356153b5816149aa565b91506020830135615302816149aa565b600080600080600060a086880312156153dd57600080fd5b85356153e8816149aa565b945060208601356153f8816149aa565b9350604086013592506060860135915060808601356001600160401b0381111561542157600080fd5b614e9488828901614dd4565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b600181811c9082168061548557607f821691505b602082108103611d5057634e487b7160e01b600052602260045260246000fd5b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016155325761553261550a565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b6000808335601e198436030181126155ae57600080fd5b8301803591506001600160401b038211156155c857600080fd5b60200191503681900382131561097057600080fd5b6020808252600d908201526c24b73b30b634b2103a37b5b2b760991b604082015260600190565b600061560f83614cd3565b60405161561c8282614ca7565b84815260208082019250600586901b85013681111561563a57600080fd5b855b818110156156895780356001600160401b0381111561565b5760008081fd5b870136601f82011261566d5760008081fd5b61567b368235868401614d8e565b86525093820193820161563c565b50919695505050505050565b634e487b7160e01b600052602160045260246000fd5b600083516156bd818460208801614a3b565b8351908301906156d1818360208801614a3b565b01949350505050565b602080825260159082015274115e1d195b9cda5bdb88189b1858dadb1a5cdd1959605a1b604082015260600190565b8054600090600181811c908083168061572357607f831692505b6020808410820361574457634e487b7160e01b600052602260045260246000fd5b818015615758576001811461576957615796565b60ff19861689528489019650615796565b60008881526020902060005b8681101561578e5781548b820152908501908301615775565b505084890196505b50505050505092915050565b60006135f16157b18386615709565b84615709565b6000602082840312156157c957600080fd5b81516001600160401b038111156157df57600080fd5b8201601f810184136157f057600080fd5b80516157fb81614d67565b6040516158088282614ca7565b82815286602084860101111561581d57600080fd5b61582e836020830160208701614a3b565b9695505050505050565b60006158448285615709565b83516156d1818360208801614a3b565b6040808252810184905260008560608301825b8781101561589757823561587a816149aa565b6001600160a01b0316825260209283019290910190600101615867565b5083810360208501528481526001600160fb1b038511156158b757600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60008160001904831182151516156158f2576158f261550a565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261591c5761591c6158f7565b500490565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115615a0b57615a0b61550a565b500190565b60408152600061537c6040830185614abf565b600082821015615a3557615a3561550a565b500390565b6020808252601c908201527f4d69736d61746368656420746f6b656e206f726967696e61746f727300000000604082015260600190565b6001600160a01b0384168152606060208201819052600090615a9590830185614abf565b828103604084015261582e8185614abf565b600082601f830112615ab857600080fd5b81516020615ac582614cd3565b604051615ad28282614ca7565b83815260059390931b8501820192828101915086841115615af257600080fd5b8286015b84811015614d5c5780518352918301918301615af6565b60008060408385031215615b2057600080fd5b82516001600160401b0380821115615b3757600080fd5b818501915085601f830112615b4b57600080fd5b81516020615b5882614cd3565b604051615b658282614ca7565b83815260059390931b8501820192828101915089841115615b8557600080fd5b948201945b83861015615bac578551615b9d816149aa565b82529482019490820190615b8a565b91880151919650909350505080821115615bc557600080fd5b5061518085828601615aa7565b600082615be157615be16158f7565b500690565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090615c2890830186614abf565b8281036060840152615c3a8186614abf565b90508281036080840152615c4e8185614a67565b98975050505050505050565b600060208284031215615c6c57600080fd5b815161199c816149eb565b600060033d1115615c905760046000803e5060005160e01c5b90565b600060443d1015615ca15790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615cd057505050505090565b8285019150815181811115615ce85750505050505090565b843d8701016020828501011115615d025750505050505090565b615d1160208286010187614ca7565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0385168152608060208201819052600090615e0f90830186614f1d565b8281036040840152615e218186614abf565b905082810360608401526143f78185614abf565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906143f790830184614a67565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b03868116825285811660208301528416604082015260a060608201819052600090615ee490830185614abf565b8281036080840152615c4e8185614abf565b600060208284031215615f0857600080fd5b815161199c81615049565b6020808252601a908201527f457874656e73696f6e20617070726f76616c206661696c75726500000000000060408201526060019056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6261723a2f2f7a6d63315754737049684679565938326277664149634945784c4648356c55634848554e307758673457382fa2646970667358221220bf79de54dc54884b22e87dd8a553321893858d3ae10e59410baa7628d2bdbef864736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102d65760003560e01c80636d73e66911610188578063b9c4d9fb116100e4578063e92a89f611610092578063e92a89f614610661578063e985e9c514610674578063f0cdc49914610687578063f242432a1461069a578063f2fde38b146106ad578063feeb5a9a146106c0578063ffa1ad74146106d357600080fd5b8063b9c4d9fb146105df578063bb3bafd6146105f2578063bd85b03914610613578063c7db289314610633578063ce8aee9d1461063b578063d5a06d4c146105f2578063e6c884dc1461064e57600080fd5b806395d89b411161014157806395d89b411461057057806399e0dd7c14610578578063a22cb4651461058b578063a341793b1461059e578063aafb2d44146105a6578063ac0c8cfa146105b9578063b0fe87c9146105cc57600080fd5b80636d73e6691461051f578063715018a61461053257806382dcc0c81461053a57806383b7db631461054d5780638c6e8472146105555780638da5cb5b1461056857600080fd5b80632eb2c2d6116102375780633e6134b8116101f05780633e6134b81461049a5780633f0f37f6146104ad5780634e1273f4146104c0578063596798ad146104d357806361e5bc6b146104e657806366d1e9d0146104f9578063695c96e61461050c57600080fd5b80632eb2c2d61461042657806330176e13146104395780633071a0f91461044c57806331ae450b1461045f578063332dd1ae146104745780633db0f8ab1461048757600080fd5b8063162094c411610294578063162094c41461038157806320e4afe21461039457806322f374d0146103a7578063239be317146103cc57806324d7806c146103df5780632a55205a146103f25780632d3456701461041357600080fd5b8062fdd58e146102db57806301ffc9a71461030157806302e7afb71461032457806306fdde03146103395780630e89341c1461034e5780630ebd4c7f14610361575b600080fd5b6102ee6102e93660046149bf565b6106db565b6040519081526020015b60405180910390f35b61031461030f366004614a01565b610776565b60405190151581526020016102f8565b610337610332366004614a1e565b610790565b005b6103416107dc565b6040516102f89190614a93565b61034161035c366004614aa6565b61086a565b61037461036f366004614aa6565b610875565b6040516102f89190614afa565b61033761038f366004614b4e565b610880565b6103376103a2366004614bdd565b6108d0565b6008546001600160a01b03165b6040516001600160a01b0390911681526020016102f8565b6103b46103da366004614aa6565b610924565b6103146103ed366004614a1e565b61092f565b610405610400366004614c56565b61095e565b6040516102f8929190614c78565b610337610421366004614a1e565b610977565b610337610434366004614df4565b6109d4565b610337610447366004614ea1565b610a19565b61033761045a366004614ee2565b610a98565b610467610aee565b6040516102f89190614f56565b610337610482366004614f69565b610b9c565b610337610495366004614fd4565b610bf0565b6103376104a8366004614ea1565b610d0c565b6103376104bb366004615057565b610d20565b6103746104ce3660046150be565b610d75565b6103376104e1366004614a1e565b610e9e565b6103376104f436600461518a565b610ee7565b610337610507366004614ea1565b610f69565b61033761051a3660046151e5565b610f7b565b61033761052d366004614a1e565b611153565b6103376111ab565b61033761054836600461527e565b6111bf565b6104676111d2565b6103746105633660046151e5565b611272565b6103b461132c565b61034161133b565b610337610586366004614ea1565b611348565b6103376105993660046152d4565b611392565b61034161139d565b6103376105b436600461518a565b6113b4565b6103376105c736600461530d565b61146e565b6103376105da36600461532a565b611480565b6104676105ed366004614aa6565b6114cd565b610605610600366004614aa6565b6114d8565b6040516102f8929190615369565b6102ee610621366004614aa6565b60009081526018602052604090205490565b6103416114ed565b610337610649366004614a1e565b61154d565b61033761065c3660046151e5565b611596565b61033761066f366004614b4e565b61170b565b610314610682366004615397565b61171e565b610337610695366004615397565b61174c565b6103376106a83660046153c5565b611796565b6103376106bb366004614a1e565b6117db565b6103746106ce3660046151e5565b611851565b6102ee600281565b60006001600160a01b03831661074b5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526004602090815260408083206001600160a01b03861684529091529020545b92915050565b600061078182611930565b80610770575061077082611959565b3361079961132c565b6001600160a01b031614806107b457506107b460023361197e565b6107d05760405162461bcd60e51b81526004016107429061542d565b6107d9816119a3565b50565b601680546107e990615471565b80601f016020809104026020016040519081016040528092919081815260200182805461081590615471565b80156108625780601f1061083757610100808354040283529160200191610862565b820191906000526020600020905b81548152906001019060200180831161084557829003601f168201915b505050505081565b606061077082611aaf565b606061077082611d56565b3361088961132c565b6001600160a01b031614806108a457506108a460023361197e565b6108c05760405162461bcd60e51b81526004016107429061542d565b6108cb838383611d61565b505050565b336108d961132c565b6001600160a01b031614806108f457506108f460023361197e565b6109105760405162461bcd60e51b81526004016107429061542d565b61091d8585858585611dc9565b5050505050565b600061077082611e50565b6000816001600160a01b031661094361132c565b6001600160a01b03161480610770575061077060028361197e565b60008061096b8484611edb565b915091505b9250929050565b61097f611fb2565b61098a60028261197e565b156107d95760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36109d0600282612011565b5050565b6001600160a01b0385163314806109f057506109f0853361171e565b610a0c5760405162461bcd60e51b8152600401610742906154a5565b61091d8585858585612026565b33610a2261132c565b6001600160a01b03161480610a3d5750610a3d60023361197e565b610a595760405162461bcd60e51b81526004016107429061542d565b6109d082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121c192505050565b33610aa161132c565b6001600160a01b03161480610abc5750610abc60023361197e565b610ad85760405162461bcd60e51b81526004016107429061542d565b610ae1836121fd565b6108cb8383836000612225565b6060610afa6002612312565b6001600160401b03811115610b1157610b11614c91565b604051908082528060200260200182016040528015610b3a578160200160208202803683370190505b50905060005b610b4a6002612312565b811015610b9857610b5c60028261231c565b828281518110610b6e57610b6e6154f4565b6001600160a01b039092166020928302919091019091015280610b9081615520565b915050610b40565b5090565b33610ba561132c565b6001600160a01b03161480610bc05750610bc060023361197e565b610bdc5760405162461bcd60e51b81526004016107429061542d565b610bea600085858585612328565b50505050565b600260015403610c125760405162461bcd60e51b815260040161074290615539565b60026001556001600160a01b038316331480610c335750610c33833361171e565b610c7f5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610742565b8051825114610ca05760405162461bcd60e51b815260040161074290615570565b8151600103610ced57610ce88383600081518110610cc057610cc06154f4565b602002602001015183600081518110610cdb57610cdb6154f4565b6020026020010151612415565b610cf8565b610cf8838383612448565b610d038383836124c1565b50506001805550565b610d1461262a565b6109d082826000612681565b33610d2961132c565b6001600160a01b03161480610d445750610d4460023361197e565b610d605760405162461bcd60e51b81526004016107429061542d565b610d69846121fd565b610bea84848484612225565b60608151835114610dda5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610742565b600083516001600160401b03811115610df557610df5614c91565b604051908082528060200260200182016040528015610e1e578160200160208202803683370190505b50905060005b8451811015610e9657610e69858281518110610e4257610e426154f4565b6020026020010151858381518110610e5c57610e5c6154f4565b60200260200101516106db565b828281518110610e7b57610e7b6154f4565b6020908102919091010152610e8f81615520565b9050610e24565b509392505050565b33610ea761132c565b6001600160a01b03161480610ec25750610ec260023361197e565b610ede5760405162461bcd60e51b81526004016107429061542d565b6107d9816126be565b610eef61262a565b82518114610f0f5760405162461bcd60e51b815260040161074290615570565b60005b8351811015610bea57610f61848281518110610f3057610f306154f4565b6020026020010151848484818110610f4a57610f4a6154f4565b9050602002810190610f5c9190615597565b612712565b600101610f12565b610f7161262a565b6109d08282612748565b600260015403610f9d5760405162461bcd60e51b815260040161074290615539565b600260015533610fab61132c565b6001600160a01b03161480610fc65750610fc660023361197e565b610fe25760405162461bcd60e51b81526004016107429061542d565b60005b838110156110a6576000858583818110611001576110016154f4565b90506020020135905060008111801561101c57506007548111155b6110385760405162461bcd60e51b8152600401610742906155dd565b6000818152600f60205260409020546001600160a01b03161561109d5760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e206372656174656420627920657874656e73696f6e0000000000006044820152606401610742565b50600101610fe5565b50611147600087878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061276292505050565b50506001805550505050565b61115b611fb2565b61116660028261197e565b6107d95760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36109d0600282612a25565b6111b3611fb2565b6111bd6000612a3a565b565b6111c761262a565b6108cb838383612681565b60606111de6009612312565b6001600160401b038111156111f5576111f5614c91565b60405190808252806020026020018201604052801561121e578160200160208202803683370190505b50905060005b61122e6009612312565b811015610b985761124060098261231c565b828281518110611252576112526154f4565b6001600160a01b0390921660209283029190910190910152600101611224565b60606002600154036112965760405162461bcd60e51b815260040161074290615539565b60026001556112a361262a565b61131d3388888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a9182918501908490808284376000920191909152506113189250889150899050615604565b612a8a565b60018055979650505050505050565b6000546001600160a01b031690565b601780546107e990615471565b3361135161132c565b6001600160a01b0316148061136c575061136c60023361197e565b6113885760405162461bcd60e51b81526004016107429061542d565b6109d08282612e17565b6109d0338383612e4b565b6019546060906113af9060ff16612f2b565b905090565b336113bd61132c565b6001600160a01b031614806113d857506113d860023361197e565b6113f45760405162461bcd60e51b81526004016107429061542d565b825181146114145760405162461bcd60e51b815260040161074290615570565b60005b8351811015610bea57611466848281518110611435576114356154f4565b602002602001015184848481811061144f5761144f6154f4565b90506020028101906114619190615597565b611d61565b600101611417565b61147661262a565b6107d933826130b7565b3361148961132c565b6001600160a01b031614806114a457506114a460023361197e565b6114c05760405162461bcd60e51b81526004016107429061542d565b61091d8585858585612328565b60606107708261312f565b6060806114e483613141565b91509150915091565b6060604051806060016040528060318152602001615f8b603191396019546115289060ff16600581111561152357611523615695565b6134f1565b6040516020016115399291906156ab565b604051602081830303815290604052905090565b3361155661132c565b6001600160a01b03161480611571575061157160023361197e565b61158d5760405162461bcd60e51b81526004016107429061542d565b6107d9816135f9565b6002600154036115b85760405162461bcd60e51b815260040161074290615539565b60026001556115c561262a565b60005b8381101561166b5733600f60008787858181106115e7576115e76154f4565b60209081029290920135835250810191909152604001600020546001600160a01b0316146116635760405162461bcd60e51b815260206004820152602360248201527f546f6b656e206e6f742063726561746564206279207468697320657874656e7360448201526234b7b760e91b6064820152608401610742565b6001016115c8565b506111473387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061276292505050565b61171361262a565b6108cb838383612712565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3361175561132c565b6001600160a01b03161480611770575061177060023361197e565b61178c5760405162461bcd60e51b81526004016107429061542d565b6109d0828261363a565b6001600160a01b0385163314806117b257506117b2853361171e565b6117ce5760405162461bcd60e51b8152600401610742906154a5565b61091d8585858585613763565b6117e3611fb2565b6001600160a01b0381166118485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610742565b6107d981612a3a565b60606002600154036118755760405162461bcd60e51b815260040161074290615539565b60026001553361188361132c565b6001600160a01b0316148061189e575061189e60023361197e565b6118ba5760405162461bcd60e51b81526004016107429061542d565b61131d600088888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a9182918501908490808284376000920191909152506113189250889150899050615604565b600061193b8261388d565b8061194a575061194a826138b2565b806107705750610770826138ed565b60006001600160e01b03198216630c934a3560e31b1480610770575061077082611930565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6001600160a01b038116158015906119c457506001600160a01b0381163014155b611a0c5760405162461bcd60e51b815260206004820152601960248201527821b0b73737ba10313630b1b5b634b9ba103cb7bab939b2b63360391b6044820152606401610742565b611a1760098261197e565b15611a5f5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a3611a5d600982612011565b505b611a6a600b8261197e565b6107d95760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a36109d0600b82612a25565b6060600082118015611ac357506007548211155b611adf5760405162461bcd60e51b8152600401610742906155dd565b6000828152600f60205260409020546001600160a01b0316611b02600b8261197e565b15611b1f5760405162461bcd60e51b8152600401610742906156da565b60008381526013602052604090208054611b3890615471565b159050611c52576001600160a01b03811660009081526012602052604090208054611b6290615471565b159050611bb3576001600160a01b038116600090815260126020908152604080832086845260138352928190209051611b9c9392016157a2565b604051602081830303815290604052915050919050565b60008381526013602052604090208054611bcc90615471565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf890615471565b8015611c455780601f10611c1a57610100808354040283529160200191611c45565b820191906000526020600020905b815481529060010190602001808311611c2857829003601f168201915b5050505050915050919050565b611c638163e9dc637560e01b613922565b15611cdb5760405163e9dc637560e01b81526001600160a01b0382169063e9dc637590611c969030908790600401614c78565b600060405180830381865afa158015611cb3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261199c91908101906157b7565b6001600160a01b03811660009081526011602052604090205460ff16611d2d576001600160a01b0381166000908152601060205260409020611d1c846134f1565b604051602001611b9c929190615838565b6001600160a01b03811660009081526010602052604090208054611bcc90615471565b50919050565b606061199c82613141565b600083118015611d7357506007548311155b8015611d9457506000838152600f60205260409020546001600160a01b0316155b611db05760405162461bcd60e51b8152600401610742906155dd565b6000838152601360205260409020610bea908383614864565b611dd58484848461393e565b6000858152601560205260408120611dec916148e4565b611e0b84848484601560008b81526020019081526020016000206139e3565b847fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee85858585604051611e419493929190615854565b60405180910390a25050505050565b6000818152600f60205260409020546001600160a01b031680611eae5760405162461bcd60e51b815260206004820152601660248201527527379032bc3a32b739b4b7b7103337b9103a37b5b2b760511b6044820152606401610742565b611eb9600b8261197e565b15611ed65760405162461bcd60e51b8152600401610742906156da565b919050565b600080600080611eea86613141565b91509150600182511115611f405760405162461bcd60e51b815260206004820152601c60248201527f4d6f7265207468616e203120726f79616c7479207265636569766572000000006044820152606401610742565b8151600003611f5757306000935093505050610970565b81600081518110611f6a57611f6a6154f4565b60200260200101516127108683600081518110611f8957611f896154f4565b6020026020010151611f9b91906158d8565b611fa5919061590d565b9350935050509250929050565b33611fbb61132c565b6001600160a01b0316146111bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610742565b600061199c836001600160a01b038416613a9e565b81518351146120475760405162461bcd60e51b815260040161074290615921565b6001600160a01b03841661206d5760405162461bcd60e51b815260040161074290615969565b3361207c818787878787613b91565b60005b845181101561216557600085828151811061209c5761209c6154f4565b6020026020010151905060008583815181106120ba576120ba6154f4565b60209081029190910181015160008481526004835260408082206001600160a01b038e16835290935291909120549091508181101561210b5760405162461bcd60e51b8152600401610742906159ae565b60008381526004602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061214a9084906159f8565b925050819055505050508061215e90615520565b905061207f565b50846001600160a01b0316866001600160a01b0316826001600160a01b0316600080516020615f4b83398151915287876040516121a3929190615a10565b60405180910390a46121b9818787878787613bdd565b505050505050565b600080526010602090815281516109d0917f6e0956cda88cad152e89927e53611735b61a5c762d1428573c6931b0a5efcb019190840190614902565b612208600b8261197e565b156107d95760405162461bcd60e51b8152600401610742906156da565b6001600160a01b038416301480159061224757506001600160a01b0384163b15155b61227d5760405162461bcd60e51b8152602060048201526007602482015266125b9d985b1a5960ca1b6044820152606401610742565b60405133906001600160a01b038616907fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a90600090a36001600160a01b03841660009081526010602052604090206122d6908484614864565b506001600160a01b0384166000908152601160205260409020805460ff1916821515179055612306600985612a25565b50610bea8460016130b7565b6000610770825490565b600061199c8383613d41565b6123348484848461393e565b6001600160a01b0385166000908152601460205260408120612355916148e4565b61238684848484601460008b6001600160a01b03166001600160a01b031681526020019081526020016000206139e3565b6001600160a01b0385166123d6577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b848484846040516123c99493929190615854565b60405180910390a161091d565b846001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f85858585604051611e419493929190615854565b612420838383613d6b565b6000828152601860205260408120805483929061243e908490615a23565b9091555050505050565b612453838383613e75565b60005b8251811015610bea57818181518110612471576124716154f4565b60200260200101516018600085848151811061248f5761248f6154f4565b6020026020010151815260200190815260200160002060008282546124b49190615a23565b9091555050600101612456565b60008251116124e25760405162461bcd60e51b815260040161074290615570565b6000600f6000846000815181106124fb576124fb6154f4565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b835181101561259c57816001600160a01b0316600f6000868481518110612553576125536154f4565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146125945760405162461bcd60e51b815260040161074290615a3a565b60010161252a565b506001600160a01b03811615610bea576125bd816303dc6f6560e51b613922565b15610bea576040516303dc6f6560e51b81526001600160a01b03821690637b8deca0906125f290879087908790600401615a71565b600060405180830381600087803b15801561260c57600080fd5b505af1158015612620573d6000803e3d6000fd5b5050505050505050565b61263560093361197e565b6111bd5760405162461bcd60e51b815260206004820152601c60248201527f4d757374206265207265676973746572656420657874656e73696f6e000000006044820152606401610742565b33600090815260106020526040902061269b908484614864565b50336000908152601160205260409020805460ff19169115159190911790555050565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f959c0e47a2fe3cf01e237ba4892e2cc3194d77cbfb33e434e40873225d6b595f9060200160405180910390a150565b6000838152600f60205260409020546001600160a01b03163314611db05760405162461bcd60e51b8152600401610742906155dd565b3360009081526012602052604090206108cb908383614864565b6001600160a01b0384161561277c5761277c838383614002565b8251600114801561278e575081516001145b801561279b575080516001145b156128425761283d836000815181106127b6576127b66154f4565b6020026020010151836000815181106127d1576127d16154f4565b6020026020010151836000815181106127ec576127ec6154f4565b602002602001015160006001600160401b0381111561280d5761280d614c91565b6040519080825280601f01601f191660200182016040528015612837576020820181803683370190505b50614091565b610bea565b82516001148015612854575080518251145b156128c25761283d8360008151811061286f5761286f6154f4565b6020026020010151838360006001600160401b0381111561289257612892614c91565b6040519080825280601f01601f1916602001820160405280156128bc576020820181803683370190505b506140c6565b815160011480156128d4575080516001145b1561293e5760005b8351811015612938576129308482815181106128fa576128fa6154f4565b602002602001015184600081518110612915576129156154f4565b6020026020010151846000815181106127ec576127ec6154f4565b6001016128dc565b50610bea565b81516001148015612950575080518351145b156129b35760005b8351811015612938576129ab848281518110612976576129766154f4565b602002602001015184600081518110612991576129916154f4565b60200260200101518484815181106127ec576127ec6154f4565b600101612958565b815183511480156129c5575080518351145b15612a0d5760005b835181101561293857612a058482815181106129eb576129eb6154f4565b6020026020010151848381518110612991576129916154f4565b6001016129cd565b60405162461bcd60e51b815260040161074290615570565b600061199c836001600160a01b038416614140565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600184511115612af55760408051600180825281830190925290602080830190803683370190505090506001825111158015612ad45750825160011480612ad4575082518451145b612af05760405162461bcd60e51b815260040161074290615570565b612b67565b82516001600160401b03811115612b0e57612b0e614c91565b604051908082528060200260200182016040528015612b37578160200160208202803683370190505b509050815160001480612b4b575081518351145b612b675760405162461bcd60e51b815260040161074290615570565b60005b8151811015612bde57600760008154612b8290615520565b909155506007548251839083908110612b9d57612b9d6154f4565b6020908102919091018101919091526007546000908152600f9091526040902080546001600160a01b0319166001600160a01b038816179055600101612b6a565b506001600160a01b03851615612bf957612bf9848285614002565b83516001148015612c0b575080516001145b15612c6157612c5c84600081518110612c2657612c266154f4565b602002602001015182600081518110612c4157612c416154f4565b6020026020010151856000815181106127ec576127ec6154f4565b612d70565b600184511115612d37578251600103612cd95760005b8451811015612cd357612ccb858281518110612c9557612c956154f4565b602002602001015183600081518110612cb057612cb06154f4565b6020026020010151866000815181106127ec576127ec6154f4565b600101612c77565b50612d70565b60005b8451811015612cd357612d2f858281518110612cfa57612cfa6154f4565b602002602001015183600081518110612d1557612d156154f4565b60200260200101518684815181106127ec576127ec6154f4565b600101612cdc565b612d7084600081518110612d4d57612d4d6154f4565b6020026020010151828560006001600160401b0381111561289257612892614c91565b60005b8151811015612e0e57825181108015612da657506000838281518110612d9b57612d9b6154f4565b602002602001015151115b15612e0657828181518110612dbd57612dbd6154f4565b602002602001015160136000848481518110612ddb57612ddb6154f4565b602002602001015181526020019081526020016000209080519060200190612e04929190614902565b505b600101612d73565b50949350505050565b6000805260126020526108cb7f7e7fa33969761a458e04f477e039a608702b4f924981d6653935a8319a08ad7b8383614864565b816001600160a01b0316836001600160a01b031603612ebe5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610742565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606006826005811115612f4157612f41615695565b60ff161115612f4f57600080fd5b816005811115612f6157612f61615695565b600003612f8a5750506040805180820190915260068152655055424c494360d01b602082015290565b816005811115612f9c57612f9c615695565b600103612fc85750506040805180820190915260098152684558434c555349564560b81b602082015290565b816005811115612fda57612fda615695565b60020361300757505060408051808201909152600a81526910d3d353515490d2505360b21b602082015290565b81600581111561301957613019615695565b60030361304e575050604080518082019091526012815271434f4d4d45524349414c5f4e4f5f4841544560701b602082015290565b81600581111561306057613060615695565b60040361308b57505060408051808201909152600881526714115494d3d3905360c21b602082015290565b505060408051808201909152601081526f504552534f4e414c5f4e4f5f4841544560801b602082015290565b6130cb826001620e90cb60e41b0319613922565b156109d0576001600160a01b0382166000818152600e6020908152604091829020805460ff191685151590811790915591519182527f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a36910160405180910390a25050565b606061313a82613141565b5092915050565b606080600060156000858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156131c357600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b900461ffff1681830152825260019092019101613179565b5050505090508051600003613312576000848152600f60205260409020546001600160a01b031680156133105761320181634e53ee3d60e11b613922565b1561328c57604051634e53ee3d60e11b81526001600160a01b03821690639ca7dc7a906132349030908990600401614c78565b600060405180830381865afa158015613251573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526132799190810190615b0d565b815191955093501561328c575050915091565b6001600160a01b038116600090815260146020908152604080832080548251818502810185019093528083529193909284015b8282101561330957600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b900461ffff16818301528252600190920191016132bf565b5050505091505b505b80516000036133b5576000808052601460209081527f4f26c3876aa9f4b92579780beea1161a61f87ebf1ec6ee865b299e447ecba99c8054604080518285028101850190915281815293919290919084015b828210156133ae57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b900461ffff1681830152825260019092019101613364565b5050505090505b8051156134eb5780516001600160401b038111156133d5576133d5614c91565b6040519080825280602002602001820160405280156133fe578160200160208202803683370190505b50925080516001600160401b0381111561341a5761341a614c91565b604051908082528060200260200182016040528015613443578160200160208202803683370190505b50915060005b81518110156134e957818181518110613464576134646154f4565b602002602001015160000151848281518110613482576134826154f4565b60200260200101906001600160a01b031690816001600160a01b0316815250508181815181106134b4576134b46154f4565b60200260200101516020015161ffff168382815181106134d6576134d66154f4565b6020908102919091010152600101613449565b505b50915091565b6060816000036135185750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613542578061352c81615520565b915061353b9050600a8361590d565b915061351c565b6000816001600160401b0381111561355c5761355c614c91565b6040519080825280601f01601f191660200182016040528015613586576020820181803683370190505b5090505b84156135f15761359b600183615a23565b91506135a8600a86615bd2565b6135b39060306159f8565b60f81b8183815181106135c8576135c86154f4565b60200101906001600160f81b031916908160001a9053506135ea600a8661590d565b945061358a565b949350505050565b60405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a36109d0600982612011565b61364560098361197e565b6136855760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21032bc3a32b739b4b7b760791b6044820152606401610742565b6001600160a01b03811615806136a757506136a7816378ea2a9760e11b613922565b6136e55760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610742565b6001600160a01b038281166000908152600d60205260409020548116908216146109d0576001600160a01b038281166000818152600d602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b6001600160a01b0384166137895760405162461bcd60e51b815260040161074290615969565b3360006137958561418f565b905060006137a28561418f565b90506137b2838989858589613b91565b60008681526004602090815260408083206001600160a01b038c168452909152902054858110156137f55760405162461bcd60e51b8152600401610742906159ae565b60008781526004602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906138349084906159f8565b909155505060408051888152602081018890526001600160a01b03808b16928c82169291881691600080516020615f6b833981519152910160405180910390a4613882848a8a8a8a8a6141da565b505050505050505050565b60006001600160e01b031982166301f4921160e61b1480610770575061077082614295565b60006001600160e01b03198216636cdb3d1360e11b148061194a57506001600160e01b031982166303a24d0760e21b14806107705750610770825b60006001600160e01b03198216632a9f3abf60e11b148061077057506301ffc9a760e01b6001600160e01b0319831614610770565b600061392d83614346565b801561199c575061199c8383614379565b82811461395d5760405162461bcd60e51b815260040161074290615570565b6000805b828110156139975783838281811061397b5761397b6154f4565b905060200201358261398d91906159f8565b9150600101613961565b50612710811061091d5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b6044820152606401610742565b60005b828110156121b957816040518060400160405280888885818110613a0c57613a0c6154f4565b9050602002016020810190613a219190614a1e565b6001600160a01b03168152602001868685818110613a4157613a416154f4565b61ffff602091820293909301358316909352508354600181810186556000958652948390208451910180549490930151909116600160a01b026001600160b01b03199093166001600160a01b0390911617919091179055016139e6565b60008181526001830160205260408120548015613b87576000613ac2600183615a23565b8554909150600090613ad690600190615a23565b9050818114613b3b576000866000018281548110613af657613af66154f4565b9060005260206000200154905080876000018481548110613b1957613b196154f4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b4c57613b4c615be6565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610770565b6000915050610770565b6001600160a01b03851615801590613bb157506001600160a01b03841615155b15613bcf576040516330d4e75d60e01b815260040160405180910390fd5b6121b9868686868686614402565b6001600160a01b0384163b156121b95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613c219089908990889088908890600401615bfc565b6020604051808303816000875af1925050508015613c5c575060408051601f3d908101601f19168201909252613c5991810190615c5a565b60015b613d0857613c68615c77565b806308c379a003613ca15750613c7c615c93565b80613c875750613ca3565b8060405162461bcd60e51b81526004016107429190614a93565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610742565b6001600160e01b0319811663bc197c8160e01b14613d385760405162461bcd60e51b815260040161074290615d1c565b50505050505050565b6000826000018281548110613d5857613d586154f4565b9060005260206000200154905092915050565b6001600160a01b038316613d915760405162461bcd60e51b815260040161074290615d64565b336000613d9d8461418f565b90506000613daa8461418f565b9050613dca83876000858560405180602001604052806000815250613b91565b60008581526004602090815260408083206001600160a01b038a16845290915290205484811015613e0d5760405162461bcd60e51b815260040161074290615da7565b60008681526004602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a9052909290881691600080516020615f6b833981519152910160405180910390a4604080516020810190915260009052613d38565b6001600160a01b038316613e9b5760405162461bcd60e51b815260040161074290615d64565b8051825114613ebc5760405162461bcd60e51b815260040161074290615921565b6000339050613edf81856000868660405180602001604052806000815250613b91565b60005b8351811015613fa7576000848281518110613eff57613eff6154f4565b602002602001015190506000848381518110613f1d57613f1d6154f4565b60209081029190910181015160008481526004835260408082206001600160a01b038c168352909352919091205490915081811015613f6e5760405162461bcd60e51b815260040161074290615da7565b60009283526004602090815260408085206001600160a01b038b1686529091529092209103905580613f9f81615520565b915050613ee2565b5060006001600160a01b0316846001600160a01b0316826001600160a01b0316600080516020615f4b8339815191528686604051613fe6929190615a10565b60405180910390a4604080516020810190915260009052610bea565b336000908152600d60205260409020546001600160a01b0316156108cb57336000818152600d6020526040908190205490516378ea2a9760e11b81526001600160a01b039091169163f1d4552e916140639190879087908790600401615deb565b600060405180830381600087803b15801561407d57600080fd5b505af1158015613d38573d6000803e3d6000fd5b61409d8484848461440e565b600083815260186020526040812080548492906140bb9084906159f8565b909155505050505050565b6140d2848484846144de565b60005b835181101561091d578281815181106140f0576140f06154f4565b60200260200101516018600086848151811061410e5761410e6154f4565b60200260200101518152602001908152602001600020600082825461413391906159f8565b90915550506001016140d5565b600081815260018301602052604081205461418757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610770565b506000610770565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106141c9576141c96154f4565b602090810291909101015292915050565b6001600160a01b0384163b156121b95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061421e9089908990889088908890600401615e35565b6020604051808303816000875af1925050508015614259575060408051601f3d908101601f1916820190925261425691810190615c5a565b60015b61426557613c68615c77565b6001600160e01b0319811663f23a6e6160e01b14613d385760405162461bcd60e51b815260040161074290615d1c565b60006001600160e01b031982166314d9799760e21b14806142c657506001600160e01b031982166328f10a2160e01b145b806142d557506142d5826138b2565b806142f057506001600160e01b03198216635d9dd7eb60e11b145b8061430b57506001600160e01b03198216632dde656160e21b145b8061432657506001600160e01b031982166335681b5360e21b145b8061077057506001600160e01b0319821663152a902d60e11b1492915050565b6000614359826301ffc9a760e01b614379565b80156107705750614372826001600160e01b0319614379565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d915060005190508280156143eb575060208210155b80156143f75750600081115b979650505050505050565b6121b985858585614627565b6001600160a01b0384166144345760405162461bcd60e51b815260040161074290615e6f565b3360006144408561418f565b9050600061444d8561418f565b905061445e83600089858589613b91565b60008681526004602090815260408083206001600160a01b038b168452909152812080548792906144909084906159f8565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020615f6b833981519152910160405180910390a4613d38836000898989896141da565b6001600160a01b0384166145045760405162461bcd60e51b815260040161074290615e6f565b81518351146145255760405162461bcd60e51b815260040161074290615921565b3361453581600087878787613b91565b60005b84518110156145d157838181518110614553576145536154f4565b602002602001015160046000878481518110614571576145716154f4565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546145b991906159f8565b909155508190506145c981615520565b915050614538565b50846001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020615f4b8339815191528787604051614610929190615a10565b60405180910390a461091d81600087878787613bdd565b60008251116146485760405162461bcd60e51b815260040161074290615570565b6000600f600084600081518110614661576146616154f4565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b835181101561470257816001600160a01b0316600f60008684815181106146b9576146b96154f4565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146146fa5760405162461bcd60e51b815260040161074290615a3a565b600101614690565b506001600160a01b0381166000908152600e602052604090205460ff16156147bc5760405163e483517760e01b81526001600160a01b0382169063e4835177906147589033908990899089908990600401615eb0565b6020604051808303816000875af1158015614777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061479b9190615ef6565b6147b75760405162461bcd60e51b815260040161074290615f13565b61091d565b6008546001600160a01b03161561091d5760085460405163e483517760e01b81526001600160a01b039091169063e4835177906148059033908990899089908990600401615eb0565b6020604051808303816000875af1158015614824573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148489190615ef6565b61091d5760405162461bcd60e51b815260040161074290615f13565b82805461487090615471565b90600052602060002090601f01602090048101928261489257600085556148d8565b82601f106148ab5782800160ff198235161785556148d8565b828001600101855582156148d8579182015b828111156148d85782358255916020019190600101906148bd565b50610b98929150614976565b50805460008255906000526020600020908101906107d9919061498b565b82805461490e90615471565b90600052602060002090601f01602090048101928261493057600085556148d8565b82601f1061494957805160ff19168380011785556148d8565b828001600101855582156148d8579182015b828111156148d857825182559160200191906001019061495b565b5b80821115610b985760008155600101614977565b5b80821115610b985780546001600160b01b031916815560010161498c565b6001600160a01b03811681146107d957600080fd5b600080604083850312156149d257600080fd5b82356149dd816149aa565b946020939093013593505050565b6001600160e01b0319811681146107d957600080fd5b600060208284031215614a1357600080fd5b813561199c816149eb565b600060208284031215614a3057600080fd5b813561199c816149aa565b60005b83811015614a56578181015183820152602001614a3e565b83811115610bea5750506000910152565b60008151808452614a7f816020860160208601614a3b565b601f01601f19169290920160200192915050565b60208152600061199c6020830184614a67565b600060208284031215614ab857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015614aef57815187529582019590820190600101614ad3565b509495945050505050565b60208152600061199c6020830184614abf565b60008083601f840112614b1f57600080fd5b5081356001600160401b03811115614b3657600080fd5b60208301915083602082850101111561097057600080fd5b600080600060408486031215614b6357600080fd5b8335925060208401356001600160401b03811115614b8057600080fd5b614b8c86828701614b0d565b9497909650939450505050565b60008083601f840112614bab57600080fd5b5081356001600160401b03811115614bc257600080fd5b6020830191508360208260051b850101111561097057600080fd5b600080600080600060608688031215614bf557600080fd5b8535945060208601356001600160401b0380821115614c1357600080fd5b614c1f89838a01614b99565b90965094506040880135915080821115614c3857600080fd5b50614c4588828901614b99565b969995985093965092949392505050565b60008060408385031215614c6957600080fd5b50508035926020909101359150565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614ccc57614ccc614c91565b6040525050565b60006001600160401b03821115614cec57614cec614c91565b5060051b60200190565b600082601f830112614d0757600080fd5b81356020614d1482614cd3565b604051614d218282614ca7565b83815260059390931b8501820192828101915086841115614d4157600080fd5b8286015b84811015614d5c5780358352918301918301614d45565b509695505050505050565b60006001600160401b03821115614d8057614d80614c91565b50601f01601f191660200190565b6000614d9983614d67565b604051614da68282614ca7565b809250848152858585011115614dbb57600080fd5b8484602083013760006020868301015250509392505050565b600082601f830112614de557600080fd5b61199c83833560208501614d8e565b600080600080600060a08688031215614e0c57600080fd5b8535614e17816149aa565b94506020860135614e27816149aa565b935060408601356001600160401b0380821115614e4357600080fd5b614e4f89838a01614cf6565b94506060880135915080821115614e6557600080fd5b614e7189838a01614cf6565b93506080880135915080821115614e8757600080fd5b50614e9488828901614dd4565b9150509295509295909350565b60008060208385031215614eb457600080fd5b82356001600160401b03811115614eca57600080fd5b614ed685828601614b0d565b90969095509350505050565b600080600060408486031215614ef757600080fd5b8335614f02816149aa565b925060208401356001600160401b03811115614b8057600080fd5b600081518084526020808501945080840160005b83811015614aef5781516001600160a01b031687529582019590820190600101614f31565b60208152600061199c6020830184614f1d565b60008060008060408587031215614f7f57600080fd5b84356001600160401b0380821115614f9657600080fd5b614fa288838901614b99565b90965094506020870135915080821115614fbb57600080fd5b50614fc887828801614b99565b95989497509550505050565b600080600060608486031215614fe957600080fd5b8335614ff4816149aa565b925060208401356001600160401b038082111561501057600080fd5b61501c87838801614cf6565b9350604086013591508082111561503257600080fd5b5061503f86828701614cf6565b9150509250925092565b80151581146107d957600080fd5b6000806000806060858703121561506d57600080fd5b8435615078816149aa565b935060208501356001600160401b0381111561509357600080fd5b61509f87828801614b0d565b90945092505060408501356150b381615049565b939692955090935050565b600080604083850312156150d157600080fd5b82356001600160401b03808211156150e857600080fd5b818501915085601f8301126150fc57600080fd5b8135602061510982614cd3565b6040516151168282614ca7565b83815260059390931b850182019282810191508984111561513657600080fd5b948201945b8386101561515d57853561514e816149aa565b8252948201949082019061513b565b9650508601359250508082111561517357600080fd5b5061518085828601614cf6565b9150509250929050565b60008060006040848603121561519f57600080fd5b83356001600160401b03808211156151b657600080fd5b6151c287838801614cf6565b945060208601359150808211156151d857600080fd5b50614b8c86828701614b99565b600080600080600080606087890312156151fe57600080fd5b86356001600160401b038082111561521557600080fd5b6152218a838b01614b99565b9098509650602089013591508082111561523a57600080fd5b6152468a838b01614b99565b9096509450604089013591508082111561525f57600080fd5b5061526c89828a01614b99565b979a9699509497509295939492505050565b60008060006040848603121561529357600080fd5b83356001600160401b038111156152a957600080fd5b6152b586828701614b0d565b90945092505060208401356152c981615049565b809150509250925092565b600080604083850312156152e757600080fd5b82356152f2816149aa565b9150602083013561530281615049565b809150509250929050565b60006020828403121561531f57600080fd5b813561199c81615049565b60008060008060006060868803121561534257600080fd5b853561534d816149aa565b945060208601356001600160401b0380821115614c1357600080fd5b60408152600061537c6040830185614f1d565b828103602084015261538e8185614abf565b95945050505050565b600080604083850312156153aa57600080fd5b82356153b5816149aa565b91506020830135615302816149aa565b600080600080600060a086880312156153dd57600080fd5b85356153e8816149aa565b945060208601356153f8816149aa565b9350604086013592506060860135915060808601356001600160401b0381111561542157600080fd5b614e9488828901614dd4565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b600181811c9082168061548557607f821691505b602082108103611d5057634e487b7160e01b600052602260045260246000fd5b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016155325761553261550a565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b6000808335601e198436030181126155ae57600080fd5b8301803591506001600160401b038211156155c857600080fd5b60200191503681900382131561097057600080fd5b6020808252600d908201526c24b73b30b634b2103a37b5b2b760991b604082015260600190565b600061560f83614cd3565b60405161561c8282614ca7565b84815260208082019250600586901b85013681111561563a57600080fd5b855b818110156156895780356001600160401b0381111561565b5760008081fd5b870136601f82011261566d5760008081fd5b61567b368235868401614d8e565b86525093820193820161563c565b50919695505050505050565b634e487b7160e01b600052602160045260246000fd5b600083516156bd818460208801614a3b565b8351908301906156d1818360208801614a3b565b01949350505050565b602080825260159082015274115e1d195b9cda5bdb88189b1858dadb1a5cdd1959605a1b604082015260600190565b8054600090600181811c908083168061572357607f831692505b6020808410820361574457634e487b7160e01b600052602260045260246000fd5b818015615758576001811461576957615796565b60ff19861689528489019650615796565b60008881526020902060005b8681101561578e5781548b820152908501908301615775565b505084890196505b50505050505092915050565b60006135f16157b18386615709565b84615709565b6000602082840312156157c957600080fd5b81516001600160401b038111156157df57600080fd5b8201601f810184136157f057600080fd5b80516157fb81614d67565b6040516158088282614ca7565b82815286602084860101111561581d57600080fd5b61582e836020830160208701614a3b565b9695505050505050565b60006158448285615709565b83516156d1818360208801614a3b565b6040808252810184905260008560608301825b8781101561589757823561587a816149aa565b6001600160a01b0316825260209283019290910190600101615867565b5083810360208501528481526001600160fb1b038511156158b757600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60008160001904831182151516156158f2576158f261550a565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261591c5761591c6158f7565b500490565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115615a0b57615a0b61550a565b500190565b60408152600061537c6040830185614abf565b600082821015615a3557615a3561550a565b500390565b6020808252601c908201527f4d69736d61746368656420746f6b656e206f726967696e61746f727300000000604082015260600190565b6001600160a01b0384168152606060208201819052600090615a9590830185614abf565b828103604084015261582e8185614abf565b600082601f830112615ab857600080fd5b81516020615ac582614cd3565b604051615ad28282614ca7565b83815260059390931b8501820192828101915086841115615af257600080fd5b8286015b84811015614d5c5780518352918301918301615af6565b60008060408385031215615b2057600080fd5b82516001600160401b0380821115615b3757600080fd5b818501915085601f830112615b4b57600080fd5b81516020615b5882614cd3565b604051615b658282614ca7565b83815260059390931b8501820192828101915089841115615b8557600080fd5b948201945b83861015615bac578551615b9d816149aa565b82529482019490820190615b8a565b91880151919650909350505080821115615bc557600080fd5b5061518085828601615aa7565b600082615be157615be16158f7565b500690565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090615c2890830186614abf565b8281036060840152615c3a8186614abf565b90508281036080840152615c4e8185614a67565b98975050505050505050565b600060208284031215615c6c57600080fd5b815161199c816149eb565b600060033d1115615c905760046000803e5060005160e01c5b90565b600060443d1015615ca15790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615cd057505050505090565b8285019150815181811115615ce85750505050505090565b843d8701016020828501011115615d025750505050505090565b615d1160208286010187614ca7565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0385168152608060208201819052600090615e0f90830186614f1d565b8281036040840152615e218186614abf565b905082810360608401526143f78185614abf565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906143f790830184614a67565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b03868116825285811660208301528416604082015260a060608201819052600090615ee490830185614abf565b8281036080840152615c4e8185614abf565b600060208284031215615f0857600080fd5b815161199c81615049565b6020808252601a908201527f457874656e73696f6e20617070726f76616c206661696c75726500000000000060408201526060019056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6261723a2f2f7a6d63315754737049684679565938326277664149634945784c4648356c55634848554e307758673457382fa2646970667358221220bf79de54dc54884b22e87dd8a553321893858d3ae10e59410baa7628d2bdbef864736f6c634300080d0033

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.