ETH Price: $3,479.49 (+0.26%)

Token

StarFall Village PFP (SVPFP)
 

Overview

Max Total Supply

0 SVPFP

Holders

222

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
144 SVPFP
0xB39AF34781a55404803b1d087c113Dc787E229eF
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:
StarFallVillage

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : StarfallVillage.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "./FoundersTokensV2.sol";
//import "./CollabFaker.sol";
import "./StakingContract.sol";

contract StarFallVillage is ERC721, Ownable {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    address private _owner;

    uint256 private MAX_TOKENS;

    uint256 private MAX_GENESIS = 3333;

    uint256 private SALE_PRICE = 0.08 ether;

    uint256 private WL_LIMIT = 1111;

    uint256 private AL_AMOUNT = 10;

    uint256 private FP_AMOUNT = 2;

    uint256 private balance = 0;

    uint256 private _wlStartDateTime;

    uint256 private _wlEndDateTime;

    uint256 private _alStartDateTime;

    uint256 private _alEndDateTime;

    uint256 private _publicSaleTime;

    bool private publicSaleActive = true;

    bool private isGenesis = true;

    string private baseURI = "https://sfvpfp.s3.amazonaws.com/preview/";

    mapping (address => uint256) private _mappingWhiteList;

    mapping (address => uint256) private _mappingAllowList;

    mapping (address => uint256) private _mappingFPSpots;

    mapping (address => bool) private _mappingPartnerChecked;

    address fp_address;

    mapping(string => uint256) discountNum;
    
    //mapping(string => uint256) discountDen;

    uint256 wlSaleCount = 0;

    uint256 public offsetGenesis = 0;

    uint256 public offsetNext = 0;

    bool public genesisOffsetSet = false;

    bool public nextOffsetSet = false;

    address[10] partner_tokens_721 = [0xf36446105fF682999a442b003f2224BcB3D82067, 
    0xb072114151f32D85223aE7B00Ac0528d1F56aa6E, 0xf36446105fF682999a442b003f2224BcB3D82067, 0x521f9C7505005CFA19A8E5786a9c3c9c9F5e6f42, 
    0x9690b63Eb85467BE5267A3603f770589Ab12Dc95, 0xe26F2c3547123B5FDaE0bfD52419D71BdFb0c4EF, 0x67421C8622F8E38Fe9868b4636b8dC855347d570, 
    0x8c3FB10693B228E8b976FF33cE88f97Ce2EA9563, 0x364C828eE171616a39897688A831c2499aD972ec, 0x8Cd8155e1af6AD31dd9Eec2cEd37e04145aCFCb3];

    //address[2] partner_tokens_721 = [0x6a033F4680069BB66D99Dab5Bf97C6D2c663d4A7, 0x0C296728a1B309a8f7043F22349c1874e63cF37f];  // for dev

    address[2] staking_partners = [0x0C565d28364a2C073AF3E270444476C19e8b986c, 0x682F6Fa7dBf3ea6CAd1533E4acd9B5E6f67372C9];

    //address[2] staking_partners = [0xBf8a4dF45F98386852b1Ae1aDb7F5e1fFa8d9200, 0xBf8a4dF45F98386852b1Ae1aDb7F5e1fFa8d9200]; // for dev

    address[2] partner_tokens_1155 = [0x495f947276749Ce646f68AC8c248420045cb7b5e, 0x495f947276749Ce646f68AC8c248420045cb7b5e];

    uint256[2] start_token_ids = [108510973921457929967077298367545831468135648058682555520544970183838078599169,
    108510973921457929967077298367545831468135648058682555520544981071202216837121];

    uint256[2] token_deltas = [1099511627776, 1099511627776];

    constructor(address _fp, uint256 supply) ERC721("StarFall Village PFP", "SVPFP") public {
        _owner = msg.sender;

        MAX_TOKENS = supply;

        fp_address = _fp;

        _tokenIds.increment();

        discountNum["Paper"] = 90;
        discountNum["Bronze"] = 85;
        discountNum["Silver"] = 80;
        discountNum["Gold"] = 75;
        discountNum["Ghostly"] = 50;

        FoundersTokensV2 fp = FoundersTokensV2(fp_address);
        uint256 total = fp.itemsMinted();
        for (uint256 i=1; i <= total; i++) {
            _mappingFPSpots[fp.ownerOf(i)] += FP_AMOUNT;
        }

    }



    /** Sale helper functions */

    function hasPartnerTokenStaked(address owner) 
    public 
    view 
    returns(bool) {
        for(uint i=0; i < staking_partners.length; i ++) {
            StakingContract sc = StakingContract(staking_partners[i]);
            if (sc.depositsOf(owner).length > 0) {
                return true;
            }
        }

        return false;
    }

    function hasPartnerToken(address owner) 
    public 
    view 
    returns(bool) {
        for(uint i=0; i < partner_tokens_721.length; i ++) {
            ERC721 token = ERC721(partner_tokens_721[i]);
            if (token.balanceOf(owner) > 0) {
                return true;
            }
        }

        return false;
    }

    function hasSemiPartnerToken(address owner) 
    public 
    view 
    returns(bool) {
        for(uint i=0; i < partner_tokens_1155.length; i ++) {
            ERC1155 token = ERC1155(partner_tokens_1155[i]);
            uint256 token_id = start_token_ids[i];
            for (uint i= 0; i < 9900; i++) {
                if (token.balanceOf(owner, token_id) > 0) {
                    return true;
                }
                token_id += token_deltas[i];
            }
        }

        return false;
    }

    function getWLPrice(uint256 numberOfMints, address wallet) 
    public 
    view 
    returns (uint256) {
        uint256 price = 0;
        if (numberOfMints > _mappingFPSpots[wallet]) {
            price = (numberOfMints - _mappingFPSpots[wallet]) * SALE_PRICE;
        }
        return price;
    }

    function getDiscountPrice(uint256 numberOfMints, uint256 fpTokenId) 
    public 
    view 
    returns (uint256) {
        FoundersTokensV2 fp = FoundersTokensV2(fp_address);
        //require(wallet == fp.ownerOf(fpTokenId), "not owner");
        (, string memory trait) = fp.getTraits(fpTokenId);
        uint256 discountPrice = (SALE_PRICE * numberOfMints * discountNum[trait]) / 100;
        return discountPrice;
    }

    function getDiscountPriceWL(uint256 numberOfMints, uint256 fpTokenId, address wallet)
    public 
    view 
    returns (uint256) {
        uint256 discountPrice = 0;
        if (numberOfMints > _mappingFPSpots[wallet]) {
            FoundersTokensV2 fp = FoundersTokensV2(fp_address);
            (, string memory trait) = fp.getTraits(fpTokenId);
            discountPrice = ((numberOfMints - _mappingFPSpots[wallet]) * SALE_PRICE * discountNum[trait]) / 100;
        }
        return discountPrice;
    }

    function tokenURI(uint256 tokenId) 
    public
    view
    virtual
    override
    returns (string memory)
    {
        require(
            _exists(tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );
        //string memory _tokenURI = _tokenURIs[tokenId];
        //string(abi.encodePacked("ipfs://"));
        if (tokenId <= MAX_GENESIS) {
            uint256 tokenIdGenesis = tokenId + offsetGenesis;
            if (tokenIdGenesis > MAX_GENESIS) {
                tokenIdGenesis = tokenIdGenesis - MAX_GENESIS;
            }
            return string(abi.encodePacked("https://sfvpfp.s3.amazonaws.com/preview/", Strings.toString(tokenIdGenesis), ".json"));
        }
        uint256 tokenIdNext = tokenId + offsetNext;
        if (tokenIdNext > MAX_TOKENS) {
            tokenIdNext = tokenIdNext - MAX_TOKENS + MAX_GENESIS;
        }
        return string(abi.encodePacked(baseURI, Strings.toString(tokenIdNext), ".json"));
    }



    /** Owner methods */

    function createMintEvent(uint256 wlStartTime, uint256 wlEndTime, uint256 alStartTime, uint256 alEndTime, uint256 publicStartTime) 
    external 
    onlyOwner {
        _wlStartDateTime = wlStartTime;
        _wlEndDateTime = wlEndTime; //wlStartTime + WL_SALE_LENGTH;
        _alStartDateTime = alStartTime;
        _alEndDateTime = alEndTime; //alStartTime + AL_SALE_LENGTH;
        _publicSaleTime = publicStartTime;
    }

    function setWhiteList(address[] calldata whiteListAddress, uint256[] calldata amount) 
    external 
    onlyOwner {
        for (uint256 i = 0; i < whiteListAddress.length; i++) {
            _mappingWhiteList[whiteListAddress[i]] = amount[i];
        }
    }

    function setAllowList(address[] calldata allowListAddress) 
    external 
    onlyOwner {
        for (uint256 i = 0; i < allowListAddress.length; i++) {
            _mappingAllowList[allowListAddress[i]] = AL_AMOUNT;
        }
    }

    function setFPList() 
    external 
    onlyOwner {
        FoundersTokensV2 fp = FoundersTokensV2(fp_address);
        uint256 total = fp.itemsMinted();
        for (uint256 i=1; i <= total; i++) {
            _mappingFPSpots[fp.ownerOf(i)] += FP_AMOUNT;
        }
    }

    function setBaseURI(string memory _uri) 
    external 
    onlyOwner {
        baseURI = _uri;
    }

    function changePrice(uint256 _salePrice) 
    external 
    onlyOwner {
        SALE_PRICE = _salePrice;
    }

    function changeWLLimit(uint256 limit) 
    external 
    onlyOwner {
        WL_LIMIT = limit;
    }

    function changeALAmount(uint256 amount) 
    external 
    onlyOwner {
        AL_AMOUNT = amount;
    }

    function changeFPAmount(uint256 amount) 
    external 
    onlyOwner {
        FP_AMOUNT = amount;
    }

    function setPublicSaleActive(bool active) 
    external 
    onlyOwner {
        publicSaleActive = active;
    }

    function setGenisis(bool genesis) 
    external 
    onlyOwner {
        isGenesis = genesis;
    }

    function getRandom(uint256 limit) 
    private 
    view 
    returns(uint16) {
        uint256 totalMinted = itemsMinted();
        address owner1 = ownerOf(totalMinted/5);
        address owner2 = ownerOf(totalMinted*2/5);
        address owner3 = ownerOf(totalMinted*3/5);
        address owner4 = ownerOf(totalMinted*4/5);
        address owner5 = ownerOf(totalMinted - 1);
        uint256 pseudoRandom = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), owner1, owner2, owner3, owner4, owner5)));
        return uint16(uint16(pseudoRandom >> 1) % limit);
    }

    function revealGenesis() 
    external 
    onlyOwner { 
        require(
            !genesisOffsetSet, 
            "already revealed"
        );
        offsetGenesis = uint256(getRandom(MAX_GENESIS));
        genesisOffsetSet = true;
    }

    function revealNext() 
    external 
    onlyOwner { 
        require(
            !nextOffsetSet, 
            "already revealed"
        );
        offsetNext = uint256(getRandom(MAX_TOKENS - MAX_GENESIS));
        nextOffsetSet = true;
    }



    /** Minting methods */

    function mintWhiteList(uint256 numberOfMints) 
    public 
    payable {
        uint256 reserved = _mappingWhiteList[msg.sender] + _mappingFPSpots[msg.sender];
        require(
            isWhiteListSale(), 
            "No presale active"
        );
        require(
            reserved > 0 || 
            msg.sender == _owner, 
            "This address is not authorized for presale"
        );
        require(
            numberOfMints <= reserved 
            || msg.sender == _owner, 
            "Exceeded allowed amount"
        );
        require(
            wlSaleCount + numberOfMints <= WL_LIMIT, 
            "This would exceed the max number of allowed for wl sale"
        );
        require(
            _tokenIds.current() - 1 + numberOfMints <= MAX_TOKENS, 
            "This would exceed the max number of allowed nft"
        );
        require(
            !isGenesis || _tokenIds.current() - 1 + numberOfMints <= MAX_GENESIS, 
            "This would exceed the max number of allowed nft"
        );
        require(
            getWLPrice(numberOfMints, msg.sender) <= msg.value 
            || msg.sender == _owner, 
            "Amount of ether is not enough"
        );

        uint256 usedSpots = 0;

        if (numberOfMints >= _mappingFPSpots[msg.sender]) {
            usedSpots = _mappingFPSpots[msg.sender];
            _mappingFPSpots[msg.sender] = 0;
        } else {
            _mappingFPSpots[msg.sender] = _mappingFPSpots[msg.sender] - numberOfMints;
        }
        if ((numberOfMints > usedSpots) && _mappingFPSpots[msg.sender] == 0) {
            _mappingWhiteList[msg.sender] = _mappingWhiteList[msg.sender] - (numberOfMints - usedSpots);
        }

        wlSaleCount = wlSaleCount + numberOfMints;

        uint256 newItemId = _tokenIds.current();

        for (uint256 i=0; i < numberOfMints; i++) {
            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }

    }

    function mintWhiteListWithDiscount(uint256 numberOfMints, uint256 fpTokenId) 
    public 
    payable {
        uint256 reserved = _mappingWhiteList[msg.sender] + _mappingFPSpots[msg.sender];
        require(
            isWhiteListSale(), 
            "No presale active"
        );
        require(
            reserved > 0 
            || msg.sender == _owner, 
            "This address is not authorized for presale"
        );
        require(
            numberOfMints <= reserved 
            || msg.sender == _owner, 
            "Exceeded allowed amount"
        );
        require(
            wlSaleCount + numberOfMints <= WL_LIMIT, 
            "This would exceed the max number of allowed for wl sale"
        );
        require(
            _tokenIds.current() - 1 + numberOfMints <= MAX_TOKENS, 
            "This would exceed the max number of allowed nft"
        );
        require(
            !isGenesis 
            || _tokenIds.current() - 1 + numberOfMints <= MAX_GENESIS, 
            "This would exceed the max number of allowed nft"
        );
        uint256 discountPrice = getDiscountPriceWL(numberOfMints, fpTokenId, msg.sender);
        require(
            msg.value >= discountPrice, 
            "not enough money"
        );

        uint256 usedSpots = 0;

        if (numberOfMints >= _mappingFPSpots[msg.sender]) {
            usedSpots = _mappingFPSpots[msg.sender];
            _mappingFPSpots[msg.sender] = 0;
        } else {
            _mappingFPSpots[msg.sender] = _mappingFPSpots[msg.sender] - numberOfMints;
        }
        if ((numberOfMints > usedSpots) && _mappingFPSpots[msg.sender] == 0) {
            _mappingWhiteList[msg.sender] = _mappingWhiteList[msg.sender] - (numberOfMints - usedSpots);
        }

        wlSaleCount = wlSaleCount + numberOfMints;

        uint256 newItemId = _tokenIds.current();

        for (uint256 i=0; i < numberOfMints; i++) {
            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }

    }

    function mintAllowList(uint256 numberOfMints) public payable {
        uint256 reserved = _mappingAllowList[msg.sender];
        require(
            isAllowListSale(), 
            "No presale active"
        );
        //require(hasPartnerToken(msg.sender), "No partner token");
        require(
            reserved > 0 
            || hasPartnerToken(msg.sender) 
            || hasPartnerTokenStaked(msg.sender)
            || hasSemiPartnerToken(msg.sender),
            "This address is not authorized for presale"
        );
        if (reserved == 0 && (hasPartnerToken(msg.sender) || hasPartnerTokenStaked(msg.sender) || hasSemiPartnerToken(msg.sender))) {
            if (!_mappingPartnerChecked[msg.sender]) {
                _mappingAllowList[msg.sender] = AL_AMOUNT;
                _mappingPartnerChecked[msg.sender] = true;
            }
            reserved = _mappingAllowList[msg.sender];
            require(
                reserved > 0, 
                "This address is not authorized for presale"
            );
        }
        require(
            numberOfMints <= reserved, 
            "Exceeded allowed amount"
        );
        //require(alSaleCount < AL_LIMIT, "This would exceed the max number of allowed for allow sale");
        require(
            _tokenIds.current() - 1 + numberOfMints <= MAX_TOKENS, 
            "This would exceed the max number of allowed nft"
        );
        require(
            !isGenesis 
            || _tokenIds.current() - 1 + numberOfMints <= MAX_GENESIS, 
            "This would exceed the max number of allowed nft"
        );
        require(
            numberOfMints * SALE_PRICE <= msg.value, 
            "Amount of ether is not enough"
        );

        _mappingAllowList[msg.sender] = reserved - numberOfMints;

        _mappingPartnerChecked[msg.sender] = true;

        uint256 newItemId = _tokenIds.current();

        for (uint256 i=0; i < numberOfMints; i++) {
            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }

    }

    function mintAllowListWithDiscount(uint256 numberOfMints, uint256 fpTokenId) public payable {
        uint256 reserved = _mappingAllowList[msg.sender];
        require(
            isAllowListSale(), 
            "No presale active"
        );
        //require(hasPartnerToken(msg.sender), "No partner token");
        require(
            reserved > 0 
            || hasPartnerToken(msg.sender) 
            || hasPartnerTokenStaked(msg.sender)
            || hasSemiPartnerToken(msg.sender), 
            "This address is not authorized for presale"
        );
        if (reserved == 0 && (hasPartnerTokenStaked(msg.sender)  || hasPartnerToken(msg.sender) || hasSemiPartnerToken(msg.sender))) {
            if (!_mappingPartnerChecked[msg.sender]) {
                _mappingAllowList[msg.sender] = AL_AMOUNT;
                _mappingPartnerChecked[msg.sender] = true;
            }
            reserved = _mappingAllowList[msg.sender];
            require(
                reserved > 0, 
                "This address is not authorized for presale"
            );
        }
        require(
            numberOfMints <= reserved, 
            "Exceeded allowed amount"
        );
        //require(alSaleCount < AL_LIMIT, "This would exceed the max number of allowed for allow sale");
        require(
            _tokenIds.current() - 1 + numberOfMints <= MAX_TOKENS, 
            "This would exceed the max number of allowed nft"
        );
        require(
            !isGenesis 
            || _tokenIds.current() - 1 + numberOfMints <= MAX_GENESIS, 
            "This would exceed the max number of allowed nft"
        );

        FoundersTokensV2 fp = FoundersTokensV2(fp_address);
        require(
            msg.sender == fp.ownerOf(fpTokenId), 
            "not owner"
        );
        uint256 discountPrice = getDiscountPrice(numberOfMints, fpTokenId);
        require(
            msg.value >= discountPrice, 
            "not enough money"
        );

        _mappingAllowList[msg.sender] = reserved - numberOfMints;

        _mappingPartnerChecked[msg.sender] = true;

        uint256 newItemId = _tokenIds.current();

        for (uint256 i=0; i < numberOfMints; i++) {
            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }

    }

    function createItem(uint256 numberOfTokens) public payable returns (uint256) {
        require(
            (
                (block.timestamp >= _publicSaleTime && publicSaleActive) 
                || msg.sender == _owner
            ), 
            "sale not active"
        );
        require(
            msg.value >= (SALE_PRICE * numberOfTokens) 
            || msg.sender == _owner, 
            "not enough money"
        );

        uint256 newItemId = _tokenIds.current();
        //_setTokenURI(newItemId, string(abi.encodePacked("ipfs://", _hash)));
        require(
            (newItemId - 1 + numberOfTokens) <= MAX_TOKENS, 
            "collection fully minted"
        );
        require(
            !isGenesis 
            || _tokenIds.current() - 1 + numberOfTokens <= MAX_GENESIS, 
            "This would exceed the max number of allowed nft"
        );

        for (uint256 i=0; i < numberOfTokens; i++) {

            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }


        //payable(address(this)).transfer(SALE_PRICE);

        return newItemId;
    }

    function createItemWithDiscount(uint256 numberOfTokens, uint256 fpTokenId) public payable returns (uint256) {
        require(
            (
                (block.timestamp >= _publicSaleTime && publicSaleActive) 
                || msg.sender == _owner
            ), 
            "sale not active"
        );
        FoundersTokensV2 fp = FoundersTokensV2(fp_address);
        require(
            msg.sender == fp.ownerOf(fpTokenId), 
            "not owner"
        );
        uint256 discountPrice = getDiscountPrice(numberOfTokens, fpTokenId);
        require(
            msg.value >= discountPrice, 
            "not enough money"
        );

        uint256 newItemId = _tokenIds.current();
        //_setTokenURI(newItemId, string(abi.encodePacked("ipfs://", _hash)));
        require(
            (newItemId - 1 + numberOfTokens) <= MAX_TOKENS, 
            "collection fully minted"
        );
        require(
            !isGenesis 
            || _tokenIds.current() - 1 + numberOfTokens <= MAX_GENESIS, 
            "This would exceed the max number of allowed nft"
        );

        for (uint256 i=0; i < numberOfTokens; i++) {

            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }


        //payable(address(this)).transfer(SALE_PRICE);

        return newItemId;
    }


    /** Public View methods */

    function withdraw() onlyOwner public {
        require(
            address(this).balance > 0, 
            "0 balance"
        );
        payable(_owner).transfer(address(this).balance);
    }

    function getRemainingWLSpots(address wl) 
    public 
    view 
    returns (uint256) {
        return _mappingWhiteList[wl];
    }

    function getRemainingFPSpots(address wl) 
    public 
    view 
    returns (uint256) {
        return _mappingFPSpots[wl];
    }

    function getRemainingAllowListSpots(address wl) 
    public 
    view 
    returns (uint256) {
        return _mappingAllowList[wl];
    }

    function getParterChecked(address wl) 
    public 
    view 
    returns (bool) {
        return _mappingPartnerChecked[wl];
    }

    function getCurrentPrice() 
    public 
    view 
    returns (uint256) {
        return SALE_PRICE;
    }

    function getWLSaleCount() 
    public 
    view 
    returns (uint256) {
        return wlSaleCount;
    }

    function itemsMinted() 
    public 
    view 
    returns(uint) {
        return _tokenIds.current() - 1;
    }

    function ownerBalance() 
    public 
    view 
    returns(uint256) {
        return address(this).balance;
    }

    function isWhiteListSale() 
    public 
    view 
    returns(bool) {
        return (block.timestamp >= _wlStartDateTime && block.timestamp <= _wlEndDateTime);
    }

    function isAllowListSale() 
    public 
    view 
    returns(bool) {
        return (block.timestamp >= _alStartDateTime && block.timestamp <= _alEndDateTime);
    }

    function isPublicSale() 
    public 
    view 
    returns(bool) {
        return (block.timestamp >= _publicSaleTime);
    }

}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

