ETH Price: $2,507.55 (-0.12%)

Token

POTTED-POTTED (POTTED-POTTED)
 

Overview

Max Total Supply

4,157 POTTED-POTTED

Holders

2,023

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 POTTED-POTTED
0x0705f087fb70c784094ac6482a38aba82a73aca7
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:
PottedPotted

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : potted_potted.sol
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXK0000KXXK0KKXNWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWX0kkOO00KKKKK0Ok0NWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNKOOkxkOO0KKKKKOkONWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKxddO0K00K000OkO0KKK0kxxkKWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWN0l,:okOkkO0K0kkO000OxddxKWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWMNkloooxkkkkO00OkOOkxxddOXWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW0dllxkxxkOkkOOxddlccd0NWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXkddxKXk0NWWWWKc';dOkddoddddolcclldKWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKo:::cc;:ccd0kc'..,lxd:;clllcccldooKWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXKK0d;'....,,......,;;:lO0xdoollclKWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWN0dccc:......;clxKNNWWWNX0kxxkXWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXx:....oNWWWWWWWWWWWWWWWWWNNNWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWx'...oNWWWWWMWWWNXXXXXXXKKKXNWWMWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNx,..,xNWWMWWWWWXOO0000KKKKKKK0XWWWWWWWW
//WWWWWWWWWNXXXNWWWNKXNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXkl,.;ONWWWWWWMWNKkkkO0000KKK000KNWWWWWWW
//WWWWWWWWWKOOkk0XNkclkNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWMKl,,:xXWWWWWWWNXKK0kxkO000KKKK00OONWWWWWW
//WWWWWWWWWXOxdxxxkl'':dKWWWWWWWWWWWWWWWWWWWWWWWWWWWMWWWWWWNOl;:dKWWWWWWWWWKOO0K0kxkOO0KKKKK0kOXWWWWWW
//WWWWWWWX0OOxooddl;.'',dNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWN0o;''oXWWWNNNNNWN0OO00K00OOOO0KKK0kxxkKWWWWW
//WWWWWWWNKkxkdlooc:;'.';oONWWWWN0O0XWWWWWWWWMWWWWWWWWWWKd:,''.,ckOolllllkK0OOOkkO0KKOkO000OxdddONWWWW
//WWWWWWWWW0kkxollcx0d;''',oKWWWN0kxk0NWWWWWWWWWWWWWWWW0d:,''....,,'..'',,,,:lxkkkkO00OkOOkxxddkKWWWWW
//WWWWWWWWWWWWKOkxxKWWk,...,lxOXN0dldxkkOOKWWWWWWWWWWXOl;,'..,c;..............;lxkxxkOOkkOkxdolcxNWWWW
//WWWWWWWWWWWWWWWWWWWWO;.....',ldo:;:;'.',cxKWWWWWNOxo:,'..'ckXKxdol;....,codddxOK0kddddxxddoclxKWWWWW
//WWWWWWWWWWWWWWWWWWWWXOc''..............'',oKNWNOo:;,,'..:xKWWWWWWNKx:'.,lONWWWWWWNKKkollllccdKWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWX00x:,;,,,;,;'....',;lOkl:,''.....'c0WWWWWWWWWXx:,,;lk0XNWWWWWNXKKKOdkXWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWXXXXXXXXXkl:;'..',,'',,.......,l0WWMWWWWWWWWXKkocllxKWWWWWWWWWWWNWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWMWWWWWWWMWWWWWNW0:..''.........:lokNWWWWWWWWWWWWWWWWNNWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWMK:............'xWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWN0o,..........'xNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWN0c..........,oXWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWMWWWWWWNkcc;........:KWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWN0o,......:0WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXl......'lONWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNNNXOl,........,cldKNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWMWWWNKKkc;;;,.....','.....';dKNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWX000kl;;'........',:o;......'';oO00KNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXOo::;,,''''''..',;:c:;,,,'.',:;,,,::cxKNWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW0l:ccc:::clolc;;:lddxddocc:;:lllcccoollxXMWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXOxxxxdddd                    xxddxkkxxONWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNK0000OOkk   POTTED-POTTED    kkkkkkkkkkk0NWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNK00000000     Powered by     kkkkkkkkk0NWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNK00000000   @tamagogi_dapp   kkkkkk0NWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNK000OO000                    kkkkkkkxx0NWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNK00OkkkOO        2022        kkkkkxdlokNWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWMWWWWN0Okxxkkkk                    kxddolc::dXMWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWKdc::codxxddxxddooooooooooooooolc::;;;;oXMWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW0c;;;;;:cc::ccc:;;;;;;;;;;;;;;;::;;;;;;oXMWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWMMWWWWN0dc:::::::::::::::::::::::::::::::::cxKWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWNKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKXNWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "base64-sol/base64.sol";

import "./potted_types.sol";

interface PPRenderer {
    function drawUnrevealPP(PottedTypes.Gene memory gene) external view returns (string memory);
    function drawRevealPP(PottedTypes.Gene memory gene) external view returns (string memory);
    function drawNoBgPP(PottedTypes.Gene memory gene, uint scale) external view returns (string memory);
    function getPP(PottedTypes.Gene memory gene) external view returns (PottedTypes.MyPotted memory);
}

