ETH Price: $3,580.36 (+1.92%)
Gas: 40 Gwei

Contract

0xB68b18F5B87d5fDB4111b966A6fb2EfcAEb6e7A6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Set Approval For...195098732024-03-25 6:58:233 days ago1711349903IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0009600320.79216606
Set Approval For...186351212023-11-23 14:46:59126 days ago1700750819IN
0xB68b18F5...cAEb6e7A6
0 ETH0.001934641.8989669
Set Approval For...184159132023-10-23 22:20:47156 days ago1698099647IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0008214117.79
Set Approval For...182952302023-10-07 1:08:23173 days ago1696640903IN
0xB68b18F5...cAEb6e7A6
0 ETH0.000131365
Set Approval For...182952302023-10-07 1:08:23173 days ago1696640903IN
0xB68b18F5...cAEb6e7A6
0 ETH0.000230865
Set Approval For...174669272023-06-12 22:27:23289 days ago1686608843IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0008678218.79507305
Set Approval For...173347922023-05-25 7:50:35308 days ago1685001035IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0012270426.57493749
Set Approval For...168226072023-03-14 0:23:47380 days ago1678753427IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0004551718.76156357
Set Approval For...167883392023-03-09 4:42:11385 days ago1678336931IN
0xB68b18F5...cAEb6e7A6
0 ETH0.001368129.62993523
Set Approval For...167181862023-02-27 7:56:23395 days ago1677484583IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0003863814.7063718
Set Approval For...167181862023-02-27 7:56:23395 days ago1677484583IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0006790314.7063718
Set Approval For...166715532023-02-20 18:31:11401 days ago1676917871IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0008711233.1568143
Set Approval For...166715532023-02-20 18:31:11401 days ago1676917871IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0015282233.09770541
Set Approval For...166230992023-02-13 23:24:47408 days ago1676330687IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0011350424.5824787
Set Approval For...164877522023-01-26 1:36:59427 days ago1674697019IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0004688517.78851576
Set Approval For...164870292023-01-25 23:11:23427 days ago1674688283IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0010968923.71302714
Set Approval For...164151762023-01-15 22:27:23437 days ago1673821643IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0004937420.35130267
Set Approval For...163703842023-01-09 16:17:23443 days ago1673281043IN
0xB68b18F5...cAEb6e7A6
0 ETH0.001943942.02403918
Set Approval For...162553442022-12-24 14:58:59460 days ago1671893939IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0004934810.68782212
Set Approval For...162475392022-12-23 12:51:59461 days ago1671799919IN
0xB68b18F5...cAEb6e7A6
0 ETH0.000628313.60756027
Set Approval For...161823522022-12-14 10:31:35470 days ago1671013895IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0005855712.68223819
Set Approval For...160868262022-12-01 1:59:35483 days ago1669859975IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0006208513.44620109
Set Approval For...160868252022-12-01 1:59:23483 days ago1669859963IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0006580214.22551061
Set Approval For...160868252022-12-01 1:59:23483 days ago1669859963IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0006580214.22551061
Set Approval For...160378002022-11-24 5:37:59490 days ago1669268279IN
0xB68b18F5...cAEb6e7A6
0 ETH0.0005498611.90879774
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MutantDudes

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion
File 1 of 21 : MutantDudes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A.sol";
import "./extensions/ERC721AQueryable.sol";

import "./CryptoDudesNFTCommunity.sol";
import "./CryptoDudesGlassNFT.sol";

contract MutantDudes is Ownable, ERC721A, ERC721AQueryable, PaymentSplitter {

    using Strings for uint;

    enum Step {
        Gift,
        Sale,
        End,
        Revealed,
        Frozen
    }

    Step public sellingStep;

    //settings ----
    uint public MAX_SUPPLY = 2222;
    uint public MAX_GIFT = 22;

    //during public mint, max mint per wallet
    uint public MAX_NFT_PER_WALLET = 1;

    uint public DUDES_DURATION = 120 minutes;
    uint public WHITELIST_DURATION = 120 minutes;

    uint public wlSalePrice = 0 ether;
    uint public publicSalePrice = 0 ether;

    uint public saleStartTime = 1667235600;  //31 oct 16 pm utc

    //whitelist public
    bytes32 public merkleRoot;
    

    //URI of the NFTs when revealed
    string public baseURI;

    //URI of the NFTs when not revealed
    string public notRevealedURI;

    //keep track of minted nft during public mint
    mapping(address => uint) public amountNFTsperWallet;

    //keep track of claim list for whitelist
    mapping(address => bool) public hasAlreadyClaimedWL;
    
    //CryptoDudes NFT address
    address public cryptodudesNFTAddress;

    //White Russian NFT address
    address public whiterussianNFTAddress;

    //team share length
    uint private teamLength;

    //used Dudes & WR
    mapping(uint => bool) public cryptodudesUsed;
    mapping(uint => bool) public WRUsed;
    

    // **********************************************************************************
    // *********** CONSTRUCTOR 
    // **********************************************************************************

    constructor(address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRoot, string memory _notRevealedURI, uint _startTime, address _cryptodudesNFTAddress, address _whiterussianNFTAddress) ERC721A("MutantDudes", "MUTANTDUDES") PaymentSplitter(_team, _teamShares) {
        merkleRoot = _merkleRoot;
        notRevealedURI = _notRevealedURI;
        teamLength = _team.length;
        saleStartTime = _startTime;
        cryptodudesNFTAddress = _cryptodudesNFTAddress;
        whiterussianNFTAddress = _whiterussianNFTAddress;
    }

    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }

    // **********************************************************************************
    // *********** DUDES + WR MINT
    // **********************************************************************************

    function min(uint a, uint b) public pure returns (uint) {
        return a <= b ? a : b;
    }

    function DudesWRMint(address _account, uint[] calldata tokenIdsDudes, address _nftContractDudes, uint[] calldata tokenIdsWR, address _nftContractWR) external payable callerIsUser {
        uint tokenId;
        uint quantity = 0;
        uint nbCryptoDudes = 0;
        uint nbWR = 0;
        CryptoDudesNFTCommunity cryptodudes;
        CryptoDudesGlassNFT whiterussian;

        // check times after startime and before starttime + whitelist duration
        require(currentTime() >= saleStartTime, "Mint has not started yet");
        require(currentTime() <= saleStartTime + DUDES_DURATION + WHITELIST_DURATION, "Whitelist finished");
        require(sellingStep == Step.Sale, "MintWR is not activated");
        require(tokenIdsDudes.length > 0, "No token Ids provided");
        require(tokenIdsWR.length > 0, "No token Ids provided");
        
        require(_nftContractDudes == cryptodudesNFTAddress, "Bad D");
        require(_nftContractWR == whiterussianNFTAddress, "Bad WR");

        //check max amount to mint Dudes
        cryptodudes = CryptoDudesNFTCommunity(payable(_nftContractDudes));
        for(uint i = 0; i < tokenIdsDudes.length ; i++){
            tokenId = tokenIdsDudes[i];
            if ( cryptodudes.ownerOf(tokenId) == msg.sender && cryptodudesUsed[tokenId] == false) {
                nbCryptoDudes += 1;
                cryptodudesUsed[tokenId] = true;
            }
        }

        //check max amount to mint WR
        whiterussian = CryptoDudesGlassNFT(payable(_nftContractWR));
        for(uint i = 0; i < tokenIdsWR.length ; i++){
            tokenId = tokenIdsWR[i];
            if ( whiterussian.ownerOf(tokenId) == msg.sender && WRUsed[tokenId] == false) {
                nbWR += 1;
                WRUsed[tokenId] = true;
            }
        }

        quantity = min(nbCryptoDudes,nbWR);

        require (quantity > 0, "No more !");
        require(totalSupply() + quantity <= MAX_SUPPLY, "Max Supply exceeded (WR)");

        
        // if we reach the max minted here, automatically switch to the End Step (team and gift mint)
        // no overallocation, so we don't try to lower the quantity if needed
        if (totalSupply() + quantity == MAX_SUPPLY) {
            sellingStep = Step.End;
        }

        // mint
        _safeMint(_account, quantity);
    }

    // **********************************************************************************
    // *********** WHITE LIST MINT
    // **********************************************************************************

    function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
        uint price = wlSalePrice;

        // check times after startime and before starttime + whitelist duration
        require(currentTime() >= saleStartTime + DUDES_DURATION, "Mint has not started yet");
        require(currentTime() <= saleStartTime + DUDES_DURATION + WHITELIST_DURATION, "Whitelist finished");
        require(sellingStep == Step.Sale, "WL mint is not activated");
        require(isWhiteListed(msg.sender, 1, _proof), "You are not whitelisted");
        require(hasAlreadyClaimedWL[msg.sender] == false, "Whitelist already used");
        require(totalSupply() + _quantity <= MAX_SUPPLY, "Max Supply exceeded (WL)");

        // are you sending enough eth -  0 for free mint
        require(msg.value >= price * _quantity, "Not enought funds");

        // if we reach the max minted here, automatically switch to the End Step (team and gift mint)
        if (totalSupply() + _quantity == MAX_SUPPLY) {
            sellingStep = Step.End;
        }

        // mint
        hasAlreadyClaimedWL[msg.sender] = true;
        _safeMint(_account, _quantity);
    }

    // **********************************************************************************
    // *********** PUBLIC MINT 
    // **********************************************************************************

    function publicSaleMint(address _account, uint _quantity, bytes32[] calldata _proof, address _merkleAddr) external payable callerIsUser {
        uint price = publicSalePrice;

        // check times after the whitelist phase only
        require(currentTime() > saleStartTime + DUDES_DURATION + WHITELIST_DURATION, "Mint has not started yet");
        require(sellingStep == Step.Sale, "Mint activated");
        require(isWhiteListed(_merkleAddr, 1, _proof), "Need a proof");
        require(amountNFTsperWallet[msg.sender] + _quantity <= MAX_NFT_PER_WALLET, "You can only get X NFTs");
        require(totalSupply() + _quantity <= MAX_SUPPLY, "Max supply exceeded");   

        // are you sending enough eth
        require(msg.value >= price * _quantity, "Not enought funds");

        // if we reach the max minted here, automatically switch to the End Step (team and gift mint)
        if (totalSupply() + _quantity == MAX_SUPPLY) {
            sellingStep = Step.End;
        }

        // mint
        amountNFTsperWallet[msg.sender] += _quantity;
        _safeMint(_account, _quantity); 
    }

    // **********************************************************************************
    // *********** TEAM AND GIFTS MINT 
    // **********************************************************************************

    function gift(address _to, uint _quantity) external onlyOwner {
        require(sellingStep == Step.Gift, "Gift phase only");
        require(totalSupply() + _quantity <= MAX_GIFT, "Can't gift more than MAX_GIFT");

        if (totalSupply() + _quantity == MAX_GIFT) {
            sellingStep = Step.Sale;
        }
        _safeMint(_to, _quantity);
    }


    // **********************************************************************************
    // *********** BASE URI SETTINGS  
    // **********************************************************************************

    function setRevealedURI(string memory _baseURI) external onlyOwner {
        require(sellingStep == Step.End, "revealed URI after the sales");
        sellingStep = Step.Revealed;
        baseURI = _baseURI;
    }

    function currentTime() internal view returns(uint) {
        return block.timestamp;
    }

    function setStep(uint _step) external onlyOwner {
        require(sellingStep != Step.Frozen, "Set selling steps is now frozen!");
        sellingStep = Step(_step);
    }

    function setNotRevealedURI(string memory _notRevealedURI) external onlyOwner {
        notRevealedURI = _notRevealedURI;
    }

    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId), "URI query for nonexistent token");

        if(sellingStep < Step.Revealed) {
            return notRevealedURI;
        }
        
        return string(abi.encodePacked(baseURI, _tokenId.toString(), ".json"));

    }

    // **********************************************************************************
    // *********** merkle tree functions
    // **********************************************************************************

    function leaf(address _account, uint256 _amount) internal pure returns(bytes32) {
        return keccak256(abi.encodePacked(_account,_amount));
    }

    // --- whitelist
    function isWhiteListed(address _account, uint256 _amount,  bytes32[] calldata _proof) internal view returns(bool) {
        return _verify(leaf(_account, _amount), _proof);
    }

    function _verify(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
        return MerkleProof.verify(_proof, merkleRoot, _leaf);
    }

    // **********************************************************************************
    // *********** settings can ONLY be changed before the sale start time 
    // **********************************************************************************

    function setSaleStartTime(uint _saleStartTime) external onlyOwner {
        require(currentTime() < saleStartTime,"Sale has already started");
        saleStartTime = _saleStartTime;
    }


    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
    }

    function setSupply(uint _maxSupply, uint _maxGift) external onlyOwner {
        MAX_SUPPLY = _maxSupply;                // 5555
        MAX_GIFT = _maxGift;                    //   55 
    }
   
    function setMaxMintPerWallet(uint _maxMintPerWallet) external onlyOwner {
        MAX_NFT_PER_WALLET = _maxMintPerWallet;
    }
   
    function setWhitelistDuration(uint _duration) external onlyOwner {
        WHITELIST_DURATION = _duration;
    }

    function setDudesDuration(uint _duration) external onlyOwner {
        DUDES_DURATION = _duration;
    }

    function setWhitelistPrice(uint _wlPrice) external onlyOwner {
        wlSalePrice = _wlPrice;
    }
   
    function setPublicPrice(uint _price) external onlyOwner {
        publicSalePrice = _price;
    }

    // ********** end settings **********************************************************

    

    // ReleaseALL sale funds
    function releaseAll() external {
        for(uint i = 0 ; i < teamLength ; i++) {
            release(payable(payee(i)));
        }
    }

    receive() override external payable {
        revert('Only if you mint');
    }

}