File 3 of 18 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

        return array;
    }
}

File 4 of 18 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 7 of 18 : FoundersTokensV2.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

//import "./FoundersTokens.sol";


contract FoundersTokensV2 is ERC721, Ownable {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    address private _owner;

    uint32 private MAX_TOKENS = 3999;

    //uint256 SEED_NONCE = 0;

    uint256 private SALE_PRICE = 0.08 ether;

    uint256 private balance = 0;

    bool private isActive = false;
    
    //bool private REVEAL = false;

    string private baseURI = "https://gtsdfp.s3.amazonaws.com/preview/";

    mapping(uint256 => Trait) private tokenIdTrait;

    //uint arrays
    //uint16[][2] TIERS;

    uint16[][4] RARITIES; // = [[695, 695, 695, 695], [150, 150, 150, 150], [100, 100, 100, 100], [50, 50, 50, 50], [5, 5, 5, 5]];


    struct Trait {
        uint16 artType;
        uint16 materialType;
    }

    string[] private artTypeValues = [
        'Mean Cat',
        'Mouse',
        'Marshal',
        'Hero'
    ];

    string[] private materialTypeValues = [
        'Paper',
        'Bronze',
        'Silver',
        'Gold',
        'Ghostly'
    ];

    mapping(string=>uint16) artMap; //= {'Mean Cat': 0, 'Mouse': 1, 'Marshal': 2, 'Hero': 3];
    
    mapping(string=>uint16) materialMap;

    address v1Contract;

    constructor() ERC721("Ghost Town Founders Pass V2", "GTFP") public {
        _owner = msg.sender;

        //v1Contract = _v1Contract;

        _tokenIds.increment();

        artMap['MeanCat'] = 0;
        artMap['Mouse'] = 1;
        artMap['Marshal'] = 2;
        artMap['Hero'] = 3;

        materialMap['Paper'] = 0;
        materialMap['Bronze'] = 1;
        materialMap['Silver'] = 2;
        materialMap['Gold'] = 3;
        materialMap['Ghostly'] = 4;

        //Declare all the rarity tiers

        //Art
        //TIERS[0] = [5, 5, 5, 5];//TIERS[0] = [1000, 1000, 1000, 1000]; // Mean Cat, MM, FM, Landscape
        //material
        //TIERS[1] = [10, 4, 3, 2, 1]; // paper, bronze, silver, gold, ghostly

        //RARITIES[0] = [695, 695, 695, 695]; //, [150, 150, 150, 150], [100, 100, 100, 100], [50, 50, 50, 50], [5, 5, 5, 5]];
        //RARITIES[1] = [150, 150, 150, 150];
        //RARITIES[2] = [100, 100, 100, 100];
        //RARITIES[3] = [50, 50, 50, 50];
        //RARITIES[4] = [5, 5, 5, 5];

        RARITIES[0] = [695, 150, 100, 50, 5]; // rotating creates a better overall random distribution
        RARITIES[1] = [695, 150, 100, 50, 5];
        RARITIES[2] = [695, 150, 100, 50, 5];
        RARITIES[3] = [695, 150, 100, 50, 5];
        //RARITIES = _RARITIES;
    }


    function tokenURI(uint256 tokenId) 
    public
    view
    virtual
    override
    returns (string memory)
    {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        //string memory _tokenURI = _tokenURIs[tokenId];
        //string(abi.encodePacked("ipfs://"));
        return string(abi.encodePacked(baseURI, Strings.toString(tokenId), ".json"));
    }

    function activate(bool active) external onlyOwner {
        isActive = active;
    }

    function setBaseURI(string memory _uri) external onlyOwner {
        baseURI = _uri;
    }

    /*function setReveal(bool _reveal) external onlyOwner {
        REVEAL = _reveal;
    }*/

    function changePrice(uint256 _salePrice) external onlyOwner {
        SALE_PRICE = _salePrice;
    }

    function mintV1(uint256 numberOfMints, string[] calldata artList, string[] calldata matList, address[] calldata addrList) public {

        require(msg.sender == _owner, "not owner");

        uint256 newItemId = _tokenIds.current();

        require((newItemId - 1 + numberOfMints <= 247), "v1 limit exceeded");

        //FoundersTokens fpV1 = FoundersTokens(v1Contract);

        for (uint256 i=0; i < numberOfMints; i++) {

            //(string memory artType, string memory materialType) = fpV1.getTraits(newItemId);

            //require(RARITIES[artMap[artType]][materialMap[materialType]], "no rare");

            RARITIES[artMap[artList[i]]][materialMap[matList[i]]] -= 1;

            //tokenIdTrait[newItemId] = createTraits(newItemId, addresses[i]);
            tokenIdTrait[newItemId] = Trait({artType: artMap[artList[i]], materialType: materialMap[matList[i]]});

            _safeMint(addrList[i], newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }

    }

    function createItem(uint256 numberOfTokens) public payable returns (uint256) {
        //require(((block.timestamp >= _startDateTime && block.timestamp < _endDateTime  && !isWhiteListSale) || msg.sender == _owner), "sale not active");
        require(isActive || msg.sender == _owner, "sale not active");
        require(msg.value >= SALE_PRICE || msg.sender == _owner, "not enough money");
        //require(((mintTracker[msg.sender] + numberOfTokens) <= MAXQ || msg.sender == _owner), "ALready minted during sale");

        uint256 newItemId = _tokenIds.current();
        //_setTokenURI(newItemId, string(abi.encodePacked("ipfs://", _hash)));
        require(newItemId > 247, "need to transfer v1");
        require((newItemId - 1 + numberOfTokens) <= MAX_TOKENS, "collection fully minted");

        //mintTracker[msg.sender] = mintTracker[msg.sender] + numberOfTokens;

        for (uint256 i=0; i < numberOfTokens; i++) {
            tokenIdTrait[newItemId] = createTraits(newItemId, msg.sender);

            _safeMint(msg.sender, newItemId);

            _tokenIds.increment();
            newItemId = _tokenIds.current();
        }


        //payable(address(this)).transfer(SALE_PRICE);

        return newItemId;
    }

    function weightedRarityGenerator(uint16 pseudoRandomNumber) private returns (uint8, uint8) {
        uint16 lowerBound = 0;

        for (uint8 i = 0; i < RARITIES.length; i++) {
            for (uint8 j = 0; j < RARITIES[i].length; j++) {
                uint16 weight = RARITIES[i][j];

                if (pseudoRandomNumber >= lowerBound && pseudoRandomNumber < lowerBound + weight) {
                    RARITIES[i][j] -= 1;
                    return (i, j);
                }

                lowerBound = lowerBound + weight;
            }
        }

        revert();
    }

    function createTraits(uint256 tokenId, address _msgSender) private returns (Trait memory) {
        uint256 pseudoRandomBase = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), _msgSender, tokenId)));

        uint256 tokensMinted = itemsMinted();
        (uint8 a, uint8 m) = weightedRarityGenerator(uint16(uint16(pseudoRandomBase >> 1) % (1 + MAX_TOKENS - tokensMinted)));
        return
            Trait({
                artType: a,
                materialType: m
            });
    }

    function withdraw() onlyOwner public {
        require(address(this).balance > 0, "0 balance");
        payable(_owner).transfer(address(this).balance);
    }

    function getTraits(uint256 tokenId) public view returns (string memory artType, string memory materialType) {
        //require(REVEAL, "reveal not set yet");
        Trait memory trait = tokenIdTrait[tokenId];
        artType = artTypeValues[trait.artType];
        materialType = materialTypeValues[trait.materialType];
    }


    function itemsMinted() public view returns(uint) {
        return _tokenIds.current() - 1;
    }

    function ownerBalance() public view returns(uint256) {
        return address(this).balance;
    }

}

