ETH Price: $2,452.28 (+1.61%)
 

Overview

Max Total Supply

0 WMVG

Holders

21

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 WMVG
0x0ec997abd9ae9bdce46a01aff482f613c3e38609
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:
WhereMyVansGo

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 500 runs

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

pragma solidity ^0.8.0;

// @title: Where My Vans Go
// @creator: Isaac Wright
// @author: andrewjiang.eth, built on manifold.xyz creator core

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ··_·······____···················__··___·····_····__·················______·····  //
//  ·| |·····/ / /_··___··________··/  |/  /_··_| |··/ /___·_____··_____/ ____/___··  //
//  ·| |·/|·/ / __ \/ _ \/ ___/ _ \/ /|_/ / /·/ / |·/ / __ `/ __ \/ ___/ /·__/ __ \·  //
//  ·| |/ |/ / /·/ /  __/ /··/  __/ /··/ / /_/ /| |/ / /_/ / / / (__  ) /_/ / /_/ /·  //
//  ·|__/|__/_/·/_/\___/_/···\___/_/··/_/\__, / |___/\__,_/_/ /_/____/\____/\____/··  //
//  ····································/____/······································  //
//  ·····················-)░░░░░▓░···························----))))--·············  //
//  ·····················)░░░░░░▓░···························░░░░░░░▓░░··-----------  //
//  ·····················)░░░░░░▓░···························░░░▓▓░░▓░░-)░░░░░░░░▓░░  //
//  ·····················)░░░░░░▓░··········(················░░░▓░░░░▓▓░░░░░░░░░░▓▓░  //
//  ·····················)▓▓░░░▓▓░·······(▓███▓··············░░▓▓░░░▓░░░░░░░░░░▓▓▓▓░  //
//  ·····················)▓▓░░░▓▓░·······)███▓▓▓·············░░░▓▓░░░▓░░░▓▓░░░░▓▓▓░░  //
//  ········░░░░░··░--░▓▓▓▓▓░░░▓▓▓········)█████-············░░░▓░░░░░░░▓▓▓▓░░░▓▓▓▓░  //
//  ········░▓▓░░░-░░░░▓▓▓▓▓░░░▓▓▓·······-░░▓██▓▓░░░)-·······░░░░▓░░░░░░░░▓▓▓▓░···░░  //
//  )))))···░▓▓░░▓░░))▓░▓▓▓▓░░░▓▓░··░·░░░█▓▓▓▓▓▓▓▓▓▓▓▓▓--···-░░▓▓░▓░░░░░░░░▓▓▓░░░░░░  //
//  ▓▓▓▓▓▓░░░▓▓░░░░░▓▓▓▓▓▓▓▓░░░░▓░·)░░)░▓▓▓▓▓▓▓▓▓▓▓██▓▓▓░░░░░░░░░░░░░░░▓▓▓▓▓░░░░░░░░  //
//  ▓▓▓░░░░░▓▓▓░░░░░▓▓▓▓▓▓▓▓▓▓▓▓░░··░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░▓░░░░)░-░░░▓▓▓▓▓░░░░░░░  //
//  ▓▓▓▓░░░░░▓░░▓░░░▓▓▓▓▓▓▓▓(░░░░░░░░)▓▓░▓░░░▓▓▓▓▓▓▓▓░▓▓▓░░░)▓░░░░░░░░░░▓▓▓▓▓░░░░░░░  //
//  ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░░░░░░░▓▓▓░▓░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░*░░▓▓░░░░░░░░░░  //
//  ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓░░░░░░░░░░▓█░░▓▓█████████▓▓▓▓▓▓▓▓▓░-----··--)▓▓▓▓▓▓▓▓▓░▓░  //
//  █▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░░░░░░)██▓██████████████▓▓▓▓▓▓▓▓▓▓▓░▓▓▓░▓▓▓▓▓▓▓▓▓▓▓▓▓▓  //
//  ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓░░░░(░░░░░░░░░░▓▓█████████████████▓▓▓▓░▓▓▓▓▓▓░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓  //
//  ░░(((░(░░░░░░░░░░░░░░((░░░░(░((-)▓███████████████████▓▓░░░░░░░░░░░░░░░░░░░░░·░░░  //
//  ███████████████████████████████▓▓█████████████████████████████████▓████████░▓███  //
//  █████████████▓████████████████████████████████████████████████████▓████▓███░████  //
//  ████████████▓████████████▓▓▓▓▓▓▓▓█████████████████████████████████▓████▓███░███▓  //
//  ███████████████████████████▓▓▓▓█▓█████████████████████████████████▓████▓███░███▓  //
//  ████▓▓▓▓▓▓▓█▓░░░░▓▓▓▓|·············████▓···||*▓░█████░░░▓░░░░░░░░░░░░░░░░░▓░░░▓▓  //
//  ███████▓▓▓██▓▓▓░░▓░░░·-············*▓███░)▓▓·░)░█████░░▓▓░░░░░░░░░░░░░▓▓▓░░░▓░▓░  //
//  █████▓██▓███▓░░▓▓▓·*░·(·░|*░)░))---·-░▓▓▓░░░░))░▓▓▓█░░░░░░░░▓▓▓▓▓░░▓░░░-░░░░▓░▓░  //
//  ██████▓█████▓▓▓░░▓·░░···░)░░)-)░·||·░█▓░░░░░░(··)(░▓░-······░░░░░-*░░░░░░░░░▓░▓░  //
//  ██████▓▓▓░░·|░░░░▓·░░·░·░)░░(░(░·*░·░·░░░▓░░░░·░▓▓▓▓░···(·····)░(░░░░░░░░░░░··░░  //
//  ███░░░-·····()░░░░·░░·░·░)░░)░(░·*░·░·░░░░▓░░)·░░░░░░···(·····)░░░░░░░░░░░░░░░░░  //
//  ███▓▓░▓▓▓▓▓░▓▓▓▓░░·*░·░·░)░░(░(░░)░·░·░░░▓▓░░)·░░▓▓░░*··)·····)*░░░░░░░░░░░░░░░░  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

// From coast to coast, between borders and beyond, this series represents the journey that has forged the person and artist that I am today. 
// By following my vans on this vast journey through time, I hope you will feel every step and heartbeat, I hope you will rise above fears with me.
// If this journey has taught me anything it is that everything is about our struggle and process, if you never climb, you never see the view. 
//
// This is the climb. 
// In snow and fog, sunshine and rain, from the tops of skyscrapers and bridges and through incarceration, here I learned to do whatever it takes. 
//
// These are the shoes that made me. 
// Welcome.

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@manifoldxyz/creator-core-solidity/contracts/ERC721Creator.sol";

interface ERC1155Partial {
    function isApprovedForAll(address account, address operator) external view returns (bool);
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata) external;
}