File 2 of 21 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721A {
    using Address for address;
    using Strings for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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;

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

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

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

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

    /**
     * @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 override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

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

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

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        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 override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

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

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

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

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

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

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

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

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

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

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

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

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

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

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

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

File 3 of 21 : CryptoDudesGlassNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

//@author Mia Dude
//@title CryptoDudes NFT

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A.sol";
import "./extensions/ERC721AQueryable.sol";
import "./CryptoDudesNFTCommunity.sol";

contract CryptoDudesGlassNFT is Ownable, ERC721A, ERC721AQueryable {

    using Strings for uint;

    //URI of the NFTs when revealed
    string public baseURI;

    //start mint time
    uint public saleStartTime = 1659888000;

     //the current max supply
    uint public MAX_SUPPLY = 2222;

    // tokenId already minted ? => bool
   
    //mapping (uint => bool) isGlassMinted keep track of tokenid used, by nft contract;
    mapping(address => mapping(uint => bool)) public isGlassMinted;

    //nft contracts allowed to claim some free glass of white russian
    mapping(address => bool) isNFTContractAllowed;

    // **********************************************************************************
    // *********** CONSTRUCTOR 
    // **********************************************************************************

    constructor(string memory _baseURI, address _nft) ERC721A("WhiteRussian", "WHITERUSSIAN")  {
        baseURI = _baseURI;
        isNFTContractAllowed[_nft] = true;
    }
     
    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }


    // **********************************************************************************
    // *********** PUBLIC MINT  
    // **********************************************************************************

    function publicMint(address _account, uint[] calldata tokenIds, address _nftContract) external callerIsUser {
        uint quantity = 0;
        uint tokenId;
        CryptoDudesNFTCommunity nft;

        require(currentTime() >= saleStartTime, "Public mint has not started yet");
        require(tokenIds.length > 0, "No CryptoDudesNFT token Ids provided");
        require(isNFTContractAllowed[_nftContract] == true, "NFT Contract not allowed");

        nft = CryptoDudesNFTCommunity(payable(_nftContract));

        for(uint i = 0; i < tokenIds.length ; i++){
            tokenId = tokenIds[i];
            if ( (nft.ownerOf(tokenId) == msg.sender) && (isGlassMinted[_nftContract][tokenId] == false) ) {
                isGlassMinted[_nftContract][tokenId] = true;
                quantity += 1;
            }
        }

        require (quantity > 0, "Ooops, no glass to mint for you");
        require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded");   

        _safeMint(_account, quantity);
    }

    // **********************************************************************************
    // *********** settings 
    // **********************************************************************************

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

    // we can update the max supply (ex: for a second collection, we could mint extra glasses of white russians for the cryptodudes)
   
    function updateMaxSupply(uint _maxSupply) external onlyOwner {
        MAX_SUPPLY = _maxSupply;
    }

    //add or remove authorized collection
    function updateAllowedContract(address _nftContract, bool _allowed) external onlyOwner {
        isNFTContractAllowed[_nftContract] = _allowed;
    }


    function currentTime() internal view returns(uint) {
        return block.timestamp;
    }

    //we can update this if we need to stop the glass mint, for a futur drop
    function setSaleStartTime(uint _saleStartTime) external onlyOwner {
        saleStartTime = _saleStartTime;
    }


    // **********************************************************************************

    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId), "URI query for nonexistent token");
        
        // uniq base uri, same glass
        return baseURI;
    }

}

File 4 of 21 : CryptoDudesNFTCommunity.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

//@author Mia Dude
//@title CryptoDudes NFT

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A.sol";
import "./extensions/ERC721AQueryable.sol";

contract CryptoDudesNFTCommunity is Ownable, ERC721A, ERC721AQueryable, PaymentSplitter {

    using Strings for uint;

    // *************** selling steps
    // Gift: Reserved for the team and gifts
    // Sale: whitelist and public sale
    // End: mint finished, we can call the setRevealedURI
    // Revealed: ! \o/

    


    enum Step {
        Gift,
        Sale,
        End,
        Revealed,
        Frozen
    }

    Step public sellingStep;

    //settings ----
    uint public MAX_SUPPLY = 2222;
    uint public MAX_WHITELISTCLAIM = 605;
    uint public MAX_PUBLIC = 1595;
    uint public MAX_GIFT = 22;

    uint public MAX_NFT_PER_WALLET = 2;

    uint public WHITELIST_DURATION = 720 minutes;

    uint public wlSalePrice = 0 ether;
    uint public publicSalePrice = 0 ether;

    // excluding gif and claim (we count here the whitelist mint + public mint)
    // so we are sure to keep in reserve the claimable dudes
    // max reallyMinted = max_public
    uint256 internal reallyMinted = 0;

    uint public claimStartTime = 1657125000;     // jul 6 18h30
    uint public saleStartTime = 1657135800;      // jul 6 21h30

    //claimable nft from first contract
    bytes32 public merkleRootClaimList;
    //whitelist public
    bytes32 public merkleRoot;
    

    //URI of the NFTs when revealed
    string public baseURI;

    //URI of the NFTs when not revealed
    string public notRevealedURI;

    //keep track of minted nft during public
    mapping(address => uint) public amountNFTsperWalletSale;

    //keep track of claim list
    mapping(address => bool) public hasAlreadyClaimed;

    //team share length
    uint private teamLength;

    // **********************************************************************************
    // *********** CONSTRUCTOR 
    // **********************************************************************************

    constructor(address[] memory _team, uint[] memory _teamShares, bytes32 _merkleRootClaimList, bytes32 _merkleRoot, string memory _notRevealedURI, uint _startTime, uint _claimStartTime) ERC721A("CryptoDudes", "CRYPTODUDES") PaymentSplitter(_team, _teamShares) {
        merkleRootClaimList = _merkleRootClaimList;
        merkleRoot = _merkleRoot;
        notRevealedURI = _notRevealedURI;
        teamLength = _team.length;
        saleStartTime = _startTime;
        claimStartTime = _claimStartTime;
    }

    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract");
        _;
    }


    // **********************************************************************************
    // *********** CLAIM NFTs from old contrat
    // **********************************************************************************

    function ClaimMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
        uint price = wlSalePrice;
      
        // check times , no, can be done anytime after the gift has been done
        require(currentTime() >= claimStartTime, "Claim mint has not started yet");
        require(sellingStep == Step.Sale, "Claim is not activated");
        require(hasAlreadyClaimed[msg.sender] == false, "You have already claimed your NFTs");
        require(isWhiteListedClaimList(msg.sender, _quantity, _proof), "You are not whitelisted for the claim list");

        // are you sending enough eth - should be set to 0 for the claim
        require(msg.value >= price * _quantity, "Not enought funds");

        // mint 
        hasAlreadyClaimed[msg.sender] = true;
        _safeMint(_account, _quantity);
    }

    // **********************************************************************************
    // *********** WHITE LIST MINT - PUBLIC MINT
    // **********************************************************************************

    function whitelistMint(address _account, uint _quantity, bytes32[] calldata _proof) external payable callerIsUser {
        uint price = wlSalePrice;

        // check times after startime and before starttime + whitelist duration
        require(currentTime() >= saleStartTime, "Whitelist mint has not started yet");
        require(currentTime() <= saleStartTime + WHITELIST_DURATION, "Whitelist Sale is finished");

        // are we in step sale, whitelisted, and trying to mint only MAX_NFT_PER_WALLET_WHITELIST
        require(sellingStep == Step.Sale, "Whitelist mint is not activated");
        //forced to 1, but we can mint any quantity if needed
        require(isWhiteListed(msg.sender, 1, _proof), "You are not whitelisted");
        require(amountNFTsperWalletSale[msg.sender] + _quantity <= MAX_NFT_PER_WALLET, "You can only get 2 NFTs during the free mint");

        // allow mint up to MAX_SUPPLY even during whitelist if list is big enough
        require(reallyMinted + _quantity <= MAX_PUBLIC, "Max Public supply exceeded");

        // are you sending enough eth - should be set to 0 for free mint
        require(msg.value >= price * _quantity, "Not enought funds");

        // if we reach the max minted here, automatically switch to the End Step (team and gift mint)
        if (totalSupply() + _quantity == MAX_SUPPLY) {
            sellingStep = Step.End;
        }

        // mint
        reallyMinted += _quantity;
        amountNFTsperWalletSale[msg.sender] += _quantity;
        _safeMint(_account, _quantity);
    }

    // **********************************************************************************
    // *********** PUBLIC MINT  same as whitelist , except we don't check the merketree whitelist
    // **********************************************************************************

    function publicSaleMint(address _account, uint _quantity) external payable callerIsUser {
        uint price = publicSalePrice;

        // check times after the whitelist phase only
        require(currentTime() > saleStartTime + WHITELIST_DURATION, "Public mint has not started yet");

        // are we in step sale, and trying to mint too many nft
        require(sellingStep == Step.Sale, "Public mint is not activated");
        require(amountNFTsperWalletSale[msg.sender] + _quantity <= MAX_NFT_PER_WALLET, "You can only get 2 NFTs during the free mint");
        

        // allow mint up to MAX_WHITELIST + MAX_PUBLIC during public mint
        require(reallyMinted + _quantity <= MAX_PUBLIC, "Max Public supply exceeded");   

        // are you sending enough eth
        require(msg.value >= price * _quantity, "Not enought funds");

        // if we reach the max minted here, automatically switch to the End Step (team and gift mint)
        if (totalSupply() + _quantity == MAX_SUPPLY) {
            sellingStep = Step.End;
        }

        // mint
        reallyMinted += _quantity;
        amountNFTsperWalletSale[msg.sender] += _quantity;
        _safeMint(_account, _quantity);
    }

    // **********************************************************************************
    // *********** TEAM AND GIFTS MINT 
    // **********************************************************************************

    function gift(address _to, uint _quantity) external onlyOwner {
        require(sellingStep == Step.Gift, "No Gift during the public sale");
        require(totalSupply() + _quantity <= MAX_GIFT, "Can't gift more than MAX_GIFT");

        if (totalSupply() + _quantity == MAX_GIFT) {
            sellingStep = Step.Sale;
        }
        _safeMint(_to, _quantity);
    }


    // **********************************************************************************
    // *********** BASE URI SETTINGS  
    // **********************************************************************************

    function setRevealedURI(string memory _baseURI) external onlyOwner {
        require(sellingStep == Step.End, "You can only update the revealed URI after the sales");
        sellingStep = Step.Revealed;
        baseURI = _baseURI;
    }

    function currentTime() internal view returns(uint) {
        return block.timestamp;
    }

    // Owner can update manually the steps (ex, if not sold out, switch to sellingStep 'End' allows to do the reveal, or if URI needs an emergency update)
    // Setting the step 'frozen' means that we can't go back to another step (setRevealedURI works only for the 'End' Step, so when frozen, nobody can change the metadatas URI)
    // as we are on IPFS, it's fully decentralized, and nobody will change the NFTs traits and images
    function setStep(uint _step) external onlyOwner {
        require(sellingStep != Step.Frozen, "Set selling steps is now frozen!");
        sellingStep = Step(_step);
    }

    function setNotRevealedURI(string memory _notRevealedURI) external onlyOwner {
        notRevealedURI = _notRevealedURI;
    }

    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId), "URI query for nonexistent token");

        if(sellingStep < Step.Revealed) {
            return notRevealedURI;
        }
        
        return string(abi.encodePacked(baseURI, _tokenId.toString(), ".json"));

    }

    // **********************************************************************************
    // *********** merkle tree functions
    // **********************************************************************************

    function leaf(address _account, uint256 _amount) internal pure returns(bytes32) {
        return keccak256(abi.encodePacked(_account,_amount));
    }

    //-- claim
    function isWhiteListedClaimList(address _account, uint256 _amount,  bytes32[] calldata _proof) internal view returns(bool) {
        return _verifyClaim(leaf(_account, _amount), _proof);
    }

    function _verifyClaim(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
        return MerkleProof.verify(_proof, merkleRootClaimList, _leaf);
    }

    // --- whitelist
    function isWhiteListed(address _account, uint256 _amount,  bytes32[] calldata _proof) internal view returns(bool) {
        return _verify(leaf(_account, _amount), _proof);
    }

    function _verify(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) {
        return MerkleProof.verify(_proof, merkleRoot, _leaf);
    }

    // **********************************************************************************
    // *********** settings can ONLY be changed before the sale start time 
    // **********************************************************************************

    function setSaleStartTime(uint _saleStartTime) external onlyOwner {
        require(currentTime() < saleStartTime,"Sale has already started");
        saleStartTime = _saleStartTime;
    }

     function setClaimStartTime(uint _claimStartTime) external onlyOwner {
        require(currentTime() < claimStartTime,"Sale has already started");
        claimStartTime = _claimStartTime;
    }

    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
    }

    function setMerkleRootClaim(bytes32 _merkleRootClaimList) external onlyOwner {     
        merkleRootClaimList = _merkleRootClaimList;
    }


    function setSupply(uint _maxSupply, uint _maxWhitelist, uint _maxPublic, uint _maxGift) external onlyOwner {
        require(_maxSupply == _maxWhitelist + _maxPublic + _maxGift,"Wrong supply count" );
        MAX_SUPPLY = _maxSupply;                // 2222
        MAX_WHITELISTCLAIM = _maxWhitelist;     //  570
        MAX_PUBLIC = _maxPublic;                // 1630
        MAX_GIFT = _maxGift;                    //   22 
    }
   
    function setMaxMintPerWallet(uint _maxMintPerWallet) external onlyOwner {
        MAX_NFT_PER_WALLET = _maxMintPerWallet;
    }
   
    function setWhitelistDuration(uint _duration) external onlyOwner {
        WHITELIST_DURATION = _duration;
    }

    function setWhitelistPrice(uint _wlPrice) external onlyOwner {
        wlSalePrice = _wlPrice;
    }
   
    function setPublicPrice(uint _price) external onlyOwner {
        publicSalePrice = _price;
    }

    // ********** end settings **********************************************************



    // ReleaseALL sale funds
    function releaseAll() external {
        for(uint i = 0 ; i < teamLength ; i++) {
            release(payable(payee(i)));
        }
    }

    receive() override external payable {
        revert('Only if you mint');
    }

}

File 5 of 21 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;


import './IERC721AQueryable.sol';
import '../ERC721A.sol';


/**
 * @title ERC721A Queryable
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _currentIndex) {
            return ownership;
        }
        ownership = _ownerships[tokenId];
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _currentIndex;
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, _currentIndex)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownerships[i];
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

File 9 of 21 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(token, account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 10 of 21 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';

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

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

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

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

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

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

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

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

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

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

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

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

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     * 
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 12 of 21 : 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 13 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 21 : 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 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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`.
     *
     * 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;

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

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

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

File 16 of 21 : 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 17 of 21 : 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 18 of 21 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of an ERC721AQueryable compliant contract.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 19 of 21 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 20 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 21 of 21 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"_team","type":"address[]"},{"internalType":"uint256[]","name":"_teamShares","type":"uint256[]"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"string","name":"_notRevealedURI","type":"string"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"address","name":"_cryptodudesNFTAddress","type":"address"},{"internalType":"address","name":"_whiterussianNFTAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","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":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DUDES_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256[]","name":"tokenIdsDudes","type":"uint256[]"},{"internalType":"address","name":"_nftContractDudes","type":"address"},{"internalType":"uint256[]","name":"tokenIdsWR","type":"uint256[]"},{"internalType":"address","name":"_nftContractWR","type":"address"}],"name":"DudesWRMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"MAX_GIFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NFT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"WRUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountNFTsperWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cryptodudesNFTAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cryptodudesUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasAlreadyClaimedWL","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":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"address","name":"_merkleAddr","type":"address"}],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releaseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":[],"name":"saleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellingStep","outputs":[{"internalType":"enum MutantDudes.Step","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setDudesDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintPerWallet","type":"uint256"}],"name":"setMaxMintPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPublicPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleStartTime","type":"uint256"}],"name":"setSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_step","type":"uint256"}],"name":"setStep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxGift","type":"uint256"}],"name":"setSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setWhitelistDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wlPrice","type":"uint256"}],"name":"setWhitelistPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"whiterussianNFTAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526108ae60115560166012556001601355611c20601455611c206015556000601655600060175563635fff106018553480156200003f57600080fd5b5060405162005281380380620052818339810160408190526200006291620006af565b86866040518060400160405280600b81526020016a4d7574616e74447564657360a81b8152506040518060400160405280600b81526020016a4d5554414e54445544455360a81b815250620000c6620000c0620002a260201b60201c565b620002a6565b8151620000db906003906020850190620004e4565b508051620000f1906004906020840190620004e4565b506000600155505080518251146200016b5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001be5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000162565b60005b825181101562000242576200022d838281518110620001f057634e487b7160e01b600052603260045260246000fd5b60200260200101518383815181106200021957634e487b7160e01b600052603260045260246000fd5b6020026020010151620002f660201b60201c565b80620002398162000890565b915050620001c1565b505050601985905583516200025f90601b906020870190620004e4565b509551602055601891909155601e80546001600160a01b039283166001600160a01b031991821617909155601f80549290961691161790935550620008da915050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216620003635760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000162565b60008111620003b55760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000162565b6001600160a01b0382166000908152600b602052604090205415620004315760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000162565b600d8054600181019091557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384169081179091556000908152600b602052604090208190556009546200049b90829062000838565b600955604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054620004f29062000853565b90600052602060002090601f01602090048101928262000516576000855562000561565b82601f106200053157805160ff191683800117855562000561565b8280016001018555821562000561579182015b828111156200056157825182559160200191906001019062000544565b506200056f92915062000573565b5090565b5b808211156200056f576000815560010162000574565b80516001600160a01b0381168114620005a257600080fd5b919050565b600082601f830112620005b8578081fd5b81516020620005d1620005cb8362000812565b620007df565b80838252828201915082860187848660051b8901011115620005f1578586fd5b855b858110156200061157815184529284019290840190600101620005f3565b5090979650505050505050565b600082601f8301126200062f578081fd5b81516001600160401b038111156200064b576200064b620008c4565b602062000661601f8301601f19168201620007df565b828152858284870101111562000675578384fd5b835b838110156200069457858101830151828201840152820162000677565b83811115620006a557848385840101525b5095945050505050565b600080600080600080600060e0888a031215620006ca578283fd5b87516001600160401b0380821115620006e1578485fd5b818a0191508a601f830112620006f5578485fd5b8151602062000708620005cb8362000812565b8083825282820191508286018f848660051b89010111156200072857898afd5b8996505b84871015620007555762000740816200058a565b8352600196909601959183019183016200072c565b50918d0151919b509093505050808211156200076f578485fd5b6200077d8b838c01620005a7565b975060408a0151965060608a01519150808211156200079a578485fd5b50620007a98a828b016200061e565b94505060808801519250620007c160a089016200058a565b9150620007d160c089016200058a565b905092959891949750929550565b604051601f8201601f191681016001600160401b03811182821017156200080a576200080a620008c4565b604052919050565b60006001600160401b038211156200082e576200082e620008c4565b5060051b60200190565b600082198211156200084e576200084e620008ae565b500190565b600181811c908216806200086857607f821691505b602082108114156200088a57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620008a757620008a7620008ae565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b61499780620008ea6000396000f3fe6080604052600436106104185760003560e01c80637ae2b5c711610228578063c23dc68f11610128578063d6c29b4e116100bb578063e985e9c51161008a578063f2fde38b1161006f578063f2fde38b14610ccf578063f8dcbddb14610cef578063fc784d4914610d0f57600080fd5b8063e985e9c514610c66578063f2c4ce1e14610caf57600080fd5b8063d6c29b4e14610bef578063d79779b214610c05578063d7b1b21614610c3b578063e33b7de314610c5157600080fd5b8063ca7a18b9116100f7578063ca7a18b914610b42578063cbccefb214610b72578063cbce4c9714610b99578063ce7c2ac214610bb957600080fd5b8063c23dc68f14610ab5578063c45ac05014610ae2578063c627525514610b02578063c87b56dd14610b2257600080fd5b80639852595c116101bb578063a3f8eace1161018a578063acf4187d1161016f578063acf4187d14610a5f578063afdf613414610a75578063b88d4fde14610a9557600080fd5b8063a3f8eace14610a1f578063a825a99c14610a3f57600080fd5b80639852595c1461099357806399a2557a146109c95780639b6860c8146109e9578063a22cb465146109ff57600080fd5b80638462151c116101f75780638462151c146109135780638b83209b146109405780638da5cb5b1461096057806395d89b411461097e57600080fd5b80637ae2b5c7146108905780637cb64759146108b057806380b20937146108d05780638401be861461090057600080fd5b8063495f4bad116103335780635f26b6fd116102c6578063715018a611610295578063722503801161027a5780637225038014610845578063734c66bd1461085a57806376ee5df51461087057600080fd5b8063715018a614610810578063717d57d31461082557600080fd5b80635f26b6fd1461078b5780636352211e146107bb5780636c0360eb146107db57806370a08231146107f057600080fd5b8063525f8a5c11610302578063525f8a5c14610713578063571b1f8a146107335780635bbb2177146107495780635be7fde81461077657600080fd5b8063495f4bad146106a0578063499a4687146106b35780634b11faaf146106e057806351ae933e146106f357600080fd5b80632eb4a7ab116103ab5780633aeb4b3e1161037a5780633aeb4b3e146105fa578063406072a91461061a57806342842e0e1461066057806348b750441461068057600080fd5b80632eb4a7ab14610599578063326d4388146105af57806332cb6b0c146105cf5780633a98ef39146105e557600080fd5b806318160ddd116103e757806318160ddd1461052057806319165587146105435780631cbaee2d1461056357806323b872dd1461057957600080fd5b806301ffc9a71461046f57806306fdde03146104a4578063081812fc146104c6578063095ea7b3146104fe57600080fd5b3661046a5760405162461bcd60e51b815260206004820152601060248201527f4f6e6c7920696620796f75206d696e740000000000000000000000000000000060448201526064015b60405180910390fd5b600080fd5b34801561047b57600080fd5b5061048f61048a36600461445f565b610d2f565b60405190151581526020015b60405180910390f35b3480156104b057600080fd5b506104b9610e14565b60405161049b919061475c565b3480156104d257600080fd5b506104e66104e1366004614447565b610ea6565b6040516001600160a01b03909116815260200161049b565b34801561050a57600080fd5b5061051e610519366004614258565b610f03565b005b34801561052c57600080fd5b50600254600154035b60405190815260200161049b565b34801561054f57600080fd5b5061051e61055e366004614056565b610fbc565b34801561056f57600080fd5b5061053560185481565b34801561058557600080fd5b5061051e6105943660046140c6565b61115e565b3480156105a557600080fd5b5061053560195481565b3480156105bb57600080fd5b5061051e6105ca3660046144a9565b611169565b3480156105db57600080fd5b5061053560115481565b3480156105f157600080fd5b50600954610535565b34801561060657600080fd5b50601e546104e6906001600160a01b031681565b34801561062657600080fd5b50610535610635366004614497565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b34801561066c57600080fd5b5061051e61067b3660046140c6565b611209565b34801561068c57600080fd5b5061051e61069b366004614497565b611224565b61051e6106ae3660046142dd565b6113f0565b3480156106bf57600080fd5b506105356106ce366004614056565b601c6020526000908152604090205481565b61051e6106ee366004614283565b61170e565b3480156106ff57600080fd5b5061051e61070e366004614447565b611a74565b34801561071f57600080fd5b5061051e61072e366004614447565b611a81565b34801561073f57600080fd5b5061053560155481565b34801561075557600080fd5b50610769610764366004614383565b611adf565b60405161049b9190614691565b34801561078257600080fd5b5061051e611bd0565b34801561079757600080fd5b5061048f6107a6366004614447565b60216020526000908152604090205460ff1681565b3480156107c757600080fd5b506104e66107d6366004614447565b611bfe565b3480156107e757600080fd5b506104b9611c10565b3480156107fc57600080fd5b5061053561080b366004614056565b611c9e565b34801561081c57600080fd5b5061051e611d06565b34801561083157600080fd5b5061051e610840366004614447565b611d1a565b34801561085157600080fd5b506104b9611d27565b34801561086657600080fd5b5061053560165481565b34801561087c57600080fd5b50601f546104e6906001600160a01b031681565b34801561089c57600080fd5b506105356108ab366004614507565b611d34565b3480156108bc57600080fd5b5061051e6108cb366004614447565b611d4d565b3480156108dc57600080fd5b5061048f6108eb366004614056565b601d6020526000908152604090205460ff1681565b61051e61090e366004614183565b611d5a565b34801561091f57600080fd5b5061093361092e366004614056565b612395565b60405161049b91906146fc565b34801561094c57600080fd5b506104e661095b366004614447565b612522565b34801561096c57600080fd5b506000546001600160a01b03166104e6565b34801561098a57600080fd5b506104b9612560565b34801561099f57600080fd5b506105356109ae366004614056565b6001600160a01b03166000908152600c602052604090205490565b3480156109d557600080fd5b506109336109e436600461434f565b61256f565b3480156109f557600080fd5b5061053560175481565b348015610a0b57600080fd5b5061051e610a1a36600461422b565b612788565b348015610a2b57600080fd5b50610535610a3a366004614056565b612837565b348015610a4b57600080fd5b5061051e610a5a366004614447565b612878565b348015610a6b57600080fd5b5061053560145481565b348015610a8157600080fd5b5061051e610a90366004614447565b612885565b348015610aa157600080fd5b5061051e610ab0366004614106565b612892565b348015610ac157600080fd5b50610ad5610ad0366004614447565b6128f5565b60405161049b919061476f565b348015610aee57600080fd5b50610535610afd366004614497565b6129ce565b348015610b0e57600080fd5b5061051e610b1d366004614447565b612ac1565b348015610b2e57600080fd5b506104b9610b3d366004614447565b612ace565b348015610b4e57600080fd5b5061048f610b5d366004614447565b60226020526000908152604090205460ff1681565b348015610b7e57600080fd5b50601054610b8c9060ff1681565b60405161049b9190614734565b348015610ba557600080fd5b5061051e610bb4366004614258565b612c16565b348015610bc557600080fd5b50610535610bd4366004614056565b6001600160a01b03166000908152600b602052604090205490565b348015610bfb57600080fd5b5061053560125481565b348015610c1157600080fd5b50610535610c20366004614056565b6001600160a01b03166000908152600e602052604090205490565b348015610c4757600080fd5b5061053560135481565b348015610c5d57600080fd5b50600a54610535565b348015610c7257600080fd5b5061048f610c8136600461408e565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610cbb57600080fd5b5061051e610cca3660046144a9565b612d34565b348015610cdb57600080fd5b5061051e610cea366004614056565b612d4f565b348015610cfb57600080fd5b5061051e610d0a366004614447565b612ddc565b348015610d1b57600080fd5b5061051e610d2a366004614507565b612eab565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480610dc257507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610e0e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606060038054610e2390614864565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4f90614864565b8015610e9c5780601f10610e7157610100808354040283529160200191610e9c565b820191906000526020600020905b815481529060010190602001808311610e7f57829003601f168201915b5050505050905090565b6000610eb182612ebe565b610ee7576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610f0e82611bfe565b9050806001600160a01b0316836001600160a01b03161415610f5c576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614610fac57610f768133610c81565b610fac576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fb7838383612f03565b505050565b6001600160a01b0381166000908152600b60205260409020546110475760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610461565b600061105282612837565b9050806110c75760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610461565b6001600160a01b0382166000908152600c6020526040812080548392906110ef9084906147d6565b9250508190555080600a600082825461110891906147d6565b9091555061111890508282612f77565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b610fb7838383613090565b611171613332565b600260105460ff16600481111561119857634e487b7160e01b600052602160045260246000fd5b146111e55760405162461bcd60e51b815260206004820152601c60248201527f72657665616c656420555249206166746572207468652073616c6573000000006044820152606401610461565b6010805460ff19166003179055805161120590601a906020840190613f1b565b5050565b610fb783838360405180602001604052806000815250612892565b6001600160a01b0381166000908152600b60205260409020546112af5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610461565b60006112bb83836129ce565b9050806113305760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610461565b6001600160a01b038084166000908152600f60209081526040808320938616835292905290812080548392906113679084906147d6565b90915550506001600160a01b0383166000908152600e6020526040812080548392906113949084906147d6565b909155506113a5905083838361338c565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b32331461143f5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610461565b60175460155460145460185461145591906147d6565b61145f91906147d6565b42116114ad5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420686173206e6f7420737461727465642079657400000000000000006044820152606401610461565b600160105460ff1660048111156114d457634e487b7160e01b600052602160045260246000fd5b146115215760405162461bcd60e51b815260206004820152600e60248201527f4d696e74206163746976617465640000000000000000000000000000000000006044820152606401610461565b61152e826001868661340c565b61157a5760405162461bcd60e51b815260206004820152600c60248201527f4e65656420612070726f6f6600000000000000000000000000000000000000006044820152606401610461565b601354336000908152601c60205260409020546115989087906147d6565b11156115e65760405162461bcd60e51b815260206004820152601760248201527f596f752063616e206f6e6c79206765742058204e4654730000000000000000006044820152606401610461565b601154856115f76002546001540390565b61160191906147d6565b111561164f5760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610461565b6116598582614802565b3410156116a85760405162461bcd60e51b815260206004820152601160248201527f4e6f7420656e6f756768742066756e64730000000000000000000000000000006044820152606401610461565b601154856116b96002546001540390565b6116c391906147d6565b14156116d7576010805460ff191660021790555b336000908152601c6020526040812080548792906116f69084906147d6565b90915550611706905086866134b2565b505050505050565b32331461175d5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610461565b60165460145460185461177091906147d6565b4210156117bf5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420686173206e6f7420737461727465642079657400000000000000006044820152606401610461565b6015546014546018546117d291906147d6565b6117dc91906147d6565b42111561182b5760405162461bcd60e51b815260206004820152601260248201527f57686974656c6973742066696e697368656400000000000000000000000000006044820152606401610461565b600160105460ff16600481111561185257634e487b7160e01b600052602160045260246000fd5b1461189f5760405162461bcd60e51b815260206004820152601860248201527f574c206d696e74206973206e6f742061637469766174656400000000000000006044820152606401610461565b6118ac336001858561340c565b6118f85760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f742077686974656c69737465640000000000000000006044820152606401610461565b336000908152601d602052604090205460ff16156119585760405162461bcd60e51b815260206004820152601660248201527f57686974656c69737420616c72656164792075736564000000000000000000006044820152606401610461565b601154846119696002546001540390565b61197391906147d6565b11156119c15760405162461bcd60e51b815260206004820152601860248201527f4d617820537570706c792065786365656465642028574c2900000000000000006044820152606401610461565b6119cb8482614802565b341015611a1a5760405162461bcd60e51b815260206004820152601160248201527f4e6f7420656e6f756768742066756e64730000000000000000000000000000006044820152606401610461565b60115484611a2b6002546001540390565b611a3591906147d6565b1415611a49576010805460ff191660021790555b336000908152601d60205260409020805460ff19166001179055611a6d85856134b2565b5050505050565b611a7c613332565b601455565b611a89613332565b6018544210611ada5760405162461bcd60e51b815260206004820152601860248201527f53616c652068617320616c7265616479207374617274656400000000000000006044820152606401610461565b601855565b805160609060008167ffffffffffffffff811115611b0d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b5857816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611b2b5790505b50905060005b828114611bc857611b95858281518110611b8857634e487b7160e01b600052603260045260246000fd5b60200260200101516128f5565b828281518110611bb557634e487b7160e01b600052603260045260246000fd5b6020908102919091010152600101611b5e565b509392505050565b60005b602054811015611bfb57611be961055e82612522565b80611bf38161489f565b915050611bd3565b50565b6000611c09826134cc565b5192915050565b601a8054611c1d90614864565b80601f0160208091040260200160405190810160405280929190818152602001828054611c4990614864565b8015611c965780601f10611c6b57610100808354040283529160200191611c96565b820191906000526020600020905b815481529060010190602001808311611c7957829003601f168201915b505050505081565b60006001600160a01b038216611ce0576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b611d0e613332565b611d186000613655565b565b611d22613332565b601655565b601b8054611c1d90614864565b600081831115611d445781611d46565b825b9392505050565b611d55613332565b601955565b323314611da95760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610461565b60008060009050600080600080601854611dc04290565b1015611e0e5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420686173206e6f7420737461727465642079657400000000000000006044820152606401610461565b601554601454601854611e2191906147d6565b611e2b91906147d6565b421115611e7a5760405162461bcd60e51b815260206004820152601260248201527f57686974656c6973742066696e697368656400000000000000000000000000006044820152606401610461565b600160105460ff166004811115611ea157634e487b7160e01b600052602160045260246000fd5b14611eee5760405162461bcd60e51b815260206004820152601760248201527f4d696e745752206973206e6f74206163746976617465640000000000000000006044820152606401610461565b8a611f3b5760405162461bcd60e51b815260206004820152601560248201527f4e6f20746f6b656e204964732070726f766964656400000000000000000000006044820152606401610461565b87611f885760405162461bcd60e51b815260206004820152601560248201527f4e6f20746f6b656e204964732070726f766964656400000000000000000000006044820152606401610461565b601e546001600160a01b038b8116911614611fe55760405162461bcd60e51b815260206004820152600560248201527f42616420440000000000000000000000000000000000000000000000000000006044820152606401610461565b601f546001600160a01b038881169116146120425760405162461bcd60e51b815260206004820152600660248201527f42616420575200000000000000000000000000000000000000000000000000006044820152606401610461565b89915060005b8b811015612164578c8c8281811061207057634e487b7160e01b600052603260045260246000fd5b905060200201359650336001600160a01b0316836001600160a01b0316636352211e896040518263ffffffff1660e01b81526004016120b191815260200190565b60206040518083038186803b1580156120c957600080fd5b505afa1580156120dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121019190614072565b6001600160a01b0316148015612126575060008781526021602052604090205460ff16155b15612152576121366001866147d6565b6000888152602160205260409020805460ff1916600117905594505b8061215c8161489f565b915050612048565b5086905060005b888110156122875789898281811061219357634e487b7160e01b600052603260045260246000fd5b905060200201359650336001600160a01b0316826001600160a01b0316636352211e896040518263ffffffff1660e01b81526004016121d491815260200190565b60206040518083038186803b1580156121ec57600080fd5b505afa158015612200573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122249190614072565b6001600160a01b0316148015612249575060008781526022602052604090205460ff16155b15612275576122596001856147d6565b6000888152602260205260409020805460ff1916600117905593505b8061227f8161489f565b91505061216b565b506122928484611d34565b9450600085116122e45760405162461bcd60e51b815260206004820152600960248201527f4e6f206d6f7265202100000000000000000000000000000000000000000000006044820152606401610461565b601154856122f56002546001540390565b6122ff91906147d6565b111561234d5760405162461bcd60e51b815260206004820152601860248201527f4d617820537570706c79206578636565646564202857522900000000000000006044820152606401610461565b6011548561235e6002546001540390565b61236891906147d6565b141561237c576010805460ff191660021790555b6123868d866134b2565b50505050505050505050505050565b606060008060006123a585611c9e565b905060008167ffffffffffffffff8111156123d057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156123f9578160200160208202803683370190505b50604080516060810182526000808252602082018190529181018290529192505b83861461251657600081815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161580159282019290925292506124ab5761250e565b81516001600160a01b0316156124c057815194505b876001600160a01b0316856001600160a01b0316141561250e578083878060010198508151811061250157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b60010161241a565b50909695505050505050565b6000600d828154811061254557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b606060048054610e2390614864565b60608183106125aa576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154600090808411156125bc578093505b60006125c787611c9e565b9050848610156125e657858503818110156125e0578091505b506125ea565b5060005b60008167ffffffffffffffff81111561261357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561263c578160200160208202803683370190505b5090508161264f579350611d4692505050565b600061265a886128f5565b90506000816040015161266b575080515b885b88811415801561267d5750848714155b1561277757600081815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff1615801592820192909252935061270c5761276f565b82516001600160a01b03161561272157825191505b8a6001600160a01b0316826001600160a01b0316141561276f578084888060010199508151811061276257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b60010161266d565b505050928352509095945050505050565b6001600160a01b0382163314156127cb576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612843600a5490565b61284d90476147d6565b9050611d468382612873866001600160a01b03166000908152600c602052604090205490565b6136bd565b612880613332565b601555565b61288d613332565b601355565b61289d848484613090565b6001600160a01b0383163b156128ef576128b9848484846136fb565b6128ef576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080516060808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052909150600154831061293a5792915050565b50600082815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff1615801592820192909252906129c55792915050565b611d46836134cc565b6001600160a01b0382166000908152600e602052604081205481906040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038616906370a082319060240160206040518083038186803b158015612a4157600080fd5b505afa158015612a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7991906144ef565b612a8391906147d6565b6001600160a01b038086166000908152600f6020908152604080832093881683529290522054909150612ab990849083906136bd565b949350505050565b612ac9613332565b601755565b6060612ad982612ebe565b612b255760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610461565b600360105460ff166004811115612b4c57634e487b7160e01b600052602160045260246000fd5b1015612be457601b8054612b5f90614864565b80601f0160208091040260200160405190810160405280929190818152602001828054612b8b90614864565b8015612bd85780601f10612bad57610100808354040283529160200191612bd8565b820191906000526020600020905b815481529060010190602001808311612bbb57829003601f168201915b50505050509050919050565b601a612bef83613852565b604051602001612c0092919061458c565b6040516020818303038152906040529050919050565b612c1e613332565b600060105460ff166004811115612c4557634e487b7160e01b600052602160045260246000fd5b14612c925760405162461bcd60e51b815260206004820152600f60248201527f47696674207068617365206f6e6c7900000000000000000000000000000000006044820152606401610461565b60125481612ca36002546001540390565b612cad91906147d6565b1115612cfb5760405162461bcd60e51b815260206004820152601d60248201527f43616e27742067696674206d6f7265207468616e204d41585f474946540000006044820152606401610461565b60125481612d0c6002546001540390565b612d1691906147d6565b1415612d2a576010805460ff191660011790555b61120582826134b2565b612d3c613332565b805161120590601b906020840190613f1b565b612d57613332565b6001600160a01b038116612dd35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610461565b611bfb81613655565b612de4613332565b600460105460ff166004811115612e0b57634e487b7160e01b600052602160045260246000fd5b1415612e595760405162461bcd60e51b815260206004820181905260248201527f5365742073656c6c696e67207374657073206973206e6f772066726f7a656e216044820152606401610461565b806004811115612e7957634e487b7160e01b600052602160045260246000fd5b6010805460ff19166001836004811115612ea357634e487b7160e01b600052602160045260246000fd5b021790555050565b612eb3613332565b601191909155601255565b600060015482108015610e0e5750506000908152600560205260409020547c0100000000000000000000000000000000000000000000000000000000900460ff161590565b60008281526007602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b80471015612fc75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610461565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613014576040519150601f19603f3d011682016040523d82523d6000602084013e613019565b606091505b5050905080610fb75760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610461565b600061309b826134cc565b9050836001600160a01b031681600001516001600160a01b0316146130ec576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b038616148061310a575061310a8533610c81565b8061312557503361311a84610ea6565b6001600160a01b0316145b90508061315e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661319e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131aa60008487612f03565b6001600160a01b03858116600090815260066020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080547fffffffff000000000000000000000000000000000000000000000000000000001690941774010000000000000000000000000000000000000000429092169190910217835587018084529220805491939091166132e95760015482146132e9578054602086015167ffffffffffffffff1674010000000000000000000000000000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611a6d565b6000546001600160a01b03163314611d185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610461565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610fb79084906139a0565b60006134a961347086866040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b1660208201526034810182905260009060540160405160208183030381529060405280519060200120905092915050565b848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613a8592505050565b95945050505050565b611205828260405180602001604052806000815250613a94565b60408051606081018252600080825260208201819052918101919091528160015481101561362357600081815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161515918101829052906136215780516001600160a01b03161561358d579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b03811680835274010000000000000000000000000000000000000000820467ffffffffffffffff16938301939093527c0100000000000000000000000000000000000000000000000000000000900460ff161515928101929092521561361c579392505050565b61358d565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546001600160a01b0384166000908152600b6020526040812054909183916136e79086614802565b6136f191906147ee565b612ab99190614821565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290613749903390899088908890600401614655565b602060405180830381600087803b15801561376357600080fd5b505af1925050508015613793575060408051601f3d908101601f191682019092526137909181019061447b565b60015b613807573d8080156137c1576040519150601f19603f3d011682016040523d82523d6000602084013e6137c6565b606091505b5080516137ff576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612ab9565b60608161389257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156138bc57806138a68161489f565b91506138b59050600a836147ee565b9150613896565b60008167ffffffffffffffff8111156138e557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561390f576020820181803683370190505b5090505b8415612ab957613924600183614821565b9150613931600a866148ba565b61393c9060306147d6565b60f81b81838151811061395f57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613999600a866147ee565b9450613913565b60006139f5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613cf39092919063ffffffff16565b805190915015610fb75780806020019051810190613a13919061442b565b610fb75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610461565b6000611d468260195485613d02565b6001546001600160a01b038416613ad7576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82613b0e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416600081815260066020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168b018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168b01811690920217909155858452600590925290912080547fffffffff000000000000000000000000000000000000000000000000000000001683177401000000000000000000000000000000000000000042909316929092029190911790558190818501903b15613c9f575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4613c4f60008784806001019550876136fb565b613c85576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808210613c04578260015414613c9a57600080fd5b613ce4565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210613ca0575b506001556128ef600085838684565b6060612ab98484600085613d18565b600082613d0f8584613e60565b14949350505050565b606082471015613d905760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610461565b6001600160a01b0385163b613de75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610461565b600080866001600160a01b03168587604051613e039190614570565b60006040518083038185875af1925050503d8060008114613e40576040519150601f19603f3d011682016040523d82523d6000602084013e613e45565b606091505b5091509150613e55828286613eb3565b979650505050505050565b600081815b8451811015611bc857613e9f82868381518110613e9257634e487b7160e01b600052603260045260246000fd5b6020026020010151613eec565b915080613eab8161489f565b915050613e65565b60608315613ec2575081611d46565b825115613ed25782518084602001fd5b8160405162461bcd60e51b8152600401610461919061475c565b6000818310613f08576000828152602084905260409020611d46565b6000838152602083905260409020611d46565b828054613f2790614864565b90600052602060002090601f016020900481019282613f495760008555613f8f565b82601f10613f6257805160ff1916838001178555613f8f565b82800160010185558215613f8f579182015b82811115613f8f578251825591602001919060010190613f74565b50613f9b929150613f9f565b5090565b5b80821115613f9b5760008155600101613fa0565b600067ffffffffffffffff831115613fce57613fce6148fa565b613fe16020601f19601f860116016147a5565b9050828152838383011115613ff557600080fd5b828260208301376000602084830101529392505050565b60008083601f84011261401d578182fd5b50813567ffffffffffffffff811115614034578182fd5b6020830191508360208260051b850101111561404f57600080fd5b9250929050565b600060208284031215614067578081fd5b8135611d4681614910565b600060208284031215614083578081fd5b8151611d4681614910565b600080604083850312156140a0578081fd5b82356140ab81614910565b915060208301356140bb81614910565b809150509250929050565b6000806000606084860312156140da578081fd5b83356140e581614910565b925060208401356140f581614910565b929592945050506040919091013590565b6000806000806080858703121561411b578081fd5b843561412681614910565b9350602085013561413681614910565b925060408501359150606085013567ffffffffffffffff811115614158578182fd5b8501601f81018713614168578182fd5b61417787823560208401613fb4565b91505092959194509250565b600080600080600080600060a0888a03121561419d578283fd5b87356141a881614910565b9650602088013567ffffffffffffffff808211156141c4578485fd5b6141d08b838c0161400c565b909850965060408a013591506141e582614910565b909450606089013590808211156141fa578485fd5b506142078a828b0161400c565b909450925050608088013561421b81614910565b8091505092959891949750929550565b6000806040838503121561423d578182fd5b823561424881614910565b915060208301356140bb81614925565b6000806040838503121561426a578182fd5b823561427581614910565b946020939093013593505050565b60008060008060608587031215614298578182fd5b84356142a381614910565b935060208501359250604085013567ffffffffffffffff8111156142c5578283fd5b6142d18782880161400c565b95989497509550505050565b6000806000806000608086880312156142f4578283fd5b85356142ff81614910565b945060208601359350604086013567ffffffffffffffff811115614321578384fd5b61432d8882890161400c565b909450925050606086013561434181614910565b809150509295509295909350565b600080600060608486031215614363578081fd5b833561436e81614910565b95602085013595506040909401359392505050565b60006020808385031215614395578182fd5b823567ffffffffffffffff808211156143ac578384fd5b818501915085601f8301126143bf578384fd5b8135818111156143d1576143d16148fa565b8060051b91506143e28483016147a5565b8181528481019084860184860187018a10156143fc578788fd5b8795505b8386101561441e578035835260019590950194918601918601614400565b5098975050505050505050565b60006020828403121561443c578081fd5b8151611d4681614925565b600060208284031215614458578081fd5b5035919050565b600060208284031215614470578081fd5b8135611d4681614933565b60006020828403121561448c578081fd5b8151611d4681614933565b600080604083850312156140a0578182fd5b6000602082840312156144ba578081fd5b813567ffffffffffffffff8111156144d0578182fd5b8201601f810184136144e0578182fd5b612ab984823560208401613fb4565b600060208284031215614500578081fd5b5051919050565b60008060408385031215614519578182fd5b50508035926020909101359150565b60008151808452614540816020860160208601614838565b601f01601f19169290920160200192915050565b60008151614566818560208601614838565b9290920192915050565b60008251614582818460208701614838565b9190910192915050565b600080845482600182811c9150808316806145a857607f831692505b60208084108214156145c857634e487b7160e01b87526022600452602487fd5b8180156145dc57600181146145ed57614619565b60ff19861689528489019650614619565b60008b815260209020885b868110156146115781548b8201529085019083016145f8565b505084890196505b5050505050506134a961462c8286614554565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526146876080830184614528565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612516576146e983855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b92840192606092909201916001016146ad565b6020808252825182820181905260009190848201906040850190845b8181101561251657835183529284019291840191600101614718565b602081016005831061475657634e487b7160e01b600052602160045260246000fd5b91905290565b602081526000611d466020830184614528565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608101610e0e565b604051601f8201601f1916810167ffffffffffffffff811182821017156147ce576147ce6148fa565b604052919050565b600082198211156147e9576147e96148ce565b500190565b6000826147fd576147fd6148e4565b500490565b600081600019048311821515161561481c5761481c6148ce565b500290565b600082821015614833576148336148ce565b500390565b60005b8381101561485357818101518382015260200161483b565b838111156128ef5750506000910152565b600181811c9082168061487857607f821691505b6020821081141561489957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156148b3576148b36148ce565b5060010190565b6000826148c9576148c96148e4565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611bfb57600080fd5b8015158114611bfb57600080fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611bfb57600080fdfea264697066735822122012b177f66c17a8a4a6f197bc51aa9bc524f62c5eff3e79a8699b02c70a28e11d64736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120fc99afd29e0d49dd9b16304f45696f75f4a80da7a81c8dc55bc2e9b60c281429000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000635fff10000000000000000000000000f62519cc5c275f790713898e90ca54c78160d6ed0000000000000000000000003293d8b2425ecad69d582b475c93f3b2fbabf544000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034a8830ad29d2cdf60e1d3905de12acc3cde41cd00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000004e697066733a2f2f626166796265696337746c336765756c6a716c616c6e6f67347079683475736e6878356671777778706263356c6b356a756367777466776c63326d2f736861646f772e6a736f6e000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106104185760003560e01c80637ae2b5c711610228578063c23dc68f11610128578063d6c29b4e116100bb578063e985e9c51161008a578063f2fde38b1161006f578063f2fde38b14610ccf578063f8dcbddb14610cef578063fc784d4914610d0f57600080fd5b8063e985e9c514610c66578063f2c4ce1e14610caf57600080fd5b8063d6c29b4e14610bef578063d79779b214610c05578063d7b1b21614610c3b578063e33b7de314610c5157600080fd5b8063ca7a18b9116100f7578063ca7a18b914610b42578063cbccefb214610b72578063cbce4c9714610b99578063ce7c2ac214610bb957600080fd5b8063c23dc68f14610ab5578063c45ac05014610ae2578063c627525514610b02578063c87b56dd14610b2257600080fd5b80639852595c116101bb578063a3f8eace1161018a578063acf4187d1161016f578063acf4187d14610a5f578063afdf613414610a75578063b88d4fde14610a9557600080fd5b8063a3f8eace14610a1f578063a825a99c14610a3f57600080fd5b80639852595c1461099357806399a2557a146109c95780639b6860c8146109e9578063a22cb465146109ff57600080fd5b80638462151c116101f75780638462151c146109135780638b83209b146109405780638da5cb5b1461096057806395d89b411461097e57600080fd5b80637ae2b5c7146108905780637cb64759146108b057806380b20937146108d05780638401be861461090057600080fd5b8063495f4bad116103335780635f26b6fd116102c6578063715018a611610295578063722503801161027a5780637225038014610845578063734c66bd1461085a57806376ee5df51461087057600080fd5b8063715018a614610810578063717d57d31461082557600080fd5b80635f26b6fd1461078b5780636352211e146107bb5780636c0360eb146107db57806370a08231146107f057600080fd5b8063525f8a5c11610302578063525f8a5c14610713578063571b1f8a146107335780635bbb2177146107495780635be7fde81461077657600080fd5b8063495f4bad146106a0578063499a4687146106b35780634b11faaf146106e057806351ae933e146106f357600080fd5b80632eb4a7ab116103ab5780633aeb4b3e1161037a5780633aeb4b3e146105fa578063406072a91461061a57806342842e0e1461066057806348b750441461068057600080fd5b80632eb4a7ab14610599578063326d4388146105af57806332cb6b0c146105cf5780633a98ef39146105e557600080fd5b806318160ddd116103e757806318160ddd1461052057806319165587146105435780631cbaee2d1461056357806323b872dd1461057957600080fd5b806301ffc9a71461046f57806306fdde03146104a4578063081812fc146104c6578063095ea7b3146104fe57600080fd5b3661046a5760405162461bcd60e51b815260206004820152601060248201527f4f6e6c7920696620796f75206d696e740000000000000000000000000000000060448201526064015b60405180910390fd5b600080fd5b34801561047b57600080fd5b5061048f61048a36600461445f565b610d2f565b60405190151581526020015b60405180910390f35b3480156104b057600080fd5b506104b9610e14565b60405161049b919061475c565b3480156104d257600080fd5b506104e66104e1366004614447565b610ea6565b6040516001600160a01b03909116815260200161049b565b34801561050a57600080fd5b5061051e610519366004614258565b610f03565b005b34801561052c57600080fd5b50600254600154035b60405190815260200161049b565b34801561054f57600080fd5b5061051e61055e366004614056565b610fbc565b34801561056f57600080fd5b5061053560185481565b34801561058557600080fd5b5061051e6105943660046140c6565b61115e565b3480156105a557600080fd5b5061053560195481565b3480156105bb57600080fd5b5061051e6105ca3660046144a9565b611169565b3480156105db57600080fd5b5061053560115481565b3480156105f157600080fd5b50600954610535565b34801561060657600080fd5b50601e546104e6906001600160a01b031681565b34801561062657600080fd5b50610535610635366004614497565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b34801561066c57600080fd5b5061051e61067b3660046140c6565b611209565b34801561068c57600080fd5b5061051e61069b366004614497565b611224565b61051e6106ae3660046142dd565b6113f0565b3480156106bf57600080fd5b506105356106ce366004614056565b601c6020526000908152604090205481565b61051e6106ee366004614283565b61170e565b3480156106ff57600080fd5b5061051e61070e366004614447565b611a74565b34801561071f57600080fd5b5061051e61072e366004614447565b611a81565b34801561073f57600080fd5b5061053560155481565b34801561075557600080fd5b50610769610764366004614383565b611adf565b60405161049b9190614691565b34801561078257600080fd5b5061051e611bd0565b34801561079757600080fd5b5061048f6107a6366004614447565b60216020526000908152604090205460ff1681565b3480156107c757600080fd5b506104e66107d6366004614447565b611bfe565b3480156107e757600080fd5b506104b9611c10565b3480156107fc57600080fd5b5061053561080b366004614056565b611c9e565b34801561081c57600080fd5b5061051e611d06565b34801561083157600080fd5b5061051e610840366004614447565b611d1a565b34801561085157600080fd5b506104b9611d27565b34801561086657600080fd5b5061053560165481565b34801561087c57600080fd5b50601f546104e6906001600160a01b031681565b34801561089c57600080fd5b506105356108ab366004614507565b611d34565b3480156108bc57600080fd5b5061051e6108cb366004614447565b611d4d565b3480156108dc57600080fd5b5061048f6108eb366004614056565b601d6020526000908152604090205460ff1681565b61051e61090e366004614183565b611d5a565b34801561091f57600080fd5b5061093361092e366004614056565b612395565b60405161049b91906146fc565b34801561094c57600080fd5b506104e661095b366004614447565b612522565b34801561096c57600080fd5b506000546001600160a01b03166104e6565b34801561098a57600080fd5b506104b9612560565b34801561099f57600080fd5b506105356109ae366004614056565b6001600160a01b03166000908152600c602052604090205490565b3480156109d557600080fd5b506109336109e436600461434f565b61256f565b3480156109f557600080fd5b5061053560175481565b348015610a0b57600080fd5b5061051e610a1a36600461422b565b612788565b348015610a2b57600080fd5b50610535610a3a366004614056565b612837565b348015610a4b57600080fd5b5061051e610a5a366004614447565b612878565b348015610a6b57600080fd5b5061053560145481565b348015610a8157600080fd5b5061051e610a90366004614447565b612885565b348015610aa157600080fd5b5061051e610ab0366004614106565b612892565b348015610ac157600080fd5b50610ad5610ad0366004614447565b6128f5565b60405161049b919061476f565b348015610aee57600080fd5b50610535610afd366004614497565b6129ce565b348015610b0e57600080fd5b5061051e610b1d366004614447565b612ac1565b348015610b2e57600080fd5b506104b9610b3d366004614447565b612ace565b348015610b4e57600080fd5b5061048f610b5d366004614447565b60226020526000908152604090205460ff1681565b348015610b7e57600080fd5b50601054610b8c9060ff1681565b60405161049b9190614734565b348015610ba557600080fd5b5061051e610bb4366004614258565b612c16565b348015610bc557600080fd5b50610535610bd4366004614056565b6001600160a01b03166000908152600b602052604090205490565b348015610bfb57600080fd5b5061053560125481565b348015610c1157600080fd5b50610535610c20366004614056565b6001600160a01b03166000908152600e602052604090205490565b348015610c4757600080fd5b5061053560135481565b348015610c5d57600080fd5b50600a54610535565b348015610c7257600080fd5b5061048f610c8136600461408e565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610cbb57600080fd5b5061051e610cca3660046144a9565b612d34565b348015610cdb57600080fd5b5061051e610cea366004614056565b612d4f565b348015610cfb57600080fd5b5061051e610d0a366004614447565b612ddc565b348015610d1b57600080fd5b5061051e610d2a366004614507565b612eab565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480610dc257507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610e0e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606060038054610e2390614864565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4f90614864565b8015610e9c5780601f10610e7157610100808354040283529160200191610e9c565b820191906000526020600020905b815481529060010190602001808311610e7f57829003601f168201915b5050505050905090565b6000610eb182612ebe565b610ee7576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610f0e82611bfe565b9050806001600160a01b0316836001600160a01b03161415610f5c576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614610fac57610f768133610c81565b610fac576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fb7838383612f03565b505050565b6001600160a01b0381166000908152600b60205260409020546110475760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610461565b600061105282612837565b9050806110c75760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610461565b6001600160a01b0382166000908152600c6020526040812080548392906110ef9084906147d6565b9250508190555080600a600082825461110891906147d6565b9091555061111890508282612f77565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b610fb7838383613090565b611171613332565b600260105460ff16600481111561119857634e487b7160e01b600052602160045260246000fd5b146111e55760405162461bcd60e51b815260206004820152601c60248201527f72657665616c656420555249206166746572207468652073616c6573000000006044820152606401610461565b6010805460ff19166003179055805161120590601a906020840190613f1b565b5050565b610fb783838360405180602001604052806000815250612892565b6001600160a01b0381166000908152600b60205260409020546112af5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610461565b60006112bb83836129ce565b9050806113305760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610461565b6001600160a01b038084166000908152600f60209081526040808320938616835292905290812080548392906113679084906147d6565b90915550506001600160a01b0383166000908152600e6020526040812080548392906113949084906147d6565b909155506113a5905083838361338c565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b32331461143f5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610461565b60175460155460145460185461145591906147d6565b61145f91906147d6565b42116114ad5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420686173206e6f7420737461727465642079657400000000000000006044820152606401610461565b600160105460ff1660048111156114d457634e487b7160e01b600052602160045260246000fd5b146115215760405162461bcd60e51b815260206004820152600e60248201527f4d696e74206163746976617465640000000000000000000000000000000000006044820152606401610461565b61152e826001868661340c565b61157a5760405162461bcd60e51b815260206004820152600c60248201527f4e65656420612070726f6f6600000000000000000000000000000000000000006044820152606401610461565b601354336000908152601c60205260409020546115989087906147d6565b11156115e65760405162461bcd60e51b815260206004820152601760248201527f596f752063616e206f6e6c79206765742058204e4654730000000000000000006044820152606401610461565b601154856115f76002546001540390565b61160191906147d6565b111561164f5760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610461565b6116598582614802565b3410156116a85760405162461bcd60e51b815260206004820152601160248201527f4e6f7420656e6f756768742066756e64730000000000000000000000000000006044820152606401610461565b601154856116b96002546001540390565b6116c391906147d6565b14156116d7576010805460ff191660021790555b336000908152601c6020526040812080548792906116f69084906147d6565b90915550611706905086866134b2565b505050505050565b32331461175d5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610461565b60165460145460185461177091906147d6565b4210156117bf5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420686173206e6f7420737461727465642079657400000000000000006044820152606401610461565b6015546014546018546117d291906147d6565b6117dc91906147d6565b42111561182b5760405162461bcd60e51b815260206004820152601260248201527f57686974656c6973742066696e697368656400000000000000000000000000006044820152606401610461565b600160105460ff16600481111561185257634e487b7160e01b600052602160045260246000fd5b1461189f5760405162461bcd60e51b815260206004820152601860248201527f574c206d696e74206973206e6f742061637469766174656400000000000000006044820152606401610461565b6118ac336001858561340c565b6118f85760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f742077686974656c69737465640000000000000000006044820152606401610461565b336000908152601d602052604090205460ff16156119585760405162461bcd60e51b815260206004820152601660248201527f57686974656c69737420616c72656164792075736564000000000000000000006044820152606401610461565b601154846119696002546001540390565b61197391906147d6565b11156119c15760405162461bcd60e51b815260206004820152601860248201527f4d617820537570706c792065786365656465642028574c2900000000000000006044820152606401610461565b6119cb8482614802565b341015611a1a5760405162461bcd60e51b815260206004820152601160248201527f4e6f7420656e6f756768742066756e64730000000000000000000000000000006044820152606401610461565b60115484611a2b6002546001540390565b611a3591906147d6565b1415611a49576010805460ff191660021790555b336000908152601d60205260409020805460ff19166001179055611a6d85856134b2565b5050505050565b611a7c613332565b601455565b611a89613332565b6018544210611ada5760405162461bcd60e51b815260206004820152601860248201527f53616c652068617320616c7265616479207374617274656400000000000000006044820152606401610461565b601855565b805160609060008167ffffffffffffffff811115611b0d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b5857816020015b6040805160608101825260008082526020808301829052928201528252600019909201910181611b2b5790505b50905060005b828114611bc857611b95858281518110611b8857634e487b7160e01b600052603260045260246000fd5b60200260200101516128f5565b828281518110611bb557634e487b7160e01b600052603260045260246000fd5b6020908102919091010152600101611b5e565b509392505050565b60005b602054811015611bfb57611be961055e82612522565b80611bf38161489f565b915050611bd3565b50565b6000611c09826134cc565b5192915050565b601a8054611c1d90614864565b80601f0160208091040260200160405190810160405280929190818152602001828054611c4990614864565b8015611c965780601f10611c6b57610100808354040283529160200191611c96565b820191906000526020600020905b815481529060010190602001808311611c7957829003601f168201915b505050505081565b60006001600160a01b038216611ce0576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b611d0e613332565b611d186000613655565b565b611d22613332565b601655565b601b8054611c1d90614864565b600081831115611d445781611d46565b825b9392505050565b611d55613332565b601955565b323314611da95760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e747261637400006044820152606401610461565b60008060009050600080600080601854611dc04290565b1015611e0e5760405162461bcd60e51b815260206004820152601860248201527f4d696e7420686173206e6f7420737461727465642079657400000000000000006044820152606401610461565b601554601454601854611e2191906147d6565b611e2b91906147d6565b421115611e7a5760405162461bcd60e51b815260206004820152601260248201527f57686974656c6973742066696e697368656400000000000000000000000000006044820152606401610461565b600160105460ff166004811115611ea157634e487b7160e01b600052602160045260246000fd5b14611eee5760405162461bcd60e51b815260206004820152601760248201527f4d696e745752206973206e6f74206163746976617465640000000000000000006044820152606401610461565b8a611f3b5760405162461bcd60e51b815260206004820152601560248201527f4e6f20746f6b656e204964732070726f766964656400000000000000000000006044820152606401610461565b87611f885760405162461bcd60e51b815260206004820152601560248201527f4e6f20746f6b656e204964732070726f766964656400000000000000000000006044820152606401610461565b601e546001600160a01b038b8116911614611fe55760405162461bcd60e51b815260206004820152600560248201527f42616420440000000000000000000000000000000000000000000000000000006044820152606401610461565b601f546001600160a01b038881169116146120425760405162461bcd60e51b815260206004820152600660248201527f42616420575200000000000000000000000000000000000000000000000000006044820152606401610461565b89915060005b8b811015612164578c8c8281811061207057634e487b7160e01b600052603260045260246000fd5b905060200201359650336001600160a01b0316836001600160a01b0316636352211e896040518263ffffffff1660e01b81526004016120b191815260200190565b60206040518083038186803b1580156120c957600080fd5b505afa1580156120dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121019190614072565b6001600160a01b0316148015612126575060008781526021602052604090205460ff16155b15612152576121366001866147d6565b6000888152602160205260409020805460ff1916600117905594505b8061215c8161489f565b915050612048565b5086905060005b888110156122875789898281811061219357634e487b7160e01b600052603260045260246000fd5b905060200201359650336001600160a01b0316826001600160a01b0316636352211e896040518263ffffffff1660e01b81526004016121d491815260200190565b60206040518083038186803b1580156121ec57600080fd5b505afa158015612200573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122249190614072565b6001600160a01b0316148015612249575060008781526022602052604090205460ff16155b15612275576122596001856147d6565b6000888152602260205260409020805460ff1916600117905593505b8061227f8161489f565b91505061216b565b506122928484611d34565b9450600085116122e45760405162461bcd60e51b815260206004820152600960248201527f4e6f206d6f7265202100000000000000000000000000000000000000000000006044820152606401610461565b601154856122f56002546001540390565b6122ff91906147d6565b111561234d5760405162461bcd60e51b815260206004820152601860248201527f4d617820537570706c79206578636565646564202857522900000000000000006044820152606401610461565b6011548561235e6002546001540390565b61236891906147d6565b141561237c576010805460ff191660021790555b6123868d866134b2565b50505050505050505050505050565b606060008060006123a585611c9e565b905060008167ffffffffffffffff8111156123d057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156123f9578160200160208202803683370190505b50604080516060810182526000808252602082018190529181018290529192505b83861461251657600081815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161580159282019290925292506124ab5761250e565b81516001600160a01b0316156124c057815194505b876001600160a01b0316856001600160a01b0316141561250e578083878060010198508151811061250157634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b60010161241a565b50909695505050505050565b6000600d828154811061254557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b606060048054610e2390614864565b60608183106125aa576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154600090808411156125bc578093505b60006125c787611c9e565b9050848610156125e657858503818110156125e0578091505b506125ea565b5060005b60008167ffffffffffffffff81111561261357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561263c578160200160208202803683370190505b5090508161264f579350611d4692505050565b600061265a886128f5565b90506000816040015161266b575080515b885b88811415801561267d5750848714155b1561277757600081815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff1615801592820192909252935061270c5761276f565b82516001600160a01b03161561272157825191505b8a6001600160a01b0316826001600160a01b0316141561276f578084888060010199508151811061276257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b60010161266d565b505050928352509095945050505050565b6001600160a01b0382163314156127cb576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612843600a5490565b61284d90476147d6565b9050611d468382612873866001600160a01b03166000908152600c602052604090205490565b6136bd565b612880613332565b601555565b61288d613332565b601355565b61289d848484613090565b6001600160a01b0383163b156128ef576128b9848484846136fb565b6128ef576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b604080516060808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052909150600154831061293a5792915050565b50600082815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff1615801592820192909252906129c55792915050565b611d46836134cc565b6001600160a01b0382166000908152600e602052604081205481906040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038616906370a082319060240160206040518083038186803b158015612a4157600080fd5b505afa158015612a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7991906144ef565b612a8391906147d6565b6001600160a01b038086166000908152600f6020908152604080832093881683529290522054909150612ab990849083906136bd565b949350505050565b612ac9613332565b601755565b6060612ad982612ebe565b612b255760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610461565b600360105460ff166004811115612b4c57634e487b7160e01b600052602160045260246000fd5b1015612be457601b8054612b5f90614864565b80601f0160208091040260200160405190810160405280929190818152602001828054612b8b90614864565b8015612bd85780601f10612bad57610100808354040283529160200191612bd8565b820191906000526020600020905b815481529060010190602001808311612bbb57829003601f168201915b50505050509050919050565b601a612bef83613852565b604051602001612c0092919061458c565b6040516020818303038152906040529050919050565b612c1e613332565b600060105460ff166004811115612c4557634e487b7160e01b600052602160045260246000fd5b14612c925760405162461bcd60e51b815260206004820152600f60248201527f47696674207068617365206f6e6c7900000000000000000000000000000000006044820152606401610461565b60125481612ca36002546001540390565b612cad91906147d6565b1115612cfb5760405162461bcd60e51b815260206004820152601d60248201527f43616e27742067696674206d6f7265207468616e204d41585f474946540000006044820152606401610461565b60125481612d0c6002546001540390565b612d1691906147d6565b1415612d2a576010805460ff191660011790555b61120582826134b2565b612d3c613332565b805161120590601b906020840190613f1b565b612d57613332565b6001600160a01b038116612dd35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610461565b611bfb81613655565b612de4613332565b600460105460ff166004811115612e0b57634e487b7160e01b600052602160045260246000fd5b1415612e595760405162461bcd60e51b815260206004820181905260248201527f5365742073656c6c696e67207374657073206973206e6f772066726f7a656e216044820152606401610461565b806004811115612e7957634e487b7160e01b600052602160045260246000fd5b6010805460ff19166001836004811115612ea357634e487b7160e01b600052602160045260246000fd5b021790555050565b612eb3613332565b601191909155601255565b600060015482108015610e0e5750506000908152600560205260409020547c0100000000000000000000000000000000000000000000000000000000900460ff161590565b60008281526007602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b80471015612fc75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610461565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613014576040519150601f19603f3d011682016040523d82523d6000602084013e613019565b606091505b5050905080610fb75760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610461565b600061309b826134cc565b9050836001600160a01b031681600001516001600160a01b0316146130ec576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b038616148061310a575061310a8533610c81565b8061312557503361311a84610ea6565b6001600160a01b0316145b90508061315e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661319e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6131aa60008487612f03565b6001600160a01b03858116600090815260066020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080547fffffffff000000000000000000000000000000000000000000000000000000001690941774010000000000000000000000000000000000000000429092169190910217835587018084529220805491939091166132e95760015482146132e9578054602086015167ffffffffffffffff1674010000000000000000000000000000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611a6d565b6000546001600160a01b03163314611d185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610461565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610fb79084906139a0565b60006134a961347086866040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b1660208201526034810182905260009060540160405160208183030381529060405280519060200120905092915050565b848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613a8592505050565b95945050505050565b611205828260405180602001604052806000815250613a94565b60408051606081018252600080825260208201819052918101919091528160015481101561362357600081815260056020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161515918101829052906136215780516001600160a01b03161561358d579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b03811680835274010000000000000000000000000000000000000000820467ffffffffffffffff16938301939093527c0100000000000000000000000000000000000000000000000000000000900460ff161515928101929092521561361c579392505050565b61358d565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6009546001600160a01b0384166000908152600b6020526040812054909183916136e79086614802565b6136f191906147ee565b612ab99190614821565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290613749903390899088908890600401614655565b602060405180830381600087803b15801561376357600080fd5b505af1925050508015613793575060408051601f3d908101601f191682019092526137909181019061447b565b60015b613807573d8080156137c1576040519150601f19603f3d011682016040523d82523d6000602084013e6137c6565b606091505b5080516137ff576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612ab9565b60608161389257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156138bc57806138a68161489f565b91506138b59050600a836147ee565b9150613896565b60008167ffffffffffffffff8111156138e557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561390f576020820181803683370190505b5090505b8415612ab957613924600183614821565b9150613931600a866148ba565b61393c9060306147d6565b60f81b81838151811061395f57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613999600a866147ee565b9450613913565b60006139f5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613cf39092919063ffffffff16565b805190915015610fb75780806020019051810190613a13919061442b565b610fb75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610461565b6000611d468260195485613d02565b6001546001600160a01b038416613ad7576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82613b0e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416600081815260066020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168b018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168b01811690920217909155858452600590925290912080547fffffffff000000000000000000000000000000000000000000000000000000001683177401000000000000000000000000000000000000000042909316929092029190911790558190818501903b15613c9f575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4613c4f60008784806001019550876136fb565b613c85576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808210613c04578260015414613c9a57600080fd5b613ce4565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210613ca0575b506001556128ef600085838684565b6060612ab98484600085613d18565b600082613d0f8584613e60565b14949350505050565b606082471015613d905760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610461565b6001600160a01b0385163b613de75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610461565b600080866001600160a01b03168587604051613e039190614570565b60006040518083038185875af1925050503d8060008114613e40576040519150601f19603f3d011682016040523d82523d6000602084013e613e45565b606091505b5091509150613e55828286613eb3565b979650505050505050565b600081815b8451811015611bc857613e9f82868381518110613e9257634e487b7160e01b600052603260045260246000fd5b6020026020010151613eec565b915080613eab8161489f565b915050613e65565b60608315613ec2575081611d46565b825115613ed25782518084602001fd5b8160405162461bcd60e51b8152600401610461919061475c565b6000818310613f08576000828152602084905260409020611d46565b6000838152602083905260409020611d46565b828054613f2790614864565b90600052602060002090601f016020900481019282613f495760008555613f8f565b82601f10613f6257805160ff1916838001178555613f8f565b82800160010185558215613f8f579182015b82811115613f8f578251825591602001919060010190613f74565b50613f9b929150613f9f565b5090565b5b80821115613f9b5760008155600101613fa0565b600067ffffffffffffffff831115613fce57613fce6148fa565b613fe16020601f19601f860116016147a5565b9050828152838383011115613ff557600080fd5b828260208301376000602084830101529392505050565b60008083601f84011261401d578182fd5b50813567ffffffffffffffff811115614034578182fd5b6020830191508360208260051b850101111561404f57600080fd5b9250929050565b600060208284031215614067578081fd5b8135611d4681614910565b600060208284031215614083578081fd5b8151611d4681614910565b600080604083850312156140a0578081fd5b82356140ab81614910565b915060208301356140bb81614910565b809150509250929050565b6000806000606084860312156140da578081fd5b83356140e581614910565b925060208401356140f581614910565b929592945050506040919091013590565b6000806000806080858703121561411b578081fd5b843561412681614910565b9350602085013561413681614910565b925060408501359150606085013567ffffffffffffffff811115614158578182fd5b8501601f81018713614168578182fd5b61417787823560208401613fb4565b91505092959194509250565b600080600080600080600060a0888a03121561419d578283fd5b87356141a881614910565b9650602088013567ffffffffffffffff808211156141c4578485fd5b6141d08b838c0161400c565b909850965060408a013591506141e582614910565b909450606089013590808211156141fa578485fd5b506142078a828b0161400c565b909450925050608088013561421b81614910565b8091505092959891949750929550565b6000806040838503121561423d578182fd5b823561424881614910565b915060208301356140bb81614925565b6000806040838503121561426a578182fd5b823561427581614910565b946020939093013593505050565b60008060008060608587031215614298578182fd5b84356142a381614910565b935060208501359250604085013567ffffffffffffffff8111156142c5578283fd5b6142d18782880161400c565b95989497509550505050565b6000806000806000608086880312156142f4578283fd5b85356142ff81614910565b945060208601359350604086013567ffffffffffffffff811115614321578384fd5b61432d8882890161400c565b909450925050606086013561434181614910565b809150509295509295909350565b600080600060608486031215614363578081fd5b833561436e81614910565b95602085013595506040909401359392505050565b60006020808385031215614395578182fd5b823567ffffffffffffffff808211156143ac578384fd5b818501915085601f8301126143bf578384fd5b8135818111156143d1576143d16148fa565b8060051b91506143e28483016147a5565b8181528481019084860184860187018a10156143fc578788fd5b8795505b8386101561441e578035835260019590950194918601918601614400565b5098975050505050505050565b60006020828403121561443c578081fd5b8151611d4681614925565b600060208284031215614458578081fd5b5035919050565b600060208284031215614470578081fd5b8135611d4681614933565b60006020828403121561448c578081fd5b8151611d4681614933565b600080604083850312156140a0578182fd5b6000602082840312156144ba578081fd5b813567ffffffffffffffff8111156144d0578182fd5b8201601f810184136144e0578182fd5b612ab984823560208401613fb4565b600060208284031215614500578081fd5b5051919050565b60008060408385031215614519578182fd5b50508035926020909101359150565b60008151808452614540816020860160208601614838565b601f01601f19169290920160200192915050565b60008151614566818560208601614838565b9290920192915050565b60008251614582818460208701614838565b9190910192915050565b600080845482600182811c9150808316806145a857607f831692505b60208084108214156145c857634e487b7160e01b87526022600452602487fd5b8180156145dc57600181146145ed57614619565b60ff19861689528489019650614619565b60008b815260209020885b868110156146115781548b8201529085019083016145f8565b505084890196505b5050505050506134a961462c8286614554565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526146876080830184614528565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612516576146e983855180516001600160a01b0316825260208082015167ffffffffffffffff16908301526040908101511515910152565b92840192606092909201916001016146ad565b6020808252825182820181905260009190848201906040850190845b8181101561251657835183529284019291840191600101614718565b602081016005831061475657634e487b7160e01b600052602160045260246000fd5b91905290565b602081526000611d466020830184614528565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608101610e0e565b604051601f8201601f1916810167ffffffffffffffff811182821017156147ce576147ce6148fa565b604052919050565b600082198211156147e9576147e96148ce565b500190565b6000826147fd576147fd6148e4565b500490565b600081600019048311821515161561481c5761481c6148ce565b500290565b600082821015614833576148336148ce565b500390565b60005b8381101561485357818101518382015260200161483b565b838111156128ef5750506000910152565b600181811c9082168061487857607f821691505b6020821081141561489957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156148b3576148b36148ce565b5060010190565b6000826148c9576148c96148e4565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611bfb57600080fd5b8015158114611bfb57600080fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611bfb57600080fdfea264697066735822122012b177f66c17a8a4a6f197bc51aa9bc524f62c5eff3e79a8699b02c70a28e11d64736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120fc99afd29e0d49dd9b16304f45696f75f4a80da7a81c8dc55bc2e9b60c281429000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000635fff10000000000000000000000000f62519cc5c275f790713898e90ca54c78160d6ed0000000000000000000000003293d8b2425ecad69d582b475c93f3b2fbabf544000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034a8830ad29d2cdf60e1d3905de12acc3cde41cd00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000004e697066733a2f2f626166796265696337746c336765756c6a716c616c6e6f67347079683475736e6878356671777778706263356c6b356a756367777466776c63326d2f736861646f772e6a736f6e000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _team (address[]): 0x34A8830Ad29D2Cdf60e1D3905de12aCc3cde41cD
Arg [1] : _teamShares (uint256[]): 100
Arg [2] : _merkleRoot (bytes32): 0xfc99afd29e0d49dd9b16304f45696f75f4a80da7a81c8dc55bc2e9b60c281429
Arg [3] : _notRevealedURI (string): ipfs://bafybeic7tl3geuljqlalnog4pyh4usnhx5fqwwxpbc5lk5jucgwtfwlc2m/shadow.json
Arg [4] : _startTime (uint256): 1667235600
Arg [5] : _cryptodudesNFTAddress (address): 0xf62519cc5c275f790713898e90ca54c78160d6ED
Arg [6] : _whiterussianNFTAddress (address): 0x3293d8b2425ECAd69D582b475c93f3b2FbaBf544

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : fc99afd29e0d49dd9b16304f45696f75f4a80da7a81c8dc55bc2e9b60c281429
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [4] : 00000000000000000000000000000000000000000000000000000000635fff10
Arg [5] : 000000000000000000000000f62519cc5c275f790713898e90ca54c78160d6ed
Arg [6] : 0000000000000000000000003293d8b2425ecad69d582b475c93f3b2fbabf544
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 00000000000000000000000034a8830ad29d2cdf60e1d3905de12acc3cde41cd
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [11] : 000000000000000000000000000000000000000000000000000000000000004e
Arg [12] : 697066733a2f2f626166796265696337746c336765756c6a716c616c6e6f6734
Arg [13] : 7079683475736e6878356671777778706263356c6b356a756367777466776c63
Arg [14] : 326d2f736861646f772e6a736f6e000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.