File 8 of 18 : StakingContract.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface StakingContract {
    function depositsOf(address account)
        external
        view
        returns (uint256[] memory);
}

/*
contract CollabFaker2 {
    StakingContract public stakingContract =
        StakingContract(0x8D8A3e7EAdA138523c2dcB78FDbbF51A63A3faAD);

    function balanceOf(address owner) external view returns (uint256 balance) {
        return stakingContract.depositsOf(owner).length;
    }
}*/

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 12 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_fp","type":"address"},{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"changeALAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"changeFPAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"changePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"changeWLLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"createItem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"fpTokenId","type":"uint256"}],"name":"createItemWithDiscount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"wlStartTime","type":"uint256"},{"internalType":"uint256","name":"wlEndTime","type":"uint256"},{"internalType":"uint256","name":"alStartTime","type":"uint256"},{"internalType":"uint256","name":"alEndTime","type":"uint256"},{"internalType":"uint256","name":"publicStartTime","type":"uint256"}],"name":"createMintEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisOffsetSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"},{"internalType":"uint256","name":"fpTokenId","type":"uint256"}],"name":"getDiscountPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"},{"internalType":"uint256","name":"fpTokenId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"getDiscountPriceWL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wl","type":"address"}],"name":"getParterChecked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wl","type":"address"}],"name":"getRemainingAllowListSpots","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wl","type":"address"}],"name":"getRemainingFPSpots","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wl","type":"address"}],"name":"getRemainingWLSpots","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"getWLPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWLSaleCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"hasPartnerToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"hasPartnerTokenStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"hasSemiPartnerToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowListSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhiteListSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemsMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"}],"name":"mintAllowList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"},{"internalType":"uint256","name":"fpTokenId","type":"uint256"}],"name":"mintAllowListWithDiscount","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"}],"name":"mintWhiteList","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfMints","type":"uint256"},{"internalType":"uint256","name":"fpTokenId","type":"uint256"}],"name":"mintWhiteListWithDiscount","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOffsetSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offsetGenesis","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offsetNext","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealGenesis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealNext","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"allowListAddress","type":"address[]"}],"name":"setAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setFPList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"genesis","type":"bool"}],"name":"setGenisis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"active","type":"bool"}],"name":"setPublicSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"whiteListAddress","type":"address[]"},{"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"setWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610d05600a90815567011c37937e080000600b55610457600c55600d556002600e556000600f556015805461ff001960ff199091166001171661010017905560e0604052602860808181529062004daa60a0398051620000689160169160209091019062000630565b506000601d819055601e819055601f556020805461ffff19168155604080516101408101825273f36446105ff682999a442b003f2224bcb3d8206780825273b072114151f32d85223ae7b00ac0528d1f56aa6e938201939093529081019190915273521f9c7505005cfa19a8e5786a9c3c9c9f5e6f426060820152739690b63eb85467be5267a3603f770589ab12dc95608082015273e26f2c3547123b5fdae0bfd52419d71bdfb0c4ef60a08201527367421c8622f8e38fe9868b4636b8dc855347d57060c0820152738c3fb10693b228e8b976ff33ce88f97ce2ea956360e082015273364c828ee171616a39897688a831c2499ad972ec610100820152738cd8155e1af6ad31dd9eec2ced37e04145acfcb36101208201526200019190602190600a620006bf565b5060408051808201909152730c565d28364a2c073af3e270444476c19e8b986c815273682f6fa7dbf3ea6cad1533e4acd9b5e6f67372c96020820152620001dd90602b9060026200070a565b506040805180820190915273495f947276749ce646f68ac8c248420045cb7b5e80825260208201526200021590602d9060026200070a565b50604080518082019091527fefe708e6dd941e29965f34f4c5c6e78f0ebe3f5b00000000000002000000000181527fefe708e6dd941e29965f34f4c5c6e78f0ebe3f5b000000000026b0000000000160208201526200027990602f90600262000754565b5060408051808201909152650100000000008082526020820152620002a390603190600262000784565b50348015620002b157600080fd5b5060405162004dd238038062004dd2833981016040819052620002d49162000817565b604080518082018252601481527f5374617246616c6c2056696c6c61676520504650000000000000000000000000602080830191825283518085019094526005845264053565046560dc1b908401528151919291620003369160009162000630565b5080516200034c90600190602084019062000630565b5050506200036962000363620005d160201b60201c565b620005d5565b60088054336001600160a01b0319918216179091556009829055601b80549091166001600160a01b038416179055620003af600762000627602090811b62002aff17901c565b605a601c604051620003c19062000870565b9081526020016040518091039020819055506055601c604051620003e5906200085e565b9081526020016040518091039020819055506050601c604051620004099062000881565b908152602001604051809103902081905550604b601c6040516200042d9062000893565b9081526020016040518091039020819055506032601c6040516200045190620008a3565b908152604080516020928190038301812093909355601b54635c78a39360e01b845290516001600160a01b03909116926000928492635c78a393926004808201939291829003018186803b158015620004a957600080fd5b505afa158015620004be573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004e4919062000845565b905060015b818111620005c657600e5460196000856001600160a01b0316636352211e856040518263ffffffff1660e01b8152600401620005269190620008b6565b60206040518083038186803b1580156200053f57600080fd5b505afa15801562000554573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200057a9190620007f3565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254620005ab9190620008bf565b90915550819050620005bd8162000917565b915050620004e9565b50505050506200094b565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b8280546200063e90620008da565b90600052602060002090601f016020900481019282620006625760008555620006ad565b82601f106200067d57805160ff1916838001178555620006ad565b82800160010185558215620006ad579182015b82811115620006ad57825182559160200191906001019062000690565b50620006bb929150620007bf565b5090565b82600a8101928215620006ad579160200282015b82811115620006ad57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620006d3565b8260028101928215620006ad5791602002820182811115620006ad57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620006d3565b8260028101928215620006ad5791602002820182811115620006ad57825182559160200191906001019062000690565b8260028101928215620006ad579160200282015b82811115620006ad578251829065ffffffffffff1690559160200191906001019062000798565b5b80821115620006bb5760008155600101620007c0565b80516001600160a01b0381168114620007ee57600080fd5b919050565b60006020828403121562000805578081fd5b6200081082620007d6565b9392505050565b600080604083850312156200082a578081fd5b6200083583620007d6565b9150602083015190509250929050565b60006020828403121562000857578081fd5b5051919050565b6542726f6e7a6560d01b815260060190565b642830b832b960d91b815260050190565b6529b4b63b32b960d11b815260060190565b6311dbdb1960e21b815260040190565b6647686f73746c7960c81b815260070190565b90815260200190565b60008219821115620008d557620008d562000935565b500190565b600281046001821680620008ef57607f821691505b602082108114156200091157634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200092e576200092e62000935565b5060010190565b634e487b7160e01b600052601160045260246000fd5b61444f806200095b6000396000f3fe6080604052600436106103765760003560e01c806374870471116101d1578063ba0042e311610102578063e3946556116100a0578063eb91d37e1161006f578063eb91d37e14610946578063f1931a7b1461095b578063f283ca5b1461097b578063f2fde38b1461099b57610376565b8063e3946556146108de578063e644157b146108fe578063e86fe2bb14610913578063e985e9c51461092657610376565b8063c87b56dd116100dc578063c87b56dd14610876578063d7a5d5d314610896578063dc722bb5146108a9578063e2e06fa3146108be57610376565b8063ba0042e31461082c578063bedcf0031461084c578063c449051b1461086157610376565b80639dea616e1161016f578063a4c8dba711610149578063a4c8dba7146107cf578063a5a865dc146107e4578063aa1df13f146107f9578063b88d4fde1461080c57610376565b80639dea616e1461077c578063a22cb4651461078f578063a2b40d19146107af57610376565b806382802dd7116101ab57806382802dd71461072a57806384a619111461073d5780638da5cb5b1461075257806395d89b411461076757610376565b806374870471146106d55780637ce631af146106f55780637f05243c1461070a57610376565b8063431df961116102ab5780635e0fa8c0116102495780636447c35d116102235780636447c35d1461066057806368c986091461068057806370a08231146106a0578063715018a6146106c057610376565b80635e0fa8c01461060b5780635ee2d5b6146106205780636352211e1461064057610376565b806355f804b31161028557806355f804b3146105a157806359d2be67146105c15780635a154a18146105d65780635c78a393146105f657610376565b8063431df9611461054157806351f5e10514610561578063533e537e1461058157610376565b80632b97ba781161031857806333e62b70116102f257806333e62b70146104cc5780633c968fab146104ec5780633ccfd60b1461050c57806342842e0e1461052157610376565b80632b97ba7814610479578063323e97301461048c578063325e3777146104ac57610376565b8063095ea7b311610354578063095ea7b31461040057806317303fa81461042257806323b872dd1461043757806326a4b1681461045757610376565b806301ffc9a71461037b57806306fdde03146103b1578063081812fc146103d3575b600080fd5b34801561038757600080fd5b5061039b610396366004613746565b6109bb565b6040516103a89190613b3d565b60405180910390f35b3480156103bd57600080fd5b506103c6610a03565b6040516103a89190613b48565b3480156103df57600080fd5b506103f36103ee366004613825565b610a95565b6040516103a89190613add565b34801561040c57600080fd5b5061042061041b3660046135b1565b610ae1565b005b34801561042e57600080fd5b5061039b610b79565b34801561044357600080fd5b506104206104523660046134c0565b610b87565b34801561046357600080fd5b5061046c610bbf565b6040516103a89190614246565b610420610487366004613879565b610bc5565b34801561049857600080fd5b5061039b6104a7366004613450565b610f05565b3480156104b857600080fd5b5061046c6104c736600461389a565b610fec565b3480156104d857600080fd5b5061039b6104e7366004613450565b61111a565b3480156104f857600080fd5b5061046c610507366004613450565b611274565b34801561051857600080fd5b5061042061128f565b34801561052d57600080fd5b5061042061053c3660046134c0565b61132a565b34801561054d57600080fd5b5061046c61055c366004613855565b611345565b34801561056d57600080fd5b5061042061057c366004613825565b6113a1565b34801561058d57600080fd5b5061046c61059c366004613450565b6113e5565b3480156105ad57600080fd5b506104206105bc36600461377e565b611400565b3480156105cd57600080fd5b5061039b611456565b3480156105e257600080fd5b506104206105f1366004613825565b611471565b34801561060257600080fd5b5061046c6114b5565b34801561061757600080fd5b506104206114cd565b34801561062c57600080fd5b5061046c61063b366004613879565b611664565b34801561064c57600080fd5b506103f361065b366004613825565b61173f565b34801561066c57600080fd5b5061042061067b3660046135dc565b611774565b34801561068c57600080fd5b5061039b61069b366004613450565b611826565b3480156106ac57600080fd5b5061046c6106bb366004613450565b611844565b3480156106cc57600080fd5b50610420611888565b3480156106e157600080fd5b506104206106f036600461372c565b6118d3565b34801561070157600080fd5b5061042061192c565b34801561071657600080fd5b5061039b610725366004613450565b6119af565b61046c610738366004613879565b611a88565b34801561074957600080fd5b5061039b611c91565b34801561075e57600080fd5b506103f3611c9a565b34801561077357600080fd5b506103c6611ca9565b61042061078a366004613879565b611cb8565b34801561079b57600080fd5b506104206107aa36600461357d565b611f70565b3480156107bb57600080fd5b506104206107ca366004613825565b611f82565b3480156107db57600080fd5b5061046c611fc6565b3480156107f057600080fd5b5061039b611fcc565b610420610807366004613825565b611fd5565b34801561081857600080fd5b50610420610827366004613500565b6122a3565b34801561083857600080fd5b50610420610847366004613825565b6122e2565b34801561085857600080fd5b5061046c612326565b34801561086d57600080fd5b5061042061232a565b34801561088257600080fd5b506103c6610891366004613825565b6123c1565b61046c6108a4366004613825565b6124b9565b3480156108b557600080fd5b5061039b612621565b3480156108ca57600080fd5b506104206108d936600461372c565b61263a565b3480156108ea57600080fd5b506104206108f936600461361c565b61268c565b34801561090a57600080fd5b5061046c612762565b610420610921366004613825565b612768565b34801561093257600080fd5b5061039b610941366004613488565b6129ec565b34801561095257600080fd5b5061046c612a1a565b34801561096757600080fd5b506104206109763660046138d2565b612a20565b34801561098757600080fd5b5061046c610996366004613450565b612a76565b3480156109a757600080fd5b506104206109b6366004613450565b612a91565b60006001600160e01b031982166380ac58cd60e01b14806109ec57506001600160e01b03198216635b5e139f60e01b145b806109fb57506109fb82612b08565b90505b919050565b606060008054610a1290614342565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3e90614342565b8015610a8b5780601f10610a6057610100808354040283529160200191610a8b565b820191906000526020600020905b815481529060010190602001808311610a6e57829003601f168201915b5050505050905090565b6000610aa082612b21565b610ac55760405162461bcd60e51b8152600401610abc90613f6b565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610aec8261173f565b9050806001600160a01b0316836001600160a01b03161415610b205760405162461bcd60e51b8152600401610abc906140c2565b806001600160a01b0316610b32612b3e565b6001600160a01b03161480610b4e5750610b4e81610941612b3e565b610b6a5760405162461bcd60e51b8152600401610abc90613e46565b610b748383612b42565b505050565b602054610100900460ff1681565b610b98610b92612b3e565b82612bb0565b610bb45760405162461bcd60e51b8152600401610abc90614103565b610b74838383612c2d565b601d5490565b33600090815260186020526040902054610bdd612621565b610bf95760405162461bcd60e51b8152600401610abc906141ae565b6000811180610c0c5750610c0c336119af565b80610c1b5750610c1b33610f05565b80610c2a5750610c2a3361111a565b610c465760405162461bcd60e51b8152600401610abc906141fc565b80158015610c765750610c5833610f05565b80610c675750610c67336119af565b80610c765750610c763361111a565b15610cea57336000908152601a602052604090205460ff16610cbc57600d5433600090815260186020908152604080832093909355601a905220805460ff191660011790555b503360009081526018602052604090205480610cea5760405162461bcd60e51b8152600401610abc906141fc565b80831115610d0a5760405162461bcd60e51b8152600401610abc90613b5b565b600954836001610d1a6007612d60565b610d2491906142ff565b610d2e91906142b4565b1115610d4c5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff161580610d855750600a54836001610d6e6007612d60565b610d7891906142ff565b610d8291906142b4565b11155b610da15760405162461bcd60e51b8152600401610abc90613df7565b601b546040516331a9108f60e11b81526001600160a01b03909116908190636352211e90610dd3908690600401614246565b60206040518083038186803b158015610deb57600080fd5b505afa158015610dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e23919061346c565b6001600160a01b0316336001600160a01b031614610e535760405162461bcd60e51b8152600401610abc906141d9565b6000610e5f8585611664565b905080341015610e815760405162461bcd60e51b8152600401610abc90614098565b610e8b85846142ff565b33600090815260186020908152604080832093909355601a9052908120805460ff19166001179055610ebd6007612d60565b905060005b86811015610efc57610ed43383612d64565b610ede6007612aff565b610ee86007612d60565b915080610ef48161437d565b915050610ec2565b50505050505050565b6000805b6002811015610fe3576000602b8260028110610f3557634e487b7160e01b600052603260045260246000fd5b01546040516371d4ed8d60e11b81526001600160a01b039091169150600090829063e3a9db1a90610f6a908890600401613add565b60006040518083038186803b158015610f8257600080fd5b505afa158015610f96573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fbe9190810190613685565b511115610fd0576001925050506109fe565b5080610fdb8161437d565b915050610f09565b50600092915050565b6001600160a01b038116600090815260196020526040812054819085111561111257601b5460405163e1dc076160e01b81526001600160a01b0390911690600090829063e1dc076190611043908990600401614246565b60006040518083038186803b15801561105b57600080fd5b505afa15801561106f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261109791908101906137c4565b9150506064601c826040516110ac91906139ae565b908152602001604051809103902054600b5460196000896001600160a01b03166001600160a01b03168152602001908152602001600020548a6110ef91906142ff565b6110f991906142e0565b61110391906142e0565b61110d91906142cc565b925050505b949350505050565b6000805b6002811015610fe3576000602d826002811061114a57634e487b7160e01b600052603260045260246000fd5b01546001600160a01b031690506000602f836002811061117a57634e487b7160e01b600052603260045260246000fd5b0154905060005b6126ac81101561125e57604051627eeac760e11b81526000906001600160a01b0385169062fdd58e906111ba908a908790600401613b24565b60206040518083038186803b1580156111d257600080fd5b505afa1580156111e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120a919061383d565b111561121d5760019450505050506109fe565b6031816002811061123e57634e487b7160e01b600052603260045260246000fd5b015461124a90836142b4565b9150806112568161437d565b915050611181565b505050808061126c9061437d565b91505061111e565b6001600160a01b031660009081526017602052604090205490565b611297612b3e565b6001600160a01b03166112a8611c9a565b6001600160a01b0316146112ce5760405162461bcd60e51b8152600401610abc90613fb7565b600047116112ee5760405162461bcd60e51b8152600401610abc90614154565b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611327573d6000803e3d6000fd5b50565b610b74838383604051806020016040528060008152506122a3565b6001600160a01b038116600090815260196020526040812054819084111561139a57600b546001600160a01b03841660009081526019602052604090205461138d90866142ff565b61139791906142e0565b90505b9392505050565b6113a9612b3e565b6001600160a01b03166113ba611c9a565b6001600160a01b0316146113e05760405162461bcd60e51b8152600401610abc90613fb7565b600e55565b6001600160a01b031660009081526018602052604090205490565b611408612b3e565b6001600160a01b0316611419611c9a565b6001600160a01b03161461143f5760405162461bcd60e51b8152600401610abc90613fb7565b80516114529060169060208401906132dd565b5050565b6000601054421015801561146c57506011544211155b905090565b611479612b3e565b6001600160a01b031661148a611c9a565b6001600160a01b0316146114b05760405162461bcd60e51b8152600401610abc90613fb7565b600c55565b600060016114c36007612d60565b61146c91906142ff565b6114d5612b3e565b6001600160a01b03166114e6611c9a565b6001600160a01b03161461150c5760405162461bcd60e51b8152600401610abc90613fb7565b601b5460408051635c78a39360e01b815290516001600160a01b03909216916000918391635c78a39391600480820192602092909190829003018186803b15801561155657600080fd5b505afa15801561156a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158e919061383d565b905060015b818111610b7457600e5460196000856001600160a01b0316636352211e856040518263ffffffff1660e01b81526004016115cd9190614246565b60206040518083038186803b1580156115e557600080fd5b505afa1580156115f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161d919061346c565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461164c91906142b4565b9091555081905061165c8161437d565b915050611593565b601b5460405163e1dc076160e01b81526000916001600160a01b0316908290829063e1dc076190611699908790600401614246565b60006040518083038186803b1580156116b157600080fd5b505afa1580156116c5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116ed91908101906137c4565b91505060006064601c8360405161170491906139ae565b90815260200160405180910390205487600b5461172191906142e0565b61172b91906142e0565b61173591906142cc565b9695505050505050565b6000818152600260205260408120546001600160a01b0316806109fb5760405162461bcd60e51b8152600401610abc90613eed565b61177c612b3e565b6001600160a01b031661178d611c9a565b6001600160a01b0316146117b35760405162461bcd60e51b8152600401610abc90613fb7565b60005b81811015610b7457600d54601860008585858181106117e557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906117fa9190613450565b6001600160a01b031681526020810191909152604001600020558061181e8161437d565b9150506117b6565b6001600160a01b03166000908152601a602052604090205460ff1690565b60006001600160a01b03821661186c5760405162461bcd60e51b8152600401610abc90613ea3565b506001600160a01b031660009081526003602052604090205490565b611890612b3e565b6001600160a01b03166118a1611c9a565b6001600160a01b0316146118c75760405162461bcd60e51b8152600401610abc90613fb7565b6118d16000612d7e565b565b6118db612b3e565b6001600160a01b03166118ec611c9a565b6001600160a01b0316146119125760405162461bcd60e51b8152600401610abc90613fb7565b601580549115156101000261ff0019909216919091179055565b611934612b3e565b6001600160a01b0316611945611c9a565b6001600160a01b03161461196b5760405162461bcd60e51b8152600401610abc90613fb7565b60205460ff161561198e5760405162461bcd60e51b8152600401610abc90613cdd565b611999600a54612dd0565b61ffff16601e556020805460ff19166001179055565b6000805b600a811015610fe3576000602182600a81106119df57634e487b7160e01b600052603260045260246000fd5b01546040516370a0823160e01b81526001600160a01b03909116915060009082906370a0823190611a14908890600401613add565b60206040518083038186803b158015611a2c57600080fd5b505afa158015611a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a64919061383d565b1115611a75576001925050506109fe565b5080611a808161437d565b9150506119b3565b60006014544210158015611a9e575060155460ff165b80611ab357506008546001600160a01b031633145b611acf5760405162461bcd60e51b8152600401610abc90613d07565b601b546040516331a9108f60e11b81526001600160a01b03909116908190636352211e90611b01908690600401614246565b60206040518083038186803b158015611b1957600080fd5b505afa158015611b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b51919061346c565b6001600160a01b0316336001600160a01b031614611b815760405162461bcd60e51b8152600401610abc906141d9565b6000611b8d8585611664565b905080341015611baf5760405162461bcd60e51b8152600401610abc90614098565b6000611bbb6007612d60565b60095490915086611bcd6001846142ff565b611bd791906142b4565b1115611bf55760405162461bcd60e51b8152600401610abc90614177565b601554610100900460ff161580611c2e5750600a54866001611c176007612d60565b611c2191906142ff565b611c2b91906142b4565b11155b611c4a5760405162461bcd60e51b8152600401610abc90613df7565b60005b86811015611c8757611c5f3383612d64565b611c696007612aff565b611c736007612d60565b915080611c7f8161437d565b915050611c4d565b5095945050505050565b60205460ff1681565b6006546001600160a01b031690565b606060018054610a1290614342565b336000908152601960209081526040808320546017909252822054611cdd91906142b4565b9050611ce7611456565b611d035760405162461bcd60e51b8152600401610abc906141ae565b6000811180611d1c57506008546001600160a01b031633145b611d385760405162461bcd60e51b8152600401610abc906141fc565b8083111580611d5157506008546001600160a01b031633145b611d6d5760405162461bcd60e51b8152600401610abc90613b5b565b600c5483601d54611d7e91906142b4565b1115611d9c5760405162461bcd60e51b8152600401610abc90613fec565b600954836001611dac6007612d60565b611db691906142ff565b611dc091906142b4565b1115611dde5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff161580611e175750600a54836001611e006007612d60565b611e0a91906142ff565b611e1491906142b4565b11155b611e335760405162461bcd60e51b8152600401610abc90613df7565b6000611e40848433610fec565b905080341015611e625760405162461bcd60e51b8152600401610abc90614098565b336000908152601960205260408120548510611e9257503360009081526019602052604081208054919055611ebe565b33600090815260196020526040902054611ead9086906142ff565b336000908152601960205260409020555b8085118015611eda575033600090815260196020526040902054155b15611f1457611ee981866142ff565b33600090815260176020526040902054611f0391906142ff565b336000908152601760205260409020555b84601d54611f2291906142b4565b601d556000611f316007612d60565b905060005b86811015610efc57611f483383612d64565b611f526007612aff565b611f5c6007612d60565b915080611f688161437d565b915050611f36565b611452611f7b612b3e565b8383612ea8565b611f8a612b3e565b6001600160a01b0316611f9b611c9a565b6001600160a01b031614611fc15760405162461bcd60e51b8152600401610abc90613fb7565b600b55565b601e5481565b60145442101590565b336000908152601960209081526040808320546017909252822054611ffa91906142b4565b9050612004611456565b6120205760405162461bcd60e51b8152600401610abc906141ae565b600081118061203957506008546001600160a01b031633145b6120555760405162461bcd60e51b8152600401610abc906141fc565b808211158061206e57506008546001600160a01b031633145b61208a5760405162461bcd60e51b8152600401610abc90613b5b565b600c5482601d5461209b91906142b4565b11156120b95760405162461bcd60e51b8152600401610abc90613fec565b6009548260016120c96007612d60565b6120d391906142ff565b6120dd91906142b4565b11156120fb5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff1615806121345750600a5482600161211d6007612d60565b61212791906142ff565b61213191906142b4565b11155b6121505760405162461bcd60e51b8152600401610abc90613df7565b3461215b8333611345565b11158061217257506008546001600160a01b031633145b61218e5760405162461bcd60e51b8152600401610abc90613ca6565b3360009081526019602052604081205483106121be575033600090815260196020526040812080549190556121ea565b336000908152601960205260409020546121d99084906142ff565b336000908152601960205260409020555b8083118015612206575033600090815260196020526040902054155b156122405761221581846142ff565b3360009081526017602052604090205461222f91906142ff565b336000908152601760205260409020555b82601d5461224e91906142b4565b601d55600061225d6007612d60565b905060005b8481101561229c576122743383612d64565b61227e6007612aff565b6122886007612d60565b9150806122948161437d565b915050612262565b5050505050565b6122b46122ae612b3e565b83612bb0565b6122d05760405162461bcd60e51b8152600401610abc90614103565b6122dc84848484612f4b565b50505050565b6122ea612b3e565b6001600160a01b03166122fb611c9a565b6001600160a01b0316146123215760405162461bcd60e51b8152600401610abc90613fb7565b600d55565b4790565b612332612b3e565b6001600160a01b0316612343611c9a565b6001600160a01b0316146123695760405162461bcd60e51b8152600401610abc90613fb7565b602054610100900460ff16156123915760405162461bcd60e51b8152600401610abc90613cdd565b6123a9600a546009546123a491906142ff565b612dd0565b61ffff16601f556020805461ff001916610100179055565b60606123cc82612b21565b6123e85760405162461bcd60e51b8152600401610abc90614049565b600a54821161244d576000601e548361240191906142b4565b9050600a5481111561241d57600a5461241a90826142ff565b90505b61242681612f7e565b6040516020016124369190613a78565b6040516020818303038152906040529150506109fe565b6000601f548361245d91906142b4565b905060095481111561248657600a5460095461247990836142ff565b61248391906142b4565b90505b601661249182612f7e565b6040516020016124a29291906139ca565b604051602081830303815290604052915050919050565b600060145442101580156124cf575060155460ff165b806124e457506008546001600160a01b031633145b6125005760405162461bcd60e51b8152600401610abc90613d07565b81600b5461250e91906142e0565b3410158061252657506008546001600160a01b031633145b6125425760405162461bcd60e51b8152600401610abc90614098565b600061254e6007612d60565b600954909150836125606001846142ff565b61256a91906142b4565b11156125885760405162461bcd60e51b8152600401610abc90614177565b601554610100900460ff1615806125c15750600a548360016125aa6007612d60565b6125b491906142ff565b6125be91906142b4565b11155b6125dd5760405162461bcd60e51b8152600401610abc90613df7565b60005b8381101561261a576125f23383612d64565b6125fc6007612aff565b6126066007612d60565b9150806126128161437d565b9150506125e0565b5092915050565b6000601254421015801561146c57505060135442111590565b612642612b3e565b6001600160a01b0316612653611c9a565b6001600160a01b0316146126795760405162461bcd60e51b8152600401610abc90613fb7565b6015805460ff1916911515919091179055565b612694612b3e565b6001600160a01b03166126a5611c9a565b6001600160a01b0316146126cb5760405162461bcd60e51b8152600401610abc90613fb7565b60005b8381101561229c578282828181106126f657634e487b7160e01b600052603260045260246000fd5b905060200201356017600087878581811061272157634e487b7160e01b600052603260045260246000fd5b90506020020160208101906127369190613450565b6001600160a01b031681526020810191909152604001600020558061275a8161437d565b9150506126ce565b601f5481565b33600090815260186020526040902054612780612621565b61279c5760405162461bcd60e51b8152600401610abc906141ae565b60008111806127af57506127af336119af565b806127be57506127be33610f05565b806127cd57506127cd3361111a565b6127e95760405162461bcd60e51b8152600401610abc906141fc565b8015801561281957506127fb336119af565b8061280a575061280a33610f05565b8061281957506128193361111a565b1561288d57336000908152601a602052604090205460ff1661285f57600d5433600090815260186020908152604080832093909355601a905220805460ff191660011790555b50336000908152601860205260409020548061288d5760405162461bcd60e51b8152600401610abc906141fc565b808211156128ad5760405162461bcd60e51b8152600401610abc90613b5b565b6009548260016128bd6007612d60565b6128c791906142ff565b6128d191906142b4565b11156128ef5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff1615806129285750600a548260016129116007612d60565b61291b91906142ff565b61292591906142b4565b11155b6129445760405162461bcd60e51b8152600401610abc90613df7565b34600b548361295391906142e0565b11156129715760405162461bcd60e51b8152600401610abc90613ca6565b61297b82826142ff565b33600090815260186020908152604080832093909355601a9052908120805460ff191660011790556129ad6007612d60565b905060005b838110156122dc576129c43383612d64565b6129ce6007612aff565b6129d86007612d60565b9150806129e48161437d565b9150506129b2565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600b5490565b612a28612b3e565b6001600160a01b0316612a39611c9a565b6001600160a01b031614612a5f5760405162461bcd60e51b8152600401610abc90613fb7565b601094909455601192909255601255601355601455565b6001600160a01b031660009081526019602052604090205490565b612a99612b3e565b6001600160a01b0316612aaa611c9a565b6001600160a01b031614612ad05760405162461bcd60e51b8152600401610abc90613fb7565b6001600160a01b038116612af65760405162461bcd60e51b8152600401610abc90613be4565b61132781612d7e565b80546001019055565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612b778261173f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612bbb82612b21565b612bd75760405162461bcd60e51b8152600401610abc90613dab565b6000612be28361173f565b9050806001600160a01b0316846001600160a01b03161480612c1d5750836001600160a01b0316612c1284610a95565b6001600160a01b0316145b80611112575061111281856129ec565b826001600160a01b0316612c408261173f565b6001600160a01b031614612c665760405162461bcd60e51b8152600401610abc90613c2a565b6001600160a01b038216612c8c5760405162461bcd60e51b8152600401610abc90613d30565b612c97838383610b74565b612ca2600082612b42565b6001600160a01b0383166000908152600360205260408120805460019290612ccb9084906142ff565b90915550506001600160a01b0382166000908152600360205260408120805460019290612cf99084906142b4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610b74838383610b74565b5490565b611452828260405180602001604052806000815250613099565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080612ddb6114b5565b90506000612ded61065b6005846142cc565b90506000612e0b6005612e018560026142e0565b61065b91906142cc565b90506000612e1f6005612e018660036142e0565b90506000612e336005612e018760046142e0565b90506000612e4561065b6001886142ff565b90506000612e546001436142ff565b408686868686604051602001612e6f96959493929190613965565b60408051601f1981840301815291905280516020909101209050612e9b8961ffff600184901c16614398565b9998505050505050505050565b816001600160a01b0316836001600160a01b03161415612eda5760405162461bcd60e51b8152600401610abc90613d74565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190612f3e908590613b3d565b60405180910390a3505050565b612f56848484612c2d565b612f62848484846130cc565b6122dc5760405162461bcd60e51b8152600401610abc90613b92565b606081612fa357506040805180820190915260018152600360fc1b60208201526109fe565b8160005b8115612fcd5780612fb78161437d565b9150612fc69050600a836142cc565b9150612fa7565b60008167ffffffffffffffff811115612ff657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613020576020820181803683370190505b5090505b8415611112576130356001836142ff565b9150613042600a86614398565b61304d9060306142b4565b60f81b81838151811061307057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613092600a866142cc565b9450613024565b6130a383836131e7565b6130b060008484846130cc565b610b745760405162461bcd60e51b8152600401610abc90613b92565b60006130e0846001600160a01b03166132ce565b156131dc57836001600160a01b031663150b7a026130fc612b3e565b8786866040518563ffffffff1660e01b815260040161311e9493929190613af1565b602060405180830381600087803b15801561313857600080fd5b505af1925050508015613168575060408051601f3d908101601f1916820190925261316591810190613762565b60015b6131c2573d808015613196576040519150601f19603f3d011682016040523d82523d6000602084013e61319b565b606091505b5080516131ba5760405162461bcd60e51b8152600401610abc90613b92565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611112565b506001949350505050565b6001600160a01b03821661320d5760405162461bcd60e51b8152600401610abc90613f36565b61321681612b21565b156132335760405162461bcd60e51b8152600401610abc90613c6f565b61323f60008383610b74565b6001600160a01b03821660009081526003602052604081208054600192906132689084906142b4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461145260008383610b74565b6001600160a01b03163b151590565b8280546132e990614342565b90600052602060002090601f01602090048101928261330b5760008555613351565b82601f1061332457805160ff1916838001178555613351565b82800160010185558215613351579182015b82811115613351578251825591602001919060010190613336565b5061335d929150613361565b5090565b5b8082111561335d5760008155600101613362565b600061338961338484614280565b61424f565b905082815283838301111561339d57600080fd5b828260208301376000602084830101529392505050565b60008083601f8401126133c5578182fd5b50813567ffffffffffffffff8111156133dc578182fd5b60208301915083602080830285010111156133f657600080fd5b9250929050565b803580151581146109fe57600080fd5b600082601f83011261341d578081fd5b815161342b61338482614280565b81815284602083860101111561343f578283fd5b611112826020830160208701614316565b600060208284031215613461578081fd5b813561139a816143ee565b60006020828403121561347d578081fd5b815161139a816143ee565b6000806040838503121561349a578081fd5b82356134a5816143ee565b915060208301356134b5816143ee565b809150509250929050565b6000806000606084860312156134d4578081fd5b83356134df816143ee565b925060208401356134ef816143ee565b929592945050506040919091013590565b60008060008060808587031215613515578081fd5b8435613520816143ee565b93506020850135613530816143ee565b925060408501359150606085013567ffffffffffffffff811115613552578182fd5b8501601f81018713613562578182fd5b61357187823560208401613376565b91505092959194509250565b6000806040838503121561358f578182fd5b823561359a816143ee565b91506135a8602084016133fd565b90509250929050565b600080604083850312156135c3578182fd5b82356135ce816143ee565b946020939093013593505050565b600080602083850312156135ee578081fd5b823567ffffffffffffffff811115613604578182fd5b613610858286016133b4565b90969095509350505050565b60008060008060408587031215613631578182fd5b843567ffffffffffffffff80821115613648578384fd5b613654888389016133b4565b9096509450602087013591508082111561366c578384fd5b50613679878288016133b4565b95989497509550505050565b60006020808385031215613697578182fd5b825167ffffffffffffffff808211156136ae578384fd5b818501915085601f8301126136c1578384fd5b8151818111156136d3576136d36143d8565b83810291506136e384830161424f565b8181528481019084860184860187018a10156136fd578788fd5b8795505b8386101561371f578051835260019590950194918601918601613701565b5098975050505050505050565b60006020828403121561373d578081fd5b61139a826133fd565b600060208284031215613757578081fd5b813561139a81614403565b600060208284031215613773578081fd5b815161139a81614403565b60006020828403121561378f578081fd5b813567ffffffffffffffff8111156137a5578182fd5b8201601f810184136137b5578182fd5b61111284823560208401613376565b600080604083850312156137d6578182fd5b825167ffffffffffffffff808211156137ed578384fd5b6137f98683870161340d565b9350602085015191508082111561380e578283fd5b5061381b8582860161340d565b9150509250929050565b600060208284031215613836578081fd5b5035919050565b60006020828403121561384e578081fd5b5051919050565b60008060408385031215613867578182fd5b8235915060208301356134b5816143ee565b6000806040838503121561388b578182fd5b50508035926020909101359150565b6000806000606084860312156138ae578081fd5b833592506020840135915060408401356138c7816143ee565b809150509250925092565b600080600080600060a086880312156138e9578283fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008151808452613924816020860160208601614316565b601f01601f19169290920160200192915050565b6000815161394a818560208601614316565b9290920192915050565b64173539b7b760d91b815260050190565b9586526bffffffffffffffffffffffff19606095861b8116602088015293851b8416603487015291841b83166048860152831b8216605c85015290911b16607082015260840190565b600082516139c0818460208701614316565b9190910192915050565b82546000908190600281046001808316806139e657607f831692505b6020808410821415613a0657634e487b7160e01b87526022600452602487fd5b818015613a1a5760018114613a2b57613a57565b60ff19861689528489019650613a57565b613a348b6142a8565b885b86811015613a4f5781548b820152908501908301613a36565b505084890196505b505050505050613a6f613a6a8286613938565b613954565b95945050505050565b60007f68747470733a2f2f7366767066702e73332e616d617a6f6e6177732e636f6d2f825267707265766965772f60c01b60208301528251613ac1816028850160208701614316565b64173539b7b760d91b6028939091019283015250602d01919050565b6001600160a01b0391909116815260200190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906117359083018461390c565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b60006020825261139a602083018461390c565b60208082526017908201527f457863656564656420616c6c6f77656420616d6f756e74000000000000000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252601d908201527f416d6f756e74206f66206574686572206973206e6f7420656e6f756768000000604082015260600190565b60208082526010908201526f185b1c9958591e481c995d99585b195960821b604082015260600190565b6020808252600f908201526e73616c65206e6f742061637469766560881b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252602f908201527f5468697320776f756c642065786365656420746865206d6178206e756d62657260408201526e081bd988185b1b1bddd959081b999d608a1b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526037908201527f5468697320776f756c642065786365656420746865206d6178206e756d62657260408201527f206f6620616c6c6f77656420666f7220776c2073616c65000000000000000000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526010908201526f6e6f7420656e6f756768206d6f6e657960801b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260099082015268302062616c616e636560b81b604082015260600190565b60208082526017908201527f636f6c6c656374696f6e2066756c6c79206d696e746564000000000000000000604082015260600190565b6020808252601190820152704e6f2070726573616c652061637469766560781b604082015260600190565b6020808252600990820152683737ba1037bbb732b960b91b604082015260600190565b6020808252602a908201527f546869732061646472657373206973206e6f7420617574686f72697a656420666040820152696f722070726573616c6560b01b606082015260800190565b90815260200190565b604051601f8201601f1916810167ffffffffffffffff81118282101715614278576142786143d8565b604052919050565b600067ffffffffffffffff82111561429a5761429a6143d8565b50601f01601f191660200190565b60009081526020902090565b600082198211156142c7576142c76143ac565b500190565b6000826142db576142db6143c2565b500490565b60008160001904831182151516156142fa576142fa6143ac565b500290565b600082821015614311576143116143ac565b500390565b60005b83811015614331578181015183820152602001614319565b838111156122dc5750506000910152565b60028104600182168061435657607f821691505b6020821081141561437757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614391576143916143ac565b5060010190565b6000826143a7576143a76143c2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461132757600080fd5b6001600160e01b03198116811461132757600080fdfea2646970667358221220a9f00c29829249fbd0ec1f4396d7b936fd49b51f1afa23e64e487d85b320d68064736f6c6343000801003368747470733a2f2f7366767066702e73332e616d617a6f6e6177732e636f6d2f707265766965772f000000000000000000000000d8f4f61001256def1908e0ec724c541b38b8ec280000000000000000000000000000000000000000000000000000000000002710

Deployed Bytecode

0x6080604052600436106103765760003560e01c806374870471116101d1578063ba0042e311610102578063e3946556116100a0578063eb91d37e1161006f578063eb91d37e14610946578063f1931a7b1461095b578063f283ca5b1461097b578063f2fde38b1461099b57610376565b8063e3946556146108de578063e644157b146108fe578063e86fe2bb14610913578063e985e9c51461092657610376565b8063c87b56dd116100dc578063c87b56dd14610876578063d7a5d5d314610896578063dc722bb5146108a9578063e2e06fa3146108be57610376565b8063ba0042e31461082c578063bedcf0031461084c578063c449051b1461086157610376565b80639dea616e1161016f578063a4c8dba711610149578063a4c8dba7146107cf578063a5a865dc146107e4578063aa1df13f146107f9578063b88d4fde1461080c57610376565b80639dea616e1461077c578063a22cb4651461078f578063a2b40d19146107af57610376565b806382802dd7116101ab57806382802dd71461072a57806384a619111461073d5780638da5cb5b1461075257806395d89b411461076757610376565b806374870471146106d55780637ce631af146106f55780637f05243c1461070a57610376565b8063431df961116102ab5780635e0fa8c0116102495780636447c35d116102235780636447c35d1461066057806368c986091461068057806370a08231146106a0578063715018a6146106c057610376565b80635e0fa8c01461060b5780635ee2d5b6146106205780636352211e1461064057610376565b806355f804b31161028557806355f804b3146105a157806359d2be67146105c15780635a154a18146105d65780635c78a393146105f657610376565b8063431df9611461054157806351f5e10514610561578063533e537e1461058157610376565b80632b97ba781161031857806333e62b70116102f257806333e62b70146104cc5780633c968fab146104ec5780633ccfd60b1461050c57806342842e0e1461052157610376565b80632b97ba7814610479578063323e97301461048c578063325e3777146104ac57610376565b8063095ea7b311610354578063095ea7b31461040057806317303fa81461042257806323b872dd1461043757806326a4b1681461045757610376565b806301ffc9a71461037b57806306fdde03146103b1578063081812fc146103d3575b600080fd5b34801561038757600080fd5b5061039b610396366004613746565b6109bb565b6040516103a89190613b3d565b60405180910390f35b3480156103bd57600080fd5b506103c6610a03565b6040516103a89190613b48565b3480156103df57600080fd5b506103f36103ee366004613825565b610a95565b6040516103a89190613add565b34801561040c57600080fd5b5061042061041b3660046135b1565b610ae1565b005b34801561042e57600080fd5b5061039b610b79565b34801561044357600080fd5b506104206104523660046134c0565b610b87565b34801561046357600080fd5b5061046c610bbf565b6040516103a89190614246565b610420610487366004613879565b610bc5565b34801561049857600080fd5b5061039b6104a7366004613450565b610f05565b3480156104b857600080fd5b5061046c6104c736600461389a565b610fec565b3480156104d857600080fd5b5061039b6104e7366004613450565b61111a565b3480156104f857600080fd5b5061046c610507366004613450565b611274565b34801561051857600080fd5b5061042061128f565b34801561052d57600080fd5b5061042061053c3660046134c0565b61132a565b34801561054d57600080fd5b5061046c61055c366004613855565b611345565b34801561056d57600080fd5b5061042061057c366004613825565b6113a1565b34801561058d57600080fd5b5061046c61059c366004613450565b6113e5565b3480156105ad57600080fd5b506104206105bc36600461377e565b611400565b3480156105cd57600080fd5b5061039b611456565b3480156105e257600080fd5b506104206105f1366004613825565b611471565b34801561060257600080fd5b5061046c6114b5565b34801561061757600080fd5b506104206114cd565b34801561062c57600080fd5b5061046c61063b366004613879565b611664565b34801561064c57600080fd5b506103f361065b366004613825565b61173f565b34801561066c57600080fd5b5061042061067b3660046135dc565b611774565b34801561068c57600080fd5b5061039b61069b366004613450565b611826565b3480156106ac57600080fd5b5061046c6106bb366004613450565b611844565b3480156106cc57600080fd5b50610420611888565b3480156106e157600080fd5b506104206106f036600461372c565b6118d3565b34801561070157600080fd5b5061042061192c565b34801561071657600080fd5b5061039b610725366004613450565b6119af565b61046c610738366004613879565b611a88565b34801561074957600080fd5b5061039b611c91565b34801561075e57600080fd5b506103f3611c9a565b34801561077357600080fd5b506103c6611ca9565b61042061078a366004613879565b611cb8565b34801561079b57600080fd5b506104206107aa36600461357d565b611f70565b3480156107bb57600080fd5b506104206107ca366004613825565b611f82565b3480156107db57600080fd5b5061046c611fc6565b3480156107f057600080fd5b5061039b611fcc565b610420610807366004613825565b611fd5565b34801561081857600080fd5b50610420610827366004613500565b6122a3565b34801561083857600080fd5b50610420610847366004613825565b6122e2565b34801561085857600080fd5b5061046c612326565b34801561086d57600080fd5b5061042061232a565b34801561088257600080fd5b506103c6610891366004613825565b6123c1565b61046c6108a4366004613825565b6124b9565b3480156108b557600080fd5b5061039b612621565b3480156108ca57600080fd5b506104206108d936600461372c565b61263a565b3480156108ea57600080fd5b506104206108f936600461361c565b61268c565b34801561090a57600080fd5b5061046c612762565b610420610921366004613825565b612768565b34801561093257600080fd5b5061039b610941366004613488565b6129ec565b34801561095257600080fd5b5061046c612a1a565b34801561096757600080fd5b506104206109763660046138d2565b612a20565b34801561098757600080fd5b5061046c610996366004613450565b612a76565b3480156109a757600080fd5b506104206109b6366004613450565b612a91565b60006001600160e01b031982166380ac58cd60e01b14806109ec57506001600160e01b03198216635b5e139f60e01b145b806109fb57506109fb82612b08565b90505b919050565b606060008054610a1290614342565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3e90614342565b8015610a8b5780601f10610a6057610100808354040283529160200191610a8b565b820191906000526020600020905b815481529060010190602001808311610a6e57829003601f168201915b5050505050905090565b6000610aa082612b21565b610ac55760405162461bcd60e51b8152600401610abc90613f6b565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610aec8261173f565b9050806001600160a01b0316836001600160a01b03161415610b205760405162461bcd60e51b8152600401610abc906140c2565b806001600160a01b0316610b32612b3e565b6001600160a01b03161480610b4e5750610b4e81610941612b3e565b610b6a5760405162461bcd60e51b8152600401610abc90613e46565b610b748383612b42565b505050565b602054610100900460ff1681565b610b98610b92612b3e565b82612bb0565b610bb45760405162461bcd60e51b8152600401610abc90614103565b610b74838383612c2d565b601d5490565b33600090815260186020526040902054610bdd612621565b610bf95760405162461bcd60e51b8152600401610abc906141ae565b6000811180610c0c5750610c0c336119af565b80610c1b5750610c1b33610f05565b80610c2a5750610c2a3361111a565b610c465760405162461bcd60e51b8152600401610abc906141fc565b80158015610c765750610c5833610f05565b80610c675750610c67336119af565b80610c765750610c763361111a565b15610cea57336000908152601a602052604090205460ff16610cbc57600d5433600090815260186020908152604080832093909355601a905220805460ff191660011790555b503360009081526018602052604090205480610cea5760405162461bcd60e51b8152600401610abc906141fc565b80831115610d0a5760405162461bcd60e51b8152600401610abc90613b5b565b600954836001610d1a6007612d60565b610d2491906142ff565b610d2e91906142b4565b1115610d4c5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff161580610d855750600a54836001610d6e6007612d60565b610d7891906142ff565b610d8291906142b4565b11155b610da15760405162461bcd60e51b8152600401610abc90613df7565b601b546040516331a9108f60e11b81526001600160a01b03909116908190636352211e90610dd3908690600401614246565b60206040518083038186803b158015610deb57600080fd5b505afa158015610dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e23919061346c565b6001600160a01b0316336001600160a01b031614610e535760405162461bcd60e51b8152600401610abc906141d9565b6000610e5f8585611664565b905080341015610e815760405162461bcd60e51b8152600401610abc90614098565b610e8b85846142ff565b33600090815260186020908152604080832093909355601a9052908120805460ff19166001179055610ebd6007612d60565b905060005b86811015610efc57610ed43383612d64565b610ede6007612aff565b610ee86007612d60565b915080610ef48161437d565b915050610ec2565b50505050505050565b6000805b6002811015610fe3576000602b8260028110610f3557634e487b7160e01b600052603260045260246000fd5b01546040516371d4ed8d60e11b81526001600160a01b039091169150600090829063e3a9db1a90610f6a908890600401613add565b60006040518083038186803b158015610f8257600080fd5b505afa158015610f96573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fbe9190810190613685565b511115610fd0576001925050506109fe565b5080610fdb8161437d565b915050610f09565b50600092915050565b6001600160a01b038116600090815260196020526040812054819085111561111257601b5460405163e1dc076160e01b81526001600160a01b0390911690600090829063e1dc076190611043908990600401614246565b60006040518083038186803b15801561105b57600080fd5b505afa15801561106f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261109791908101906137c4565b9150506064601c826040516110ac91906139ae565b908152602001604051809103902054600b5460196000896001600160a01b03166001600160a01b03168152602001908152602001600020548a6110ef91906142ff565b6110f991906142e0565b61110391906142e0565b61110d91906142cc565b925050505b949350505050565b6000805b6002811015610fe3576000602d826002811061114a57634e487b7160e01b600052603260045260246000fd5b01546001600160a01b031690506000602f836002811061117a57634e487b7160e01b600052603260045260246000fd5b0154905060005b6126ac81101561125e57604051627eeac760e11b81526000906001600160a01b0385169062fdd58e906111ba908a908790600401613b24565b60206040518083038186803b1580156111d257600080fd5b505afa1580156111e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120a919061383d565b111561121d5760019450505050506109fe565b6031816002811061123e57634e487b7160e01b600052603260045260246000fd5b015461124a90836142b4565b9150806112568161437d565b915050611181565b505050808061126c9061437d565b91505061111e565b6001600160a01b031660009081526017602052604090205490565b611297612b3e565b6001600160a01b03166112a8611c9a565b6001600160a01b0316146112ce5760405162461bcd60e51b8152600401610abc90613fb7565b600047116112ee5760405162461bcd60e51b8152600401610abc90614154565b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611327573d6000803e3d6000fd5b50565b610b74838383604051806020016040528060008152506122a3565b6001600160a01b038116600090815260196020526040812054819084111561139a57600b546001600160a01b03841660009081526019602052604090205461138d90866142ff565b61139791906142e0565b90505b9392505050565b6113a9612b3e565b6001600160a01b03166113ba611c9a565b6001600160a01b0316146113e05760405162461bcd60e51b8152600401610abc90613fb7565b600e55565b6001600160a01b031660009081526018602052604090205490565b611408612b3e565b6001600160a01b0316611419611c9a565b6001600160a01b03161461143f5760405162461bcd60e51b8152600401610abc90613fb7565b80516114529060169060208401906132dd565b5050565b6000601054421015801561146c57506011544211155b905090565b611479612b3e565b6001600160a01b031661148a611c9a565b6001600160a01b0316146114b05760405162461bcd60e51b8152600401610abc90613fb7565b600c55565b600060016114c36007612d60565b61146c91906142ff565b6114d5612b3e565b6001600160a01b03166114e6611c9a565b6001600160a01b03161461150c5760405162461bcd60e51b8152600401610abc90613fb7565b601b5460408051635c78a39360e01b815290516001600160a01b03909216916000918391635c78a39391600480820192602092909190829003018186803b15801561155657600080fd5b505afa15801561156a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158e919061383d565b905060015b818111610b7457600e5460196000856001600160a01b0316636352211e856040518263ffffffff1660e01b81526004016115cd9190614246565b60206040518083038186803b1580156115e557600080fd5b505afa1580156115f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161d919061346c565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461164c91906142b4565b9091555081905061165c8161437d565b915050611593565b601b5460405163e1dc076160e01b81526000916001600160a01b0316908290829063e1dc076190611699908790600401614246565b60006040518083038186803b1580156116b157600080fd5b505afa1580156116c5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116ed91908101906137c4565b91505060006064601c8360405161170491906139ae565b90815260200160405180910390205487600b5461172191906142e0565b61172b91906142e0565b61173591906142cc565b9695505050505050565b6000818152600260205260408120546001600160a01b0316806109fb5760405162461bcd60e51b8152600401610abc90613eed565b61177c612b3e565b6001600160a01b031661178d611c9a565b6001600160a01b0316146117b35760405162461bcd60e51b8152600401610abc90613fb7565b60005b81811015610b7457600d54601860008585858181106117e557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906117fa9190613450565b6001600160a01b031681526020810191909152604001600020558061181e8161437d565b9150506117b6565b6001600160a01b03166000908152601a602052604090205460ff1690565b60006001600160a01b03821661186c5760405162461bcd60e51b8152600401610abc90613ea3565b506001600160a01b031660009081526003602052604090205490565b611890612b3e565b6001600160a01b03166118a1611c9a565b6001600160a01b0316146118c75760405162461bcd60e51b8152600401610abc90613fb7565b6118d16000612d7e565b565b6118db612b3e565b6001600160a01b03166118ec611c9a565b6001600160a01b0316146119125760405162461bcd60e51b8152600401610abc90613fb7565b601580549115156101000261ff0019909216919091179055565b611934612b3e565b6001600160a01b0316611945611c9a565b6001600160a01b03161461196b5760405162461bcd60e51b8152600401610abc90613fb7565b60205460ff161561198e5760405162461bcd60e51b8152600401610abc90613cdd565b611999600a54612dd0565b61ffff16601e556020805460ff19166001179055565b6000805b600a811015610fe3576000602182600a81106119df57634e487b7160e01b600052603260045260246000fd5b01546040516370a0823160e01b81526001600160a01b03909116915060009082906370a0823190611a14908890600401613add565b60206040518083038186803b158015611a2c57600080fd5b505afa158015611a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a64919061383d565b1115611a75576001925050506109fe565b5080611a808161437d565b9150506119b3565b60006014544210158015611a9e575060155460ff165b80611ab357506008546001600160a01b031633145b611acf5760405162461bcd60e51b8152600401610abc90613d07565b601b546040516331a9108f60e11b81526001600160a01b03909116908190636352211e90611b01908690600401614246565b60206040518083038186803b158015611b1957600080fd5b505afa158015611b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b51919061346c565b6001600160a01b0316336001600160a01b031614611b815760405162461bcd60e51b8152600401610abc906141d9565b6000611b8d8585611664565b905080341015611baf5760405162461bcd60e51b8152600401610abc90614098565b6000611bbb6007612d60565b60095490915086611bcd6001846142ff565b611bd791906142b4565b1115611bf55760405162461bcd60e51b8152600401610abc90614177565b601554610100900460ff161580611c2e5750600a54866001611c176007612d60565b611c2191906142ff565b611c2b91906142b4565b11155b611c4a5760405162461bcd60e51b8152600401610abc90613df7565b60005b86811015611c8757611c5f3383612d64565b611c696007612aff565b611c736007612d60565b915080611c7f8161437d565b915050611c4d565b5095945050505050565b60205460ff1681565b6006546001600160a01b031690565b606060018054610a1290614342565b336000908152601960209081526040808320546017909252822054611cdd91906142b4565b9050611ce7611456565b611d035760405162461bcd60e51b8152600401610abc906141ae565b6000811180611d1c57506008546001600160a01b031633145b611d385760405162461bcd60e51b8152600401610abc906141fc565b8083111580611d5157506008546001600160a01b031633145b611d6d5760405162461bcd60e51b8152600401610abc90613b5b565b600c5483601d54611d7e91906142b4565b1115611d9c5760405162461bcd60e51b8152600401610abc90613fec565b600954836001611dac6007612d60565b611db691906142ff565b611dc091906142b4565b1115611dde5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff161580611e175750600a54836001611e006007612d60565b611e0a91906142ff565b611e1491906142b4565b11155b611e335760405162461bcd60e51b8152600401610abc90613df7565b6000611e40848433610fec565b905080341015611e625760405162461bcd60e51b8152600401610abc90614098565b336000908152601960205260408120548510611e9257503360009081526019602052604081208054919055611ebe565b33600090815260196020526040902054611ead9086906142ff565b336000908152601960205260409020555b8085118015611eda575033600090815260196020526040902054155b15611f1457611ee981866142ff565b33600090815260176020526040902054611f0391906142ff565b336000908152601760205260409020555b84601d54611f2291906142b4565b601d556000611f316007612d60565b905060005b86811015610efc57611f483383612d64565b611f526007612aff565b611f5c6007612d60565b915080611f688161437d565b915050611f36565b611452611f7b612b3e565b8383612ea8565b611f8a612b3e565b6001600160a01b0316611f9b611c9a565b6001600160a01b031614611fc15760405162461bcd60e51b8152600401610abc90613fb7565b600b55565b601e5481565b60145442101590565b336000908152601960209081526040808320546017909252822054611ffa91906142b4565b9050612004611456565b6120205760405162461bcd60e51b8152600401610abc906141ae565b600081118061203957506008546001600160a01b031633145b6120555760405162461bcd60e51b8152600401610abc906141fc565b808211158061206e57506008546001600160a01b031633145b61208a5760405162461bcd60e51b8152600401610abc90613b5b565b600c5482601d5461209b91906142b4565b11156120b95760405162461bcd60e51b8152600401610abc90613fec565b6009548260016120c96007612d60565b6120d391906142ff565b6120dd91906142b4565b11156120fb5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff1615806121345750600a5482600161211d6007612d60565b61212791906142ff565b61213191906142b4565b11155b6121505760405162461bcd60e51b8152600401610abc90613df7565b3461215b8333611345565b11158061217257506008546001600160a01b031633145b61218e5760405162461bcd60e51b8152600401610abc90613ca6565b3360009081526019602052604081205483106121be575033600090815260196020526040812080549190556121ea565b336000908152601960205260409020546121d99084906142ff565b336000908152601960205260409020555b8083118015612206575033600090815260196020526040902054155b156122405761221581846142ff565b3360009081526017602052604090205461222f91906142ff565b336000908152601760205260409020555b82601d5461224e91906142b4565b601d55600061225d6007612d60565b905060005b8481101561229c576122743383612d64565b61227e6007612aff565b6122886007612d60565b9150806122948161437d565b915050612262565b5050505050565b6122b46122ae612b3e565b83612bb0565b6122d05760405162461bcd60e51b8152600401610abc90614103565b6122dc84848484612f4b565b50505050565b6122ea612b3e565b6001600160a01b03166122fb611c9a565b6001600160a01b0316146123215760405162461bcd60e51b8152600401610abc90613fb7565b600d55565b4790565b612332612b3e565b6001600160a01b0316612343611c9a565b6001600160a01b0316146123695760405162461bcd60e51b8152600401610abc90613fb7565b602054610100900460ff16156123915760405162461bcd60e51b8152600401610abc90613cdd565b6123a9600a546009546123a491906142ff565b612dd0565b61ffff16601f556020805461ff001916610100179055565b60606123cc82612b21565b6123e85760405162461bcd60e51b8152600401610abc90614049565b600a54821161244d576000601e548361240191906142b4565b9050600a5481111561241d57600a5461241a90826142ff565b90505b61242681612f7e565b6040516020016124369190613a78565b6040516020818303038152906040529150506109fe565b6000601f548361245d91906142b4565b905060095481111561248657600a5460095461247990836142ff565b61248391906142b4565b90505b601661249182612f7e565b6040516020016124a29291906139ca565b604051602081830303815290604052915050919050565b600060145442101580156124cf575060155460ff165b806124e457506008546001600160a01b031633145b6125005760405162461bcd60e51b8152600401610abc90613d07565b81600b5461250e91906142e0565b3410158061252657506008546001600160a01b031633145b6125425760405162461bcd60e51b8152600401610abc90614098565b600061254e6007612d60565b600954909150836125606001846142ff565b61256a91906142b4565b11156125885760405162461bcd60e51b8152600401610abc90614177565b601554610100900460ff1615806125c15750600a548360016125aa6007612d60565b6125b491906142ff565b6125be91906142b4565b11155b6125dd5760405162461bcd60e51b8152600401610abc90613df7565b60005b8381101561261a576125f23383612d64565b6125fc6007612aff565b6126066007612d60565b9150806126128161437d565b9150506125e0565b5092915050565b6000601254421015801561146c57505060135442111590565b612642612b3e565b6001600160a01b0316612653611c9a565b6001600160a01b0316146126795760405162461bcd60e51b8152600401610abc90613fb7565b6015805460ff1916911515919091179055565b612694612b3e565b6001600160a01b03166126a5611c9a565b6001600160a01b0316146126cb5760405162461bcd60e51b8152600401610abc90613fb7565b60005b8381101561229c578282828181106126f657634e487b7160e01b600052603260045260246000fd5b905060200201356017600087878581811061272157634e487b7160e01b600052603260045260246000fd5b90506020020160208101906127369190613450565b6001600160a01b031681526020810191909152604001600020558061275a8161437d565b9150506126ce565b601f5481565b33600090815260186020526040902054612780612621565b61279c5760405162461bcd60e51b8152600401610abc906141ae565b60008111806127af57506127af336119af565b806127be57506127be33610f05565b806127cd57506127cd3361111a565b6127e95760405162461bcd60e51b8152600401610abc906141fc565b8015801561281957506127fb336119af565b8061280a575061280a33610f05565b8061281957506128193361111a565b1561288d57336000908152601a602052604090205460ff1661285f57600d5433600090815260186020908152604080832093909355601a905220805460ff191660011790555b50336000908152601860205260409020548061288d5760405162461bcd60e51b8152600401610abc906141fc565b808211156128ad5760405162461bcd60e51b8152600401610abc90613b5b565b6009548260016128bd6007612d60565b6128c791906142ff565b6128d191906142b4565b11156128ef5760405162461bcd60e51b8152600401610abc90613df7565b601554610100900460ff1615806129285750600a548260016129116007612d60565b61291b91906142ff565b61292591906142b4565b11155b6129445760405162461bcd60e51b8152600401610abc90613df7565b34600b548361295391906142e0565b11156129715760405162461bcd60e51b8152600401610abc90613ca6565b61297b82826142ff565b33600090815260186020908152604080832093909355601a9052908120805460ff191660011790556129ad6007612d60565b905060005b838110156122dc576129c43383612d64565b6129ce6007612aff565b6129d86007612d60565b9150806129e48161437d565b9150506129b2565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600b5490565b612a28612b3e565b6001600160a01b0316612a39611c9a565b6001600160a01b031614612a5f5760405162461bcd60e51b8152600401610abc90613fb7565b601094909455601192909255601255601355601455565b6001600160a01b031660009081526019602052604090205490565b612a99612b3e565b6001600160a01b0316612aaa611c9a565b6001600160a01b031614612ad05760405162461bcd60e51b8152600401610abc90613fb7565b6001600160a01b038116612af65760405162461bcd60e51b8152600401610abc90613be4565b61132781612d7e565b80546001019055565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612b778261173f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612bbb82612b21565b612bd75760405162461bcd60e51b8152600401610abc90613dab565b6000612be28361173f565b9050806001600160a01b0316846001600160a01b03161480612c1d5750836001600160a01b0316612c1284610a95565b6001600160a01b0316145b80611112575061111281856129ec565b826001600160a01b0316612c408261173f565b6001600160a01b031614612c665760405162461bcd60e51b8152600401610abc90613c2a565b6001600160a01b038216612c8c5760405162461bcd60e51b8152600401610abc90613d30565b612c97838383610b74565b612ca2600082612b42565b6001600160a01b0383166000908152600360205260408120805460019290612ccb9084906142ff565b90915550506001600160a01b0382166000908152600360205260408120805460019290612cf99084906142b4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610b74838383610b74565b5490565b611452828260405180602001604052806000815250613099565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080612ddb6114b5565b90506000612ded61065b6005846142cc565b90506000612e0b6005612e018560026142e0565b61065b91906142cc565b90506000612e1f6005612e018660036142e0565b90506000612e336005612e018760046142e0565b90506000612e4561065b6001886142ff565b90506000612e546001436142ff565b408686868686604051602001612e6f96959493929190613965565b60408051601f1981840301815291905280516020909101209050612e9b8961ffff600184901c16614398565b9998505050505050505050565b816001600160a01b0316836001600160a01b03161415612eda5760405162461bcd60e51b8152600401610abc90613d74565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190612f3e908590613b3d565b60405180910390a3505050565b612f56848484612c2d565b612f62848484846130cc565b6122dc5760405162461bcd60e51b8152600401610abc90613b92565b606081612fa357506040805180820190915260018152600360fc1b60208201526109fe565b8160005b8115612fcd5780612fb78161437d565b9150612fc69050600a836142cc565b9150612fa7565b60008167ffffffffffffffff811115612ff657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613020576020820181803683370190505b5090505b8415611112576130356001836142ff565b9150613042600a86614398565b61304d9060306142b4565b60f81b81838151811061307057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613092600a866142cc565b9450613024565b6130a383836131e7565b6130b060008484846130cc565b610b745760405162461bcd60e51b8152600401610abc90613b92565b60006130e0846001600160a01b03166132ce565b156131dc57836001600160a01b031663150b7a026130fc612b3e565b8786866040518563ffffffff1660e01b815260040161311e9493929190613af1565b602060405180830381600087803b15801561313857600080fd5b505af1925050508015613168575060408051601f3d908101601f1916820190925261316591810190613762565b60015b6131c2573d808015613196576040519150601f19603f3d011682016040523d82523d6000602084013e61319b565b606091505b5080516131ba5760405162461bcd60e51b8152600401610abc90613b92565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611112565b506001949350505050565b6001600160a01b03821661320d5760405162461bcd60e51b8152600401610abc90613f36565b61321681612b21565b156132335760405162461bcd60e51b8152600401610abc90613c6f565b61323f60008383610b74565b6001600160a01b03821660009081526003602052604081208054600192906132689084906142b4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461145260008383610b74565b6001600160a01b03163b151590565b8280546132e990614342565b90600052602060002090601f01602090048101928261330b5760008555613351565b82601f1061332457805160ff1916838001178555613351565b82800160010185558215613351579182015b82811115613351578251825591602001919060010190613336565b5061335d929150613361565b5090565b5b8082111561335d5760008155600101613362565b600061338961338484614280565b61424f565b905082815283838301111561339d57600080fd5b828260208301376000602084830101529392505050565b60008083601f8401126133c5578182fd5b50813567ffffffffffffffff8111156133dc578182fd5b60208301915083602080830285010111156133f657600080fd5b9250929050565b803580151581146109fe57600080fd5b600082601f83011261341d578081fd5b815161342b61338482614280565b81815284602083860101111561343f578283fd5b611112826020830160208701614316565b600060208284031215613461578081fd5b813561139a816143ee565b60006020828403121561347d578081fd5b815161139a816143ee565b6000806040838503121561349a578081fd5b82356134a5816143ee565b915060208301356134b5816143ee565b809150509250929050565b6000806000606084860312156134d4578081fd5b83356134df816143ee565b925060208401356134ef816143ee565b929592945050506040919091013590565b60008060008060808587031215613515578081fd5b8435613520816143ee565b93506020850135613530816143ee565b925060408501359150606085013567ffffffffffffffff811115613552578182fd5b8501601f81018713613562578182fd5b61357187823560208401613376565b91505092959194509250565b6000806040838503121561358f578182fd5b823561359a816143ee565b91506135a8602084016133fd565b90509250929050565b600080604083850312156135c3578182fd5b82356135ce816143ee565b946020939093013593505050565b600080602083850312156135ee578081fd5b823567ffffffffffffffff811115613604578182fd5b613610858286016133b4565b90969095509350505050565b60008060008060408587031215613631578182fd5b843567ffffffffffffffff80821115613648578384fd5b613654888389016133b4565b9096509450602087013591508082111561366c578384fd5b50613679878288016133b4565b95989497509550505050565b60006020808385031215613697578182fd5b825167ffffffffffffffff808211156136ae578384fd5b818501915085601f8301126136c1578384fd5b8151818111156136d3576136d36143d8565b83810291506136e384830161424f565b8181528481019084860184860187018a10156136fd578788fd5b8795505b8386101561371f578051835260019590950194918601918601613701565b5098975050505050505050565b60006020828403121561373d578081fd5b61139a826133fd565b600060208284031215613757578081fd5b813561139a81614403565b600060208284031215613773578081fd5b815161139a81614403565b60006020828403121561378f578081fd5b813567ffffffffffffffff8111156137a5578182fd5b8201601f810184136137b5578182fd5b61111284823560208401613376565b600080604083850312156137d6578182fd5b825167ffffffffffffffff808211156137ed578384fd5b6137f98683870161340d565b9350602085015191508082111561380e578283fd5b5061381b8582860161340d565b9150509250929050565b600060208284031215613836578081fd5b5035919050565b60006020828403121561384e578081fd5b5051919050565b60008060408385031215613867578182fd5b8235915060208301356134b5816143ee565b6000806040838503121561388b578182fd5b50508035926020909101359150565b6000806000606084860312156138ae578081fd5b833592506020840135915060408401356138c7816143ee565b809150509250925092565b600080600080600060a086880312156138e9578283fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008151808452613924816020860160208601614316565b601f01601f19169290920160200192915050565b6000815161394a818560208601614316565b9290920192915050565b64173539b7b760d91b815260050190565b9586526bffffffffffffffffffffffff19606095861b8116602088015293851b8416603487015291841b83166048860152831b8216605c85015290911b16607082015260840190565b600082516139c0818460208701614316565b9190910192915050565b82546000908190600281046001808316806139e657607f831692505b6020808410821415613a0657634e487b7160e01b87526022600452602487fd5b818015613a1a5760018114613a2b57613a57565b60ff19861689528489019650613a57565b613a348b6142a8565b885b86811015613a4f5781548b820152908501908301613a36565b505084890196505b505050505050613a6f613a6a8286613938565b613954565b95945050505050565b60007f68747470733a2f2f7366767066702e73332e616d617a6f6e6177732e636f6d2f825267707265766965772f60c01b60208301528251613ac1816028850160208701614316565b64173539b7b760d91b6028939091019283015250602d01919050565b6001600160a01b0391909116815260200190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906117359083018461390c565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b60006020825261139a602083018461390c565b60208082526017908201527f457863656564656420616c6c6f77656420616d6f756e74000000000000000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252601d908201527f416d6f756e74206f66206574686572206973206e6f7420656e6f756768000000604082015260600190565b60208082526010908201526f185b1c9958591e481c995d99585b195960821b604082015260600190565b6020808252600f908201526e73616c65206e6f742061637469766560881b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252602f908201527f5468697320776f756c642065786365656420746865206d6178206e756d62657260408201526e081bd988185b1b1bddd959081b999d608a1b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526037908201527f5468697320776f756c642065786365656420746865206d6178206e756d62657260408201527f206f6620616c6c6f77656420666f7220776c2073616c65000000000000000000606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526010908201526f6e6f7420656e6f756768206d6f6e657960801b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260099082015268302062616c616e636560b81b604082015260600190565b60208082526017908201527f636f6c6c656374696f6e2066756c6c79206d696e746564000000000000000000604082015260600190565b6020808252601190820152704e6f2070726573616c652061637469766560781b604082015260600190565b6020808252600990820152683737ba1037bbb732b960b91b604082015260600190565b6020808252602a908201527f546869732061646472657373206973206e6f7420617574686f72697a656420666040820152696f722070726573616c6560b01b606082015260800190565b90815260200190565b604051601f8201601f1916810167ffffffffffffffff81118282101715614278576142786143d8565b604052919050565b600067ffffffffffffffff82111561429a5761429a6143d8565b50601f01601f191660200190565b60009081526020902090565b600082198211156142c7576142c76143ac565b500190565b6000826142db576142db6143c2565b500490565b60008160001904831182151516156142fa576142fa6143ac565b500290565b600082821015614311576143116143ac565b500390565b60005b83811015614331578181015183820152602001614319565b838111156122dc5750506000910152565b60028104600182168061435657607f821691505b6020821081141561437757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614391576143916143ac565b5060010190565b6000826143a7576143a76143c2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461132757600080fd5b6001600160e01b03198116811461132757600080fdfea2646970667358221220a9f00c29829249fbd0ec1f4396d7b936fd49b51f1afa23e64e487d85b320d68064736f6c63430008010033

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

000000000000000000000000d8f4f61001256def1908e0ec724c541b38b8ec280000000000000000000000000000000000000000000000000000000000002710

-----Decoded View---------------
Arg [0] : _fp (address): 0xd8F4F61001256Def1908e0ec724c541b38b8Ec28
Arg [1] : supply (uint256): 10000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d8f4f61001256def1908e0ec724c541b38b8ec28
Arg [1] : 0000000000000000000000000000000000000000000000000000000000002710


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.