contract WhereMyVansGo is ERC721Creator {

    constructor() ERC721Creator("Where My Vans Go", "WMVG") {}

    // * CONSTANTS * //
    uint8 public constant collectionSize = 125; // Contract enforced collection size limit

    // * STORAGE * //
    address public purgatory = address(0);
    address public originalContract = address(0);
    bytes32 public merkleRoot; // Merkle root to verify original token IDs and new token IDs are valid
    bool public merkleRootLocked = false; // Lock merkle root to prevent tampering
    uint8[] public migrationRange;
    string public contractMetadataURI;
    
    mapping(uint256 => address) public originalTokenIdToAddress;
    mapping(uint256 => bool) public newTokenMinted;

    function setMigrationParameters(
        address _purgatory, 
        address _originalContract,
        uint8[] calldata _migrationRange,
        bytes32 _merkleRoot
    ) adminRequired public {
        purgatory = _purgatory;
        originalContract = _originalContract;
        migrationRange = _migrationRange;

        if(merkleRootLocked == false) {
            merkleRoot = _merkleRoot;
        }
    }

    function lockMerkleRoot() adminRequired public {
        require(merkleRoot != 0, "Merkle root has not yet been set");
        merkleRootLocked = true;
    }

    function setContractURI(string calldata _contractURI) adminRequired public {
        contractMetadataURI = _contractURI;
    }

    function contractURI() public view returns (string memory) {
        return contractMetadataURI;
    }

    // * MAIN FUNCTIONS * // 
    function sendTokenToPurgatory(
        uint256 originalTokenId, 
        uint256 newTokenId, 
        bytes32[] calldata merkleProof,
        string calldata uri
    ) external {
        require(purgatory != address(0), "Purgatory address cannot be the 0x0 address");
        require(originalContract != address(0), "Original contract address cannot be the 0x0 address");
        
        ERC1155Partial baseContract = ERC1155Partial(originalContract);
        require(baseContract.isApprovedForAll(msg.sender, address(this)), "Contract not yet approved for all transfers from original contract");
        
        bytes32 leaf = generateLeaf(originalTokenId, newTokenId);
        require(verifyMerkleProof(merkleProof, merkleRoot, leaf),"Invalid proof"); // Ensures original and new tokenIds are valid

        baseContract.safeTransferFrom(msg.sender, purgatory, originalTokenId, 1, "");
        originalTokenIdToAddress[originalTokenId] = msg.sender;
        resurrect(msg.sender, newTokenId, uri);
    }

    function resurrect(
        address owner, 
        uint256 newTokenId,
        string calldata uri
    ) internal virtual nonReentrant {
        require(newTokenMinted[newTokenId] == false, "New token already minted");
        require(bytes(uri).length > 0, "URI cannot be empty");
        
        newTokenMinted[newTokenId] = true;
        _safeMint(owner, newTokenId);
        _tokenURIs[newTokenId] = uri;
    }

    function mint(address to, uint8 tokenId, string calldata uri) public virtual nonReentrant adminRequired returns(uint256) {
        require(newTokenMinted[tokenId] == false, "New token already minted");
        require(tokenId < collectionSize, "Token ID must be less than max collection size");
        require(tokenId < migrationRange[0] || tokenId > migrationRange[1], "Token ID must be outside of migration range");
        require(bytes(uri).length > 0, "URI cannot be empty");

        newTokenMinted[tokenId] = true;
        _safeMint(to, tokenId);
        _tokenURIs[tokenId] = uri;
    }

    // * UTILITY FUNCTIONS * //
    function verifyMerkleProof(bytes32[] memory proof, bytes32 root, bytes32 leaf)
        public
        view
        returns (bool)
    {
        return MerkleProof.verify(proof, root, leaf);
    }

    function generateLeaf(uint256 originalTokenId, uint256 newTokenId) public pure returns (bytes32){
        string memory originalTokenStr = convertUintToString(originalTokenId);
        string memory newTokenStr = convertUintToString(newTokenId);
        string memory leaf = string(abi.encodePacked(originalTokenStr, " ", newTokenStr));
        return keccak256(abi.encodePacked(leaf));
    }

    function convertUintToString(uint _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len;
        while (_i != 0) {
            k = k-1;
            uint8 temp = (48 + uint8(_i - _i / 10 * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }

    // * DISABLING PARENT MINT FUNCTIONS * //
    function mintBase(address to) public virtual override nonReentrant adminRequired returns(uint256) {}
    function mintBase(address to, string calldata uri) public virtual override nonReentrant adminRequired returns(uint256) {}
    function mintBaseBatch(address to, uint16 count) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) {}
    function mintBaseBatch(address to, string[] calldata uris) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) {}
    function mintExtension(address to) public virtual override nonReentrant extensionRequired returns(uint256) {}
    function mintExtension(address to, string calldata uri) public virtual override nonReentrant extensionRequired returns(uint256) {}

}

File 2 of 27 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

File 3 of 27 : ERC721Creator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "./core/ERC721CreatorCore.sol";

/**
 * @dev ERC721Creator implementation
 */
contract ERC721Creator is AdminControl, ERC721, ERC721CreatorCore {

    constructor (string memory _name, string memory _symbol) ERC721(_name, _symbol) {
    }

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

    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        _approveTransfer(from, to, tokenId);    
    }

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

    /**
     * @dev See {ICreatorCore-registerExtension}.
     */
    function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external override adminRequired nonBlacklistRequired(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 extensionRequired {
        _setBaseTokenURIExtension(uri, false);
    }

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

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

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

    /**
     * @dev See {ICreatorCore-setTokenURIExtension}.
     */
    function setTokenURIExtension(uint256[] memory tokenIds, string[] calldata uris) external override extensionRequired {
        require(tokenIds.length == uris.length, "Invalid input");
        for (uint i = 0; i < tokenIds.length; i++) {
            _setTokenURIExtension(tokenIds[i], uris[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 = 0; i < tokenIds.length; i++) {
            _setTokenURI(tokenIds[i], uris[i]);            
        }
    }

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

    /**
     * @dev See {IERC721CreatorCore-mintBase}.
     */
    function mintBase(address to) public virtual override nonReentrant adminRequired returns(uint256) {
        return _mintBase(to, "");
    }

    /**
     * @dev See {IERC721CreatorCore-mintBase}.
     */
    function mintBase(address to, string calldata uri) public virtual override nonReentrant adminRequired returns(uint256) {
        return _mintBase(to, uri);
    }

    /**
     * @dev See {IERC721CreatorCore-mintBaseBatch}.
     */
    function mintBaseBatch(address to, uint16 count) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) {
        tokenIds = new uint256[](count);
        for (uint16 i = 0; i < count; i++) {
            tokenIds[i] = _mintBase(to, "");
        }
        return tokenIds;
    }

    /**
     * @dev See {IERC721CreatorCore-mintBaseBatch}.
     */
    function mintBaseBatch(address to, string[] calldata uris) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) {
        tokenIds = new uint256[](uris.length);
        for (uint i = 0; i < uris.length; i++) {
            tokenIds[i] = _mintBase(to, uris[i]);
        }
        return tokenIds;
    }

    /**
     * @dev Mint token with no extension
     */
    function _mintBase(address to, string memory uri) internal virtual returns(uint256 tokenId) {
        _tokenCount++;
        tokenId = _tokenCount;

        // Track the extension that minted the token
        _tokensExtension[tokenId] = address(this);

        _safeMint(to, tokenId);

        if (bytes(uri).length > 0) {
            _tokenURIs[tokenId] = uri;
        }

        // Call post mint
        _postMintBase(to, tokenId);
        return tokenId;
    }


    /**
     * @dev See {IERC721CreatorCore-mintExtension}.
     */
    function mintExtension(address to) public virtual override nonReentrant extensionRequired returns(uint256) {
        return _mintExtension(to, "");
    }

    /**
     * @dev See {IERC721CreatorCore-mintExtension}.
     */
    function mintExtension(address to, string calldata uri) public virtual override nonReentrant extensionRequired returns(uint256) {
        return _mintExtension(to, uri);
    }

    /**
     * @dev See {IERC721CreatorCore-mintExtensionBatch}.
     */
    function mintExtensionBatch(address to, uint16 count) public virtual override nonReentrant extensionRequired returns(uint256[] memory tokenIds) {
        tokenIds = new uint256[](count);
        for (uint16 i = 0; i < count; i++) {
            tokenIds[i] = _mintExtension(to, "");
        }
        return tokenIds;
    }

    /**
     * @dev See {IERC721CreatorCore-mintExtensionBatch}.
     */
    function mintExtensionBatch(address to, string[] calldata uris) public virtual override nonReentrant extensionRequired returns(uint256[] memory tokenIds) {
        tokenIds = new uint256[](uris.length);
        for (uint i = 0; i < uris.length; i++) {
            tokenIds[i] = _mintExtension(to, uris[i]);
        }
    }
    
    /**
     * @dev Mint token via extension
     */
    function _mintExtension(address to, string memory uri) internal virtual returns(uint256 tokenId) {
        _tokenCount++;
        tokenId = _tokenCount;

        _checkMintPermissions(to, tokenId);

        // Track the extension that minted the token
        _tokensExtension[tokenId] = msg.sender;

        _safeMint(to, tokenId);

        if (bytes(uri).length > 0) {
            _tokenURIs[tokenId] = uri;
        }
        
        // Call post mint
        _postMintExtension(to, tokenId);
        return tokenId;
    }

    /**
     * @dev See {IERC721CreatorCore-tokenExtension}.
     */
    function tokenExtension(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "Nonexistent token");
        return _tokenExtension(tokenId);
    }

    /**
     * @dev See {IERC721CreatorCore-burn}.
     */
    function burn(uint256 tokenId) public virtual override nonReentrant {
        require(_isApprovedOrOwner(msg.sender, tokenId), "Caller is not owner nor approved");
        address owner = ownerOf(tokenId);
        _burn(tokenId);
        _postBurn(owner, tokenId);
    }

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

    /**
     * @dev See {ICreatorCore-setRoyalties}.
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        require(_exists(tokenId), "Nonexistent token");
        _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) {
        require(_exists(tokenId), "Nonexistent token");
        return _getRoyalties(tokenId);
    }

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "Nonexistent token");
        return _tokenURI(tokenId);
    }
    
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 5 of 27 : 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 6 of 27 : ERC721CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

import "../extensions/ERC721/IERC721CreatorExtensionApproveTransfer.sol";
import "../extensions/ERC721/IERC721CreatorExtensionBurnable.sol";
import "../permissions/ERC721/IERC721CreatorMintPermissions.sol";
import "./IERC721CreatorCore.sol";
import "./CreatorCore.sol";

/**
 * @dev Core ERC721 creator implementation
 */
abstract contract ERC721CreatorCore is CreatorCore, IERC721CreatorCore {

    using EnumerableSet for EnumerableSet.AddressSet;

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

    /**
     * @dev See {ICreatorCore-setApproveTransferExtension}.
     */
    function setApproveTransferExtension(bool enabled) external override extensionRequired {
        require(!enabled || ERC165Checker.supportsInterface(msg.sender, type(IERC721CreatorExtensionApproveTransfer).interfaceId), "Extension must implement IERC721CreatorExtensionApproveTransfer");
        if (_extensionApproveTransfers[msg.sender] != enabled) {
            _extensionApproveTransfers[msg.sender] = enabled;
            emit ExtensionApproveTransferUpdated(msg.sender, enabled);
        }
    }

    /**
     * @dev Set mint permissions for an extension
     */
    function _setMintPermissions(address extension, address permissions) internal {
        require(_extensions.contains(extension), "CreatorCore: Invalid extension");
        require(permissions == address(0x0) || ERC165Checker.supportsInterface(permissions, type(IERC721CreatorMintPermissions).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 to, uint256 tokenId) internal {
        if (_extensionPermissions[msg.sender] != address(0x0)) {
            IERC721CreatorMintPermissions(_extensionPermissions[msg.sender]).approveMint(msg.sender, to, tokenId);
        }
    }

    /**
     * Override for post mint actions
     */
    function _postMintBase(address, uint256) internal virtual {}

    
    /**
     * Override for post mint actions
     */
    function _postMintExtension(address, uint256) internal virtual {}

    /**
     * Post-burning callback and metadata cleanup
     */
    function _postBurn(address owner, uint256 tokenId) internal virtual {
        // Callback to originating extension if needed
        if (_tokensExtension[tokenId] != address(this)) {
           if (ERC165Checker.supportsInterface(_tokensExtension[tokenId], type(IERC721CreatorExtensionBurnable).interfaceId)) {
               IERC721CreatorExtensionBurnable(_tokensExtension[tokenId]).onBurn(owner, tokenId);
           }
        }
        // Clear metadata (if any)
        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }    
        // Delete token origin extension tracking
        delete _tokensExtension[tokenId];    
    }

    /**
     * Approve a transfer
     */
    function _approveTransfer(address from, address to, uint256 tokenId) internal {
       if (_extensionApproveTransfers[_tokensExtension[tokenId]]) {
           require(IERC721CreatorExtensionApproveTransfer(_tokensExtension[tokenId]).approveTransfer(from, to, tokenId), "ERC721Creator: Extension approval failure");
       }
    }

}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 10 of 27 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 27 : 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 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 13 of 27 : 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 14 of 27 : 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 15 of 27 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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.
 */
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;

        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;

        assembly {
            result := store
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 17 of 27 : 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 18 of 27 : IERC721CreatorExtensionApproveTransfer.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 IERC721CreatorExtensionApproveTransfer is IERC165 {

    /**
     * @dev Set whether or not the creator 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 from, address to, uint256 tokenId) external returns (bool);
}

File 19 of 27 : IERC721CreatorExtensionBurnable.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 IERC721CreatorExtensionBurnable is IERC165 {
    /**
     * @dev callback handler for burn events
     */
    function onBurn(address owner, uint256 tokenId) external;
}

File 20 of 27 : IERC721CreatorMintPermissions.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 ERC721Creator compliant extension contracts.
 */
interface IERC721CreatorMintPermissions is IERC165 {

    /**
     * @dev get approval to mint
     */
    function approveMint(address extension, address to, uint256 tokenId) external;
}

File 21 of 27 : IERC721CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "./ICreatorCore.sol";

/**
 * @dev Core ERC721 creator interface
 */
interface IERC721CreatorCore is ICreatorCore {

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBase(address to) external returns (uint256);

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBase(address to, string calldata uri) external returns (uint256);

    /**
     * @dev batch mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBaseBatch(address to, uint16 count) external returns (uint256[] memory);

    /**
     * @dev batch mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBaseBatch(address to, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to) external returns (uint256);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to, string calldata uri) external returns (uint256);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenIds minted
     */
    function mintExtensionBatch(address to, uint16 count) external returns (uint256[] memory);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtensionBatch(address to, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev burn a token. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(uint256 tokenId) external;

}

File 22 of 27 : 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 "./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 _tokenCount = 0;

    // 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
    mapping (address => address payable[]) internal _extensionRoyaltyReceivers;
    mapping (address => uint256[]) internal _extensionRoyaltyBPS;
    mapping (uint256 => address payable[]) internal _tokenRoyaltyReceivers;
    mapping (uint256 => uint256[]) internal _tokenRoyaltyBPS;

    /**
     * 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 || 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
     */
    modifier extensionRequired() {
        require(_extensions.contains(msg.sender), "Must be registered extension");
        _;
    }

    /**
     * @dev Only allows non-blacklisted extensions
     */
    modifier nonBlacklistRequired(address extension) {
        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 = 0; i < _extensions.length(); i++) {
            extensions[i] = _extensions.at(i);
        }
        return extensions;
    }

    /**
     * @dev Register an extension
     */
    function _registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) internal {
        require(extension != address(this), "Creator: Invalid");
        require(extension.isContract(), "Creator: Extension must be a contract");
        if (!_extensions.contains(extension)) {
            _extensionBaseURI[extension] = baseURI;
            _extensionBaseURIIdentical[extension] = baseURIIdentical;
            emit ExtensionRegistered(extension, msg.sender);
            _extensions.add(extension);
        }
    }

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

    /**
     * @dev Blacklist an extension
     */
    function _blacklistExtension(address extension) internal {
       require(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(this)] = uri;
    }

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


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

    /**
     * @dev Retrieve a token's URI
     */
    function _tokenURI(uint256 tokenId) internal view returns (string memory) {
        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(this), "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[] storage, uint256[] storage) {
        return (_getRoyaltyReceivers(tokenId), _getRoyaltyBPS(tokenId));
    }

    /**
     * Helper to get royalty receivers for a token
     */
    function _getRoyaltyReceivers(uint256 tokenId) view internal returns (address payable[] storage) {
        if (_tokenRoyaltyReceivers[tokenId].length > 0) {
            return _tokenRoyaltyReceivers[tokenId];
        } else if (_extensionRoyaltyReceivers[_tokensExtension[tokenId]].length > 0) {
            return _extensionRoyaltyReceivers[_tokensExtension[tokenId]];
        }
        return _extensionRoyaltyReceivers[address(this)];        
    }

    /**
     * Helper to get royalty basis points for a token
     */
    function _getRoyaltyBPS(uint256 tokenId) view internal returns (uint256[] storage) {
        if (_tokenRoyaltyBPS[tokenId].length > 0) {
            return _tokenRoyaltyBPS[tokenId];
        } else if (_extensionRoyaltyBPS[_tokensExtension[tokenId]].length > 0) {
            return _extensionRoyaltyBPS[_tokensExtension[tokenId]];
        }
        return _extensionRoyaltyBPS[address(this)];        
    }

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

    /**
     * Set royalties for a token
     */
    function _setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) internal {
        require(receivers.length == basisPoints.length, "Invalid input");
        uint256 totalBasisPoints;
        for (uint i = 0; i < basisPoints.length; i++) {
            totalBasisPoints += basisPoints[i];
        }
        require(totalBasisPoints < 10000, "Invalid total royalties");
        _tokenRoyaltyReceivers[tokenId] = receivers;
        _tokenRoyaltyBPS[tokenId] = basisPoints;
        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 {
        require(receivers.length == basisPoints.length, "Invalid input");
        uint256 totalBasisPoints;
        for (uint i = 0; i < basisPoints.length; i++) {
            totalBasisPoints += basisPoints[i];
        }
        require(totalBasisPoints < 10000, "Invalid total royalties");
        _extensionRoyaltyReceivers[extension] = receivers;
        _extensionRoyaltyBPS[extension] = basisPoints;
        if (extension == address(this)) {
            emit DefaultRoyaltiesUpdated(receivers, basisPoints);
        } else {
            emit ExtensionRoyaltiesUpdated(extension, receivers, basisPoints);
        }
    }


}

File 23 of 27 : 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 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);

}

File 24 of 27 : 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 25 of 27 : ERC165Checker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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) {
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
        if (result.length < 32) return false;
        return success && abi.decode(result, (bool));
    }
}