contract PottedPotted is Ownable, ERC721A, ReentrancyGuard{
    PPRenderer public renderer = PPRenderer(0x795Fe5BA6Be2D37F08Cb96c003D57F6089103CA9);
    
    struct Config {
        uint maxPotted;
        uint publicPrice;
        uint publicMaxMint;
        address petContract;
        bytes32 claimHash;
        bytes32 presaleHash;
        Phase phase;
    }

    Config public config;
    uint private _mintedId = 1;
    uint private _teamReserve = 200;
    uint public currentReserve = 0;
    mapping(address => bool) public claimed;
    mapping(address => bool) public presaleMinted;
    mapping(address => uint) public publicMinted;
    mapping(uint => PottedTypes.Gene) public potteds;
    mapping(uint => bool) public petForReroll;

    constructor() ERC721A("POTTED-POTTED", "POTTED-POTTED") {
        config.maxPotted = 7777;
        config.publicPrice = 0;
        config.publicMaxMint = 1;
        config.petContract = 0x4C534034a06f11ECB638BF71A097c168a052a659;
        config.claimHash = 0x0;
        config.presaleHash = 0x0;
        config.phase = Phase.PAUSED;
    }

    enum Phase {
        PAUSED,
        CLAIM,
        PRESALE,
        PUBLIC,
        REVEAL
    }

    /*******
    * Event
    *******/
    event EReveal(
       uint tokenId
    );

    /*******
    * Modifier
    *******/
    modifier validToken(uint tokenId) {
        require(tokenId >= _startTokenId() && tokenId <= _totalMinted(), "Not valid id");
        _;
    }

    modifier validOwner(uint tokenId) {
        require(ownerOf(tokenId) == msg.sender, "Not token's owner");
        _;
    }

    modifier mintable(uint quantity) {
        require(_totalMinted() + quantity <= config.maxPotted, "No potted left");
        _;
    }

    modifier onlyReveal(uint tokenId) {
        require(potteds[tokenId].revealNum != 0, "Potted not reveal yet");
        _;
    }

    /*******
    * PreSale 1, maxMint is pet balance, free.
    *******/
    function claimPotted(bytes32[] calldata _proof) external {
        uint max = ERC721A(config.petContract).balanceOf(msg.sender);
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));

        require(!claimed[msg.sender], "Claimed");
        require(config.phase == Phase.CLAIM, "Invalid phase");
        require(MerkleProof.verify(_proof, config.claimHash, leaf), "invalid proof");
        require(_totalMinted() + max <= config.maxPotted, "No potted left");
        
        _mintPotted(max);
        claimed[msg.sender] = true;
    }

    /*******
    * PreSale 2, maxMint = 1, free.
    *******/
    function getPotted(bytes32[] calldata _proof) external mintable(1) payable {
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));

        require(!presaleMinted[msg.sender], "Minted");
        require(config.phase == Phase.PRESALE, "Invalid phase");
        require(MerkleProof.verify(_proof, config.presaleHash, leaf), "invalid proof");
        
        _mintPotted(1);
        presaleMinted[msg.sender] = true;
    }

    /*******
    * PublicSale
    *******/
    function buyPotted(uint quantity) external mintable(quantity) payable {
        require(publicMinted[msg.sender] + quantity <= config.publicMaxMint, "Exceed max buy");
        require(config.phase == Phase.PUBLIC, "Invalid phase");
        require(quantity * config.publicPrice <= msg.value, "No enough eth.");
        
        publicMinted[msg.sender] += quantity;
        _mintPotted(quantity);
    }

    /*******
    * Reveal by owner
    *******/
    function setPottedReveal(uint tokenId, uint revealNum) external validOwner(tokenId) {
        require(config.phase == Phase.REVEAL, "Not in valid phase");
        require(revealNum >= 1 && revealNum <= 8, "Out of range");
        require(potteds[tokenId].revealNum == 0, "Potted revealed");

        potteds[tokenId] = PottedTypes.Gene(potteds[tokenId].dna, revealNum, potteds[tokenId].isReroll);

        emit EReveal(tokenId);
    }

    /*******
    * Reroll by owner
    *******/
    function rerollPotted(uint tokenId, uint petId) external validToken(tokenId) validOwner(tokenId) {
        address petOwner = ERC721A(config.petContract).ownerOf(petId);
        require(petOwner == msg.sender, "Not pet owner");
        require(petId >= 1 && petId <= 3825, "Not valid Tamagogi Pets id");
        require(!petForReroll[petId], "This pet has been rerolled for potted");

        potteds[tokenId] = PottedTypes.Gene(_getRandom(tokenId), potteds[tokenId].revealNum, true);
    }

    function _mintPotted(uint quantity) private {
        for (uint i = 0; i < quantity; i++) {
            uint tokenId = _mintedId;
            uint seed = _getRandom(tokenId);

            potteds[tokenId] = PottedTypes.Gene(seed, 0, false);
            _mintedId++;
        }

        _safeMint(msg.sender, quantity);
    }

    /*******
    * PreviewPotted with no bg / only Reveal
    *******/
    function previewPottedNoBg(uint tokenId, uint scale) external onlyReveal(tokenId) validOwner(tokenId) view returns (string memory) {
        PottedTypes.Gene memory gene = potteds[tokenId];
        return renderer.drawNoBgPP(gene, scale);
    }

    /*******
    * PreviewPotted / only owner
    *******/
    function previewPotted(uint tokenId, uint revealNum) external validOwner(tokenId) view returns (string memory) {
        require(revealNum >= 1 && revealNum <= 8, "Out of range");
        PottedTypes.Gene memory gene = PottedTypes.Gene(potteds[tokenId].dna, revealNum, false);
        return renderer.drawRevealPP(gene);
    }

    function _getUnreveal(PottedTypes.Gene memory gene, PottedTypes.MyPotted memory myPotted, uint tokenId) private view returns (string memory) {
        string memory json = 
                string(
                    abi.encodePacked(
                        '{"name": "#',Strings.toString(tokenId),' Unreveal POTTED-POTTED",',
                        '"description": "Japanese-style bonsai has its charm, whether the type of pot, the direction of growth of the branches or whether flowering or not, there are multiple set of styles. POTTED-POTTED is The first on-chain generated Potted artwork.",', 
                        '"attributes": [',
                            '{ "trait_type": "background", "value": "',myPotted.bg.traitName,'"},',
                            '{ "trait_type": "potted", "value": "',myPotted.potted.traitName,'"},',
                            '{ "trait_type": "isReveal", "value": "No"}',
                        '],'
                        '"image": "data:image/svg+xml;base64,', Base64.encode(bytes(renderer.drawUnrevealPP(gene))), '"}' 
                        )
                    );

        return Base64.encode(
            bytes(
                string(json)
                )
            );
    }

    function _getReveal(PottedTypes.Gene memory gene, PottedTypes.MyPotted memory myPotted, uint tokenId) private view returns (string memory) {
        string memory json = 
                string(
                    abi.encodePacked(
                        '{"name": "#',Strings.toString(tokenId),' POTTED-POTTED",',
                        '"description": "Japanese-style bonsai has its charm, whether the type of pot, the direction of growth of the branches or whether flowering or not, there are multiple set of styles. POTTED-POTTED is The first on-chain generated Potted artwork.",', 
                        _getRevealAttr(gene, myPotted),
                        '"image": "data:image/svg+xml;base64,', Base64.encode(bytes(renderer.drawRevealPP(gene))), '"}' 
                        )
                    );

        return Base64.encode(
            bytes(
                string(json)
                )
            );
    }

    function _getRevealAttr(PottedTypes.Gene memory gene, PottedTypes.MyPotted memory myPotted) private pure returns (string memory) {
        uint blossomCount = (gene.dna + gene.revealNum - 1) % myPotted.branch.pointX.length;
        string memory json = 
                string(
                    abi.encodePacked(
                        '"attributes": [',
                            '{ "trait_type": "background", "value": "',myPotted.bg.traitName,'"},',
                            '{ "trait_type": "potted", "value": "',myPotted.potted.traitName,'"},',
                            '{ "trait_type": "branch", "value": "',myPotted.branch.traitName,'"},',
                            '{ "trait_type": "blossom", "value": "',myPotted.blossom.traitName,'"},',
                            '{ "trait_type": "blossom amount", "display_type": "number", "value": ',Strings.toString(blossomCount),'}',
                        '],'
                        )
                    );

        return json;
    }

    function _tokenURI(uint256 tokenId) private view  returns (string memory) {
        PottedTypes.Gene memory gene = potteds[tokenId];
        string memory json = potteds[tokenId].revealNum == 0 ? _getUnreveal(gene, renderer.getPP(gene), tokenId) : _getReveal(gene, renderer.getPP(gene), tokenId);

        return string(abi.encodePacked('data:application/json;base64,', json));
    }

    function tokenURI(uint256 tokenId) override (ERC721A) public view validToken(tokenId) returns (string memory) {
        return _tokenURI(tokenId);
    }

    function numberMinted(address _addr) public view returns(uint256){
        return _numberMinted(_addr);
    }

    function _startTokenId() override internal pure virtual returns (uint256) {
        return 1;
    }
    
    function _getRandom(uint tokenId) private view returns (uint) {
        uint randomlize = uint(keccak256(abi.encodePacked(blockhash(block.number - 1), tokenId, msg.sender)));
        return randomlize;
    }
    
    /*******
    * ERC721AQueryable.sol
    *******/
    function tokensOfOwner(address owner) public view virtual returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }

    /*******
    * Admin function
    *******/
    function setPublicPrice(uint data) external onlyOwner {
        config.publicPrice = data;
    }
    function setPublicMaxMint(uint data) external onlyOwner {
        config.publicMaxMint = data;
    }
    function setClaimHash(bytes32 data) external onlyOwner {
        config.claimHash = data;
    }
    function setPresaleHash(bytes32 data) external onlyOwner {
        config.presaleHash = data;
    }
    function setPhase(Phase phase) external onlyOwner {
        config.phase = phase;
    }
    function setRenderContract(address _address) external onlyOwner {
        renderer = PPRenderer(_address);
    }
    function teamReserve(uint quantity) external mintable(quantity) onlyOwner {
        require(currentReserve + quantity <= _teamReserve, "Exceed max reserve");
        currentReserve += quantity;
        _mintPotted(quantity);
    }
    function withdraw() external onlyOwner nonReentrant {
        (bool success, ) = msg.sender.call{value: address(this).balance}("");
        require(success, ".");
    }
}

File 2 of 10 : potted_types.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

interface PottedTypes {
    struct Gene {
        uint dna;
        uint revealNum;
        bool isReroll;
    }

    struct MyPotted {
      Potted potted;
      Branch branch;
      Blossom blossom;
      Bg bg;
    }

    struct Potted {
      string traitName;
      uint width;
      uint height;
      uint x;
      uint y;
      uint id;
    }

    struct Branch {
      string traitName;
      uint width;
      uint height;
      uint unique;
      uint x;
      uint y;
      uint[] pointX;
      uint[] pointY;
      uint id;
    }

    // Each blossom max count <= branchPointX.length
    struct Blossom {
      string traitName;
      uint[] width;
      uint[] height;
      uint[] childs;
      uint id;
    }

    struct Bg {
      string traitName;
      uint id;
    }
}

File 3 of 10 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 4 of 10 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @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, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @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) public payable virtual override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @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) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @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. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @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 memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

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

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 7 of 10 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree 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.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
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 Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle 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++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 8 of 10 : 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 9 of 10 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @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,
        bytes calldata data
    ) external payable;

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` 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 payable;

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

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"EReveal","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":"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"buyPotted","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claimPotted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"uint256","name":"maxPotted","type":"uint256"},{"internalType":"uint256","name":"publicPrice","type":"uint256"},{"internalType":"uint256","name":"publicMaxMint","type":"uint256"},{"internalType":"address","name":"petContract","type":"address"},{"internalType":"bytes32","name":"claimHash","type":"bytes32"},{"internalType":"bytes32","name":"presaleHash","type":"bytes32"},{"internalType":"enum PottedPotted.Phase","name":"phase","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"getPotted","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"petForReroll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"potteds","outputs":[{"internalType":"uint256","name":"dna","type":"uint256"},{"internalType":"uint256","name":"revealNum","type":"uint256"},{"internalType":"bool","name":"isReroll","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"revealNum","type":"uint256"}],"name":"previewPotted","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"scale","type":"uint256"}],"name":"previewPottedNoBg","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract PPRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"petId","type":"uint256"}],"name":"rerollPotted","outputs":[],"stateMutability":"nonpayable","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":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"data","type":"bytes32"}],"name":"setClaimHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum PottedPotted.Phase","name":"phase","type":"uint8"}],"name":"setPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"revealNum","type":"uint256"}],"name":"setPottedReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"data","type":"bytes32"}],"name":"setPresaleHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"data","type":"uint256"}],"name":"setPublicMaxMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"data","type":"uint256"}],"name":"setPublicPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setRenderContract","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":"quantity","type":"uint256"}],"name":"teamReserve","outputs":[],"stateMutability":"nonpayable","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":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600a80546001600160a01b03191673795fe5ba6be2d37f08cb96c003d57f6089103ca9179055600160125560c860135560006014553480156200004657600080fd5b506040518060400160405280600d81526020016c1413d51511510b5413d5151151609a1b8152506040518060400160405280600d81526020016c1413d51511510b5413d5151151609a1b815250620000ad620000a76200013660201b60201c565b6200013a565b8151620000c29060039060208501906200018a565b508051620000d89060049060208401906200018a565b5060018081556009819055611e61600b556000600c819055600d91909155600e80546001600160a01b031916734c534034a06f11ecb638bf71a097c168a052a659179055600f81905560105550506011805460ff191690556200026d565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001989062000230565b90600052602060002090601f016020900481019282620001bc576000855562000207565b82601f10620001d757805160ff191683800117855562000207565b8280016001018555821562000207579182015b8281111562000207578251825591602001919060010190620001ea565b506200021592915062000219565b5090565b5b808211156200021557600081556001016200021a565b600181811c908216806200024557607f821691505b602082108114156200026757634e487b7160e01b600052602260045260246000fd5b50919050565b6139bf806200027d6000396000f3fe6080604052600436106102515760003560e01c80638da5cb5b11610139578063b88d4fde116100b6578063c62752551161007a578063c62752551461073b578063c87b56dd1461075b578063c884ef831461077b578063dc33e681146107ab578063e985e9c5146107cb578063f2fde38b146107eb57600080fd5b8063b88d4fde14610698578063bc660cac146106ab578063bf92b273146106db578063c03afb59146106fb578063c538668b1461071b57600080fd5b8063a59585a8116100fd578063a59585a8146105c6578063ab0e136c146105e6578063acb102d6146105f9578063b5b8d7dd14610629578063b66dc62e1461063c57600080fd5b80638da5cb5b146105335780639574e0f11461055157806395d89b4114610571578063a0452b4714610586578063a22cb465146105a657600080fd5b80633ccfd60b116101d2578063715018a611610196578063715018a61461044357806379502c55146104585780638415d213146104a65780638462151c146104c65780638ada6b0f146104f35780638b7400ee1461051357600080fd5b80633ccfd60b146103bb57806342842e0e146103d05780636352211e146103e357806368b434561461040357806370a082311461042357600080fd5b80631015805b116102195780631015805b1461031a57806318160ddd1461035557806323b872dd146103725780632e12007c14610385578063347ac6e41461039b57600080fd5b806301ffc9a71461025657806306fdde031461028b57806307269bf6146102ad578063081812fc146102cf578063095ea7b314610307575b600080fd5b34801561026257600080fd5b50610276610271366004612df3565b61080b565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a061085d565b60405161028291906135e8565b3480156102b957600080fd5b506102cd6102c8366004612f73565b6108ef565b005b3480156102db57600080fd5b506102ef6102ea366004612dda565b610b6f565b6040516001600160a01b039091168152602001610282565b6102cd610315366004612d3a565b610bb3565b34801561032657600080fd5b50610347610335366004612baa565b60176020526000908152604090205481565b604051908152602001610282565b34801561036157600080fd5b506002546001540360001901610347565b6102cd610380366004612c1d565b610c53565b34801561039157600080fd5b5061034760145481565b3480156103a757600080fd5b506102cd6103b6366004612dda565b610de4565b3480156103c757600080fd5b506102cd610ea0565b6102cd6103de366004612c1d565b610f84565b3480156103ef57600080fd5b506102ef6103fe366004612dda565b610fa4565b34801561040f57600080fd5b506102cd61041e366004612f73565b610faf565b34801561042f57600080fd5b5061034761043e366004612baa565b611163565b34801561044f57600080fd5b506102cd6111b1565b34801561046457600080fd5b50600b54600c54600d54600e54600f54601054601154610493969594936001600160a01b031692919060ff1687565b6040516102829796959493929190613698565b3480156104b257600080fd5b506102cd6104c1366004612baa565b6111c5565b3480156104d257600080fd5b506104e66104e1366004612baa565b6111ef565b60405161028291906135b0565b3480156104ff57600080fd5b50600a546102ef906001600160a01b031681565b34801561051f57600080fd5b506102cd61052e366004612dda565b6112fe565b34801561053f57600080fd5b506000546001600160a01b03166102ef565b34801561055d57600080fd5b506102a061056c366004612f73565b61130b565b34801561057d57600080fd5b506102a061143c565b34801561059257600080fd5b506102a06105a1366004612f73565b61144b565b3480156105b257600080fd5b506102cd6105c1366004612d07565b6115af565b3480156105d257600080fd5b506102cd6105e1366004612dda565b61161b565b6102cd6105f4366004612dda565b611628565b34801561060557600080fd5b50610276610614366004612dda565b60196020526000908152604090205460ff1681565b6102cd610637366004612d66565b611763565b34801561064857600080fd5b5061067b610657366004612dda565b60186020526000908152604090208054600182015460029092015490919060ff1683565b604080519384526020840192909252151590820152606001610282565b6102cd6106a6366004612c5e565b6118fa565b3480156106b757600080fd5b506102766106c6366004612baa565b60166020526000908152604090205460ff1681565b3480156106e757600080fd5b506102cd6106f6366004612d66565b611944565b34801561070757600080fd5b506102cd610716366004612e2d565b611b57565b34801561072757600080fd5b506102cd610736366004612dda565b611b86565b34801561074757600080fd5b506102cd610756366004612dda565b611b93565b34801561076757600080fd5b506102a0610776366004612dda565b611ba0565b34801561078757600080fd5b50610276610796366004612baa565b60156020526000908152604090205460ff1681565b3480156107b757600080fd5b506103476107c6366004612baa565b611c07565b3480156107d757600080fd5b506102766107e6366004612be4565b611c31565b3480156107f757600080fd5b506102cd610806366004612baa565b611c5f565b60006301ffc9a760e01b6001600160e01b03198316148061083c57506380ac58cd60e01b6001600160e01b03198316145b806108575750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606003805461086c9061384c565b80601f01602080910402602001604051908101604052809291908181526020018280546108989061384c565b80156108e55780601f106108ba576101008083540402835291602001916108e5565b820191906000526020600020905b8154815290600101906020018083116108c857829003601f168201915b5050505050905090565b81600181101580156109075750600154600019018111155b6109475760405162461bcd60e51b815260206004820152600c60248201526b139bdd081d985b1a59081a5960a21b60448201526064015b60405180910390fd5b823361095282610fa4565b6001600160a01b0316146109785760405162461bcd60e51b815260040161093e906135fb565b600e546040516331a9108f60e11b8152600481018590526000916001600160a01b031690636352211e9060240160206040518083038186803b1580156109bd57600080fd5b505afa1580156109d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f59190612bc7565b90506001600160a01b0381163314610a3f5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103832ba1037bbb732b960991b604482015260640161093e565b60018410158015610a525750610ef18411155b610a9e5760405162461bcd60e51b815260206004820152601a60248201527f4e6f742076616c69642054616d61676f67692050657473206964000000000000604482015260640161093e565b60008481526019602052604090205460ff1615610b0b5760405162461bcd60e51b815260206004820152602560248201527f546869732070657420686173206265656e207265726f6c6c656420666f7220706044820152641bdd1d195960da1b606482015260840161093e565b6040518060600160405280610b1f87611cd8565b815260008781526018602081815260408084206001808201805485890152968301529a9093529081528351895583015190915501516002909501805460ff19169515159590951790945550505050565b6000610b7a82611d2c565b610b97576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610bbe82610fa4565b9050336001600160a01b03821614610bf757610bda8133611c31565b610bf7576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610c5e82611d61565b9050836001600160a01b0316816001600160a01b031614610c915760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610cde57610cc18633611c31565b610cde57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d0557604051633a954ecd60e21b815260040160405180910390fd5b8015610d1057600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b8316610d9b5760018401600081815260056020526040902054610d99576001548114610d995760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600b54819081610df76001546000190190565b610e0191906137be565b1115610e1f5760405162461bcd60e51b815260040161093e9061364d565b610e27611dd1565b60135482601454610e3891906137be565b1115610e7b5760405162461bcd60e51b8152602060048201526012602482015271457863656564206d6178207265736572766560701b604482015260640161093e565b8160146000828254610e8d91906137be565b90915550610e9c905082611e2b565b5050565b610ea8611dd1565b60026009541415610efb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161093e565b6002600955604051600090339047908381818185875af1925050503d8060008114610f42576040519150601f19603f3d011682016040523d82523d6000602084013e610f47565b606091505b5050905080610f7c5760405162461bcd60e51b81526020600482015260016024820152601760f91b604482015260640161093e565b506001600955565b610f9f838383604051806020016040528060008152506118fa565b505050565b600061085782611d61565b8133610fba82610fa4565b6001600160a01b031614610fe05760405162461bcd60e51b815260040161093e906135fb565b600460115460ff166004811115610ff957610ff96138dc565b1461103b5760405162461bcd60e51b81526020600482015260126024820152714e6f7420696e2076616c696420706861736560701b604482015260640161093e565b6001821015801561104d575060088211155b6110885760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662072616e676560a01b604482015260640161093e565b600083815260186020526040902060010154156110d95760405162461bcd60e51b815260206004820152600f60248201526e141bdd1d1959081c995d99585b1959608a1b604482015260640161093e565b604080516060810182526000858152601860208181528483208054855281850188815260028201805460ff81161515888a01908152968c905294845295518255516001909101559151151560ff199091161790915590518481527f8c3c9df32d93095569c39215747311f36eacd9871dca487a5e8938c65d26518b910160405180910390a1505050565b60006001600160a01b03821661118c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6111b9611dd1565b6111c36000611ec3565b565b6111cd611dd1565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b606060008060006111ff85611163565b90506000816001600160401b0381111561121b5761121b613908565b604051908082528060200260200182016040528015611244578160200160208202803683370190505b50905061127160408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146112f25761128481611f13565b9150816040015115611295576112ea565b81516001600160a01b0316156112aa57815194505b876001600160a01b0316856001600160a01b031614156112ea57808387806001019850815181106112dd576112dd6138f2565b6020026020010181815250505b600101611274565b50909695505050505050565b611306611dd1565b601055565b6060823361131882610fa4565b6001600160a01b03161461133e5760405162461bcd60e51b815260040161093e906135fb565b60018310158015611350575060088311155b61138b5760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662072616e676560a01b604482015260640161093e565b60408051606081018252600086815260186020908152838220548352820186905281830152600a54915163137e875160e21b815290916001600160a01b031690634dfa1d44906113df908490600401613675565b60006040518083038186803b1580156113f757600080fd5b505afa15801561140b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114339190810190612e4e565b95945050505050565b60606004805461086c9061384c565b60008281526018602052604090206001015460609083906114a65760405162461bcd60e51b8152602060048201526015602482015274141bdd1d1959081b9bdd081c995d99585b081e595d605a1b604482015260640161093e565b83336114b182610fa4565b6001600160a01b0316146114d75760405162461bcd60e51b815260040161093e906135fb565b600085815260186020908152604091829020825160608101845281548152600182015492810192835260029091015460ff161515818401908152600a5493516315f4afc360e11b81528251600482015292516024840152511515604483015260648201879052916001600160a01b031690632be95f869060840160006040518083038186803b15801561156957600080fd5b505afa15801561157d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115a59190810190612e4e565b9695505050505050565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611623611dd1565b600d55565b600b5481908161163b6001546000190190565b61164591906137be565b11156116635760405162461bcd60e51b815260040161093e9061364d565b600d54336000908152601760205260409020546116819084906137be565b11156116c05760405162461bcd60e51b815260206004820152600e60248201526d457863656564206d61782062757960901b604482015260640161093e565b600360115460ff1660048111156116d9576116d96138dc565b146116f65760405162461bcd60e51b815260040161093e90613626565b600c54349061170590846137ea565b11156117445760405162461bcd60e51b815260206004820152600e60248201526d27379032b737bab3b41032ba341760911b604482015260640161093e565b3360009081526017602052604081208054849290610e8d9084906137be565b600b54600190816117776001546000190190565b61178191906137be565b111561179f5760405162461bcd60e51b815260040161093e9061364d565b6040516001600160601b03193360601b16602082015260009060340160408051601f198184030181529181528151602092830120336000908152601690935291205490915060ff161561181d5760405162461bcd60e51b8152602060048201526006602482015265135a5b9d195960d21b604482015260640161093e565b600260115460ff166004811115611836576118366138dc565b146118535760405162461bcd60e51b815260040161093e90613626565b611894848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506010549150849050611f91565b6118d05760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161093e565b6118da6001611e2b565b5050336000908152601660205260409020805460ff191660011790555050565b611905848484610c53565b6001600160a01b0383163b1561193e5761192184848484611fa7565b61193e576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600e546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561198857600080fd5b505afa15801561199c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c09190612f5a565b6040516001600160601b03193360601b16602082015290915060009060340160408051601f198184030181529181528151602092830120336000908152601590935291205490915060ff1615611a425760405162461bcd60e51b815260206004820152600760248201526610db185a5b595960ca1b604482015260640161093e565b600160115460ff166004811115611a5b57611a5b6138dc565b14611a785760405162461bcd60e51b815260040161093e90613626565b611ab984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600f549150849050611f91565b611af55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161093e565b600b5482611b066001546000190190565b611b1091906137be565b1115611b2e5760405162461bcd60e51b815260040161093e9061364d565b611b3782611e2b565b5050336000908152601560205260409020805460ff191660011790555050565b611b5f611dd1565b6011805482919060ff19166001836004811115611b7e57611b7e6138dc565b021790555050565b611b8e611dd1565b600f55565b611b9b611dd1565b600c55565b60608160018110158015611bba5750600154600019018111155b611bf55760405162461bcd60e51b815260206004820152600c60248201526b139bdd081d985b1a59081a5960a21b604482015260640161093e565b611bfe8361209f565b91505b50919050565b6001600160a01b038116600090815260066020526040808220546001600160401b03911c16610857565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b611c67611dd1565b6001600160a01b038116611ccc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161093e565b611cd581611ec3565b50565b600080611ce6600143613809565b6040805191406020830152810184905233606090811b6001600160601b0319169082015260740160408051601f1981840301815291905280516020909101209392505050565b600081600111158015611d40575060015482105b8015610857575050600090815260056020526040902054600160e01b161590565b60008180600111611db857600154811015611db857600081815260056020526040902054600160e01b8116611db6575b80611daf575060001901600081815260056020526040902054611d91565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000546001600160a01b031633146111c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161093e565b60005b81811015611eb8576012546000611e4482611cd8565b60408051606081018252828152600060208083018281528385018381528884526018909252938220925183559251600183015591516002909101805460ff19169115159190911790556012805492935090611e9e83613881565b919050555050508080611eb090613881565b915050611e2e565b50611cd53382612238565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526005602052604090205461085790604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b600082611f9e8584612252565b14949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fdc90339089908890889060040161357d565b602060405180830381600087803b158015611ff657600080fd5b505af1925050508015612026575060408051601f3d908101601f1916820190925261202391810190612e10565b60015b612081573d808015612054576040519150601f19603f3d011682016040523d82523d6000602084013e612059565b606091505b508051612079576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600081815260186020818152604080842081516060818101845282548252600183015482860181905260029093015460ff161515938201939093528686529390925292901561217d57600a54604051630d346f4560e31b81526121789184916001600160a01b03909116906369a37a289061211e908490600401613675565b60006040518083038186803b15801561213657600080fd5b505afa15801561214a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121729190810190612e82565b8661229f565b61220d565b600a54604051630d346f4560e31b815261220d9184916001600160a01b03909116906369a37a28906121b3908490600401613675565b60006040518083038186803b1580156121cb57600080fd5b505afa1580156121df573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122079190810190612e82565b8661236d565b9050806040516020016122209190613538565b60405160208183030381529060405292505050919050565b610e9c8282604051806020016040528060008152506123c8565b600081815b84518110156122975761228382868381518110612276576122766138f2565b6020026020010151612435565b91508061228f81613881565b915050612257565b509392505050565b606060006122ac83612461565b6122b6868661255e565b600a5460405163137e875160e21b8152612341916001600160a01b031690634dfa1d44906122e8908b90600401613675565b60006040518083038186803b15801561230057600080fd5b505afa158015612314573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261233c9190810190612e4e565b6125e7565b60405160200161235393929190613177565b6040516020818303038152906040529050611433816125e7565b6060600061237a83612461565b606085015151855151600a5460405163f457223160e01b81526123b5916001600160a01b03169063f4572231906122e8908c90600401613675565b604051602001612353949392919061323e565b6123d2838361274c565b6001600160a01b0383163b15610f9f576001548281035b6123fc6000868380600101945086611fa7565b612419576040516368d2bf6b60e11b815260040160405180910390fd5b8181106123e957816001541461242e57600080fd5b5050505050565b6000818310612451576000828152602084905260409020611daf565b5060009182526020526040902090565b6060816124855750506040805180820190915260018152600360fc1b602082015290565b8160005b81156124af578061249981613881565b91506124a89050600a836137d6565b9150612489565b6000816001600160401b038111156124c9576124c9613908565b6040519080825280601f01601f1916602001820160405280156124f3576020820181803683370190505b5090505b841561209757612508600183613809565b9150612515600a8661389c565b6125209060306137be565b60f81b818381518110612535576125356138f2565b60200101906001600160f81b031916908160001a905350612557600a866137d6565b94506124f7565b60606000826020015160c001515160018560200151866000015161258291906137be565b61258c9190613809565b612596919061389c565b6060840151518451516020860151516040870151519394506000936125ba86612461565b6040516020016125ce959493929190613399565b60408051808303601f1901815291905295945050505050565b606081516000141561260757505060408051602081019091526000815290565b600060405180606001604052806040815260200161394a604091399050600060038451600261263691906137be565b61264091906137d6565b61264b9060046137ea565b9050600061265a8260206137be565b6001600160401b0381111561267157612671613908565b6040519080825280601f01601f19166020018201604052801561269b576020820181803683370190505b509050818152600183018586518101602084015b81831015612707576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016126af565b60038951066001811461272157600281146127325761273e565b613d3d60f01b60011983015261273e565b603d60f81b6000198301525b509398975050505050505050565b6001548161276d5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461281c57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016127e4565b508161283a57604051622e076360e81b815260040160405180910390fd5b60015550505050565b600082601f83011261285457600080fd5b815160206001600160401b0382111561286f5761286f613908565b8160051b61287e828201613767565b83815282810190868401838801850189101561289957600080fd5b600093505b858410156128bc57805183526001939093019291840191840161289e565b50979650505050505050565b600082601f8301126128d957600080fd5b81516128ec6128e782613797565b613767565b81815284602083860101111561290157600080fd5b612097826020830160208701613820565b60006040828403121561292457600080fd5b604051604081016001600160401b03828210818311171561294757612947613908565b81604052829350845191508082111561295f57600080fd5b5061296c858286016128c8565b825250602083015160208201525092915050565b600060a0828403121561299257600080fd5b61299a6136fa565b905081516001600160401b03808211156129b357600080fd5b6129bf858386016128c8565b835260208401519150808211156129d557600080fd5b6129e185838601612843565b602084015260408401519150808211156129fa57600080fd5b612a0685838601612843565b60408401526060840151915080821115612a1f57600080fd5b50612a2c84828501612843565b6060830152506080820151608082015292915050565b60006101208284031215612a5557600080fd5b612a5d613722565b905081516001600160401b0380821115612a7657600080fd5b612a82858386016128c8565b83526020840151602084015260408401516040840152606084015160608401526080840151608084015260a084015160a084015260c0840151915080821115612aca57600080fd5b612ad685838601612843565b60c084015260e0840151915080821115612aef57600080fd5b50612afc84828501612843565b60e08301525061010080830151818301525092915050565b600060c08284031215612b2657600080fd5b60405160c081016001600160401b038282108183111715612b4957612b49613908565b816040528293508451915080821115612b6157600080fd5b50612b6e858286016128c8565b8252506020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b600060208284031215612bbc57600080fd5b8135611daf8161391e565b600060208284031215612bd957600080fd5b8151611daf8161391e565b60008060408385031215612bf757600080fd5b8235612c028161391e565b91506020830135612c128161391e565b809150509250929050565b600080600060608486031215612c3257600080fd5b8335612c3d8161391e565b92506020840135612c4d8161391e565b929592945050506040919091013590565b60008060008060808587031215612c7457600080fd5b8435612c7f8161391e565b93506020850135612c8f8161391e565b92506040850135915060608501356001600160401b03811115612cb157600080fd5b8501601f81018713612cc257600080fd5b8035612cd06128e782613797565b818152886020838501011115612ce557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612d1a57600080fd5b8235612d258161391e565b915060208301358015158114612c1257600080fd5b60008060408385031215612d4d57600080fd5b8235612d588161391e565b946020939093013593505050565b60008060208385031215612d7957600080fd5b82356001600160401b0380821115612d9057600080fd5b818501915085601f830112612da457600080fd5b813581811115612db357600080fd5b8660208260051b8501011115612dc857600080fd5b60209290920196919550909350505050565b600060208284031215612dec57600080fd5b5035919050565b600060208284031215612e0557600080fd5b8135611daf81613933565b600060208284031215612e2257600080fd5b8151611daf81613933565b600060208284031215612e3f57600080fd5b813560058110611daf57600080fd5b600060208284031215612e6057600080fd5b81516001600160401b03811115612e7657600080fd5b612097848285016128c8565b600060208284031215612e9457600080fd5b81516001600160401b0380821115612eab57600080fd5b9083019060808286031215612ebf57600080fd5b612ec7613745565b825182811115612ed657600080fd5b612ee287828601612b14565b825250602083015182811115612ef757600080fd5b612f0387828601612a42565b602083015250604083015182811115612f1b57600080fd5b612f2787828601612980565b604083015250606083015182811115612f3f57600080fd5b612f4b87828601612912565b60608301525095945050505050565b600060208284031215612f6c57600080fd5b5051919050565b60008060408385031215612f8657600080fd5b50508035926020909101359150565b60008151808452612fad816020860160208601613820565b601f01601f19169290920160200192915050565b60008151612fd3818560208601613820565b9290920192915050565b7f226465736372697074696f6e223a20224a6170616e6573652d7374796c65206281527f6f6e736169206861732069747320636861726d2c20776865746865722074686560208201527f2074797065206f6620706f742c2074686520646972656374696f6e206f66206760408201527f726f777468206f6620746865206272616e63686573206f72207768657468657260608201527f20666c6f776572696e67206f72206e6f742c20746865726520617265206d756c60808201527f7469706c6520736574206f66207374796c65732e20504f545445442d504f545460a08201527f454420697320546865206669727374206f6e2d636861696e2067656e6572617460c082015273195908141bdd1d195908185c9d1ddbdc9acb888b60621b60e082015260f40190565b7f7b202274726169745f74797065223a2022706f74746564222c202276616c7565815263111d101160e11b602082015260240190565b7f7b202274726169745f74797065223a20226261636b67726f756e64222c20227681526730b63ab2911d101160c11b602082015260280190565b6a7b226e616d65223a20222360a81b8152835160009061319e81600b850160208901613820565b6f081413d51511510b5413d5151151088b60821b600b918401918201526131c7601b8201612fdd565b905084516131d9818360208901613820565b8082019150507f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b626173815263194d8d0b60e21b60208201528351613222816024840160208801613820565b61227d60f01b6024929091019182015260260195945050505050565b6a7b226e616d65223a20222360a81b8152845160009061326581600b850160208a01613820565b7f20556e72657665616c20504f545445442d504f54544544222c00000000000000600b9184019182015261329b60248201612fdd565b6e2261747472696275746573223a205b60881b815290506132be600f820161313d565b905085516132d0818360208a01613820565b62089f4b60ea1b9101818152906132e960038301613107565b915085516132fb818460208a01613820565b919091019081527f7b202274726169745f74797065223a2022697352657665616c222c202276616c6003820152697565223a20224e6f227d60b01b60238201527f5d2c22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62602d82015265185cd94d8d0b60d21b604d82015261338e6133806053830186612fc1565b61227d60f01b815260020190565b979650505050505050565b6e2261747472696275746573223a205b60881b815260006133bc600f830161313d565b87516133cc818360208c01613820565b62089f4b60ea1b9101818152906133e560038301613107565b915087516133f7818460208c01613820565b919091018181527f7b202274726169745f74797065223a20226272616e6368222c202276616c7565600382015263111d101160e11b60238201528651909190613447816027850160208b01613820565b60279201918201527f7b202274726169745f74797065223a2022626c6f73736f6d222c202276616c75602a8201526432911d101160d91b604a82015261352c61351e61351161350b6134ae61349f604f87018b612fc1565b62089f4b60ea1b815260030190565b7f7b202274726169745f74797065223a2022626c6f73736f6d20616d6f756e742281527f2c2022646973706c61795f74797065223a20226e756d626572222c202276616c60208201526403ab2911d160dd1b604082015260450190565b87612fc1565b607d60f81b815260010190565b61174b60f21b815260020190565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161357081601d850160208701613820565b91909101601d0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906115a590830184612f95565b6020808252825182820181905260009190848201906040850190845b818110156112f2578351835292840192918401916001016135cc565b602081526000611daf6020830184612f95565b6020808252601190820152702737ba103a37b5b2b713b99037bbb732b960791b604082015260600190565b6020808252600d908201526c496e76616c696420706861736560981b604082015260600190565b6020808252600e908201526d139bc81c1bdd1d1959081b19599d60921b604082015260600190565b815181526020808301519082015260408083015115159082015260608101610857565b87815260208101879052604081018690526001600160a01b03851660608201526080810184905260a0810183905260e08101600583106136e857634e487b7160e01b600052602160045260246000fd5b8260c083015298975050505050505050565b60405160a081016001600160401b038111828210171561371c5761371c613908565b60405290565b60405161012081016001600160401b038111828210171561371c5761371c613908565b604051608081016001600160401b038111828210171561371c5761371c613908565b604051601f8201601f191681016001600160401b038111828210171561378f5761378f613908565b604052919050565b60006001600160401b038211156137b0576137b0613908565b50601f01601f191660200190565b600082198211156137d1576137d16138b0565b500190565b6000826137e5576137e56138c6565b500490565b6000816000190483118215151615613804576138046138b0565b500290565b60008282101561381b5761381b6138b0565b500390565b60005b8381101561383b578181015183820152602001613823565b8381111561193e5750506000910152565b600181811c9082168061386057607f821691505b60208210811415611c0157634e487b7160e01b600052602260045260246000fd5b6000600019821415613895576138956138b0565b5060010190565b6000826138ab576138ab6138c6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611cd557600080fd5b6001600160e01b031981168114611cd557600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212204562e209d4249fac987e7d198a7405b4cada447ac8e0bb5cacea6e722416263264736f6c63430008070033

Deployed Bytecode

0x6080604052600436106102515760003560e01c80638da5cb5b11610139578063b88d4fde116100b6578063c62752551161007a578063c62752551461073b578063c87b56dd1461075b578063c884ef831461077b578063dc33e681146107ab578063e985e9c5146107cb578063f2fde38b146107eb57600080fd5b8063b88d4fde14610698578063bc660cac146106ab578063bf92b273146106db578063c03afb59146106fb578063c538668b1461071b57600080fd5b8063a59585a8116100fd578063a59585a8146105c6578063ab0e136c146105e6578063acb102d6146105f9578063b5b8d7dd14610629578063b66dc62e1461063c57600080fd5b80638da5cb5b146105335780639574e0f11461055157806395d89b4114610571578063a0452b4714610586578063a22cb465146105a657600080fd5b80633ccfd60b116101d2578063715018a611610196578063715018a61461044357806379502c55146104585780638415d213146104a65780638462151c146104c65780638ada6b0f146104f35780638b7400ee1461051357600080fd5b80633ccfd60b146103bb57806342842e0e146103d05780636352211e146103e357806368b434561461040357806370a082311461042357600080fd5b80631015805b116102195780631015805b1461031a57806318160ddd1461035557806323b872dd146103725780632e12007c14610385578063347ac6e41461039b57600080fd5b806301ffc9a71461025657806306fdde031461028b57806307269bf6146102ad578063081812fc146102cf578063095ea7b314610307575b600080fd5b34801561026257600080fd5b50610276610271366004612df3565b61080b565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a061085d565b60405161028291906135e8565b3480156102b957600080fd5b506102cd6102c8366004612f73565b6108ef565b005b3480156102db57600080fd5b506102ef6102ea366004612dda565b610b6f565b6040516001600160a01b039091168152602001610282565b6102cd610315366004612d3a565b610bb3565b34801561032657600080fd5b50610347610335366004612baa565b60176020526000908152604090205481565b604051908152602001610282565b34801561036157600080fd5b506002546001540360001901610347565b6102cd610380366004612c1d565b610c53565b34801561039157600080fd5b5061034760145481565b3480156103a757600080fd5b506102cd6103b6366004612dda565b610de4565b3480156103c757600080fd5b506102cd610ea0565b6102cd6103de366004612c1d565b610f84565b3480156103ef57600080fd5b506102ef6103fe366004612dda565b610fa4565b34801561040f57600080fd5b506102cd61041e366004612f73565b610faf565b34801561042f57600080fd5b5061034761043e366004612baa565b611163565b34801561044f57600080fd5b506102cd6111b1565b34801561046457600080fd5b50600b54600c54600d54600e54600f54601054601154610493969594936001600160a01b031692919060ff1687565b6040516102829796959493929190613698565b3480156104b257600080fd5b506102cd6104c1366004612baa565b6111c5565b3480156104d257600080fd5b506104e66104e1366004612baa565b6111ef565b60405161028291906135b0565b3480156104ff57600080fd5b50600a546102ef906001600160a01b031681565b34801561051f57600080fd5b506102cd61052e366004612dda565b6112fe565b34801561053f57600080fd5b506000546001600160a01b03166102ef565b34801561055d57600080fd5b506102a061056c366004612f73565b61130b565b34801561057d57600080fd5b506102a061143c565b34801561059257600080fd5b506102a06105a1366004612f73565b61144b565b3480156105b257600080fd5b506102cd6105c1366004612d07565b6115af565b3480156105d257600080fd5b506102cd6105e1366004612dda565b61161b565b6102cd6105f4366004612dda565b611628565b34801561060557600080fd5b50610276610614366004612dda565b60196020526000908152604090205460ff1681565b6102cd610637366004612d66565b611763565b34801561064857600080fd5b5061067b610657366004612dda565b60186020526000908152604090208054600182015460029092015490919060ff1683565b604080519384526020840192909252151590820152606001610282565b6102cd6106a6366004612c5e565b6118fa565b3480156106b757600080fd5b506102766106c6366004612baa565b60166020526000908152604090205460ff1681565b3480156106e757600080fd5b506102cd6106f6366004612d66565b611944565b34801561070757600080fd5b506102cd610716366004612e2d565b611b57565b34801561072757600080fd5b506102cd610736366004612dda565b611b86565b34801561074757600080fd5b506102cd610756366004612dda565b611b93565b34801561076757600080fd5b506102a0610776366004612dda565b611ba0565b34801561078757600080fd5b50610276610796366004612baa565b60156020526000908152604090205460ff1681565b3480156107b757600080fd5b506103476107c6366004612baa565b611c07565b3480156107d757600080fd5b506102766107e6366004612be4565b611c31565b3480156107f757600080fd5b506102cd610806366004612baa565b611c5f565b60006301ffc9a760e01b6001600160e01b03198316148061083c57506380ac58cd60e01b6001600160e01b03198316145b806108575750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606003805461086c9061384c565b80601f01602080910402602001604051908101604052809291908181526020018280546108989061384c565b80156108e55780601f106108ba576101008083540402835291602001916108e5565b820191906000526020600020905b8154815290600101906020018083116108c857829003601f168201915b5050505050905090565b81600181101580156109075750600154600019018111155b6109475760405162461bcd60e51b815260206004820152600c60248201526b139bdd081d985b1a59081a5960a21b60448201526064015b60405180910390fd5b823361095282610fa4565b6001600160a01b0316146109785760405162461bcd60e51b815260040161093e906135fb565b600e546040516331a9108f60e11b8152600481018590526000916001600160a01b031690636352211e9060240160206040518083038186803b1580156109bd57600080fd5b505afa1580156109d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f59190612bc7565b90506001600160a01b0381163314610a3f5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103832ba1037bbb732b960991b604482015260640161093e565b60018410158015610a525750610ef18411155b610a9e5760405162461bcd60e51b815260206004820152601a60248201527f4e6f742076616c69642054616d61676f67692050657473206964000000000000604482015260640161093e565b60008481526019602052604090205460ff1615610b0b5760405162461bcd60e51b815260206004820152602560248201527f546869732070657420686173206265656e207265726f6c6c656420666f7220706044820152641bdd1d195960da1b606482015260840161093e565b6040518060600160405280610b1f87611cd8565b815260008781526018602081815260408084206001808201805485890152968301529a9093529081528351895583015190915501516002909501805460ff19169515159590951790945550505050565b6000610b7a82611d2c565b610b97576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610bbe82610fa4565b9050336001600160a01b03821614610bf757610bda8133611c31565b610bf7576040516367d9dca160e11b815260040160405180910390fd5b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610c5e82611d61565b9050836001600160a01b0316816001600160a01b031614610c915760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610cde57610cc18633611c31565b610cde57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d0557604051633a954ecd60e21b815260040160405180910390fd5b8015610d1057600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b8316610d9b5760018401600081815260056020526040902054610d99576001548114610d995760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600b54819081610df76001546000190190565b610e0191906137be565b1115610e1f5760405162461bcd60e51b815260040161093e9061364d565b610e27611dd1565b60135482601454610e3891906137be565b1115610e7b5760405162461bcd60e51b8152602060048201526012602482015271457863656564206d6178207265736572766560701b604482015260640161093e565b8160146000828254610e8d91906137be565b90915550610e9c905082611e2b565b5050565b610ea8611dd1565b60026009541415610efb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161093e565b6002600955604051600090339047908381818185875af1925050503d8060008114610f42576040519150601f19603f3d011682016040523d82523d6000602084013e610f47565b606091505b5050905080610f7c5760405162461bcd60e51b81526020600482015260016024820152601760f91b604482015260640161093e565b506001600955565b610f9f838383604051806020016040528060008152506118fa565b505050565b600061085782611d61565b8133610fba82610fa4565b6001600160a01b031614610fe05760405162461bcd60e51b815260040161093e906135fb565b600460115460ff166004811115610ff957610ff96138dc565b1461103b5760405162461bcd60e51b81526020600482015260126024820152714e6f7420696e2076616c696420706861736560701b604482015260640161093e565b6001821015801561104d575060088211155b6110885760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662072616e676560a01b604482015260640161093e565b600083815260186020526040902060010154156110d95760405162461bcd60e51b815260206004820152600f60248201526e141bdd1d1959081c995d99585b1959608a1b604482015260640161093e565b604080516060810182526000858152601860208181528483208054855281850188815260028201805460ff81161515888a01908152968c905294845295518255516001909101559151151560ff199091161790915590518481527f8c3c9df32d93095569c39215747311f36eacd9871dca487a5e8938c65d26518b910160405180910390a1505050565b60006001600160a01b03821661118c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6111b9611dd1565b6111c36000611ec3565b565b6111cd611dd1565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b606060008060006111ff85611163565b90506000816001600160401b0381111561121b5761121b613908565b604051908082528060200260200182016040528015611244578160200160208202803683370190505b50905061127160408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146112f25761128481611f13565b9150816040015115611295576112ea565b81516001600160a01b0316156112aa57815194505b876001600160a01b0316856001600160a01b031614156112ea57808387806001019850815181106112dd576112dd6138f2565b6020026020010181815250505b600101611274565b50909695505050505050565b611306611dd1565b601055565b6060823361131882610fa4565b6001600160a01b03161461133e5760405162461bcd60e51b815260040161093e906135fb565b60018310158015611350575060088311155b61138b5760405162461bcd60e51b815260206004820152600c60248201526b4f7574206f662072616e676560a01b604482015260640161093e565b60408051606081018252600086815260186020908152838220548352820186905281830152600a54915163137e875160e21b815290916001600160a01b031690634dfa1d44906113df908490600401613675565b60006040518083038186803b1580156113f757600080fd5b505afa15801561140b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114339190810190612e4e565b95945050505050565b60606004805461086c9061384c565b60008281526018602052604090206001015460609083906114a65760405162461bcd60e51b8152602060048201526015602482015274141bdd1d1959081b9bdd081c995d99585b081e595d605a1b604482015260640161093e565b83336114b182610fa4565b6001600160a01b0316146114d75760405162461bcd60e51b815260040161093e906135fb565b600085815260186020908152604091829020825160608101845281548152600182015492810192835260029091015460ff161515818401908152600a5493516315f4afc360e11b81528251600482015292516024840152511515604483015260648201879052916001600160a01b031690632be95f869060840160006040518083038186803b15801561156957600080fd5b505afa15801561157d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115a59190810190612e4e565b9695505050505050565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611623611dd1565b600d55565b600b5481908161163b6001546000190190565b61164591906137be565b11156116635760405162461bcd60e51b815260040161093e9061364d565b600d54336000908152601760205260409020546116819084906137be565b11156116c05760405162461bcd60e51b815260206004820152600e60248201526d457863656564206d61782062757960901b604482015260640161093e565b600360115460ff1660048111156116d9576116d96138dc565b146116f65760405162461bcd60e51b815260040161093e90613626565b600c54349061170590846137ea565b11156117445760405162461bcd60e51b815260206004820152600e60248201526d27379032b737bab3b41032ba341760911b604482015260640161093e565b3360009081526017602052604081208054849290610e8d9084906137be565b600b54600190816117776001546000190190565b61178191906137be565b111561179f5760405162461bcd60e51b815260040161093e9061364d565b6040516001600160601b03193360601b16602082015260009060340160408051601f198184030181529181528151602092830120336000908152601690935291205490915060ff161561181d5760405162461bcd60e51b8152602060048201526006602482015265135a5b9d195960d21b604482015260640161093e565b600260115460ff166004811115611836576118366138dc565b146118535760405162461bcd60e51b815260040161093e90613626565b611894848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506010549150849050611f91565b6118d05760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161093e565b6118da6001611e2b565b5050336000908152601660205260409020805460ff191660011790555050565b611905848484610c53565b6001600160a01b0383163b1561193e5761192184848484611fa7565b61193e576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600e546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561198857600080fd5b505afa15801561199c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c09190612f5a565b6040516001600160601b03193360601b16602082015290915060009060340160408051601f198184030181529181528151602092830120336000908152601590935291205490915060ff1615611a425760405162461bcd60e51b815260206004820152600760248201526610db185a5b595960ca1b604482015260640161093e565b600160115460ff166004811115611a5b57611a5b6138dc565b14611a785760405162461bcd60e51b815260040161093e90613626565b611ab984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600f549150849050611f91565b611af55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b604482015260640161093e565b600b5482611b066001546000190190565b611b1091906137be565b1115611b2e5760405162461bcd60e51b815260040161093e9061364d565b611b3782611e2b565b5050336000908152601560205260409020805460ff191660011790555050565b611b5f611dd1565b6011805482919060ff19166001836004811115611b7e57611b7e6138dc565b021790555050565b611b8e611dd1565b600f55565b611b9b611dd1565b600c55565b60608160018110158015611bba5750600154600019018111155b611bf55760405162461bcd60e51b815260206004820152600c60248201526b139bdd081d985b1a59081a5960a21b604482015260640161093e565b611bfe8361209f565b91505b50919050565b6001600160a01b038116600090815260066020526040808220546001600160401b03911c16610857565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b611c67611dd1565b6001600160a01b038116611ccc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161093e565b611cd581611ec3565b50565b600080611ce6600143613809565b6040805191406020830152810184905233606090811b6001600160601b0319169082015260740160408051601f1981840301815291905280516020909101209392505050565b600081600111158015611d40575060015482105b8015610857575050600090815260056020526040902054600160e01b161590565b60008180600111611db857600154811015611db857600081815260056020526040902054600160e01b8116611db6575b80611daf575060001901600081815260056020526040902054611d91565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000546001600160a01b031633146111c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161093e565b60005b81811015611eb8576012546000611e4482611cd8565b60408051606081018252828152600060208083018281528385018381528884526018909252938220925183559251600183015591516002909101805460ff19169115159190911790556012805492935090611e9e83613881565b919050555050508080611eb090613881565b915050611e2e565b50611cd53382612238565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526005602052604090205461085790604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b600082611f9e8584612252565b14949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fdc90339089908890889060040161357d565b602060405180830381600087803b158015611ff657600080fd5b505af1925050508015612026575060408051601f3d908101601f1916820190925261202391810190612e10565b60015b612081573d808015612054576040519150601f19603f3d011682016040523d82523d6000602084013e612059565b606091505b508051612079576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600081815260186020818152604080842081516060818101845282548252600183015482860181905260029093015460ff161515938201939093528686529390925292901561217d57600a54604051630d346f4560e31b81526121789184916001600160a01b03909116906369a37a289061211e908490600401613675565b60006040518083038186803b15801561213657600080fd5b505afa15801561214a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121729190810190612e82565b8661229f565b61220d565b600a54604051630d346f4560e31b815261220d9184916001600160a01b03909116906369a37a28906121b3908490600401613675565b60006040518083038186803b1580156121cb57600080fd5b505afa1580156121df573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122079190810190612e82565b8661236d565b9050806040516020016122209190613538565b60405160208183030381529060405292505050919050565b610e9c8282604051806020016040528060008152506123c8565b600081815b84518110156122975761228382868381518110612276576122766138f2565b6020026020010151612435565b91508061228f81613881565b915050612257565b509392505050565b606060006122ac83612461565b6122b6868661255e565b600a5460405163137e875160e21b8152612341916001600160a01b031690634dfa1d44906122e8908b90600401613675565b60006040518083038186803b15801561230057600080fd5b505afa158015612314573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261233c9190810190612e4e565b6125e7565b60405160200161235393929190613177565b6040516020818303038152906040529050611433816125e7565b6060600061237a83612461565b606085015151855151600a5460405163f457223160e01b81526123b5916001600160a01b03169063f4572231906122e8908c90600401613675565b604051602001612353949392919061323e565b6123d2838361274c565b6001600160a01b0383163b15610f9f576001548281035b6123fc6000868380600101945086611fa7565b612419576040516368d2bf6b60e11b815260040160405180910390fd5b8181106123e957816001541461242e57600080fd5b5050505050565b6000818310612451576000828152602084905260409020611daf565b5060009182526020526040902090565b6060816124855750506040805180820190915260018152600360fc1b602082015290565b8160005b81156124af578061249981613881565b91506124a89050600a836137d6565b9150612489565b6000816001600160401b038111156124c9576124c9613908565b6040519080825280601f01601f1916602001820160405280156124f3576020820181803683370190505b5090505b841561209757612508600183613809565b9150612515600a8661389c565b6125209060306137be565b60f81b818381518110612535576125356138f2565b60200101906001600160f81b031916908160001a905350612557600a866137d6565b94506124f7565b60606000826020015160c001515160018560200151866000015161258291906137be565b61258c9190613809565b612596919061389c565b6060840151518451516020860151516040870151519394506000936125ba86612461565b6040516020016125ce959493929190613399565b60408051808303601f1901815291905295945050505050565b606081516000141561260757505060408051602081019091526000815290565b600060405180606001604052806040815260200161394a604091399050600060038451600261263691906137be565b61264091906137d6565b61264b9060046137ea565b9050600061265a8260206137be565b6001600160401b0381111561267157612671613908565b6040519080825280601f01601f19166020018201604052801561269b576020820181803683370190505b509050818152600183018586518101602084015b81831015612707576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016126af565b60038951066001811461272157600281146127325761273e565b613d3d60f01b60011983015261273e565b603d60f81b6000198301525b509398975050505050505050565b6001548161276d5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526006602090815260408083208054680100000000000000018802019055848352600590915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461281c57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016127e4565b508161283a57604051622e076360e81b815260040160405180910390fd5b60015550505050565b600082601f83011261285457600080fd5b815160206001600160401b0382111561286f5761286f613908565b8160051b61287e828201613767565b83815282810190868401838801850189101561289957600080fd5b600093505b858410156128bc57805183526001939093019291840191840161289e565b50979650505050505050565b600082601f8301126128d957600080fd5b81516128ec6128e782613797565b613767565b81815284602083860101111561290157600080fd5b612097826020830160208701613820565b60006040828403121561292457600080fd5b604051604081016001600160401b03828210818311171561294757612947613908565b81604052829350845191508082111561295f57600080fd5b5061296c858286016128c8565b825250602083015160208201525092915050565b600060a0828403121561299257600080fd5b61299a6136fa565b905081516001600160401b03808211156129b357600080fd5b6129bf858386016128c8565b835260208401519150808211156129d557600080fd5b6129e185838601612843565b602084015260408401519150808211156129fa57600080fd5b612a0685838601612843565b60408401526060840151915080821115612a1f57600080fd5b50612a2c84828501612843565b6060830152506080820151608082015292915050565b60006101208284031215612a5557600080fd5b612a5d613722565b905081516001600160401b0380821115612a7657600080fd5b612a82858386016128c8565b83526020840151602084015260408401516040840152606084015160608401526080840151608084015260a084015160a084015260c0840151915080821115612aca57600080fd5b612ad685838601612843565b60c084015260e0840151915080821115612aef57600080fd5b50612afc84828501612843565b60e08301525061010080830151818301525092915050565b600060c08284031215612b2657600080fd5b60405160c081016001600160401b038282108183111715612b4957612b49613908565b816040528293508451915080821115612b6157600080fd5b50612b6e858286016128c8565b8252506020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201525092915050565b600060208284031215612bbc57600080fd5b8135611daf8161391e565b600060208284031215612bd957600080fd5b8151611daf8161391e565b60008060408385031215612bf757600080fd5b8235612c028161391e565b91506020830135612c128161391e565b809150509250929050565b600080600060608486031215612c3257600080fd5b8335612c3d8161391e565b92506020840135612c4d8161391e565b929592945050506040919091013590565b60008060008060808587031215612c7457600080fd5b8435612c7f8161391e565b93506020850135612c8f8161391e565b92506040850135915060608501356001600160401b03811115612cb157600080fd5b8501601f81018713612cc257600080fd5b8035612cd06128e782613797565b818152886020838501011115612ce557600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612d1a57600080fd5b8235612d258161391e565b915060208301358015158114612c1257600080fd5b60008060408385031215612d4d57600080fd5b8235612d588161391e565b946020939093013593505050565b60008060208385031215612d7957600080fd5b82356001600160401b0380821115612d9057600080fd5b818501915085601f830112612da457600080fd5b813581811115612db357600080fd5b8660208260051b8501011115612dc857600080fd5b60209290920196919550909350505050565b600060208284031215612dec57600080fd5b5035919050565b600060208284031215612e0557600080fd5b8135611daf81613933565b600060208284031215612e2257600080fd5b8151611daf81613933565b600060208284031215612e3f57600080fd5b813560058110611daf57600080fd5b600060208284031215612e6057600080fd5b81516001600160401b03811115612e7657600080fd5b612097848285016128c8565b600060208284031215612e9457600080fd5b81516001600160401b0380821115612eab57600080fd5b9083019060808286031215612ebf57600080fd5b612ec7613745565b825182811115612ed657600080fd5b612ee287828601612b14565b825250602083015182811115612ef757600080fd5b612f0387828601612a42565b602083015250604083015182811115612f1b57600080fd5b612f2787828601612980565b604083015250606083015182811115612f3f57600080fd5b612f4b87828601612912565b60608301525095945050505050565b600060208284031215612f6c57600080fd5b5051919050565b60008060408385031215612f8657600080fd5b50508035926020909101359150565b60008151808452612fad816020860160208601613820565b601f01601f19169290920160200192915050565b60008151612fd3818560208601613820565b9290920192915050565b7f226465736372697074696f6e223a20224a6170616e6573652d7374796c65206281527f6f6e736169206861732069747320636861726d2c20776865746865722074686560208201527f2074797065206f6620706f742c2074686520646972656374696f6e206f66206760408201527f726f777468206f6620746865206272616e63686573206f72207768657468657260608201527f20666c6f776572696e67206f72206e6f742c20746865726520617265206d756c60808201527f7469706c6520736574206f66207374796c65732e20504f545445442d504f545460a08201527f454420697320546865206669727374206f6e2d636861696e2067656e6572617460c082015273195908141bdd1d195908185c9d1ddbdc9acb888b60621b60e082015260f40190565b7f7b202274726169745f74797065223a2022706f74746564222c202276616c7565815263111d101160e11b602082015260240190565b7f7b202274726169745f74797065223a20226261636b67726f756e64222c20227681526730b63ab2911d101160c11b602082015260280190565b6a7b226e616d65223a20222360a81b8152835160009061319e81600b850160208901613820565b6f081413d51511510b5413d5151151088b60821b600b918401918201526131c7601b8201612fdd565b905084516131d9818360208901613820565b8082019150507f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b626173815263194d8d0b60e21b60208201528351613222816024840160208801613820565b61227d60f01b6024929091019182015260260195945050505050565b6a7b226e616d65223a20222360a81b8152845160009061326581600b850160208a01613820565b7f20556e72657665616c20504f545445442d504f54544544222c00000000000000600b9184019182015261329b60248201612fdd565b6e2261747472696275746573223a205b60881b815290506132be600f820161313d565b905085516132d0818360208a01613820565b62089f4b60ea1b9101818152906132e960038301613107565b915085516132fb818460208a01613820565b919091019081527f7b202274726169745f74797065223a2022697352657665616c222c202276616c6003820152697565223a20224e6f227d60b01b60238201527f5d2c22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62602d82015265185cd94d8d0b60d21b604d82015261338e6133806053830186612fc1565b61227d60f01b815260020190565b979650505050505050565b6e2261747472696275746573223a205b60881b815260006133bc600f830161313d565b87516133cc818360208c01613820565b62089f4b60ea1b9101818152906133e560038301613107565b915087516133f7818460208c01613820565b919091018181527f7b202274726169745f74797065223a20226272616e6368222c202276616c7565600382015263111d101160e11b60238201528651909190613447816027850160208b01613820565b60279201918201527f7b202274726169745f74797065223a2022626c6f73736f6d222c202276616c75602a8201526432911d101160d91b604a82015261352c61351e61351161350b6134ae61349f604f87018b612fc1565b62089f4b60ea1b815260030190565b7f7b202274726169745f74797065223a2022626c6f73736f6d20616d6f756e742281527f2c2022646973706c61795f74797065223a20226e756d626572222c202276616c60208201526403ab2911d160dd1b604082015260450190565b87612fc1565b607d60f81b815260010190565b61174b60f21b815260020190565b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161357081601d850160208701613820565b91909101601d0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906115a590830184612f95565b6020808252825182820181905260009190848201906040850190845b818110156112f2578351835292840192918401916001016135cc565b602081526000611daf6020830184612f95565b6020808252601190820152702737ba103a37b5b2b713b99037bbb732b960791b604082015260600190565b6020808252600d908201526c496e76616c696420706861736560981b604082015260600190565b6020808252600e908201526d139bc81c1bdd1d1959081b19599d60921b604082015260600190565b815181526020808301519082015260408083015115159082015260608101610857565b87815260208101879052604081018690526001600160a01b03851660608201526080810184905260a0810183905260e08101600583106136e857634e487b7160e01b600052602160045260246000fd5b8260c083015298975050505050505050565b60405160a081016001600160401b038111828210171561371c5761371c613908565b60405290565b60405161012081016001600160401b038111828210171561371c5761371c613908565b604051608081016001600160401b038111828210171561371c5761371c613908565b604051601f8201601f191681016001600160401b038111828210171561378f5761378f613908565b604052919050565b60006001600160401b038211156137b0576137b0613908565b50601f01601f191660200190565b600082198211156137d1576137d16138b0565b500190565b6000826137e5576137e56138c6565b500490565b6000816000190483118215151615613804576138046138b0565b500290565b60008282101561381b5761381b6138b0565b500390565b60005b8381101561383b578181015183820152602001613823565b8381111561193e5750506000910152565b600181811c9082168061386057607f821691505b60208210811415611c0157634e487b7160e01b600052602260045260246000fd5b6000600019821415613895576138956138b0565b5060010190565b6000826138ab576138ab6138c6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611cd557600080fd5b6001600160e01b031981168114611cd557600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212204562e209d4249fac987e7d198a7405b4cada447ac8e0bb5cacea6e722416263264736f6c63430008070033

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.