File 26 of 27 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address 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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"blacklistExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionSize","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"originalTokenId","type":"uint256"},{"internalType":"uint256","name":"newTokenId","type":"uint256"}],"name":"generateLeaf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","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":[{"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":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"migrationRange","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"string","name":"uri","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintBaseBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"count","type":"uint16"}],"name":"mintBaseBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintExtension","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintExtension","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintExtensionBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"count","type":"uint16"}],"name":"mintExtensionBatch","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"newTokenMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"originalContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"originalTokenIdToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purgatory","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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"originalTokenId","type":"uint256"},{"internalType":"uint256","name":"newTokenId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"string","name":"uri","type":"string"}],"name":"sendTokenToPurgatory","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":"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":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_purgatory","type":"address"},{"internalType":"address","name":"_originalContract","type":"address"},{"internalType":"uint8[]","name":"_migrationRange","type":"uint8[]"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMigrationParameters","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":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"unregisterExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"verifyMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040526000600a55601a80546001600160a01b0319908116909155601b80549091169055601d805460ff191690553480156200003c57600080fd5b506040518060400160405280601081526020016f5768657265204d792056616e7320476f60801b81525060405180604001604052806004815260200163574d564760e01b81525081816200009f62000099620000d960201b60201c565b620000dd565b600180558151620000b89060049060208501906200012d565b508051620000ce9060059060208401906200012d565b505050505062000210565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200013b90620001d3565b90600052602060002090601f0160209004810192826200015f5760008555620001aa565b82601f106200017a57805160ff1916838001178555620001aa565b82800160010185558215620001aa579182015b82811115620001aa5782518255916020019190600101906200018d565b50620001b8929150620001bc565b5090565b5b80821115620001b85760008155600101620001bd565b600281046001821680620001e857607f821691505b602082108114156200020a57634e487b7160e01b600052602260045260246000fd5b50919050565b615fee80620002206000396000f3fe608060405234801561001057600080fd5b506004361061041d5760003560e01c806374aed3fd1161022b578063b45a053111610130578063e00aab4b116100b8578063e985e9c511610087578063e985e9c5146108ea578063f0cdc499146108fd578063f2fde38b14610910578063fc1cc1d114610923578063fe2e1f58146109365761041d565b8063e00aab4b146108b4578063e2c345e2146108c7578063e8a3d485146108cf578063e92a89f6146108d75761041d565b8063bb3bafd6116100ff578063bb3bafd61461085a578063c87b56dd1461087b578063cbebc00e1461088e578063ce8aee9d146108a1578063d5a06d4c1461085a5761041d565b8063b45a053114610801578063b88d4fde14610814578063b8c7997d14610827578063b9c4d9fb1461083a5761041d565b806395d89b41116101b3578063aafb2d4411610182578063aafb2d44146107a2578063ac0c8cfa146107b5578063ad2d0ddd146107c8578063ada4fa18146107db578063b0fe87c9146107ee5761041d565b806395d89b411461076c57806399e0dd7c14610774578063a22cb46514610787578063a37edeba1461079a5761041d565b806382dcc0c8116101fa57806382dcc0c81461072357806383b7db631461073657806385b0e9dd1461073e5780638da5cb5b14610751578063938e3d7b146107595761041d565b806374aed3fd146106ed57806376ad2817146106f55780637884af44146106fd5780637aa15f16146107105761041d565b80633071a0f91161033157806345c0f533116102b95780636d73e669116102885780636d73e669146106a457806370a08231146106b7578063715018a6146106ca57806372ff03d3146106d257806373e92784146106e55761041d565b806345c0f5331461065657806361e5bc6b1461066b5780636352211e1461067e57806366d1e9d0146106915761041d565b806338e52e781161030057806338e52e78146105f75780633e6134b81461060a5780633f0f37f61461061d57806342842e0e1461063057806342966c68146106435761041d565b80633071a0f9146105a9578063313ed5d1146105bc57806331ae450b146105cf578063332dd1ae146105e45761041d565b806320e4afe2116103b45780632928ca58116103835780632928ca581461053a5780632a55205a1461055a5780632d3456701461057b5780632eb4a7ab1461058e57806330176e13146105965761041d565b806320e4afe2146104ee578063239be3171461050157806323b872dd1461051457806324d7806c146105275761041d565b8063095ea7b3116103f0578063095ea7b3146104955780630ebd4c7f146104a8578063162094c4146104c857806319819935146104db5761041d565b806301ffc9a71461042257806302e7afb71461044b57806306fdde0314610460578063081812fc14610475575b600080fd5b610435610430366004614bfa565b610949565b6040516104429190615234565b60405180910390f35b61045e6104593660046145fe565b61097a565b005b6104686109cf565b604051610442919061525d565b610488610483366004614d3a565b610a61565b604051610442919061502f565b61045e6104a3366004614983565b610aa4565b6104bb6104b6366004614d3a565b610b3c565b6040516104429190615221565b61045e6104d6366004614d87565b610bc2565b61045e6104e9366004614dd9565b610c0d565b61045e6104fc366004614d52565b610e07565b61048861050f366004614d3a565b610e80565b61045e6105223660046146bd565b610eb0565b6104356105353660046145fe565b610ee8565b61054d6105483660046145fe565b610f17565b604051610442919061523f565b61056d610568366004614db8565b610f71565b6040516104429291906150eb565b61045e6105893660046145fe565b610faf565b61054d611043565b61045e6105a4366004614c32565b611049565b61045e6105b73660046148a4565b6110c8565b6104886105ca366004614d3a565b611144565b6105d761115e565b6040516104429190615104565b61045e6105f2366004614a16565b611229565b6104bb610605366004614824565b611276565b61045e610618366004614c32565b6113de565b61045e61062b3660046148ea565b611411565b61045e61063e3660046146bd565b611486565b61045e610651366004614d3a565b6114a1565b61065e611517565b6040516104429190615d2f565b61045e610679366004614b13565b61151c565b61048861068c366004614d3a565b6115e3565b61045e61069f366004614c32565b611618565b61045e6106b23660046145fe565b611649565b61054d6106c53660046145fe565b6116d8565b61045e61171c565b61054d6106e03660046145fe565b611767565b6104686117d1565b61048861185f565b61045e61186e565b61054d61070b3660046148a4565b6118dc565b6104bb61071e366004614824565b611951565b61045e610731366004614c72565b611976565b6105d76119a8565b61054d61074c366004614db8565b611a6f565b610488611ae3565b61045e610767366004614c32565b611af2565b610468611b3e565b61045e610782366004614c32565b611b4d565b61045e610795366004614877565b611b97565b610435611ba9565b61045e6107b0366004614b13565b611bb2565b61045e6107c3366004614bc2565b611c92565b6104bb6107d6366004614950565b611d61565b6104356107e9366004614a73565b611dd5565b61045e6107fc3660046147a4565b611dea565b61045e61080f366004614652565b611e37565b61045e6108223660046146fd565b611ec7565b610435610835366004614d3a565b611f00565b61084d610848366004614d3a565b611f15565b60405161044291906151e9565b61086d610868366004614d3a565b611fa4565b6040516104429291906151fc565b610468610889366004614d3a565b612088565b61065e61089c366004614d3a565b6120b8565b61045e6108af3660046145fe565b6120ec565b6104bb6108c2366004614950565b612135565b610488612255565b610468612264565b61045e6108e5366004614d87565b612273565b6104356108f836600461461a565b6122a5565b61045e61090b36600461461a565b6122d3565b61045e61091e3660046145fe565b61231d565b61054d6109313660046149ae565b61238b565b61054d6109443660046148a4565b612570565b6000610954826125c1565b806109635750610963826125e6565b80610972575061097282612621565b90505b919050565b33610983611ae3565b6001600160a01b0316148061099e575061099e600233612646565b6109c35760405162461bcd60e51b81526004016109ba90615bae565b60405180910390fd5b6109cc81612662565b50565b6060600480546109de90615eb7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0a90615eb7565b8015610a575780601f10610a2c57610100808354040283529160200191610a57565b820191906000526020600020905b815481529060010190602001808311610a3a57829003601f168201915b5050505050905090565b6000610a6c8261272e565b610a885760405162461bcd60e51b81526004016109ba90615900565b506000908152600860205260409020546001600160a01b031690565b6000610aaf826115e3565b9050806001600160a01b0316836001600160a01b03161415610ae35760405162461bcd60e51b81526004016109ba90615a6d565b806001600160a01b0316610af561274b565b6001600160a01b03161480610b115750610b11816108f861274b565b610b2d5760405162461bcd60e51b81526004016109ba90615668565b610b37838361274f565b505050565b6060610b478261272e565b610b635760405162461bcd60e51b81526004016109ba906156c5565b610b6c826127bd565b805480602002602001604051908101604052809291908181526020018280548015610bb657602002820191906000526020600020905b815481526020019060010190808311610ba2575b50505050509050919050565b33610bcb611ae3565b6001600160a01b03161480610be65750610be6600233612646565b610c025760405162461bcd60e51b81526004016109ba90615bae565b610b3783838361284d565b601a546001600160a01b0316610c355760405162461bcd60e51b81526004016109ba90615823565b601b546001600160a01b0316610c5d5760405162461bcd60e51b81526004016109ba9061586e565b601b5460405163e985e9c560e01b81526001600160a01b0390911690819063e985e9c590610c919033903090600401615043565b60206040518083038186803b158015610ca957600080fd5b505afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190614bde565b610cfd5760405162461bcd60e51b81526004016109ba90615426565b6000610d098888611a6f565b9050610d4c86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c549150849050611dd5565b610d685760405162461bcd60e51b81526004016109ba90615c86565b601a54604051637921219560e11b81526001600160a01b038085169263f242432a92610d9f92339216908d906001906004016150b3565b600060405180830381600087803b158015610db957600080fd5b505af1158015610dcd573d6000803e3d6000fd5b5050506000898152602080526040902080546001600160a01b03191633908117909155610dfd915088868661289c565b5050505050505050565b33610e10611ae3565b6001600160a01b03161480610e2b5750610e2b600233612646565b610e475760405162461bcd60e51b81526004016109ba90615bae565b610e508561272e565b610e6c5760405162461bcd60e51b81526004016109ba906156c5565b610e798585858585612957565b5050505050565b6000610e8b8261272e565b610ea75760405162461bcd60e51b81526004016109ba906156c5565b61097282612a64565b610ec1610ebb61274b565b82612ac4565b610edd5760405162461bcd60e51b81526004016109ba90615b51565b610b37838383612b41565b6000816001600160a01b0316610efc611ae3565b6001600160a01b031614806109725750610972600283612646565b600060026001541415610f3c5760405162461bcd60e51b81526004016109ba90615cf8565b6002600155610f4c600b33612646565b610f685760405162461bcd60e51b81526004016109ba90615631565b60018055919050565b600080610f7d8461272e565b610f995760405162461bcd60e51b81526004016109ba906156c5565b610fa38484612c6e565b915091505b9250929050565b610fb761274b565b6001600160a01b0316610fc8611ae3565b6001600160a01b031614610fee5760405162461bcd60e51b81526004016109ba90615991565b610ff9600282612646565b156109cc5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a361103f600282612d42565b5050565b601c5481565b33611052611ae3565b6001600160a01b0316148061106d575061106d600233612646565b6110895760405162461bcd60e51b81526004016109ba90615bae565b61103f82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d5792505050565b336110d1611ae3565b6001600160a01b031614806110ec57506110ec600233612646565b6111085760405162461bcd60e51b81526004016109ba90615bae565b82611114600d82612646565b156111315760405162461bcd60e51b81526004016109ba90615552565b61113e8484846000612d77565b50505050565b60208052600090815260409020546001600160a01b031681565b606061116a6002612e58565b67ffffffffffffffff81111561119057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111b9578160200160208202803683370190505b50905060005b6111c96002612e58565b811015611225576111db600282612e63565b8282815181106111fb57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061121d81615f0e565b9150506111bf565b5090565b33611232611ae3565b6001600160a01b0316148061124d575061124d600233612646565b6112695760405162461bcd60e51b81526004016109ba90615bae565b61113e3085858585612e6f565b60606002600154141561129b5760405162461bcd60e51b81526004016109ba90615cf8565b60026001556112ab600b33612646565b6112c75760405162461bcd60e51b81526004016109ba90615631565b8167ffffffffffffffff8111156112ee57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611317578160200160208202803683370190505b50905060005b828110156113d2576113958585858481811061134957634e487b7160e01b600052603260045260246000fd5b905060200281019061135b9190615d3d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612fe492505050565b8282815181106113b557634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806113ca81615f0e565b91505061131d565b50600180559392505050565b6113e9600b33612646565b6114055760405162461bcd60e51b81526004016109ba90615631565b61103f82826000613063565b3361141a611ae3565b6001600160a01b031614806114355750611435600233612646565b6114515760405162461bcd60e51b81526004016109ba90615bae565b8361145d600d82612646565b1561147a5760405162461bcd60e51b81526004016109ba90615552565b610e7985858585612d77565b610b3783838360405180602001604052806000815250611ec7565b600260015414156114c45760405162461bcd60e51b81526004016109ba90615cf8565b60026001556114d33382612ac4565b6114ef5760405162461bcd60e51b81526004016109ba90615b1c565b60006114fa826115e3565b9050611505826130a0565b61150f8183613147565b505060018055565b607d81565b611527600b33612646565b6115435760405162461bcd60e51b81526004016109ba90615631565b825181146115635760405162461bcd60e51b81526004016109ba90615a46565b60005b835181101561113e576115d184828151811061159257634e487b7160e01b600052603260045260246000fd5b60200260200101518484848181106115ba57634e487b7160e01b600052603260045260246000fd5b90506020028101906115cc9190615d3d565b61325b565b806115db81615f0e565b915050611566565b6000818152600660205260408120546001600160a01b0316806109725760405162461bcd60e51b81526004016109ba906157da565b611623600b33612646565b61163f5760405162461bcd60e51b81526004016109ba90615631565b61103f8282613291565b61165161274b565b6001600160a01b0316611662611ae3565b6001600160a01b0316146116885760405162461bcd60e51b81526004016109ba90615991565b611693600282612646565b6109cc5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a361103f6002826132ab565b60006001600160a01b0382166117005760405162461bcd60e51b81526004016109ba90615759565b506001600160a01b031660009081526007602052604090205490565b61172461274b565b6001600160a01b0316611735611ae3565b6001600160a01b03161461175b5760405162461bcd60e51b81526004016109ba90615991565b61176560006132c0565b565b60006002600154141561178c5760405162461bcd60e51b81526004016109ba90615cf8565b60026001553361179a611ae3565b6001600160a01b031614806117b557506117b5600233612646565b610f685760405162461bcd60e51b81526004016109ba90615bae565b601f80546117de90615eb7565b80601f016020809104026020016040519081016040528092919081815260200182805461180a90615eb7565b80156118575780601f1061182c57610100808354040283529160200191611857565b820191906000526020600020905b81548152906001019060200180831161183a57829003601f168201915b505050505081565b601a546001600160a01b031681565b33611877611ae3565b6001600160a01b031614806118925750611892600233612646565b6118ae5760405162461bcd60e51b81526004016109ba90615bae565b601c546118cd5760405162461bcd60e51b81526004016109ba906155fc565b601d805460ff19166001179055565b6000600260015414156119015760405162461bcd60e51b81526004016109ba90615cf8565b60026001553361190f611ae3565b6001600160a01b0316148061192a575061192a600233612646565b6119465760405162461bcd60e51b81526004016109ba90615bae565b600180559392505050565b6060600260015414156119015760405162461bcd60e51b81526004016109ba90615cf8565b611981600b33612646565b61199d5760405162461bcd60e51b81526004016109ba90615631565b610b37838383613063565b60606119b4600b612e58565b67ffffffffffffffff8111156119da57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a03578160200160208202803683370190505b50905060005b611a13600b612e58565b81101561122557611a25600b82612e63565b828281518110611a4557634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611a6781615f0e565b915050611a09565b600080611a7b84613310565b90506000611a8884613310565b905060008282604051602001611a9f929190614fb9565b604051602081830303815290604052905080604051602001611ac19190614f9d565b6040516020818303038152906040528051906020012093505050505b92915050565b6000546001600160a01b031690565b33611afb611ae3565b6001600160a01b03161480611b165750611b16600233612646565b611b325760405162461bcd60e51b81526004016109ba90615bae565b610b37601f838361430a565b6060600580546109de90615eb7565b33611b56611ae3565b6001600160a01b03161480611b715750611b71600233612646565b611b8d5760405162461bcd60e51b81526004016109ba90615bae565b61103f8282613456565b61103f611ba261274b565b8383613470565b601d5460ff1681565b33611bbb611ae3565b6001600160a01b03161480611bd65750611bd6600233612646565b611bf25760405162461bcd60e51b81526004016109ba90615bae565b82518114611c125760405162461bcd60e51b81526004016109ba90615a46565b60005b835181101561113e57611c80848281518110611c4157634e487b7160e01b600052603260045260246000fd5b6020026020010151848484818110611c6957634e487b7160e01b600052603260045260246000fd5b9050602002810190611c7b9190615d3d565b61284d565b80611c8a81615f0e565b915050611c15565b611c9d600b33612646565b611cb95760405162461bcd60e51b81526004016109ba90615631565b801580611cd25750611cd233634ce6d51160e11b613513565b611cee5760405162461bcd60e51b81526004016109ba90615bf2565b3360009081526010602052604090205460ff161515811515146109cc573360008181526010602052604090819020805460ff1916841515179055517f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a3690611d56908490615234565b60405180910390a250565b606060026001541415611d865760405162461bcd60e51b81526004016109ba90615cf8565b600260015533611d94611ae3565b6001600160a01b03161480611daf5750611daf600233612646565b611dcb5760405162461bcd60e51b81526004016109ba90615bae565b6001805592915050565b6000611de284848461352f565b949350505050565b33611df3611ae3565b6001600160a01b03161480611e0e5750611e0e600233612646565b611e2a5760405162461bcd60e51b81526004016109ba90615bae565b610e798585858585612e6f565b33611e40611ae3565b6001600160a01b03161480611e5b5750611e5b600233612646565b611e775760405162461bcd60e51b81526004016109ba90615bae565b601a80546001600160a01b038088166001600160a01b031992831617909255601b805492871692909116919091179055611eb3601e848461438a565b50601d5460ff16610e7957601c5550505050565b611ed8611ed261274b565b83612ac4565b611ef45760405162461bcd60e51b81526004016109ba90615b51565b61113e84848484613545565b60216020526000908152604090205460ff1681565b6060611f208261272e565b611f3c5760405162461bcd60e51b81526004016109ba906156c5565b611f4582613578565b805480602002602001604051908101604052809291908181526020018280548015610bb657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f7b5750505050509050919050565b606080611fb08361272e565b611fcc5760405162461bcd60e51b81526004016109ba906156c5565b611fd583613608565b81546040805160208084028201810190925282815291849183018282801561202657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612008575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561207857602002820191906000526020600020905b815481526020019060010190808311612064575b5050505050905091509150915091565b60606120938261272e565b6120af5760405162461bcd60e51b81526004016109ba906156c5565b61097282613626565b601e81815481106120c857600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b336120f5611ae3565b6001600160a01b031614806121105750612110600233612646565b61212c5760405162461bcd60e51b81526004016109ba90615bae565b6109cc816138b7565b60606002600154141561215a5760405162461bcd60e51b81526004016109ba90615cf8565b600260015561216a600b33612646565b6121865760405162461bcd60e51b81526004016109ba90615631565b8161ffff1667ffffffffffffffff8111156121b157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156121da578160200160208202803683370190505b50905060005b8261ffff168161ffff16101561224a576122098460405180602001604052806000815250612fe4565b828261ffff168151811061222d57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061224281615eec565b9150506121e0565b506001805592915050565b601b546001600160a01b031681565b6060601f80546109de90615eb7565b61227e600b33612646565b61229a5760405162461bcd60e51b81526004016109ba90615631565b610b3783838361325b565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b336122dc611ae3565b6001600160a01b031614806122f757506122f7600233612646565b6123135760405162461bcd60e51b81526004016109ba90615bae565b61103f8282613908565b61232561274b565b6001600160a01b0316612336611ae3565b6001600160a01b03161461235c5760405162461bcd60e51b81526004016109ba90615991565b6001600160a01b0381166123825760405162461bcd60e51b81526004016109ba90615372565b6109cc816132c0565b6000600260015414156123b05760405162461bcd60e51b81526004016109ba90615cf8565b6002600155336123be611ae3565b6001600160a01b031614806123d957506123d9600233612646565b6123f55760405162461bcd60e51b81526004016109ba90615bae565b60ff80851660009081526021602052604090205416156124275760405162461bcd60e51b81526004016109ba90615ae5565b607d60ff85161061244a5760405162461bcd60e51b81526004016109ba906156fc565b601e60008154811061246c57634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff1610806124e55750601e6001815481106124bc57634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff16115b6125015760405162461bcd60e51b81526004016109ba90615cad565b8161251e5760405162461bcd60e51b81526004016109ba90615270565b60ff84166000818152602160205260409020805460ff191660011790556125469086906139eb565b60ff8416600090815260156020526040902061256390848461430a565b5060018055949350505050565b6000600260015414156125955760405162461bcd60e51b81526004016109ba90615cf8565b60026001556125a5600b33612646565b6119465760405162461bcd60e51b81526004016109ba90615631565b60006001600160e01b03198216639088c20760e01b1480610972575061097282613a05565b60006001600160e01b031982166380ac58cd60e01b148061096357506001600160e01b03198216635b5e139f60e01b14806109725750610972825b60006001600160e01b03198216632a9f3abf60e11b1480610972575061097282613a98565b600061265b836001600160a01b038416613ab1565b9392505050565b6001600160a01b03811630141561268b5760405162461bcd60e51b81526004016109ba906152a7565b612696600b82612646565b156126de5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a36126dc600b82612d42565b505b6126e9600d82612646565b6109cc5760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a361103f600d826132ab565b6000908152600660205260409020546001600160a01b0316151590565b3390565b600081815260086020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612784826115e3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260196020526040812054156127e557506000818152601960205260409020610975565b6000828152601160209081526040808320546001600160a01b0316835260179091529020541561283957506000818152601160209081526040808320546001600160a01b0316835260179091529020610975565b505030600090815260176020526040902090565b6000838152601160205260409020546001600160a01b031630146128835760405162461bcd60e51b81526004016109ba906155d5565b600083815260156020526040902061113e90838361430a565b600260015414156128bf5760405162461bcd60e51b81526004016109ba90615cf8565b600260015560008381526021602052604090205460ff16156128f35760405162461bcd60e51b81526004016109ba90615ae5565b806129105760405162461bcd60e51b81526004016109ba90615270565b6000838152602160205260409020805460ff1916600117905561293384846139eb565b600083815260156020526040902061294c90838361430a565b505060018055505050565b8281146129765760405162461bcd60e51b81526004016109ba90615a46565b6000805b828110156129c8578383828181106129a257634e487b7160e01b600052603260045260246000fd5b90506020020135826129b49190615e04565b9150806129c081615f0e565b91505061297a565b5061271081106129ea5760405162461bcd60e51b81526004016109ba90615aae565b6000868152601860205260409020612a0390868661442e565b506000868152601960205260409020612a1d908484614481565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee86868686604051612a549493929190615151565b60405180910390a2505050505050565b6000818152601160205260409020546001600160a01b031630811415612a9c5760405162461bcd60e51b81526004016109ba906159c6565b612aa7600d82612646565b156109755760405162461bcd60e51b81526004016109ba90615552565b6000612acf8261272e565b612aeb5760405162461bcd60e51b81526004016109ba90615589565b6000612af6836115e3565b9050806001600160a01b0316846001600160a01b03161480612b315750836001600160a01b0316612b2684610a61565b6001600160a01b0316145b80611de25750611de281856122a5565b826001600160a01b0316612b54826115e3565b6001600160a01b031614612b7a5760405162461bcd60e51b81526004016109ba906159fd565b6001600160a01b038216612ba05760405162461bcd60e51b81526004016109ba906154d7565b612bab838383613ac9565b612bb660008261274f565b6001600160a01b0383166000908152600760205260408120805460019290612bdf908490615e74565b90915550506001600160a01b0382166000908152600760205260408120805460019290612c0d908490615e04565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000806000612c7c85613578565b805490915060011015612ca15760405162461bcd60e51b81526004016109ba906157a3565b8054612cb4573060009250925050610fa8565b80600081548110612cd557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031661271085612cf7886127bd565b600081548110612d1757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154612d2c9190615e55565b612d369190615e41565b92509250509250929050565b600061265b836001600160a01b038416613ad4565b306000908152601260209081526040909120825161103f928401906144bb565b6001600160a01b038416301415612da05760405162461bcd60e51b81526004016109ba90615c4f565b612db2846001600160a01b0316613bf1565b612dce5760405162461bcd60e51b81526004016109ba9061594c565b612dd9600b85612646565b61113e576001600160a01b0384166000908152601260205260409020612e0090848461430a565b506001600160a01b038416600081815260136020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a3610e79600b856132ab565b600061097282613bf7565b600061265b8383613bfb565b828114612e8e5760405162461bcd60e51b81526004016109ba90615a46565b6000805b82811015612ee057838382818110612eba57634e487b7160e01b600052603260045260246000fd5b9050602002013582612ecc9190615e04565b915080612ed881615f0e565b915050612e92565b506127108110612f025760405162461bcd60e51b81526004016109ba90615aae565b6001600160a01b0386166000908152601660205260409020612f2590868661442e565b506001600160a01b0386166000908152601760205260409020612f49908484614481565b506001600160a01b038616301415612f9d577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612f909493929190615151565b60405180910390a1612fdc565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f86868686604051612a549493929190615151565b505050505050565b600a805460009182612ff583615f0e565b9190505550600a5490506130098382613c33565b600081815260116020526040902080546001600160a01b0319163317905561303183826139eb565b8151156130595760008181526015602090815260409091208351613057928501906144bb565b505b611add838261103f565b33600090815260126020526040902061307d90848461430a565b50336000908152601360205260409020805460ff19169115159190911790555050565b60006130ab826115e3565b90506130b981600084613ac9565b6130c460008361274f565b6001600160a01b03811660009081526007602052604081208054600192906130ed908490615e74565b909155505060008281526006602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152601160205260409020546001600160a01b031630146132055760008181526011602052604090205461318e906001600160a01b03166311686e4b60e21b613513565b1561320557600081815260116020526040908190205490516311686e4b60e21b81526001600160a01b03909116906345a1b92c906131d290859085906004016150eb565b600060405180830381600087803b1580156131ec57600080fd5b505af1158015613200573d6000803e3d6000fd5b505050505b6000818152601560205260409020805461321e90615eb7565b15905061323c57600081815260156020526040812061323c9161452f565b600090815260116020526040902080546001600160a01b031916905550565b6000838152601160205260409020546001600160a01b031633146128835760405162461bcd60e51b81526004016109ba906155d5565b336000908152601460205260409020610b3790838361430a565b600061265b836001600160a01b038416613cc0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60608161333557506040805180820190915260018152600360fc1b6020820152610975565b8160005b811561335f578061334981615f0e565b91506133589050600a83615e41565b9150613339565b60008167ffffffffffffffff81111561338857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156133b2576020820181803683370190505b509050815b851561344d576133c8600182615e74565b905060006133d7600a88615e41565b6133e290600a615e55565b6133ec9088615e74565b6133f7906030615e1c565b905060008160f81b90508084848151811061342257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613444600a89615e41565b975050506133b7565b50949350505050565b306000908152601460205260409020610b3790838361430a565b816001600160a01b0316836001600160a01b031614156134a25760405162461bcd60e51b81526004016109ba9061551b565b6001600160a01b0383811660008181526009602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190613506908590615234565b60405180910390a3505050565b600061351e83613d0a565b801561265b575061265b8383613d3d565b60008261353c8584613e2e565b14949350505050565b613550848484612b41565b61355c84848484613ee6565b61113e5760405162461bcd60e51b81526004016109ba90615315565b600081815260186020526040812054156135a057506000818152601860205260409020610975565b6000828152601160209081526040808320546001600160a01b031683526016909152902054156135f457506000818152601160209081526040808320546001600160a01b0316835260169091529020610975565b505030600090815260166020526040902090565b60008061361483613578565b61361d846127bd565b91509150915091565b6000818152601160205260409020546060906001600160a01b031661364c600d82612646565b156136695760405162461bcd60e51b81526004016109ba90615552565b6000838152601560205260409020805461368290615eb7565b15905061379c576001600160a01b038116600090815260146020526040902080546136ac90615eb7565b1590506136fd576001600160a01b0381166000908152601460209081526040808320868452601583529281902090516136e693920161501a565b604051602081830303815290604052915050610975565b6000838152601560205260409020805461371690615eb7565b80601f016020809104026020016040519081016040528092919081815260200182805461374290615eb7565b801561378f5780601f106137645761010080835404028352916020019161378f565b820191906000526020600020905b81548152906001019060200180831161377257829003601f168201915b5050505050915050610975565b6137ad8163e9dc637560e01b613513565b1561383c5760405163e9dc637560e01b81526001600160a01b0382169063e9dc6375906137e090309087906004016150eb565b60006040518083038186803b1580156137f857600080fd5b505afa15801561380c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526138349190810190614cc7565b915050610975565b6001600160a01b03811660009081526013602052604090205460ff1661388e576001600160a01b038116600090815260126020526040902061387d84614001565b6040516020016136e6929190614ff5565b6001600160a01b0381166000908152601260205260409020805461371690615eb7565b50919050565b6138c2600b82612646565b156109cc5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361103f600b82612d42565b613913600b83612646565b61392f5760405162461bcd60e51b81526004016109ba906153ef565b6001600160a01b0381161580613951575061395181631e05385b60e31b613513565b61396d5760405162461bcd60e51b81526004016109ba906152de565b6001600160a01b038281166000908152600f602052604090205481169082161461103f576001600160a01b038281166000818152600f602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b61103f82826040518060200160405280600081525061411c565b60006001600160e01b031982166328f10a2160e01b1480613a2a5750613a2a826125e6565b80613a4557506001600160e01b03198216635d9dd7eb60e11b145b80613a6057506001600160e01b03198216632dde656160e21b145b80613a7b57506001600160e01b031982166335681b5360e21b145b806109725750506001600160e01b03191663152a902d60e11b1490565b6001600160e01b031981166301ffc9a760e01b14919050565b60009081526001919091016020526040902054151590565b610b3783838361414f565b60008181526001830160205260408120548015613be7576000613af8600183615e74565b8554909150600090613b0c90600190615e74565b9050818114613b8d576000866000018281548110613b3a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613b6b57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613bac57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611add565b6000915050611add565b3b151590565b5490565b6000826000018281548110613c2057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b336000908152600f60205260409020546001600160a01b03161561103f57336000818152600f602052604090819020549051631e05385b60e31b81526001600160a01b039091169163f029c2d891613c9291908690869060040161505d565b600060405180830381600087803b158015613cac57600080fd5b505af1158015612fdc573d6000803e3d6000fd5b6000613ccc8383613ab1565b613d0257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611add565b506000611add565b6000613d1d826301ffc9a760e01b613d3d565b80156109725750613d36826001600160e01b0319613d3d565b1592915050565b6000806301ffc9a760e01b83604051602401613d599190615248565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050509050600080856001600160a01b031661753084604051613dac9190614f9d565b6000604051808303818686fa925050503d8060008114613de8576040519150601f19603f3d011682016040523d82523d6000602084013e613ded565b606091505b5091509150602081511015613e085760009350505050611add565b818015613e24575080806020019051810190613e249190614bde565b9695505050505050565b600081815b8451811015613ede576000858281518110613e5e57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613e9f578281604051602001613e82929190614f8f565b604051602081830303815290604052805190602001209250613ecb565b8083604051602001613eb2929190614f8f565b6040516020818303038152906040528051906020012092505b5080613ed681615f0e565b915050613e33565b509392505050565b6000613efa846001600160a01b0316613bf1565b15613ff657836001600160a01b031663150b7a02613f1661274b565b8786866040518563ffffffff1660e01b8152600401613f389493929190615081565b602060405180830381600087803b158015613f5257600080fd5b505af1925050508015613f82575060408051601f3d908101601f19168201909252613f7f91810190614c16565b60015b613fdc573d808015613fb0576040519150601f19603f3d011682016040523d82523d6000602084013e613fb5565b606091505b508051613fd45760405162461bcd60e51b81526004016109ba90615315565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611de2565b506001949350505050565b60608161402657506040805180820190915260018152600360fc1b6020820152610975565b8160005b8115614050578061403a81615f0e565b91506140499050600a83615e41565b915061402a565b60008167ffffffffffffffff81111561407957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156140a3576020820181803683370190505b5090505b8415611de2576140b8600183615e74565b91506140c5600a86615f29565b6140d0906030615e04565b60f81b8183815181106140f357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350614115600a86615e41565b94506140a7565b614126838361422b565b6141336000848484613ee6565b610b375760405162461bcd60e51b81526004016109ba90615315565b6000818152601160209081526040808320546001600160a01b03168352601090915290205460ff1615610b375760008181526011602052604090819020549051638258080560e01b81526001600160a01b03909116906382580805906141bd9086908690869060040161505d565b602060405180830381600087803b1580156141d757600080fd5b505af11580156141eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061420f9190614bde565b610b375760405162461bcd60e51b81526004016109ba9061548e565b6001600160a01b0382166142515760405162461bcd60e51b81526004016109ba906158cb565b61425a8161272e565b156142775760405162461bcd60e51b81526004016109ba906153b8565b61428360008383613ac9565b6001600160a01b03821660009081526007602052604081208054600192906142ac908490615e04565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461431690615eb7565b90600052602060002090601f016020900481019282614338576000855561437e565b82601f106143515782800160ff1982351617855561437e565b8280016001018555821561437e579182015b8281111561437e578235825591602001919060010190614363565b50611225929150614567565b82805482825590600052602060002090601f0160209004810192821561437e5791602002820160005b838211156143f457833560ff1683826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026143b3565b80156144215782816101000a81549060ff02191690556001016020816000010492830192600103026143f4565b5050611225929150614567565b82805482825590600052602060002090810192821561437e579160200282015b8281111561437e5781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061444e565b82805482825590600052602060002090810192821561437e579160200282018281111561437e578235825591602001919060010190614363565b8280546144c790615eb7565b90600052602060002090601f0160209004810192826144e9576000855561437e565b82601f1061450257805160ff191683800117855561437e565b8280016001018555821561437e579182015b8281111561437e578251825591602001919060010190614514565b50805461453b90615eb7565b6000825580601f1061454d57506109cc565b601f0160209004906000526020600020908101906109cc91905b5b808211156112255760008155600101614568565b60008083601f84011261458d578182fd5b50813567ffffffffffffffff8111156145a4578182fd5b6020830191508360208083028501011115610fa857600080fd5b60008083601f8401126145cf578182fd5b50813567ffffffffffffffff8111156145e6578182fd5b602083019150836020828501011115610fa857600080fd5b60006020828403121561460f578081fd5b813561265b81615f7f565b6000806040838503121561462c578081fd5b823561463781615f7f565b9150602083013561464781615f7f565b809150509250929050565b600080600080600060808688031215614669578081fd5b853561467481615f7f565b9450602086013561468481615f7f565b9350604086013567ffffffffffffffff81111561469f578182fd5b6146ab8882890161457c565b96999598509660600135949350505050565b6000806000606084860312156146d1578081fd5b83356146dc81615f7f565b925060208401356146ec81615f7f565b929592945050506040919091013590565b60008060008060808587031215614712578182fd5b843561471d81615f7f565b9350602085013561472d81615f7f565b925060408501359150606085013567ffffffffffffffff81111561474f578182fd5b8501601f8101871361475f578182fd5b803561477261476d82615dd0565b615d82565b818152886020838501011115614786578384fd5b81602084016020830137908101602001929092525092959194509250565b6000806000806000606086880312156147bb578283fd5b85356147c681615f7f565b9450602086013567ffffffffffffffff808211156147e2578485fd5b6147ee89838a0161457c565b90965094506040880135915080821115614806578283fd5b506148138882890161457c565b969995985093965092949392505050565b600080600060408486031215614838578081fd5b833561484381615f7f565b9250602084013567ffffffffffffffff81111561485e578182fd5b61486a8682870161457c565b9497909650939450505050565b60008060408385031215614889578182fd5b823561489481615f7f565b9150602083013561464781615f94565b6000806000604084860312156148b8578081fd5b83356148c381615f7f565b9250602084013567ffffffffffffffff8111156148de578182fd5b61486a868287016145be565b600080600080606085870312156148ff578182fd5b843561490a81615f7f565b9350602085013567ffffffffffffffff811115614925578283fd5b614931878288016145be565b909450925050604085013561494581615f94565b939692955090935050565b60008060408385031215614962578182fd5b823561496d81615f7f565b9150602083013561ffff81168114614647578182fd5b60008060408385031215614995578182fd5b82356149a081615f7f565b946020939093013593505050565b600080600080606085870312156149c3578182fd5b84356149ce81615f7f565b9350602085013560ff811681146149e3578283fd5b9250604085013567ffffffffffffffff8111156149fe578283fd5b614a0a878288016145be565b95989497509550505050565b60008060008060408587031215614a2b578182fd5b843567ffffffffffffffff80821115614a42578384fd5b614a4e8883890161457c565b90965094506020870135915080821115614a66578384fd5b50614a0a8782880161457c565b600080600060608486031215614a87578081fd5b833567ffffffffffffffff811115614a9d578182fd5b8401601f81018613614aad578182fd5b80356020614abd61476d83615dac565b82815281810190848301838502860184018b1015614ad9578687fd5b8695505b84861015614afb578035835260019590950194918301918301614add565b50999188013598505060409096013595945050505050565b600080600060408486031215614b27578081fd5b833567ffffffffffffffff80821115614b3e578283fd5b818601915086601f830112614b51578283fd5b81356020614b6161476d83615dac565b82815281810190858301838502870184018c1015614b7d578788fd5b8796505b84871015614b9f578035835260019690960195918301918301614b81565b5097505087013592505080821115614bb5578283fd5b5061486a8682870161457c565b600060208284031215614bd3578081fd5b813561265b81615f94565b600060208284031215614bef578081fd5b815161265b81615f94565b600060208284031215614c0b578081fd5b813561265b81615fa2565b600060208284031215614c27578081fd5b815161265b81615fa2565b60008060208385031215614c44578182fd5b823567ffffffffffffffff811115614c5a578283fd5b614c66858286016145be565b90969095509350505050565b600080600060408486031215614c86578081fd5b833567ffffffffffffffff811115614c9c578182fd5b614ca8868287016145be565b9094509250506020840135614cbc81615f94565b809150509250925092565b600060208284031215614cd8578081fd5b815167ffffffffffffffff811115614cee578182fd5b8201601f81018413614cfe578182fd5b8051614d0c61476d82615dd0565b818152856020838501011115614d20578384fd5b614d31826020830160208601615e8b565b95945050505050565b600060208284031215614d4b578081fd5b5035919050565b600080600080600060608688031215614d69578283fd5b85359450602086013567ffffffffffffffff808211156147e2578485fd5b600080600060408486031215614d9b578081fd5b83359250602084013567ffffffffffffffff8111156148de578182fd5b60008060408385031215614dca578182fd5b50508035926020909101359150565b60008060008060008060808789031215614df1578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115614e16578586fd5b614e228a838b0161457c565b90965094506060890135915080821115614e3a578283fd5b50614e4789828a016145be565b979a9699509497509295939492505050565b6000815180845260208085019450808401835b83811015614e915781516001600160a01b031687529582019590820190600101614e6c565b509495945050505050565b6000815180845260208085019450808401835b83811015614e9157815187529582019590820190600101614eaf565b60008151808452614ee3816020860160208601615e8b565b601f01601f19169290920160200192915050565b805460009060028104600180831680614f1157607f831692505b6020808410821415614f3157634e487b7160e01b86526022600452602486fd5b818015614f455760018114614f5657614f83565b60ff19861689528489019650614f83565b614f5f88615df8565b60005b86811015614f7b5781548b820152908501908301614f62565b505084890196505b50505050505092915050565b918252602082015260400190565b60008251614faf818460208701615e8b565b9190910192915050565b60008351614fcb818460208801615e8b565b600160fd1b9083019081528351614fe9816001840160208801615e8b565b01600101949350505050565b60006150018285614ef7565b8351615011818360208801615e8b565b01949350505050565b6000611de26150298386614ef7565b84614ef7565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613e246080830184614ecb565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156151455783516001600160a01b031683529284019291840191600101615120565b50909695505050505050565b6040808252810184905260008560608301825b8781101561519457823561517781615f7f565b6001600160a01b0316825260209283019290910190600101615164565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8511156151cc578283fd5b602085029150818660208301370160200190815295945050505050565b60006020825261265b6020830184614e59565b60006040825261520f6040830185614e59565b8281036020840152614d318185614e9c565b60006020825261265b6020830184614e9c565b901515815260200190565b90815260200190565b6001600160e01b031991909116815260200190565b60006020825261265b6020830184614ecb565b60208082526013908201527f5552492063616e6e6f7420626520656d70747900000000000000000000000000604082015260600190565b60208082526019908201527f43616e6e6f7420626c61636b6c69737420796f757273656c6600000000000000604082015260600190565b6020808252600f908201527f496e76616c696420616464726573730000000000000000000000000000000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252601e908201527f43726561746f72436f72653a20496e76616c696420657874656e73696f6e0000604082015260600190565b60208082526042908201527f436f6e7472616374206e6f742079657420617070726f76656420666f7220616c60408201527f6c207472616e73666572732066726f6d206f726967696e616c20636f6e74726160608201526118dd60f21b608082015260a00190565b60208082526029908201527f45524337323143726561746f723a20457874656e73696f6e20617070726f76616040820152686c206661696c75726560b81b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526015908201527f457874656e73696f6e20626c61636b6c69737465640000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600d908201526c24b73b30b634b2103a37b5b2b760991b604082015260600190565b6020808252818101527f4d65726b6c6520726f6f7420686173206e6f7420796574206265656e20736574604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526011908201527f4e6f6e6578697374656e7420746f6b656e000000000000000000000000000000604082015260600190565b6020808252602e908201527f546f6b656e204944206d757374206265206c657373207468616e206d6178206360408201527f6f6c6c656374696f6e2073697a65000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252601c908201527f4d6f7265207468616e203120726f79616c747920726563656976657200000000604082015260600190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252602b908201527f5075726761746f727920616464726573732063616e6e6f74206265207468652060408201526a307830206164647265737360a81b606082015260800190565b60208082526033908201527f4f726967696e616c20636f6e747261637420616464726573732063616e6e6f7460408201527f2062652074686520307830206164647265737300000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6040820152641d1c9858dd60da1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527f4e6f20657874656e73696f6e20666f7220746f6b656e00000000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526017908201527f496e76616c696420746f74616c20726f79616c74696573000000000000000000604082015260600190565b60208082526018908201527f4e657720746f6b656e20616c7265616479206d696e7465640000000000000000604082015260600190565b6020808252818101527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6020808252603f908201527f457874656e73696f6e206d75737420696d706c656d656e74204945524337323160408201527f43726561746f72457874656e73696f6e417070726f76655472616e7366657200606082015260800190565b60208082526010908201527f43726561746f723a20496e76616c696400000000000000000000000000000000604082015260600190565b6020808252600d908201526c24b73b30b634b210383937b7b360991b604082015260600190565b6020808252602b908201527f546f6b656e204944206d757374206265206f757473696465206f66206d69677260408201526a6174696f6e2072616e676560a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60ff91909116815260200190565b6000808335601e19843603018112615d53578283fd5b83018035915067ffffffffffffffff821115615d6d578283fd5b602001915036819003821315610fa857600080fd5b60405181810167ffffffffffffffff81118282101715615da457615da4615f69565b604052919050565b600067ffffffffffffffff821115615dc657615dc6615f69565b5060209081020190565b600067ffffffffffffffff821115615dea57615dea615f69565b50601f01601f191660200190565b60009081526020902090565b60008219821115615e1757615e17615f3d565b500190565b600060ff821660ff84168060ff03821115615e3957615e39615f3d565b019392505050565b600082615e5057615e50615f53565b500490565b6000816000190483118215151615615e6f57615e6f615f3d565b500290565b600082821015615e8657615e86615f3d565b500390565b60005b83811015615ea6578181015183820152602001615e8e565b8381111561113e5750506000910152565b600281046001821680615ecb57607f821691505b602082108114156138b157634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615f0457615f04615f3d565b6001019392505050565b6000600019821415615f2257615f22615f3d565b5060010190565b600082615f3857615f38615f53565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109cc57600080fd5b80151581146109cc57600080fd5b6001600160e01b0319811681146109cc57600080fdfea264697066735822122048bdf4ba239b64070ca10b03279c22144a738638f3654cefdc22f75074bf704e64736f6c63430008000033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061041d5760003560e01c806374aed3fd1161022b578063b45a053111610130578063e00aab4b116100b8578063e985e9c511610087578063e985e9c5146108ea578063f0cdc499146108fd578063f2fde38b14610910578063fc1cc1d114610923578063fe2e1f58146109365761041d565b8063e00aab4b146108b4578063e2c345e2146108c7578063e8a3d485146108cf578063e92a89f6146108d75761041d565b8063bb3bafd6116100ff578063bb3bafd61461085a578063c87b56dd1461087b578063cbebc00e1461088e578063ce8aee9d146108a1578063d5a06d4c1461085a5761041d565b8063b45a053114610801578063b88d4fde14610814578063b8c7997d14610827578063b9c4d9fb1461083a5761041d565b806395d89b41116101b3578063aafb2d4411610182578063aafb2d44146107a2578063ac0c8cfa146107b5578063ad2d0ddd146107c8578063ada4fa18146107db578063b0fe87c9146107ee5761041d565b806395d89b411461076c57806399e0dd7c14610774578063a22cb46514610787578063a37edeba1461079a5761041d565b806382dcc0c8116101fa57806382dcc0c81461072357806383b7db631461073657806385b0e9dd1461073e5780638da5cb5b14610751578063938e3d7b146107595761041d565b806374aed3fd146106ed57806376ad2817146106f55780637884af44146106fd5780637aa15f16146107105761041d565b80633071a0f91161033157806345c0f533116102b95780636d73e669116102885780636d73e669146106a457806370a08231146106b7578063715018a6146106ca57806372ff03d3146106d257806373e92784146106e55761041d565b806345c0f5331461065657806361e5bc6b1461066b5780636352211e1461067e57806366d1e9d0146106915761041d565b806338e52e781161030057806338e52e78146105f75780633e6134b81461060a5780633f0f37f61461061d57806342842e0e1461063057806342966c68146106435761041d565b80633071a0f9146105a9578063313ed5d1146105bc57806331ae450b146105cf578063332dd1ae146105e45761041d565b806320e4afe2116103b45780632928ca58116103835780632928ca581461053a5780632a55205a1461055a5780632d3456701461057b5780632eb4a7ab1461058e57806330176e13146105965761041d565b806320e4afe2146104ee578063239be3171461050157806323b872dd1461051457806324d7806c146105275761041d565b8063095ea7b3116103f0578063095ea7b3146104955780630ebd4c7f146104a8578063162094c4146104c857806319819935146104db5761041d565b806301ffc9a71461042257806302e7afb71461044b57806306fdde0314610460578063081812fc14610475575b600080fd5b610435610430366004614bfa565b610949565b6040516104429190615234565b60405180910390f35b61045e6104593660046145fe565b61097a565b005b6104686109cf565b604051610442919061525d565b610488610483366004614d3a565b610a61565b604051610442919061502f565b61045e6104a3366004614983565b610aa4565b6104bb6104b6366004614d3a565b610b3c565b6040516104429190615221565b61045e6104d6366004614d87565b610bc2565b61045e6104e9366004614dd9565b610c0d565b61045e6104fc366004614d52565b610e07565b61048861050f366004614d3a565b610e80565b61045e6105223660046146bd565b610eb0565b6104356105353660046145fe565b610ee8565b61054d6105483660046145fe565b610f17565b604051610442919061523f565b61056d610568366004614db8565b610f71565b6040516104429291906150eb565b61045e6105893660046145fe565b610faf565b61054d611043565b61045e6105a4366004614c32565b611049565b61045e6105b73660046148a4565b6110c8565b6104886105ca366004614d3a565b611144565b6105d761115e565b6040516104429190615104565b61045e6105f2366004614a16565b611229565b6104bb610605366004614824565b611276565b61045e610618366004614c32565b6113de565b61045e61062b3660046148ea565b611411565b61045e61063e3660046146bd565b611486565b61045e610651366004614d3a565b6114a1565b61065e611517565b6040516104429190615d2f565b61045e610679366004614b13565b61151c565b61048861068c366004614d3a565b6115e3565b61045e61069f366004614c32565b611618565b61045e6106b23660046145fe565b611649565b61054d6106c53660046145fe565b6116d8565b61045e61171c565b61054d6106e03660046145fe565b611767565b6104686117d1565b61048861185f565b61045e61186e565b61054d61070b3660046148a4565b6118dc565b6104bb61071e366004614824565b611951565b61045e610731366004614c72565b611976565b6105d76119a8565b61054d61074c366004614db8565b611a6f565b610488611ae3565b61045e610767366004614c32565b611af2565b610468611b3e565b61045e610782366004614c32565b611b4d565b61045e610795366004614877565b611b97565b610435611ba9565b61045e6107b0366004614b13565b611bb2565b61045e6107c3366004614bc2565b611c92565b6104bb6107d6366004614950565b611d61565b6104356107e9366004614a73565b611dd5565b61045e6107fc3660046147a4565b611dea565b61045e61080f366004614652565b611e37565b61045e6108223660046146fd565b611ec7565b610435610835366004614d3a565b611f00565b61084d610848366004614d3a565b611f15565b60405161044291906151e9565b61086d610868366004614d3a565b611fa4565b6040516104429291906151fc565b610468610889366004614d3a565b612088565b61065e61089c366004614d3a565b6120b8565b61045e6108af3660046145fe565b6120ec565b6104bb6108c2366004614950565b612135565b610488612255565b610468612264565b61045e6108e5366004614d87565b612273565b6104356108f836600461461a565b6122a5565b61045e61090b36600461461a565b6122d3565b61045e61091e3660046145fe565b61231d565b61054d6109313660046149ae565b61238b565b61054d6109443660046148a4565b612570565b6000610954826125c1565b806109635750610963826125e6565b80610972575061097282612621565b90505b919050565b33610983611ae3565b6001600160a01b0316148061099e575061099e600233612646565b6109c35760405162461bcd60e51b81526004016109ba90615bae565b60405180910390fd5b6109cc81612662565b50565b6060600480546109de90615eb7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0a90615eb7565b8015610a575780601f10610a2c57610100808354040283529160200191610a57565b820191906000526020600020905b815481529060010190602001808311610a3a57829003601f168201915b5050505050905090565b6000610a6c8261272e565b610a885760405162461bcd60e51b81526004016109ba90615900565b506000908152600860205260409020546001600160a01b031690565b6000610aaf826115e3565b9050806001600160a01b0316836001600160a01b03161415610ae35760405162461bcd60e51b81526004016109ba90615a6d565b806001600160a01b0316610af561274b565b6001600160a01b03161480610b115750610b11816108f861274b565b610b2d5760405162461bcd60e51b81526004016109ba90615668565b610b37838361274f565b505050565b6060610b478261272e565b610b635760405162461bcd60e51b81526004016109ba906156c5565b610b6c826127bd565b805480602002602001604051908101604052809291908181526020018280548015610bb657602002820191906000526020600020905b815481526020019060010190808311610ba2575b50505050509050919050565b33610bcb611ae3565b6001600160a01b03161480610be65750610be6600233612646565b610c025760405162461bcd60e51b81526004016109ba90615bae565b610b3783838361284d565b601a546001600160a01b0316610c355760405162461bcd60e51b81526004016109ba90615823565b601b546001600160a01b0316610c5d5760405162461bcd60e51b81526004016109ba9061586e565b601b5460405163e985e9c560e01b81526001600160a01b0390911690819063e985e9c590610c919033903090600401615043565b60206040518083038186803b158015610ca957600080fd5b505afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190614bde565b610cfd5760405162461bcd60e51b81526004016109ba90615426565b6000610d098888611a6f565b9050610d4c86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c549150849050611dd5565b610d685760405162461bcd60e51b81526004016109ba90615c86565b601a54604051637921219560e11b81526001600160a01b038085169263f242432a92610d9f92339216908d906001906004016150b3565b600060405180830381600087803b158015610db957600080fd5b505af1158015610dcd573d6000803e3d6000fd5b5050506000898152602080526040902080546001600160a01b03191633908117909155610dfd915088868661289c565b5050505050505050565b33610e10611ae3565b6001600160a01b03161480610e2b5750610e2b600233612646565b610e475760405162461bcd60e51b81526004016109ba90615bae565b610e508561272e565b610e6c5760405162461bcd60e51b81526004016109ba906156c5565b610e798585858585612957565b5050505050565b6000610e8b8261272e565b610ea75760405162461bcd60e51b81526004016109ba906156c5565b61097282612a64565b610ec1610ebb61274b565b82612ac4565b610edd5760405162461bcd60e51b81526004016109ba90615b51565b610b37838383612b41565b6000816001600160a01b0316610efc611ae3565b6001600160a01b031614806109725750610972600283612646565b600060026001541415610f3c5760405162461bcd60e51b81526004016109ba90615cf8565b6002600155610f4c600b33612646565b610f685760405162461bcd60e51b81526004016109ba90615631565b60018055919050565b600080610f7d8461272e565b610f995760405162461bcd60e51b81526004016109ba906156c5565b610fa38484612c6e565b915091505b9250929050565b610fb761274b565b6001600160a01b0316610fc8611ae3565b6001600160a01b031614610fee5760405162461bcd60e51b81526004016109ba90615991565b610ff9600282612646565b156109cc5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a361103f600282612d42565b5050565b601c5481565b33611052611ae3565b6001600160a01b0316148061106d575061106d600233612646565b6110895760405162461bcd60e51b81526004016109ba90615bae565b61103f82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d5792505050565b336110d1611ae3565b6001600160a01b031614806110ec57506110ec600233612646565b6111085760405162461bcd60e51b81526004016109ba90615bae565b82611114600d82612646565b156111315760405162461bcd60e51b81526004016109ba90615552565b61113e8484846000612d77565b50505050565b60208052600090815260409020546001600160a01b031681565b606061116a6002612e58565b67ffffffffffffffff81111561119057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111b9578160200160208202803683370190505b50905060005b6111c96002612e58565b811015611225576111db600282612e63565b8282815181106111fb57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061121d81615f0e565b9150506111bf565b5090565b33611232611ae3565b6001600160a01b0316148061124d575061124d600233612646565b6112695760405162461bcd60e51b81526004016109ba90615bae565b61113e3085858585612e6f565b60606002600154141561129b5760405162461bcd60e51b81526004016109ba90615cf8565b60026001556112ab600b33612646565b6112c75760405162461bcd60e51b81526004016109ba90615631565b8167ffffffffffffffff8111156112ee57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611317578160200160208202803683370190505b50905060005b828110156113d2576113958585858481811061134957634e487b7160e01b600052603260045260246000fd5b905060200281019061135b9190615d3d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612fe492505050565b8282815181106113b557634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806113ca81615f0e565b91505061131d565b50600180559392505050565b6113e9600b33612646565b6114055760405162461bcd60e51b81526004016109ba90615631565b61103f82826000613063565b3361141a611ae3565b6001600160a01b031614806114355750611435600233612646565b6114515760405162461bcd60e51b81526004016109ba90615bae565b8361145d600d82612646565b1561147a5760405162461bcd60e51b81526004016109ba90615552565b610e7985858585612d77565b610b3783838360405180602001604052806000815250611ec7565b600260015414156114c45760405162461bcd60e51b81526004016109ba90615cf8565b60026001556114d33382612ac4565b6114ef5760405162461bcd60e51b81526004016109ba90615b1c565b60006114fa826115e3565b9050611505826130a0565b61150f8183613147565b505060018055565b607d81565b611527600b33612646565b6115435760405162461bcd60e51b81526004016109ba90615631565b825181146115635760405162461bcd60e51b81526004016109ba90615a46565b60005b835181101561113e576115d184828151811061159257634e487b7160e01b600052603260045260246000fd5b60200260200101518484848181106115ba57634e487b7160e01b600052603260045260246000fd5b90506020028101906115cc9190615d3d565b61325b565b806115db81615f0e565b915050611566565b6000818152600660205260408120546001600160a01b0316806109725760405162461bcd60e51b81526004016109ba906157da565b611623600b33612646565b61163f5760405162461bcd60e51b81526004016109ba90615631565b61103f8282613291565b61165161274b565b6001600160a01b0316611662611ae3565b6001600160a01b0316146116885760405162461bcd60e51b81526004016109ba90615991565b611693600282612646565b6109cc5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a361103f6002826132ab565b60006001600160a01b0382166117005760405162461bcd60e51b81526004016109ba90615759565b506001600160a01b031660009081526007602052604090205490565b61172461274b565b6001600160a01b0316611735611ae3565b6001600160a01b03161461175b5760405162461bcd60e51b81526004016109ba90615991565b61176560006132c0565b565b60006002600154141561178c5760405162461bcd60e51b81526004016109ba90615cf8565b60026001553361179a611ae3565b6001600160a01b031614806117b557506117b5600233612646565b610f685760405162461bcd60e51b81526004016109ba90615bae565b601f80546117de90615eb7565b80601f016020809104026020016040519081016040528092919081815260200182805461180a90615eb7565b80156118575780601f1061182c57610100808354040283529160200191611857565b820191906000526020600020905b81548152906001019060200180831161183a57829003601f168201915b505050505081565b601a546001600160a01b031681565b33611877611ae3565b6001600160a01b031614806118925750611892600233612646565b6118ae5760405162461bcd60e51b81526004016109ba90615bae565b601c546118cd5760405162461bcd60e51b81526004016109ba906155fc565b601d805460ff19166001179055565b6000600260015414156119015760405162461bcd60e51b81526004016109ba90615cf8565b60026001553361190f611ae3565b6001600160a01b0316148061192a575061192a600233612646565b6119465760405162461bcd60e51b81526004016109ba90615bae565b600180559392505050565b6060600260015414156119015760405162461bcd60e51b81526004016109ba90615cf8565b611981600b33612646565b61199d5760405162461bcd60e51b81526004016109ba90615631565b610b37838383613063565b60606119b4600b612e58565b67ffffffffffffffff8111156119da57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a03578160200160208202803683370190505b50905060005b611a13600b612e58565b81101561122557611a25600b82612e63565b828281518110611a4557634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611a6781615f0e565b915050611a09565b600080611a7b84613310565b90506000611a8884613310565b905060008282604051602001611a9f929190614fb9565b604051602081830303815290604052905080604051602001611ac19190614f9d565b6040516020818303038152906040528051906020012093505050505b92915050565b6000546001600160a01b031690565b33611afb611ae3565b6001600160a01b03161480611b165750611b16600233612646565b611b325760405162461bcd60e51b81526004016109ba90615bae565b610b37601f838361430a565b6060600580546109de90615eb7565b33611b56611ae3565b6001600160a01b03161480611b715750611b71600233612646565b611b8d5760405162461bcd60e51b81526004016109ba90615bae565b61103f8282613456565b61103f611ba261274b565b8383613470565b601d5460ff1681565b33611bbb611ae3565b6001600160a01b03161480611bd65750611bd6600233612646565b611bf25760405162461bcd60e51b81526004016109ba90615bae565b82518114611c125760405162461bcd60e51b81526004016109ba90615a46565b60005b835181101561113e57611c80848281518110611c4157634e487b7160e01b600052603260045260246000fd5b6020026020010151848484818110611c6957634e487b7160e01b600052603260045260246000fd5b9050602002810190611c7b9190615d3d565b61284d565b80611c8a81615f0e565b915050611c15565b611c9d600b33612646565b611cb95760405162461bcd60e51b81526004016109ba90615631565b801580611cd25750611cd233634ce6d51160e11b613513565b611cee5760405162461bcd60e51b81526004016109ba90615bf2565b3360009081526010602052604090205460ff161515811515146109cc573360008181526010602052604090819020805460ff1916841515179055517f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a3690611d56908490615234565b60405180910390a250565b606060026001541415611d865760405162461bcd60e51b81526004016109ba90615cf8565b600260015533611d94611ae3565b6001600160a01b03161480611daf5750611daf600233612646565b611dcb5760405162461bcd60e51b81526004016109ba90615bae565b6001805592915050565b6000611de284848461352f565b949350505050565b33611df3611ae3565b6001600160a01b03161480611e0e5750611e0e600233612646565b611e2a5760405162461bcd60e51b81526004016109ba90615bae565b610e798585858585612e6f565b33611e40611ae3565b6001600160a01b03161480611e5b5750611e5b600233612646565b611e775760405162461bcd60e51b81526004016109ba90615bae565b601a80546001600160a01b038088166001600160a01b031992831617909255601b805492871692909116919091179055611eb3601e848461438a565b50601d5460ff16610e7957601c5550505050565b611ed8611ed261274b565b83612ac4565b611ef45760405162461bcd60e51b81526004016109ba90615b51565b61113e84848484613545565b60216020526000908152604090205460ff1681565b6060611f208261272e565b611f3c5760405162461bcd60e51b81526004016109ba906156c5565b611f4582613578565b805480602002602001604051908101604052809291908181526020018280548015610bb657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f7b5750505050509050919050565b606080611fb08361272e565b611fcc5760405162461bcd60e51b81526004016109ba906156c5565b611fd583613608565b81546040805160208084028201810190925282815291849183018282801561202657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612008575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561207857602002820191906000526020600020905b815481526020019060010190808311612064575b5050505050905091509150915091565b60606120938261272e565b6120af5760405162461bcd60e51b81526004016109ba906156c5565b61097282613626565b601e81815481106120c857600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b336120f5611ae3565b6001600160a01b031614806121105750612110600233612646565b61212c5760405162461bcd60e51b81526004016109ba90615bae565b6109cc816138b7565b60606002600154141561215a5760405162461bcd60e51b81526004016109ba90615cf8565b600260015561216a600b33612646565b6121865760405162461bcd60e51b81526004016109ba90615631565b8161ffff1667ffffffffffffffff8111156121b157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156121da578160200160208202803683370190505b50905060005b8261ffff168161ffff16101561224a576122098460405180602001604052806000815250612fe4565b828261ffff168151811061222d57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061224281615eec565b9150506121e0565b506001805592915050565b601b546001600160a01b031681565b6060601f80546109de90615eb7565b61227e600b33612646565b61229a5760405162461bcd60e51b81526004016109ba90615631565b610b3783838361325b565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b336122dc611ae3565b6001600160a01b031614806122f757506122f7600233612646565b6123135760405162461bcd60e51b81526004016109ba90615bae565b61103f8282613908565b61232561274b565b6001600160a01b0316612336611ae3565b6001600160a01b03161461235c5760405162461bcd60e51b81526004016109ba90615991565b6001600160a01b0381166123825760405162461bcd60e51b81526004016109ba90615372565b6109cc816132c0565b6000600260015414156123b05760405162461bcd60e51b81526004016109ba90615cf8565b6002600155336123be611ae3565b6001600160a01b031614806123d957506123d9600233612646565b6123f55760405162461bcd60e51b81526004016109ba90615bae565b60ff80851660009081526021602052604090205416156124275760405162461bcd60e51b81526004016109ba90615ae5565b607d60ff85161061244a5760405162461bcd60e51b81526004016109ba906156fc565b601e60008154811061246c57634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff1610806124e55750601e6001815481106124bc57634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff16115b6125015760405162461bcd60e51b81526004016109ba90615cad565b8161251e5760405162461bcd60e51b81526004016109ba90615270565b60ff84166000818152602160205260409020805460ff191660011790556125469086906139eb565b60ff8416600090815260156020526040902061256390848461430a565b5060018055949350505050565b6000600260015414156125955760405162461bcd60e51b81526004016109ba90615cf8565b60026001556125a5600b33612646565b6119465760405162461bcd60e51b81526004016109ba90615631565b60006001600160e01b03198216639088c20760e01b1480610972575061097282613a05565b60006001600160e01b031982166380ac58cd60e01b148061096357506001600160e01b03198216635b5e139f60e01b14806109725750610972825b60006001600160e01b03198216632a9f3abf60e11b1480610972575061097282613a98565b600061265b836001600160a01b038416613ab1565b9392505050565b6001600160a01b03811630141561268b5760405162461bcd60e51b81526004016109ba906152a7565b612696600b82612646565b156126de5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a36126dc600b82612d42565b505b6126e9600d82612646565b6109cc5760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a361103f600d826132ab565b6000908152600660205260409020546001600160a01b0316151590565b3390565b600081815260086020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612784826115e3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260196020526040812054156127e557506000818152601960205260409020610975565b6000828152601160209081526040808320546001600160a01b0316835260179091529020541561283957506000818152601160209081526040808320546001600160a01b0316835260179091529020610975565b505030600090815260176020526040902090565b6000838152601160205260409020546001600160a01b031630146128835760405162461bcd60e51b81526004016109ba906155d5565b600083815260156020526040902061113e90838361430a565b600260015414156128bf5760405162461bcd60e51b81526004016109ba90615cf8565b600260015560008381526021602052604090205460ff16156128f35760405162461bcd60e51b81526004016109ba90615ae5565b806129105760405162461bcd60e51b81526004016109ba90615270565b6000838152602160205260409020805460ff1916600117905561293384846139eb565b600083815260156020526040902061294c90838361430a565b505060018055505050565b8281146129765760405162461bcd60e51b81526004016109ba90615a46565b6000805b828110156129c8578383828181106129a257634e487b7160e01b600052603260045260246000fd5b90506020020135826129b49190615e04565b9150806129c081615f0e565b91505061297a565b5061271081106129ea5760405162461bcd60e51b81526004016109ba90615aae565b6000868152601860205260409020612a0390868661442e565b506000868152601960205260409020612a1d908484614481565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee86868686604051612a549493929190615151565b60405180910390a2505050505050565b6000818152601160205260409020546001600160a01b031630811415612a9c5760405162461bcd60e51b81526004016109ba906159c6565b612aa7600d82612646565b156109755760405162461bcd60e51b81526004016109ba90615552565b6000612acf8261272e565b612aeb5760405162461bcd60e51b81526004016109ba90615589565b6000612af6836115e3565b9050806001600160a01b0316846001600160a01b03161480612b315750836001600160a01b0316612b2684610a61565b6001600160a01b0316145b80611de25750611de281856122a5565b826001600160a01b0316612b54826115e3565b6001600160a01b031614612b7a5760405162461bcd60e51b81526004016109ba906159fd565b6001600160a01b038216612ba05760405162461bcd60e51b81526004016109ba906154d7565b612bab838383613ac9565b612bb660008261274f565b6001600160a01b0383166000908152600760205260408120805460019290612bdf908490615e74565b90915550506001600160a01b0382166000908152600760205260408120805460019290612c0d908490615e04565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000806000612c7c85613578565b805490915060011015612ca15760405162461bcd60e51b81526004016109ba906157a3565b8054612cb4573060009250925050610fa8565b80600081548110612cd557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031661271085612cf7886127bd565b600081548110612d1757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154612d2c9190615e55565b612d369190615e41565b92509250509250929050565b600061265b836001600160a01b038416613ad4565b306000908152601260209081526040909120825161103f928401906144bb565b6001600160a01b038416301415612da05760405162461bcd60e51b81526004016109ba90615c4f565b612db2846001600160a01b0316613bf1565b612dce5760405162461bcd60e51b81526004016109ba9061594c565b612dd9600b85612646565b61113e576001600160a01b0384166000908152601260205260409020612e0090848461430a565b506001600160a01b038416600081815260136020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a3610e79600b856132ab565b600061097282613bf7565b600061265b8383613bfb565b828114612e8e5760405162461bcd60e51b81526004016109ba90615a46565b6000805b82811015612ee057838382818110612eba57634e487b7160e01b600052603260045260246000fd5b9050602002013582612ecc9190615e04565b915080612ed881615f0e565b915050612e92565b506127108110612f025760405162461bcd60e51b81526004016109ba90615aae565b6001600160a01b0386166000908152601660205260409020612f2590868661442e565b506001600160a01b0386166000908152601760205260409020612f49908484614481565b506001600160a01b038616301415612f9d577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612f909493929190615151565b60405180910390a1612fdc565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f86868686604051612a549493929190615151565b505050505050565b600a805460009182612ff583615f0e565b9190505550600a5490506130098382613c33565b600081815260116020526040902080546001600160a01b0319163317905561303183826139eb565b8151156130595760008181526015602090815260409091208351613057928501906144bb565b505b611add838261103f565b33600090815260126020526040902061307d90848461430a565b50336000908152601360205260409020805460ff19169115159190911790555050565b60006130ab826115e3565b90506130b981600084613ac9565b6130c460008361274f565b6001600160a01b03811660009081526007602052604081208054600192906130ed908490615e74565b909155505060008281526006602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152601160205260409020546001600160a01b031630146132055760008181526011602052604090205461318e906001600160a01b03166311686e4b60e21b613513565b1561320557600081815260116020526040908190205490516311686e4b60e21b81526001600160a01b03909116906345a1b92c906131d290859085906004016150eb565b600060405180830381600087803b1580156131ec57600080fd5b505af1158015613200573d6000803e3d6000fd5b505050505b6000818152601560205260409020805461321e90615eb7565b15905061323c57600081815260156020526040812061323c9161452f565b600090815260116020526040902080546001600160a01b031916905550565b6000838152601160205260409020546001600160a01b031633146128835760405162461bcd60e51b81526004016109ba906155d5565b336000908152601460205260409020610b3790838361430a565b600061265b836001600160a01b038416613cc0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60608161333557506040805180820190915260018152600360fc1b6020820152610975565b8160005b811561335f578061334981615f0e565b91506133589050600a83615e41565b9150613339565b60008167ffffffffffffffff81111561338857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156133b2576020820181803683370190505b509050815b851561344d576133c8600182615e74565b905060006133d7600a88615e41565b6133e290600a615e55565b6133ec9088615e74565b6133f7906030615e1c565b905060008160f81b90508084848151811061342257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613444600a89615e41565b975050506133b7565b50949350505050565b306000908152601460205260409020610b3790838361430a565b816001600160a01b0316836001600160a01b031614156134a25760405162461bcd60e51b81526004016109ba9061551b565b6001600160a01b0383811660008181526009602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190613506908590615234565b60405180910390a3505050565b600061351e83613d0a565b801561265b575061265b8383613d3d565b60008261353c8584613e2e565b14949350505050565b613550848484612b41565b61355c84848484613ee6565b61113e5760405162461bcd60e51b81526004016109ba90615315565b600081815260186020526040812054156135a057506000818152601860205260409020610975565b6000828152601160209081526040808320546001600160a01b031683526016909152902054156135f457506000818152601160209081526040808320546001600160a01b0316835260169091529020610975565b505030600090815260166020526040902090565b60008061361483613578565b61361d846127bd565b91509150915091565b6000818152601160205260409020546060906001600160a01b031661364c600d82612646565b156136695760405162461bcd60e51b81526004016109ba90615552565b6000838152601560205260409020805461368290615eb7565b15905061379c576001600160a01b038116600090815260146020526040902080546136ac90615eb7565b1590506136fd576001600160a01b0381166000908152601460209081526040808320868452601583529281902090516136e693920161501a565b604051602081830303815290604052915050610975565b6000838152601560205260409020805461371690615eb7565b80601f016020809104026020016040519081016040528092919081815260200182805461374290615eb7565b801561378f5780601f106137645761010080835404028352916020019161378f565b820191906000526020600020905b81548152906001019060200180831161377257829003601f168201915b5050505050915050610975565b6137ad8163e9dc637560e01b613513565b1561383c5760405163e9dc637560e01b81526001600160a01b0382169063e9dc6375906137e090309087906004016150eb565b60006040518083038186803b1580156137f857600080fd5b505afa15801561380c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526138349190810190614cc7565b915050610975565b6001600160a01b03811660009081526013602052604090205460ff1661388e576001600160a01b038116600090815260126020526040902061387d84614001565b6040516020016136e6929190614ff5565b6001600160a01b0381166000908152601260205260409020805461371690615eb7565b50919050565b6138c2600b82612646565b156109cc5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361103f600b82612d42565b613913600b83612646565b61392f5760405162461bcd60e51b81526004016109ba906153ef565b6001600160a01b0381161580613951575061395181631e05385b60e31b613513565b61396d5760405162461bcd60e51b81526004016109ba906152de565b6001600160a01b038281166000908152600f602052604090205481169082161461103f576001600160a01b038281166000818152600f602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b61103f82826040518060200160405280600081525061411c565b60006001600160e01b031982166328f10a2160e01b1480613a2a5750613a2a826125e6565b80613a4557506001600160e01b03198216635d9dd7eb60e11b145b80613a6057506001600160e01b03198216632dde656160e21b145b80613a7b57506001600160e01b031982166335681b5360e21b145b806109725750506001600160e01b03191663152a902d60e11b1490565b6001600160e01b031981166301ffc9a760e01b14919050565b60009081526001919091016020526040902054151590565b610b3783838361414f565b60008181526001830160205260408120548015613be7576000613af8600183615e74565b8554909150600090613b0c90600190615e74565b9050818114613b8d576000866000018281548110613b3a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613b6b57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613bac57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611add565b6000915050611add565b3b151590565b5490565b6000826000018281548110613c2057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b336000908152600f60205260409020546001600160a01b03161561103f57336000818152600f602052604090819020549051631e05385b60e31b81526001600160a01b039091169163f029c2d891613c9291908690869060040161505d565b600060405180830381600087803b158015613cac57600080fd5b505af1158015612fdc573d6000803e3d6000fd5b6000613ccc8383613ab1565b613d0257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611add565b506000611add565b6000613d1d826301ffc9a760e01b613d3d565b80156109725750613d36826001600160e01b0319613d3d565b1592915050565b6000806301ffc9a760e01b83604051602401613d599190615248565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050509050600080856001600160a01b031661753084604051613dac9190614f9d565b6000604051808303818686fa925050503d8060008114613de8576040519150601f19603f3d011682016040523d82523d6000602084013e613ded565b606091505b5091509150602081511015613e085760009350505050611add565b818015613e24575080806020019051810190613e249190614bde565b9695505050505050565b600081815b8451811015613ede576000858281518110613e5e57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613e9f578281604051602001613e82929190614f8f565b604051602081830303815290604052805190602001209250613ecb565b8083604051602001613eb2929190614f8f565b6040516020818303038152906040528051906020012092505b5080613ed681615f0e565b915050613e33565b509392505050565b6000613efa846001600160a01b0316613bf1565b15613ff657836001600160a01b031663150b7a02613f1661274b565b8786866040518563ffffffff1660e01b8152600401613f389493929190615081565b602060405180830381600087803b158015613f5257600080fd5b505af1925050508015613f82575060408051601f3d908101601f19168201909252613f7f91810190614c16565b60015b613fdc573d808015613fb0576040519150601f19603f3d011682016040523d82523d6000602084013e613fb5565b606091505b508051613fd45760405162461bcd60e51b81526004016109ba90615315565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611de2565b506001949350505050565b60608161402657506040805180820190915260018152600360fc1b6020820152610975565b8160005b8115614050578061403a81615f0e565b91506140499050600a83615e41565b915061402a565b60008167ffffffffffffffff81111561407957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156140a3576020820181803683370190505b5090505b8415611de2576140b8600183615e74565b91506140c5600a86615f29565b6140d0906030615e04565b60f81b8183815181106140f357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350614115600a86615e41565b94506140a7565b614126838361422b565b6141336000848484613ee6565b610b375760405162461bcd60e51b81526004016109ba90615315565b6000818152601160209081526040808320546001600160a01b03168352601090915290205460ff1615610b375760008181526011602052604090819020549051638258080560e01b81526001600160a01b03909116906382580805906141bd9086908690869060040161505d565b602060405180830381600087803b1580156141d757600080fd5b505af11580156141eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061420f9190614bde565b610b375760405162461bcd60e51b81526004016109ba9061548e565b6001600160a01b0382166142515760405162461bcd60e51b81526004016109ba906158cb565b61425a8161272e565b156142775760405162461bcd60e51b81526004016109ba906153b8565b61428360008383613ac9565b6001600160a01b03821660009081526007602052604081208054600192906142ac908490615e04565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461431690615eb7565b90600052602060002090601f016020900481019282614338576000855561437e565b82601f106143515782800160ff1982351617855561437e565b8280016001018555821561437e579182015b8281111561437e578235825591602001919060010190614363565b50611225929150614567565b82805482825590600052602060002090601f0160209004810192821561437e5791602002820160005b838211156143f457833560ff1683826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026143b3565b80156144215782816101000a81549060ff02191690556001016020816000010492830192600103026143f4565b5050611225929150614567565b82805482825590600052602060002090810192821561437e579160200282015b8281111561437e5781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061444e565b82805482825590600052602060002090810192821561437e579160200282018281111561437e578235825591602001919060010190614363565b8280546144c790615eb7565b90600052602060002090601f0160209004810192826144e9576000855561437e565b82601f1061450257805160ff191683800117855561437e565b8280016001018555821561437e579182015b8281111561437e578251825591602001919060010190614514565b50805461453b90615eb7565b6000825580601f1061454d57506109cc565b601f0160209004906000526020600020908101906109cc91905b5b808211156112255760008155600101614568565b60008083601f84011261458d578182fd5b50813567ffffffffffffffff8111156145a4578182fd5b6020830191508360208083028501011115610fa857600080fd5b60008083601f8401126145cf578182fd5b50813567ffffffffffffffff8111156145e6578182fd5b602083019150836020828501011115610fa857600080fd5b60006020828403121561460f578081fd5b813561265b81615f7f565b6000806040838503121561462c578081fd5b823561463781615f7f565b9150602083013561464781615f7f565b809150509250929050565b600080600080600060808688031215614669578081fd5b853561467481615f7f565b9450602086013561468481615f7f565b9350604086013567ffffffffffffffff81111561469f578182fd5b6146ab8882890161457c565b96999598509660600135949350505050565b6000806000606084860312156146d1578081fd5b83356146dc81615f7f565b925060208401356146ec81615f7f565b929592945050506040919091013590565b60008060008060808587031215614712578182fd5b843561471d81615f7f565b9350602085013561472d81615f7f565b925060408501359150606085013567ffffffffffffffff81111561474f578182fd5b8501601f8101871361475f578182fd5b803561477261476d82615dd0565b615d82565b818152886020838501011115614786578384fd5b81602084016020830137908101602001929092525092959194509250565b6000806000806000606086880312156147bb578283fd5b85356147c681615f7f565b9450602086013567ffffffffffffffff808211156147e2578485fd5b6147ee89838a0161457c565b90965094506040880135915080821115614806578283fd5b506148138882890161457c565b969995985093965092949392505050565b600080600060408486031215614838578081fd5b833561484381615f7f565b9250602084013567ffffffffffffffff81111561485e578182fd5b61486a8682870161457c565b9497909650939450505050565b60008060408385031215614889578182fd5b823561489481615f7f565b9150602083013561464781615f94565b6000806000604084860312156148b8578081fd5b83356148c381615f7f565b9250602084013567ffffffffffffffff8111156148de578182fd5b61486a868287016145be565b600080600080606085870312156148ff578182fd5b843561490a81615f7f565b9350602085013567ffffffffffffffff811115614925578283fd5b614931878288016145be565b909450925050604085013561494581615f94565b939692955090935050565b60008060408385031215614962578182fd5b823561496d81615f7f565b9150602083013561ffff81168114614647578182fd5b60008060408385031215614995578182fd5b82356149a081615f7f565b946020939093013593505050565b600080600080606085870312156149c3578182fd5b84356149ce81615f7f565b9350602085013560ff811681146149e3578283fd5b9250604085013567ffffffffffffffff8111156149fe578283fd5b614a0a878288016145be565b95989497509550505050565b60008060008060408587031215614a2b578182fd5b843567ffffffffffffffff80821115614a42578384fd5b614a4e8883890161457c565b90965094506020870135915080821115614a66578384fd5b50614a0a8782880161457c565b600080600060608486031215614a87578081fd5b833567ffffffffffffffff811115614a9d578182fd5b8401601f81018613614aad578182fd5b80356020614abd61476d83615dac565b82815281810190848301838502860184018b1015614ad9578687fd5b8695505b84861015614afb578035835260019590950194918301918301614add565b50999188013598505060409096013595945050505050565b600080600060408486031215614b27578081fd5b833567ffffffffffffffff80821115614b3e578283fd5b818601915086601f830112614b51578283fd5b81356020614b6161476d83615dac565b82815281810190858301838502870184018c1015614b7d578788fd5b8796505b84871015614b9f578035835260019690960195918301918301614b81565b5097505087013592505080821115614bb5578283fd5b5061486a8682870161457c565b600060208284031215614bd3578081fd5b813561265b81615f94565b600060208284031215614bef578081fd5b815161265b81615f94565b600060208284031215614c0b578081fd5b813561265b81615fa2565b600060208284031215614c27578081fd5b815161265b81615fa2565b60008060208385031215614c44578182fd5b823567ffffffffffffffff811115614c5a578283fd5b614c66858286016145be565b90969095509350505050565b600080600060408486031215614c86578081fd5b833567ffffffffffffffff811115614c9c578182fd5b614ca8868287016145be565b9094509250506020840135614cbc81615f94565b809150509250925092565b600060208284031215614cd8578081fd5b815167ffffffffffffffff811115614cee578182fd5b8201601f81018413614cfe578182fd5b8051614d0c61476d82615dd0565b818152856020838501011115614d20578384fd5b614d31826020830160208601615e8b565b95945050505050565b600060208284031215614d4b578081fd5b5035919050565b600080600080600060608688031215614d69578283fd5b85359450602086013567ffffffffffffffff808211156147e2578485fd5b600080600060408486031215614d9b578081fd5b83359250602084013567ffffffffffffffff8111156148de578182fd5b60008060408385031215614dca578182fd5b50508035926020909101359150565b60008060008060008060808789031215614df1578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115614e16578586fd5b614e228a838b0161457c565b90965094506060890135915080821115614e3a578283fd5b50614e4789828a016145be565b979a9699509497509295939492505050565b6000815180845260208085019450808401835b83811015614e915781516001600160a01b031687529582019590820190600101614e6c565b509495945050505050565b6000815180845260208085019450808401835b83811015614e9157815187529582019590820190600101614eaf565b60008151808452614ee3816020860160208601615e8b565b601f01601f19169290920160200192915050565b805460009060028104600180831680614f1157607f831692505b6020808410821415614f3157634e487b7160e01b86526022600452602486fd5b818015614f455760018114614f5657614f83565b60ff19861689528489019650614f83565b614f5f88615df8565b60005b86811015614f7b5781548b820152908501908301614f62565b505084890196505b50505050505092915050565b918252602082015260400190565b60008251614faf818460208701615e8b565b9190910192915050565b60008351614fcb818460208801615e8b565b600160fd1b9083019081528351614fe9816001840160208801615e8b565b01600101949350505050565b60006150018285614ef7565b8351615011818360208801615e8b565b01949350505050565b6000611de26150298386614ef7565b84614ef7565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613e246080830184614ecb565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156151455783516001600160a01b031683529284019291840191600101615120565b50909695505050505050565b6040808252810184905260008560608301825b8781101561519457823561517781615f7f565b6001600160a01b0316825260209283019290910190600101615164565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8511156151cc578283fd5b602085029150818660208301370160200190815295945050505050565b60006020825261265b6020830184614e59565b60006040825261520f6040830185614e59565b8281036020840152614d318185614e9c565b60006020825261265b6020830184614e9c565b901515815260200190565b90815260200190565b6001600160e01b031991909116815260200190565b60006020825261265b6020830184614ecb565b60208082526013908201527f5552492063616e6e6f7420626520656d70747900000000000000000000000000604082015260600190565b60208082526019908201527f43616e6e6f7420626c61636b6c69737420796f757273656c6600000000000000604082015260600190565b6020808252600f908201527f496e76616c696420616464726573730000000000000000000000000000000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252601e908201527f43726561746f72436f72653a20496e76616c696420657874656e73696f6e0000604082015260600190565b60208082526042908201527f436f6e7472616374206e6f742079657420617070726f76656420666f7220616c60408201527f6c207472616e73666572732066726f6d206f726967696e616c20636f6e74726160608201526118dd60f21b608082015260a00190565b60208082526029908201527f45524337323143726561746f723a20457874656e73696f6e20617070726f76616040820152686c206661696c75726560b81b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526015908201527f457874656e73696f6e20626c61636b6c69737465640000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600d908201526c24b73b30b634b2103a37b5b2b760991b604082015260600190565b6020808252818101527f4d65726b6c6520726f6f7420686173206e6f7420796574206265656e20736574604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526011908201527f4e6f6e6578697374656e7420746f6b656e000000000000000000000000000000604082015260600190565b6020808252602e908201527f546f6b656e204944206d757374206265206c657373207468616e206d6178206360408201527f6f6c6c656374696f6e2073697a65000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252601c908201527f4d6f7265207468616e203120726f79616c747920726563656976657200000000604082015260600190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252602b908201527f5075726761746f727920616464726573732063616e6e6f74206265207468652060408201526a307830206164647265737360a81b606082015260800190565b60208082526033908201527f4f726967696e616c20636f6e747261637420616464726573732063616e6e6f7460408201527f2062652074686520307830206164647265737300000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6040820152641d1c9858dd60da1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527f4e6f20657874656e73696f6e20666f7220746f6b656e00000000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526017908201527f496e76616c696420746f74616c20726f79616c74696573000000000000000000604082015260600190565b60208082526018908201527f4e657720746f6b656e20616c7265616479206d696e7465640000000000000000604082015260600190565b6020808252818101527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6020808252603f908201527f457874656e73696f6e206d75737420696d706c656d656e74204945524337323160408201527f43726561746f72457874656e73696f6e417070726f76655472616e7366657200606082015260800190565b60208082526010908201527f43726561746f723a20496e76616c696400000000000000000000000000000000604082015260600190565b6020808252600d908201526c24b73b30b634b210383937b7b360991b604082015260600190565b6020808252602b908201527f546f6b656e204944206d757374206265206f757473696465206f66206d69677260408201526a6174696f6e2072616e676560a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60ff91909116815260200190565b6000808335601e19843603018112615d53578283fd5b83018035915067ffffffffffffffff821115615d6d578283fd5b602001915036819003821315610fa857600080fd5b60405181810167ffffffffffffffff81118282101715615da457615da4615f69565b604052919050565b600067ffffffffffffffff821115615dc657615dc6615f69565b5060209081020190565b600067ffffffffffffffff821115615dea57615dea615f69565b50601f01601f191660200190565b60009081526020902090565b60008219821115615e1757615e17615f3d565b500190565b600060ff821660ff84168060ff03821115615e3957615e39615f3d565b019392505050565b600082615e5057615e50615f53565b500490565b6000816000190483118215151615615e6f57615e6f615f3d565b500290565b600082821015615e8657615e86615f3d565b500390565b60005b83811015615ea6578181015183820152602001615e8e565b8381111561113e5750506000910152565b600281046001821680615ecb57607f821691505b602082108114156138b157634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615f0457615f04615f3d565b6001019392505050565b6000600019821415615f2257615f22615f3d565b5060010190565b600082615f3857615f38615f53565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109cc57600080fd5b80151581146109cc57600080fd5b6001600160e01b0319811681146109cc57600080fdfea264697066735822122048bdf4ba239b64070ca10b03279c22144a738638f3654cefdc22f75074bf704e64736f6c63430008000033

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.