ETH Price: $3,289.02 (+1.46%)
Gas: 1 Gwei

Token

CanvasArtistsMembershipV2 (CAM2)
 

Overview

Max Total Supply

80 CAM2

Holders

70

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
lucky2136.eth
Balance
1 CAM2
0xB5BEebBFB568be3d5d7AFc7C35CAC5bC517a1fA4
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CanvasArtistsMembershipV2

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 16 : CanvasArtistsMembership.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

// @author: greenbunny.eth
//  
/*                                                                                                               
                             (//////////////////////    &                  &    
                       %(/////////////////////////// /.///&          &  & &%     
                    //(//////////////////////////// /.*****.//       %% &%&&     
                 (((///////////////////////////// /.********.////    &%&&##&     
              (////////////////////////////////// /.**,,,*,**./////& &%#%##%&    
            #///////////     ,//////////////// /. /.,     .*,/////// /.##(##%(#    
           (///////////                                   /////// /.***((/#((    
         #/////////////                                   ////// /.***,,///((    
        (//////////////.                                 .//// /.****,,,,*(/     
       %////////////////      / /.,,,,,,,*******,**       // /. /.**,,,,,,,./      
       /////////////////      *,,,,,,,,,********./.      / /. /.,,,,,,,,****      
      //////////////////       /.****,*** /.********.       /.*,,,,,,,,******&     
      (/////////////////      ////////////////////.      *,,,,,,,*,,*******     
      //////////////////      ////////// /.********       ,,,,,,,*,,********     
      (/////////////////      ,,,,,*********,,,,,*       ,,,,,,,,*,********     
      (//////////// /.,,                                   ,,,,,*,,********      
       //////// /.,*,,,,                                   ,**,************      
       &//// /.***,,*,,,            ,*********,           .***************       
        (/ /.****,,,,,,,,*,*,*****.////// /.******************************        
         (****,,,,,*,,,*,**.//// /.*,***********************************         
        (((,*,,,/,,,* /..// /.***,**,// /.*./ /.**************************          
        ((/(*,*,,* /.****,,,** /. /   ,*   *  *,,.* ******************            
        &///#( /.****,,,.//////////// /. ********* ** **************              
        %(/%((&##,*,./////// / . /.* *  * ./ /.,*  * . *.*********                
          %&%&##(#& /////////// /.****************************                   
          &&&%%%&       .//// /.**************************                       
          &&&                 #*********************%                            
           &                                                                                                                                                              
       ...       .                 ,    

       This is such an awesome piece of work that I have to admire it mysellf, I know we all copy from
       each other. So those of you who steal ideas from here, just give me a little credit :)       

       Welcome to CanvasArtists the new home for premier artists!     
*/

contract CanvasArtistsMembershipV2 is ERC721, ERC721Enumerable, ERC721URIStorage, AccessControl {

    // Keep track of the minting counters, membership types and proces
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdCounter;                                               // this is all 721, so there is a token ID
 
    // permission roles for this contract - love me some OpenZepplin 4.x
    bytes32 public constant TREASURER_ROLE = keccak256("TREASURER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant WHITELIST_ROLE = keccak256("WHITELIST_ROLE");

    // what sale mode are we in
    bool private _premintIsOn = false;                                                          // pre-mint on
    bool private _publicSaleOpen = false;                                                       // public-mint-on

    // setup price multiplier                                                               
    uint256 public constant PRICE_MULTIPLIER = 0.01 ether;                                      // this is used for limiting prices 
 
    // Membership Coonfiguration
    uint256 private constant MAX_MEMBERSHIP_TYPES = 5;                                          // never more than 5 membership types
    uint256 [MAX_MEMBERSHIP_TYPES] private _membershipSupply = [0,0,0,0,0];                     // how many memberships, per type
    uint256 [MAX_MEMBERSHIP_TYPES] private _reservedSupply = [0,0,0,0,0];                       // howmant are available
    uint256 [MAX_MEMBERSHIP_TYPES] private _forSaleSupply = [0,0,0,0,0];                        // how many available for sale
    uint256 [MAX_MEMBERSHIP_TYPES] private _memebershipPrice = [0,0,0,0,0];                     // how much retail price
    bool [MAX_MEMBERSHIP_TYPES] private _membershipAvailableofSale = 
                                                            [false,false,false,false,false];    // available for sale?
    // # Token Supply
    uint256 [MAX_MEMBERSHIP_TYPES] private _totalMintedCount = [0,0,0,0,0];
    uint256 [MAX_MEMBERSHIP_TYPES] private _reservedMintedCount = [0,0,0,0,0];
    uint256 [MAX_MEMBERSHIP_TYPES] private _saleMintedCount =[0,0,0,0,0];

    //whitelist and discounts  
    uint256 private constant MAX_DISCOUNT_TYPES = 5;                                            // maximum number of discounts
    mapping(address => uint256) private _discountType;                                          // discount type
    mapping(uint256 => uint256) private _membershipMap;                                         // IDs to memebrships
    uint256 [MAX_MEMBERSHIP_TYPES][MAX_DISCOUNT_TYPES] private _discountTable;                  // discount table

    // Where the funds will go
    address private _addTreasury;

    // Setup the token URI for all membership types
    string private _baseTokenURI = "https://gateway.pinata.cloud/ipfs/";

    // events that the contract emits
    event welcomeToTheMembership(uint256 id);

    // ----------------------------------------------------------------------------------------------
    // Construct this...

    constructor() ERC721("CanvasArtistsMembershipV2", "CAM2") {

        // set the permissions
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(MINTER_ROLE, msg.sender);
        _grantRole(TREASURER_ROLE, msg.sender);

        // configure membership types 1 and 2
        //  type 0 NOT CONFIGURED
        configureMembership( 1, 255, 30, 30 );
        configureMembership( 2, 5555, 100, 10 );
   

       // configigure NO discoujts - must always set slot 0
       _discountTable[1][0] = _memebershipPrice[1];
       _discountTable[2][0] = _memebershipPrice[2];

        // burn ID 0 - it's not used
        _tokenIdCounter.increment();

        // set what's available for sale
        setAvailableForSale( 1, true );
        setAvailableForSale( 2, true );

        // set the treasury
        _addTreasury = msg.sender;
    }

    // ----------------------------------------------------------------------------------------------
    // These are all configuration funbctions
    // setup memberships and allow for future expansion

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    function setBaseURI(string memory baseURI) public onlyRole(MINTER_ROLE) {
        _baseTokenURI = baseURI;
    }

    function configureMembership( uint _mType, uint _mSupply, uint _mReserved, uint _mPrice ) public onlyRole(DEFAULT_ADMIN_ROLE) {

        // make sure membership isn't configured 
        //   for security you only get one shot at this, once configured, can never be reconfigiured

        require( _mType < MAX_MEMBERSHIP_TYPES,     "Invalid type" );
        require( _membershipSupply[_mType] == 0,    "Already configured" );

        _membershipSupply[_mType] = _mSupply;                   // set the total supply of memberships
        _reservedSupply[_mType] = _mReserved;                   // set how many to reserve
        _forSaleSupply[_mType] = _mSupply - _mReserved;         // how many are for sale
        _memebershipPrice[_mType] = _mPrice * PRICE_MULTIPLIER;  // set the retail price of memberships TODO reality
   }

    function _configureDiscountTable( uint _mType, uint _mp0,  uint _mp1,  uint _mp2,  uint _mp3,  uint _mp4 ) private onlyRole(DEFAULT_ADMIN_ROLE) {

        // make sure isn't configured 
        //   for security you only get one shot at this, once configured, can never be reconfigiured

        require( _mType < MAX_MEMBERSHIP_TYPES,     "Invalid type" );
        require( _discountTable[_mType][1] == 0,    "Configured Already" );

        // configure the discount table 
        _discountTable[_mType][0] = _mp0;
        _discountTable[_mType][1] = _mp1;
        _discountTable[_mType][2] = _mp2;
        _discountTable[_mType][3] = _mp3;
        _discountTable[_mType][4] = _mp4;
    }

    function configureDiscountTable( uint _mType, uint _mp0,  uint _mp1,  uint _mp2,  uint _mp3,  uint _mp4 ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        _configureDiscountTable( _mType, 
                    _mp0 * PRICE_MULTIPLIER, 
                    _mp1 * PRICE_MULTIPLIER, 
                    _mp2 * PRICE_MULTIPLIER, 
                    _mp3 * PRICE_MULTIPLIER, 
                    _mp4 * PRICE_MULTIPLIER 
        );
    }

    // ----------------------------------------------------------------------------------------------
    // These functions are about whitelist managment and discounts 

    function addToWhitelist( address _user, uint256 _dType ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        _grantRole(WHITELIST_ROLE, _user);
        _discountType[_user] = _dType;
    }
  
    function addToWhitelistArray(address[] memory _users, uint256 _dType ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        for (uint i = 0; i < _users.length; i++) {
            _grantRole(WHITELIST_ROLE, _users[i]);
            _discountType[_users[i]] = _dType;
        }
    }

    // ----------------------------------------------------------------------------------------------
    // Price management and how much supply is available, and what is contract state

    function getPrice( uint _membershipType ) public view returns (uint256) {

        // return premint discount price
        return _memebershipPrice[_membershipType];
    }

    function getTotalSupply( uint _membershipType ) public view returns (uint256) {

        // return premint discount price
        return _membershipSupply[_membershipType];
    }

    function getAvailableSupply( uint _membershipType ) public view returns (uint256) {

        // return premint discount price
        return _forSaleSupply[_membershipType];
    }

    function getPriceForWallet( uint _membershipType, address _user) public view returns (uint256) {

        // return discount price
        return _discountTable[_membershipType][_discountType[_user]];
    }

    function isOnWhitelist( address _user ) public view returns (bool) {

        // return whitelist status 
        return hasRole(WHITELIST_ROLE, _user);
    }

    // ----------------------------------------------------------------------------------------------
    // Sale and Token managment

    function getMembersipTyoe( uint256 _tokenId ) public view returns (uint256) {
        return _membershipMap[_tokenId];
    }

    function isPresaleOpen() public view returns (bool) {

        // is the presale open
        return _premintIsOn;
    }

    function isPublicSaleOpen() public view returns (bool) {

        // is the presale open
        return _publicSaleOpen;
    }

    function setNoSaleOpen() public onlyRole(MINTER_ROLE) {
        _premintIsOn = false;
        _publicSaleOpen = false;
    }

    function setPreSaleOpen() public onlyRole(MINTER_ROLE) {
        _premintIsOn = true;
        _publicSaleOpen = false;
    }

    function setPublicSaleOpen() public onlyRole(MINTER_ROLE) {
        _premintIsOn = false;
        _publicSaleOpen = true;
    }

    function setAvailableForSale( uint _mType, bool _avail )  public onlyRole(MINTER_ROLE) {

        // do nothing if sold out
        if ( isSoldOut(_mType) != true ) 
            _membershipAvailableofSale[_mType] = _avail;
    }

    function isAvailableForSale( uint _mType ) public view returns (bool) {

        // make sure we are not sold out
        if ( isSoldOut(_mType) )
            return false;
        else
            return _membershipAvailableofSale[_mType];
    }

    function isSoldOut( uint _mType )  public view returns (bool) {
        return ( _forSaleSupply[_mType] == 0 ? true : false );
    }

    function howManyCanMint( address _user ) public view returns (uint256) {
        if ( _discountType[_user] == 0 )
            return 5;
        else if (_discountType[_user] != 4)
            return 3;
        else
            return 1;
    }

    // ----------------------------------------------------------------------------------------------
    // Mint Mangment and making sure it all works right

    // emergancy token URI swapping out - It's needed - sometimes your IPFS provider is down and you need to 
    //   send a hardcoded URL into mint function and then fix it later

    function setTokenURI( uint256 tokenId, string memory _uri ) public onlyRole(MINTER_ROLE) {
         _setTokenURI( tokenId, _uri );
    }

    function _mintTokens( uint _mType, uint _quantity, address _to, string memory _uri, bool _fromReserve ) private {

        for (uint i = 0; i < _quantity; i++) {

            // let's mint the actual token - no checks required
            uint256 tokenId = _tokenIdCounter.current();
            _tokenIdCounter.increment();

            _safeMint( _to, tokenId );
            _setTokenURI( tokenId, _uri );
            _membershipMap[tokenId] = _mType;

            if ( _fromReserve == false ) {
                _forSaleSupply[_mType] = _forSaleSupply[_mType] - 1;
                emit welcomeToTheMembership( tokenId );
            }
        }
    }

    // mint the reserve tokens for later airdroping

    function mintReserve( uint _mType, address _to, string memory _uri ) public onlyRole(MINTER_ROLE) {

        // Mint reserve supply
        uint quantity = _reservedSupply[_mType];
        require( quantity > 0, "M10: already minted" );               

        _mintTokens( _mType, quantity, _to, _uri, true );

        // erase the reserve
        _reservedSupply[_mType] = 0;
    }

    function airdropMembership( uint _mType, uint _quantity, address _to, string memory _uri ) public onlyRole(MINTER_ROLE) {

        // is the membership type available for sale
        require( isAvailableForSale(_mType), "M0: not for sale" );

        // trying to mint zero tokens
        require( _quantity != 0, "M3: zero tokens" );

        // make sure not trying to mint too many
        require( _quantity <= howManyCanMint(_to), "M4: too many" );

        // is there enough supply available
        require( _forSaleSupply[_mType] >= _quantity, "M5: mint fewer" );

        // Mint it! 
        _mintTokens( _mType, _quantity, _to, _uri, false );
    }

    function mintMembership( uint _mType, uint _quantity, address _to, string memory _uri ) public payable {

        // is the membership type available for sale
        require( isAvailableForSale(_mType), "M0: not for sale" );

        // is presale or public sale open
        require( isPresaleOpen() || isPublicSaleOpen(), "M1: not available for sale" );

        // if premint is on make sure the address is allowed to buy
        bool onWhitelist = isOnWhitelist(_to);
        uint hasDiscount =  _discountType[_to];

        if ( _premintIsOn ) {
            require( onWhitelist, "M2: not whitelist" );
        }

        // trying to mint zero tokens
        require( _quantity != 0, "M3: zero tokens" );

        // make sure not trying to mint too many
        require( _quantity <= howManyCanMint(_to), "M4: too many" );

        // is there enough supply available
        require( _forSaleSupply[_mType] >= _quantity, "M5: mint fewer" );

        // did they give us enough money 
        //uint cost = _quantity * getPriceForWallet( _mType, _to );
        uint cost = _quantity * getPriceForWallet( _mType, _to );
        require( msg.value >= cost, "M6: not enough ETH" );

        // Mint it! 
        _mintTokens( _mType, _quantity, _to, _uri, false );

        // if you had a discount, it's spent
        if ( hasDiscount != 0 ) {
           _discountType[_to] = 0; 
        }
    }

    // ----------------------------------------------------------------------------------------------
    // allow switching of treasury and withdrawall of funds

    function setTreasury( address _newTreasury )  public onlyRole(DEFAULT_ADMIN_ROLE) {
        _addTreasury = _newTreasury;
    }

    function withdrawAll()  public onlyRole(DEFAULT_ADMIN_ROLE) {
        uint256 balance = address(this).balance;
        require(balance > 0);
        _widthdraw( _addTreasury, address(this).balance );
    }

    function _widthdraw(address _address, uint256 _amount) private {
        (bool success, ) = _address.call{value: _amount}("");
        require(success, "Transfer failed.");
    }

    // ----------------------------------------------------------------------------------------------
    // Managment functions provided by OpenZepplin that were not touched

    function _beforeTokenTransfer(address from, address to, uint256 tokenId)
        internal
        override(ERC721, ERC721Enumerable)
    {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC721Enumerable, AccessControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    function totalToken() 
        public
        view
        returns (uint256)
    {
        return _tokenIdCounter.current();
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721, ERC721URIStorage)
        returns (string memory)
    {
        return super.tokenURI(tokenId);
    }

    // The following functions are overrides required by Solidity.

    function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) onlyRole(DEFAULT_ADMIN_ROLE) {
        super._burn(tokenId);
    }
}

File 2 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 3 of 16 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

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

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 4 of 16 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

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

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

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

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 5 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 6 of 16 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 7 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 12 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 13 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 14 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 15 of 16 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 16 of 16 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"welcomeToTheMembership","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_dType","type":"uint256"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256","name":"_dType","type":"uint256"}],"name":"addToWhitelistArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mType","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"string","name":"_uri","type":"string"}],"name":"airdropMembership","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_mType","type":"uint256"},{"internalType":"uint256","name":"_mp0","type":"uint256"},{"internalType":"uint256","name":"_mp1","type":"uint256"},{"internalType":"uint256","name":"_mp2","type":"uint256"},{"internalType":"uint256","name":"_mp3","type":"uint256"},{"internalType":"uint256","name":"_mp4","type":"uint256"}],"name":"configureDiscountTable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mType","type":"uint256"},{"internalType":"uint256","name":"_mSupply","type":"uint256"},{"internalType":"uint256","name":"_mReserved","type":"uint256"},{"internalType":"uint256","name":"_mPrice","type":"uint256"}],"name":"configureMembership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_membershipType","type":"uint256"}],"name":"getAvailableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getMembersipTyoe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_membershipType","type":"uint256"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_membershipType","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"getPriceForWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_membershipType","type":"uint256"}],"name":"getTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"howManyCanMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"_mType","type":"uint256"}],"name":"isAvailableForSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isOnWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mType","type":"uint256"}],"name":"isSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mType","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"string","name":"_uri","type":"string"}],"name":"mintMembership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mType","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"string","name":"_uri","type":"string"}],"name":"mintReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mType","type":"uint256"},{"internalType":"bool","name":"_avail","type":"bool"}],"name":"setAvailableForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setNoSaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPreSaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPublicSaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalToken","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":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600d805461ffff191690556101206040526000608081815260a082905260c082905260e0829052610100919091526200003d90600e9060056200084c565b506040805160a081018252600080825260208201819052918101829052606081018290526080810191909152620000799060139060056200084c565b506040805160a081018252600080825260208201819052918101829052606081018290526080810191909152620000b59060189060056200084c565b506040805160a081018252600080825260208201819052918101829052606081018290526080810191909152620000f190601d9060056200084c565b506040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526200012d90602290600562000894565b506040805160a081018252600080825260208201819052918101829052606081018290526080810191909152620001699060239060056200084c565b506040805160a081018252600080825260208201819052918101829052606081018290526080810191909152620001a59060289060056200084c565b506040805160a081018252600080825260208201819052918101829052606081018290526080810191909152620001e190602d9060056200084c565b50604051806060016040528060228152602001620040976022913980516200021291604e9160209091019062000928565b503480156200022057600080fd5b50604080518082018252601981527f43616e766173417274697374734d656d6265727368697056320000000000000060208083019182528351808501909452600484526321a0a69960e11b908401528151919291620002829160009162000928565b5080516200029890600190602084019062000928565b50620002aa915060009050336200036c565b620002c5600080516020620040b9833981519152336200036c565b620002f17f3496e2e73c4d42b75d702e60d9e48102720b8691234415963a5a857b86425d07336200036c565b62000302600160ff601e8062000411565b6200031560026115b36064600a62000411565b601e54603955601f54603e5562000339600c62000548602090811b620017fb17901c565b6200034660018062000551565b620003546002600162000551565b604d80546001600160a01b0319163317905562000b8d565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166200040d576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003cc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006200041f8133620005be565b60058510620004645760405162461bcd60e51b815260206004820152600c60248201526b496e76616c6964207479706560a01b60448201526064015b60405180910390fd5b600e85600581106200047a576200047a620009bc565b015415620004c05760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e4818dbdb999a59dd5c995960721b60448201526064016200045b565b83600e8660058110620004d757620004d7620009bc565b01558260138660058110620004f057620004f0620009bc565b0155620004fe8385620009e8565b60188660058110620005145762000514620009bc565b015562000529662386f26fc100008362000a02565b601d86600581106200053f576200053f620009bc565b01555050505050565b80546001019055565b600080516020620040b98339815191526200056d8133620005be565b62000578836200065b565b1515600114620005b9578160228460058110620005995762000599620009bc565b602091828204019190066101000a81548160ff0219169083151502179055505b505050565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff166200040d576200060a816001600160a01b031660146200068c60201b620018041760201c565b62000620836020620018046200068c821b17811c565b6040516020016200063392919062000a57565b60408051601f198184030181529082905262461bcd60e51b82526200045b9160040162000ad0565b600060188260058110620006735762000673620009bc565b0154156200068357600062000686565b60015b92915050565b606060006200069d83600262000a02565b620006aa90600262000b05565b6001600160401b03811115620006c457620006c462000b20565b6040519080825280601f01601f191660200182016040528015620006ef576020820181803683370190505b509050600360fc1b816000815181106200070d576200070d620009bc565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106200073f576200073f620009bc565b60200101906001600160f81b031916908160001a90535060006200076584600262000a02565b6200077290600162000b05565b90505b6001811115620007f4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110620007aa57620007aa620009bc565b1a60f81b828281518110620007c357620007c3620009bc565b60200101906001600160f81b031916908160001a90535060049490941c93620007ec8162000b36565b905062000775565b508315620008455760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200045b565b9392505050565b826005810192821562000882579160200282015b8281111562000882578251829060ff1690559160200191906001019062000860565b5062000890929150620009a5565b5090565b600183019183908215620008825791602002820160005b83821115620008ea57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302620008ab565b8015620009195782816101000a81549060ff0219169055600101602081600001049283019260010302620008ea565b505062000890929150620009a5565b828054620009369062000b50565b90600052602060002090601f0160209004810192826200095a576000855562000882565b82601f106200097557805160ff191683800117855562000882565b8280016001018555821562000882579182015b828111156200088257825182559160200191906001019062000988565b5b80821115620008905760008155600101620009a6565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015620009fd57620009fd620009d2565b500390565b600081600019048311821515161562000a1f5762000a1f620009d2565b500290565b60005b8381101562000a4157818101518382015260200162000a27565b8381111562000a51576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000a9181601785016020880162000a24565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162000ac481602884016020880162000a24565b01602801949350505050565b602081526000825180602084015262000af181604085016020870162000a24565b601f01601f19169190910160400192915050565b6000821982111562000b1b5762000b1b620009d2565b500190565b634e487b7160e01b600052604160045260246000fd5b60008162000b485762000b48620009d2565b506000190190565b600181811c9082168062000b6557607f821691505b6020821081141562000b8757634e487b7160e01b600052602260045260246000fd5b50919050565b6134fa8062000b9d6000396000f3fe60806040526004361061026a5760003560e01c806370a082311161014b57806370a08231146105d25780637a997ab7146105f25780637ba5dd7f146106145780638051522d14610634578063853828b614610654578063867307a1146106695780638d952e5e1461067c57806390cfd9b01461069c57806391d14854146106b157806392ab723e146106d157806395d89b41146106f1578063a217fddf14610706578063a22cb4651461071b578063ab963a5d1461073b578063b88d4fde1461075b578063c87422911461077b578063c87b56dd14610790578063d5391393146107b0578063d547741f146107d2578063e57a857b146107f2578063e757223014610812578063e985e9c514610832578063eb4f847b14610852578063f0a3a97c1461086a578063f0ba9cb81461089e578063f0f44260146108be578063f5ec12cd146108de57600080fd5b806301ffc9a71461026f57806306fdde03146102a45780630708fccf146102c6578063081812fc146102e8578063095ea7b314610320578063113990b814610340578063162094c41461036957806318160ddd1461038957806319a727f31461039e5780631a6949e3146103be578063214405fc146103db57806323b872dd146103fb578063248a9ca31461041b5780632f2ff15d1461043b5780632f745c591461045b5780633145065c1461047b57806336568abe1461049b5780633a3ab672146104bb57806342842e0e146104db5780634e2baf56146104fb5780634f6ccce71461051057806355f804b314610530578063609d6c2614610550578063626be567146105705780636352211e146105855780636cffc846146105a5575b600080fd5b34801561027b57600080fd5b5061028f61028a366004612b78565b6108fe565b60405190151581526020015b60405180910390f35b3480156102b057600080fd5b506102b961090f565b60405161029b9190612bed565b3480156102d257600080fd5b506102e66102e1366004612c10565b6109a1565b005b3480156102f457600080fd5b50610308610303366004612c3c565b610a05565b6040516001600160a01b03909116815260200161029b565b34801561032c57600080fd5b506102e661033b366004612c6c565b610a92565b34801561034c57600080fd5b5061035b662386f26fc1000081565b60405190815260200161029b565b34801561037557600080fd5b506102e6610384366004612d53565b610b9e565b34801561039557600080fd5b5060085461035b565b3480156103aa57600080fd5b506102e66103b9366004612d99565b610bc1565b3480156103ca57600080fd5b50600d54610100900460ff1661028f565b3480156103e757600080fd5b506102e66103f6366004612c6c565b610cbc565b34801561040757600080fd5b506102e6610416366004612dcb565b610cfd565b34801561042757600080fd5b5061035b610436366004612c3c565b610d2e565b34801561044757600080fd5b506102e6610456366004612e07565b610d43565b34801561046757600080fd5b5061035b610476366004612c6c565b610d60565b34801561048757600080fd5b5061028f610496366004612c3c565b610df6565b3480156104a757600080fd5b506102e66104b6366004612e07565b610e42565b3480156104c757600080fd5b5061028f6104d6366004612e2a565b610ec0565b3480156104e757600080fd5b506102e66104f6366004612dcb565b610eda565b34801561050757600080fd5b506102e6610ef5565b34801561051c57600080fd5b5061035b61052b366004612c3c565b610f1f565b34801561053c57600080fd5b506102e661054b366004612e45565b610fb2565b34801561055c57600080fd5b506102e661056b366004612e79565b610fde565b34801561057c57600080fd5b5061035b611079565b34801561059157600080fd5b506103086105a0366004612c3c565b611089565b3480156105b157600080fd5b5061035b6105c0366004612c3c565b60009081526033602052604090205490565b3480156105de57600080fd5b5061035b6105ed366004612e2a565b611100565b3480156105fe57600080fd5b5061035b60008051602061348583398151915281565b34801561062057600080fd5b5061035b61062f366004612e2a565b611187565b34801561064057600080fd5b5061035b61064f366004612c3c565b6111dc565b34801561066057600080fd5b506102e66111f9565b6102e6610677366004612ecf565b611226565b34801561068857600080fd5b506102e6610697366004612f2f565b61142d565b3480156106a857600080fd5b506102e6611497565b3480156106bd57600080fd5b5061028f6106cc366004612e07565b6114be565b3480156106dd57600080fd5b5061035b6106ec366004612c3c565b6114e9565b3480156106fd57600080fd5b506102b96114fe565b34801561071257600080fd5b5061035b600081565b34801561072757600080fd5b506102e6610736366004612f72565b61150d565b34801561074757600080fd5b506102e6610756366004612f9c565b611518565b34801561076757600080fd5b506102e661077636600461304e565b6115bd565b34801561078757600080fd5b506102e66115ef565b34801561079c57600080fd5b506102b96107ab366004612c3c565b61161a565b3480156107bc57600080fd5b5061035b6000805160206134a583398151915281565b3480156107de57600080fd5b506102e66107ed366004612e07565b611625565b3480156107fe57600080fd5b506102e661080d366004612ecf565b611642565b34801561081e57600080fd5b5061035b61082d366004612c3c565b61170e565b34801561083e57600080fd5b5061028f61084d3660046130bd565b611723565b34801561085e57600080fd5b50600d5460ff1661028f565b34801561087657600080fd5b5061035b7f3496e2e73c4d42b75d702e60d9e48102720b8691234415963a5a857b86425d0781565b3480156108aa57600080fd5b5061028f6108b9366004612c3c565b611751565b3480156108ca57600080fd5b506102e66108d9366004612e2a565b611774565b3480156108ea57600080fd5b5061035b6108f9366004612e07565b6117a3565b6000610909826119a6565b92915050565b60606000805461091e906130e7565b80601f016020809104026020016040519081016040528092919081815260200182805461094a906130e7565b80156109975780601f1061096c57610100808354040283529160200191610997565b820191906000526020600020905b81548152906001019060200180831161097a57829003601f168201915b5050505050905090565b6000805160206134a58339815191526109ba81336119cb565b6109c383611751565b1515600114610a005781602284600581106109e0576109e0613122565b602091828204019190066101000a81548160ff0219169083151502179055505b505050565b6000610a1082611a2f565b610a765760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a9d82611089565b9050806001600160a01b0316836001600160a01b03161415610b0b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a6d565b336001600160a01b0382161480610b275750610b278133611723565b610b945760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610a6d565b610a008383611a4c565b6000805160206134a5833981519152610bb781336119cb565b610a008383611aba565b6000610bcd81336119cb565b60058510610bed5760405162461bcd60e51b8152600401610a6d90613138565b600e8560058110610c0057610c00613122565b015415610c445760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e4818dbdb999a59dd5c995960721b6044820152606401610a6d565b83600e8660058110610c5857610c58613122565b01558260138660058110610c6e57610c6e613122565b0155610c7a8385613174565b60188660058110610c8d57610c8d613122565b0155610ca0662386f26fc100008361318b565b601d8660058110610cb357610cb3613122565b01555050505050565b6000610cc881336119cb565b610ce060008051602061348583398151915284611b45565b506001600160a01b03909116600090815260326020526040902055565b610d073382611bcb565b610d235760405162461bcd60e51b8152600401610a6d906131aa565b610a00838383611c95565b6000908152600b602052604090206001015490565b610d4c82610d2e565b610d5681336119cb565b610a008383611b45565b6000610d6b83611100565b8210610dcd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a6d565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000610e0182611751565b15610e0e57506000919050565b60228260058110610e2157610e21613122565b602081049091015460ff601f9092166101000a90041692915050565b919050565b6001600160a01b0381163314610eb25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a6d565b610ebc8282611e40565b5050565b6000610909600080516020613485833981519152836114be565b610a00838383604051806020016040528060008152506115bd565b6000805160206134a5833981519152610f0e81336119cb565b50600d805461ffff19166001179055565b6000610f2a60085490565b8210610f8d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a6d565b60088281548110610fa057610fa0613122565b90600052602060002001549050919050565b6000805160206134a5833981519152610fcb81336119cb565b8151610a0090604e906020850190612ac6565b6000805160206134a5833981519152610ff781336119cb565b60006013856005811061100c5761100c613122565b01549050600081116110565760405162461bcd60e51b8152602060048201526013602482015272134c4c0e88185b1c9958591e481b5a5b9d1959606a1b6044820152606401610a6d565b611064858286866001611ea7565b600060138660058110610cb357610cb3613122565b6000611084600c5490565b905090565b6000818152600260205260408120546001600160a01b0316806109095760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a6d565b60006001600160a01b03821661116b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a6d565b506001600160a01b031660009081526003602052604090205490565b6001600160a01b0381166000908152603260205260408120546111ac57506005919050565b6001600160a01b0382166000908152603260205260409020546004146111d457506003919050565b506001919050565b6000601882600581106111f1576111f1613122565b015492915050565b600061120581336119cb565b478061121057600080fd5b604d54610ebc906001600160a01b031647611f7c565b61122f84610df6565b61124b5760405162461bcd60e51b8152600401610a6d906131fb565b600d5460ff16806112635750600d54610100900460ff165b6112ac5760405162461bcd60e51b815260206004820152601a6024820152794d313a206e6f7420617661696c61626c6520666f722073616c6560301b6044820152606401610a6d565b60006112b783610ec0565b6001600160a01b038416600090815260326020526040902054600d549192509060ff161561132057816113205760405162461bcd60e51b8152602060048201526011602482015270134c8e881b9bdd081dda1a5d195b1a5cdd607a1b6044820152606401610a6d565b8461133d5760405162461bcd60e51b8152600401610a6d90613225565b61134684611187565b8511156113655760405162461bcd60e51b8152600401610a6d9061324e565b846018876005811061137957611379613122565b015410156113995760405162461bcd60e51b8152600401610a6d90613274565b60006113a587866117a3565b6113af908761318b565b9050803410156113f65760405162461bcd60e51b815260206004820152601260248201527109a6c7440dcdee840cadcdeeaced0408aa8960731b6044820152606401610a6d565b611404878787876000611ea7565b8115611424576001600160a01b0385166000908152603260205260408120555b50505050505050565b600061143981336119cb565b6114248761144e662386f26fc100008961318b565b61145f662386f26fc100008961318b565b611470662386f26fc100008961318b565b611481662386f26fc100008961318b565b611492662386f26fc100008961318b565b612012565b6000805160206134a58339815191526114b081336119cb565b50600d805461ffff19169055565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600e82600581106111f1576111f1613122565b60606001805461091e906130e7565b610ebc338383612130565b600061152481336119cb565b60005b83518110156115b75761156160008051602061348583398151915285838151811061155457611554613122565b6020026020010151611b45565b826032600086848151811061157857611578613122565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806115af9061329c565b915050611527565b50505050565b6115c73383611bcb565b6115e35760405162461bcd60e51b8152600401610a6d906131aa565b6115b7848484846121fb565b6000805160206134a583398151915261160881336119cb565b50600d805461ffff1916610100179055565b60606109098261222e565b61162e82610d2e565b61163881336119cb565b610a008383611e40565b6000805160206134a583398151915261165b81336119cb565b61166485610df6565b6116805760405162461bcd60e51b8152600401610a6d906131fb565b8361169d5760405162461bcd60e51b8152600401610a6d90613225565b6116a683611187565b8411156116c55760405162461bcd60e51b8152600401610a6d9061324e565b83601886600581106116d9576116d9613122565b015410156116f95760405162461bcd60e51b8152600401610a6d90613274565b611707858585856000611ea7565b5050505050565b6000601d82600581106111f1576111f1613122565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006018826005811061176657611766613122565b0154156111d4576000610909565b600061178081336119cb565b50604d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000603483600581106117b8576117b8613122565b6005020160326000846001600160a01b03166001600160a01b0316815260200190815260200160002054600581106117f2576117f2613122565b01549392505050565b80546001019055565b6060600061181383600261318b565b61181e9060026132b7565b6001600160401b0381111561183557611835612c96565b6040519080825280601f01601f19166020018201604052801561185f576020820181803683370190505b509050600360fc1b8160008151811061187a5761187a613122565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106118a9576118a9613122565b60200101906001600160f81b031916908160001a90535060006118cd84600261318b565b6118d89060016132b7565b90505b6001811115611950576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061190c5761190c613122565b1a60f81b82828151811061192257611922613122565b60200101906001600160f81b031916908160001a90535060049490941c93611949816132cf565b90506118db565b50831561199f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a6d565b9392505050565b60006001600160e01b03198216637965db0b60e01b1480610909575061090982612390565b6119d582826114be565b610ebc576119ed816001600160a01b03166014611804565b6119f8836020611804565b604051602001611a099291906132e6565b60408051601f198184030181529082905262461bcd60e51b8252610a6d91600401612bed565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a8182611089565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611ac382611a2f565b611b265760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a6d565b6000828152600a602090815260409091208251610a0092840190612ac6565b611b4f82826114be565b610ebc576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611b873390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611bd682611a2f565b611c375760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a6d565b6000611c4283611089565b9050806001600160a01b0316846001600160a01b03161480611c7d5750836001600160a01b0316611c7284610a05565b6001600160a01b0316145b80611c8d5750611c8d8185611723565b949350505050565b826001600160a01b0316611ca882611089565b6001600160a01b031614611d105760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a6d565b6001600160a01b038216611d725760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a6d565b611d7d8383836123b5565b611d88600082611a4c565b6001600160a01b0383166000908152600360205260408120805460019290611db1908490613174565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ddf9084906132b7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611e4a82826114be565b15610ebc576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b84811015611f74576000611ebd600c5490565b9050611ecd600c80546001019055565b611ed785826123c0565b611ee18185611aba565b600081815260336020526040902087905582611f6157600160188860058110611f0c57611f0c613122565b0154611f189190613174565b60188860058110611f2b57611f2b613122565b01556040518181527f88f448b9cc200f1c4d615e4ddbcad0cbe0e1eaa39f012ad1b7df90c3f0abb3449060200160405180910390a15b5080611f6c8161329c565b915050611eaa565b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fc9576040519150601f19603f3d011682016040523d82523d6000602084013e611fce565b606091505b5050905080610a005760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610a6d565b600061201e81336119cb565b6005871061203e5760405162461bcd60e51b8152600401610a6d90613138565b6034876005811061205157612051613122565b60050201600101541561209b5760405162461bcd60e51b8152602060048201526012602482015271436f6e6669677572656420416c726561647960701b6044820152606401610a6d565b85603488600581106120af576120af613122565b600502016000015584603488600581106120cb576120cb613122565b600502016001015583603488600581106120e7576120e7613122565b6005020160020155826034886005811061210357612103613122565b6005020160030155816034886005811061211f5761211f613122565b600502016004015550505050505050565b816001600160a01b0316836001600160a01b0316141561218e5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610a6d565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612206848484611c95565b612212848484846123da565b6115b75760405162461bcd60e51b8152600401610a6d90613355565b606061223982611a2f565b61229f5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a6d565b6000828152600a6020526040812080546122b8906130e7565b80601f01602080910402602001604051908101604052809291908181526020018280546122e4906130e7565b80156123315780601f1061230657610100808354040283529160200191612331565b820191906000526020600020905b81548152906001019060200180831161231457829003601f168201915b5050505050905060006123426124e7565b9050805160001415612355575092915050565b81511561238757808260405160200161236f9291906133a7565b60405160208183030381529060405292505050919050565b611c8d846124f6565b60006001600160e01b0319821663780e9d6360e01b14806109095750610909826125c0565b610a00838383612610565b610ebc8282604051806020016040528060008152506126c8565b60006001600160a01b0384163b156124dc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061241e9033908990889088906004016133d6565b602060405180830381600087803b15801561243857600080fd5b505af1925050508015612468575060408051601f3d908101601f1916820190925261246591810190613413565b60015b6124c2573d808015612496576040519150601f19603f3d011682016040523d82523d6000602084013e61249b565b606091505b5080516124ba5760405162461bcd60e51b8152600401610a6d90613355565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c8d565b506001949350505050565b6060604e805461091e906130e7565b606061250182611a2f565b6125655760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a6d565b600061256f6124e7565b9050600081511161258f576040518060200160405280600081525061199f565b80612599846126fb565b6040516020016125aa9291906133a7565b6040516020818303038152906040529392505050565b60006001600160e01b031982166380ac58cd60e01b14806125f157506001600160e01b03198216635b5e139f60e01b145b8061090957506301ffc9a760e01b6001600160e01b0319831614610909565b6001600160a01b03831661266b5761266681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61268e565b816001600160a01b0316836001600160a01b03161461268e5761268e83826127f8565b6001600160a01b0382166126a557610a0081612895565b826001600160a01b0316826001600160a01b031614610a0057610a008282612944565b6126d28383612988565b6126df60008484846123da565b610a005760405162461bcd60e51b8152600401610a6d90613355565b60608161271f5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561274957806127338161329c565b91506127429050600a83613446565b9150612723565b6000816001600160401b0381111561276357612763612c96565b6040519080825280601f01601f19166020018201604052801561278d576020820181803683370190505b5090505b8415611c8d576127a2600183613174565b91506127af600a8661345a565b6127ba9060306132b7565b60f81b8183815181106127cf576127cf613122565b60200101906001600160f81b031916908160001a9053506127f1600a86613446565b9450612791565b6000600161280584611100565b61280f9190613174565b600083815260076020526040902054909150808214612862576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906128a790600190613174565b600083815260096020526040812054600880549394509092849081106128cf576128cf613122565b9060005260206000200154905080600883815481106128f0576128f0613122565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129285761292861346e565b6001900381819060005260206000200160009055905550505050565b600061294f83611100565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166129de5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a6d565b6129e781611a2f565b15612a335760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610a6d565b612a3f600083836123b5565b6001600160a01b0382166000908152600360205260408120805460019290612a689084906132b7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612ad2906130e7565b90600052602060002090601f016020900481019282612af45760008555612b3a565b82601f10612b0d57805160ff1916838001178555612b3a565b82800160010185558215612b3a579182015b82811115612b3a578251825591602001919060010190612b1f565b50612b46929150612b4a565b5090565b5b80821115612b465760008155600101612b4b565b6001600160e01b031981168114612b7557600080fd5b50565b600060208284031215612b8a57600080fd5b813561199f81612b5f565b60005b83811015612bb0578181015183820152602001612b98565b838111156115b75750506000910152565b60008151808452612bd9816020860160208601612b95565b601f01601f19169290920160200192915050565b60208152600061199f6020830184612bc1565b80358015158114610e3d57600080fd5b60008060408385031215612c2357600080fd5b82359150612c3360208401612c00565b90509250929050565b600060208284031215612c4e57600080fd5b5035919050565b80356001600160a01b0381168114610e3d57600080fd5b60008060408385031215612c7f57600080fd5b612c8883612c55565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612cd457612cd4612c96565b604052919050565b60006001600160401b03831115612cf557612cf5612c96565b612d08601f8401601f1916602001612cac565b9050828152838383011115612d1c57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612d4457600080fd5b61199f83833560208501612cdc565b60008060408385031215612d6657600080fd5b8235915060208301356001600160401b03811115612d8357600080fd5b612d8f85828601612d33565b9150509250929050565b60008060008060808587031215612daf57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060608486031215612de057600080fd5b612de984612c55565b9250612df760208501612c55565b9150604084013590509250925092565b60008060408385031215612e1a57600080fd5b82359150612c3360208401612c55565b600060208284031215612e3c57600080fd5b61199f82612c55565b600060208284031215612e5757600080fd5b81356001600160401b03811115612e6d57600080fd5b611c8d84828501612d33565b600080600060608486031215612e8e57600080fd5b83359250612e9e60208501612c55565b915060408401356001600160401b03811115612eb957600080fd5b612ec586828701612d33565b9150509250925092565b60008060008060808587031215612ee557600080fd5b8435935060208501359250612efc60408601612c55565b915060608501356001600160401b03811115612f1757600080fd5b612f2387828801612d33565b91505092959194509250565b60008060008060008060c08789031215612f4857600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b60008060408385031215612f8557600080fd5b612f8e83612c55565b9150612c3360208401612c00565b60008060408385031215612faf57600080fd5b82356001600160401b0380821115612fc657600080fd5b818501915085601f830112612fda57600080fd5b8135602082821115612fee57612fee612c96565b8160051b9250612fff818401612cac565b828152928401810192818101908985111561301957600080fd5b948201945b8486101561303e5761302f86612c55565b8252948201949082019061301e565b9997909101359750505050505050565b6000806000806080858703121561306457600080fd5b61306d85612c55565b935061307b60208601612c55565b92506040850135915060608501356001600160401b0381111561309d57600080fd5b8501601f810187136130ae57600080fd5b612f2387823560208401612cdc565b600080604083850312156130d057600080fd5b6130d983612c55565b9150612c3360208401612c55565b600181811c908216806130fb57607f821691505b6020821081141561311c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6020808252600c908201526b496e76616c6964207479706560a01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156131865761318661315e565b500390565b60008160001904831182151516156131a5576131a561315e565b500290565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526010908201526f4d303a206e6f7420666f722073616c6560801b604082015260600190565b6020808252600f908201526e4d333a207a65726f20746f6b656e7360881b604082015260600190565b6020808252600c908201526b4d343a20746f6f206d616e7960a01b604082015260600190565b6020808252600e908201526d269a9d1036b4b73a103332bbb2b960911b604082015260600190565b60006000198214156132b0576132b061315e565b5060010190565b600082198211156132ca576132ca61315e565b500190565b6000816132de576132de61315e565b506000190190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613318816017850160208801612b95565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613349816028840160208801612b95565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600083516133b9818460208801612b95565b8351908301906133cd818360208801612b95565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061340990830184612bc1565b9695505050505050565b60006020828403121561342557600080fd5b815161199f81612b5f565b634e487b7160e01b600052601260045260246000fd5b60008261345557613455613430565b500490565b60008261346957613469613430565b500690565b634e487b7160e01b600052603160045260246000fdfedc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be67609f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220594c14f50da34d82f34110d1276c6ebc5411db58e7c0c6bd83662b25982925a664736f6c6343000809003368747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6

Deployed Bytecode

0x60806040526004361061026a5760003560e01c806370a082311161014b57806370a08231146105d25780637a997ab7146105f25780637ba5dd7f146106145780638051522d14610634578063853828b614610654578063867307a1146106695780638d952e5e1461067c57806390cfd9b01461069c57806391d14854146106b157806392ab723e146106d157806395d89b41146106f1578063a217fddf14610706578063a22cb4651461071b578063ab963a5d1461073b578063b88d4fde1461075b578063c87422911461077b578063c87b56dd14610790578063d5391393146107b0578063d547741f146107d2578063e57a857b146107f2578063e757223014610812578063e985e9c514610832578063eb4f847b14610852578063f0a3a97c1461086a578063f0ba9cb81461089e578063f0f44260146108be578063f5ec12cd146108de57600080fd5b806301ffc9a71461026f57806306fdde03146102a45780630708fccf146102c6578063081812fc146102e8578063095ea7b314610320578063113990b814610340578063162094c41461036957806318160ddd1461038957806319a727f31461039e5780631a6949e3146103be578063214405fc146103db57806323b872dd146103fb578063248a9ca31461041b5780632f2ff15d1461043b5780632f745c591461045b5780633145065c1461047b57806336568abe1461049b5780633a3ab672146104bb57806342842e0e146104db5780634e2baf56146104fb5780634f6ccce71461051057806355f804b314610530578063609d6c2614610550578063626be567146105705780636352211e146105855780636cffc846146105a5575b600080fd5b34801561027b57600080fd5b5061028f61028a366004612b78565b6108fe565b60405190151581526020015b60405180910390f35b3480156102b057600080fd5b506102b961090f565b60405161029b9190612bed565b3480156102d257600080fd5b506102e66102e1366004612c10565b6109a1565b005b3480156102f457600080fd5b50610308610303366004612c3c565b610a05565b6040516001600160a01b03909116815260200161029b565b34801561032c57600080fd5b506102e661033b366004612c6c565b610a92565b34801561034c57600080fd5b5061035b662386f26fc1000081565b60405190815260200161029b565b34801561037557600080fd5b506102e6610384366004612d53565b610b9e565b34801561039557600080fd5b5060085461035b565b3480156103aa57600080fd5b506102e66103b9366004612d99565b610bc1565b3480156103ca57600080fd5b50600d54610100900460ff1661028f565b3480156103e757600080fd5b506102e66103f6366004612c6c565b610cbc565b34801561040757600080fd5b506102e6610416366004612dcb565b610cfd565b34801561042757600080fd5b5061035b610436366004612c3c565b610d2e565b34801561044757600080fd5b506102e6610456366004612e07565b610d43565b34801561046757600080fd5b5061035b610476366004612c6c565b610d60565b34801561048757600080fd5b5061028f610496366004612c3c565b610df6565b3480156104a757600080fd5b506102e66104b6366004612e07565b610e42565b3480156104c757600080fd5b5061028f6104d6366004612e2a565b610ec0565b3480156104e757600080fd5b506102e66104f6366004612dcb565b610eda565b34801561050757600080fd5b506102e6610ef5565b34801561051c57600080fd5b5061035b61052b366004612c3c565b610f1f565b34801561053c57600080fd5b506102e661054b366004612e45565b610fb2565b34801561055c57600080fd5b506102e661056b366004612e79565b610fde565b34801561057c57600080fd5b5061035b611079565b34801561059157600080fd5b506103086105a0366004612c3c565b611089565b3480156105b157600080fd5b5061035b6105c0366004612c3c565b60009081526033602052604090205490565b3480156105de57600080fd5b5061035b6105ed366004612e2a565b611100565b3480156105fe57600080fd5b5061035b60008051602061348583398151915281565b34801561062057600080fd5b5061035b61062f366004612e2a565b611187565b34801561064057600080fd5b5061035b61064f366004612c3c565b6111dc565b34801561066057600080fd5b506102e66111f9565b6102e6610677366004612ecf565b611226565b34801561068857600080fd5b506102e6610697366004612f2f565b61142d565b3480156106a857600080fd5b506102e6611497565b3480156106bd57600080fd5b5061028f6106cc366004612e07565b6114be565b3480156106dd57600080fd5b5061035b6106ec366004612c3c565b6114e9565b3480156106fd57600080fd5b506102b96114fe565b34801561071257600080fd5b5061035b600081565b34801561072757600080fd5b506102e6610736366004612f72565b61150d565b34801561074757600080fd5b506102e6610756366004612f9c565b611518565b34801561076757600080fd5b506102e661077636600461304e565b6115bd565b34801561078757600080fd5b506102e66115ef565b34801561079c57600080fd5b506102b96107ab366004612c3c565b61161a565b3480156107bc57600080fd5b5061035b6000805160206134a583398151915281565b3480156107de57600080fd5b506102e66107ed366004612e07565b611625565b3480156107fe57600080fd5b506102e661080d366004612ecf565b611642565b34801561081e57600080fd5b5061035b61082d366004612c3c565b61170e565b34801561083e57600080fd5b5061028f61084d3660046130bd565b611723565b34801561085e57600080fd5b50600d5460ff1661028f565b34801561087657600080fd5b5061035b7f3496e2e73c4d42b75d702e60d9e48102720b8691234415963a5a857b86425d0781565b3480156108aa57600080fd5b5061028f6108b9366004612c3c565b611751565b3480156108ca57600080fd5b506102e66108d9366004612e2a565b611774565b3480156108ea57600080fd5b5061035b6108f9366004612e07565b6117a3565b6000610909826119a6565b92915050565b60606000805461091e906130e7565b80601f016020809104026020016040519081016040528092919081815260200182805461094a906130e7565b80156109975780601f1061096c57610100808354040283529160200191610997565b820191906000526020600020905b81548152906001019060200180831161097a57829003601f168201915b5050505050905090565b6000805160206134a58339815191526109ba81336119cb565b6109c383611751565b1515600114610a005781602284600581106109e0576109e0613122565b602091828204019190066101000a81548160ff0219169083151502179055505b505050565b6000610a1082611a2f565b610a765760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a9d82611089565b9050806001600160a01b0316836001600160a01b03161415610b0b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a6d565b336001600160a01b0382161480610b275750610b278133611723565b610b945760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610a6d565b610a008383611a4c565b6000805160206134a5833981519152610bb781336119cb565b610a008383611aba565b6000610bcd81336119cb565b60058510610bed5760405162461bcd60e51b8152600401610a6d90613138565b600e8560058110610c0057610c00613122565b015415610c445760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e4818dbdb999a59dd5c995960721b6044820152606401610a6d565b83600e8660058110610c5857610c58613122565b01558260138660058110610c6e57610c6e613122565b0155610c7a8385613174565b60188660058110610c8d57610c8d613122565b0155610ca0662386f26fc100008361318b565b601d8660058110610cb357610cb3613122565b01555050505050565b6000610cc881336119cb565b610ce060008051602061348583398151915284611b45565b506001600160a01b03909116600090815260326020526040902055565b610d073382611bcb565b610d235760405162461bcd60e51b8152600401610a6d906131aa565b610a00838383611c95565b6000908152600b602052604090206001015490565b610d4c82610d2e565b610d5681336119cb565b610a008383611b45565b6000610d6b83611100565b8210610dcd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a6d565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000610e0182611751565b15610e0e57506000919050565b60228260058110610e2157610e21613122565b602081049091015460ff601f9092166101000a90041692915050565b919050565b6001600160a01b0381163314610eb25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a6d565b610ebc8282611e40565b5050565b6000610909600080516020613485833981519152836114be565b610a00838383604051806020016040528060008152506115bd565b6000805160206134a5833981519152610f0e81336119cb565b50600d805461ffff19166001179055565b6000610f2a60085490565b8210610f8d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a6d565b60088281548110610fa057610fa0613122565b90600052602060002001549050919050565b6000805160206134a5833981519152610fcb81336119cb565b8151610a0090604e906020850190612ac6565b6000805160206134a5833981519152610ff781336119cb565b60006013856005811061100c5761100c613122565b01549050600081116110565760405162461bcd60e51b8152602060048201526013602482015272134c4c0e88185b1c9958591e481b5a5b9d1959606a1b6044820152606401610a6d565b611064858286866001611ea7565b600060138660058110610cb357610cb3613122565b6000611084600c5490565b905090565b6000818152600260205260408120546001600160a01b0316806109095760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a6d565b60006001600160a01b03821661116b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a6d565b506001600160a01b031660009081526003602052604090205490565b6001600160a01b0381166000908152603260205260408120546111ac57506005919050565b6001600160a01b0382166000908152603260205260409020546004146111d457506003919050565b506001919050565b6000601882600581106111f1576111f1613122565b015492915050565b600061120581336119cb565b478061121057600080fd5b604d54610ebc906001600160a01b031647611f7c565b61122f84610df6565b61124b5760405162461bcd60e51b8152600401610a6d906131fb565b600d5460ff16806112635750600d54610100900460ff165b6112ac5760405162461bcd60e51b815260206004820152601a6024820152794d313a206e6f7420617661696c61626c6520666f722073616c6560301b6044820152606401610a6d565b60006112b783610ec0565b6001600160a01b038416600090815260326020526040902054600d549192509060ff161561132057816113205760405162461bcd60e51b8152602060048201526011602482015270134c8e881b9bdd081dda1a5d195b1a5cdd607a1b6044820152606401610a6d565b8461133d5760405162461bcd60e51b8152600401610a6d90613225565b61134684611187565b8511156113655760405162461bcd60e51b8152600401610a6d9061324e565b846018876005811061137957611379613122565b015410156113995760405162461bcd60e51b8152600401610a6d90613274565b60006113a587866117a3565b6113af908761318b565b9050803410156113f65760405162461bcd60e51b815260206004820152601260248201527109a6c7440dcdee840cadcdeeaced0408aa8960731b6044820152606401610a6d565b611404878787876000611ea7565b8115611424576001600160a01b0385166000908152603260205260408120555b50505050505050565b600061143981336119cb565b6114248761144e662386f26fc100008961318b565b61145f662386f26fc100008961318b565b611470662386f26fc100008961318b565b611481662386f26fc100008961318b565b611492662386f26fc100008961318b565b612012565b6000805160206134a58339815191526114b081336119cb565b50600d805461ffff19169055565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600e82600581106111f1576111f1613122565b60606001805461091e906130e7565b610ebc338383612130565b600061152481336119cb565b60005b83518110156115b75761156160008051602061348583398151915285838151811061155457611554613122565b6020026020010151611b45565b826032600086848151811061157857611578613122565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806115af9061329c565b915050611527565b50505050565b6115c73383611bcb565b6115e35760405162461bcd60e51b8152600401610a6d906131aa565b6115b7848484846121fb565b6000805160206134a583398151915261160881336119cb565b50600d805461ffff1916610100179055565b60606109098261222e565b61162e82610d2e565b61163881336119cb565b610a008383611e40565b6000805160206134a583398151915261165b81336119cb565b61166485610df6565b6116805760405162461bcd60e51b8152600401610a6d906131fb565b8361169d5760405162461bcd60e51b8152600401610a6d90613225565b6116a683611187565b8411156116c55760405162461bcd60e51b8152600401610a6d9061324e565b83601886600581106116d9576116d9613122565b015410156116f95760405162461bcd60e51b8152600401610a6d90613274565b611707858585856000611ea7565b5050505050565b6000601d82600581106111f1576111f1613122565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006018826005811061176657611766613122565b0154156111d4576000610909565b600061178081336119cb565b50604d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000603483600581106117b8576117b8613122565b6005020160326000846001600160a01b03166001600160a01b0316815260200190815260200160002054600581106117f2576117f2613122565b01549392505050565b80546001019055565b6060600061181383600261318b565b61181e9060026132b7565b6001600160401b0381111561183557611835612c96565b6040519080825280601f01601f19166020018201604052801561185f576020820181803683370190505b509050600360fc1b8160008151811061187a5761187a613122565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106118a9576118a9613122565b60200101906001600160f81b031916908160001a90535060006118cd84600261318b565b6118d89060016132b7565b90505b6001811115611950576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061190c5761190c613122565b1a60f81b82828151811061192257611922613122565b60200101906001600160f81b031916908160001a90535060049490941c93611949816132cf565b90506118db565b50831561199f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a6d565b9392505050565b60006001600160e01b03198216637965db0b60e01b1480610909575061090982612390565b6119d582826114be565b610ebc576119ed816001600160a01b03166014611804565b6119f8836020611804565b604051602001611a099291906132e6565b60408051601f198184030181529082905262461bcd60e51b8252610a6d91600401612bed565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a8182611089565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611ac382611a2f565b611b265760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a6d565b6000828152600a602090815260409091208251610a0092840190612ac6565b611b4f82826114be565b610ebc576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611b873390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611bd682611a2f565b611c375760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a6d565b6000611c4283611089565b9050806001600160a01b0316846001600160a01b03161480611c7d5750836001600160a01b0316611c7284610a05565b6001600160a01b0316145b80611c8d5750611c8d8185611723565b949350505050565b826001600160a01b0316611ca882611089565b6001600160a01b031614611d105760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a6d565b6001600160a01b038216611d725760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a6d565b611d7d8383836123b5565b611d88600082611a4c565b6001600160a01b0383166000908152600360205260408120805460019290611db1908490613174565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ddf9084906132b7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611e4a82826114be565b15610ebc576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b84811015611f74576000611ebd600c5490565b9050611ecd600c80546001019055565b611ed785826123c0565b611ee18185611aba565b600081815260336020526040902087905582611f6157600160188860058110611f0c57611f0c613122565b0154611f189190613174565b60188860058110611f2b57611f2b613122565b01556040518181527f88f448b9cc200f1c4d615e4ddbcad0cbe0e1eaa39f012ad1b7df90c3f0abb3449060200160405180910390a15b5080611f6c8161329c565b915050611eaa565b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611fc9576040519150601f19603f3d011682016040523d82523d6000602084013e611fce565b606091505b5050905080610a005760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610a6d565b600061201e81336119cb565b6005871061203e5760405162461bcd60e51b8152600401610a6d90613138565b6034876005811061205157612051613122565b60050201600101541561209b5760405162461bcd60e51b8152602060048201526012602482015271436f6e6669677572656420416c726561647960701b6044820152606401610a6d565b85603488600581106120af576120af613122565b600502016000015584603488600581106120cb576120cb613122565b600502016001015583603488600581106120e7576120e7613122565b6005020160020155826034886005811061210357612103613122565b6005020160030155816034886005811061211f5761211f613122565b600502016004015550505050505050565b816001600160a01b0316836001600160a01b0316141561218e5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610a6d565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612206848484611c95565b612212848484846123da565b6115b75760405162461bcd60e51b8152600401610a6d90613355565b606061223982611a2f565b61229f5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a6d565b6000828152600a6020526040812080546122b8906130e7565b80601f01602080910402602001604051908101604052809291908181526020018280546122e4906130e7565b80156123315780601f1061230657610100808354040283529160200191612331565b820191906000526020600020905b81548152906001019060200180831161231457829003601f168201915b5050505050905060006123426124e7565b9050805160001415612355575092915050565b81511561238757808260405160200161236f9291906133a7565b60405160208183030381529060405292505050919050565b611c8d846124f6565b60006001600160e01b0319821663780e9d6360e01b14806109095750610909826125c0565b610a00838383612610565b610ebc8282604051806020016040528060008152506126c8565b60006001600160a01b0384163b156124dc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061241e9033908990889088906004016133d6565b602060405180830381600087803b15801561243857600080fd5b505af1925050508015612468575060408051601f3d908101601f1916820190925261246591810190613413565b60015b6124c2573d808015612496576040519150601f19603f3d011682016040523d82523d6000602084013e61249b565b606091505b5080516124ba5760405162461bcd60e51b8152600401610a6d90613355565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c8d565b506001949350505050565b6060604e805461091e906130e7565b606061250182611a2f565b6125655760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a6d565b600061256f6124e7565b9050600081511161258f576040518060200160405280600081525061199f565b80612599846126fb565b6040516020016125aa9291906133a7565b6040516020818303038152906040529392505050565b60006001600160e01b031982166380ac58cd60e01b14806125f157506001600160e01b03198216635b5e139f60e01b145b8061090957506301ffc9a760e01b6001600160e01b0319831614610909565b6001600160a01b03831661266b5761266681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61268e565b816001600160a01b0316836001600160a01b03161461268e5761268e83826127f8565b6001600160a01b0382166126a557610a0081612895565b826001600160a01b0316826001600160a01b031614610a0057610a008282612944565b6126d28383612988565b6126df60008484846123da565b610a005760405162461bcd60e51b8152600401610a6d90613355565b60608161271f5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561274957806127338161329c565b91506127429050600a83613446565b9150612723565b6000816001600160401b0381111561276357612763612c96565b6040519080825280601f01601f19166020018201604052801561278d576020820181803683370190505b5090505b8415611c8d576127a2600183613174565b91506127af600a8661345a565b6127ba9060306132b7565b60f81b8183815181106127cf576127cf613122565b60200101906001600160f81b031916908160001a9053506127f1600a86613446565b9450612791565b6000600161280584611100565b61280f9190613174565b600083815260076020526040902054909150808214612862576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906128a790600190613174565b600083815260096020526040812054600880549394509092849081106128cf576128cf613122565b9060005260206000200154905080600883815481106128f0576128f0613122565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129285761292861346e565b6001900381819060005260206000200160009055905550505050565b600061294f83611100565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166129de5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a6d565b6129e781611a2f565b15612a335760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610a6d565b612a3f600083836123b5565b6001600160a01b0382166000908152600360205260408120805460019290612a689084906132b7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612ad2906130e7565b90600052602060002090601f016020900481019282612af45760008555612b3a565b82601f10612b0d57805160ff1916838001178555612b3a565b82800160010185558215612b3a579182015b82811115612b3a578251825591602001919060010190612b1f565b50612b46929150612b4a565b5090565b5b80821115612b465760008155600101612b4b565b6001600160e01b031981168114612b7557600080fd5b50565b600060208284031215612b8a57600080fd5b813561199f81612b5f565b60005b83811015612bb0578181015183820152602001612b98565b838111156115b75750506000910152565b60008151808452612bd9816020860160208601612b95565b601f01601f19169290920160200192915050565b60208152600061199f6020830184612bc1565b80358015158114610e3d57600080fd5b60008060408385031215612c2357600080fd5b82359150612c3360208401612c00565b90509250929050565b600060208284031215612c4e57600080fd5b5035919050565b80356001600160a01b0381168114610e3d57600080fd5b60008060408385031215612c7f57600080fd5b612c8883612c55565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612cd457612cd4612c96565b604052919050565b60006001600160401b03831115612cf557612cf5612c96565b612d08601f8401601f1916602001612cac565b9050828152838383011115612d1c57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612d4457600080fd5b61199f83833560208501612cdc565b60008060408385031215612d6657600080fd5b8235915060208301356001600160401b03811115612d8357600080fd5b612d8f85828601612d33565b9150509250929050565b60008060008060808587031215612daf57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060608486031215612de057600080fd5b612de984612c55565b9250612df760208501612c55565b9150604084013590509250925092565b60008060408385031215612e1a57600080fd5b82359150612c3360208401612c55565b600060208284031215612e3c57600080fd5b61199f82612c55565b600060208284031215612e5757600080fd5b81356001600160401b03811115612e6d57600080fd5b611c8d84828501612d33565b600080600060608486031215612e8e57600080fd5b83359250612e9e60208501612c55565b915060408401356001600160401b03811115612eb957600080fd5b612ec586828701612d33565b9150509250925092565b60008060008060808587031215612ee557600080fd5b8435935060208501359250612efc60408601612c55565b915060608501356001600160401b03811115612f1757600080fd5b612f2387828801612d33565b91505092959194509250565b60008060008060008060c08789031215612f4857600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b60008060408385031215612f8557600080fd5b612f8e83612c55565b9150612c3360208401612c00565b60008060408385031215612faf57600080fd5b82356001600160401b0380821115612fc657600080fd5b818501915085601f830112612fda57600080fd5b8135602082821115612fee57612fee612c96565b8160051b9250612fff818401612cac565b828152928401810192818101908985111561301957600080fd5b948201945b8486101561303e5761302f86612c55565b8252948201949082019061301e565b9997909101359750505050505050565b6000806000806080858703121561306457600080fd5b61306d85612c55565b935061307b60208601612c55565b92506040850135915060608501356001600160401b0381111561309d57600080fd5b8501601f810187136130ae57600080fd5b612f2387823560208401612cdc565b600080604083850312156130d057600080fd5b6130d983612c55565b9150612c3360208401612c55565b600181811c908216806130fb57607f821691505b6020821081141561311c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6020808252600c908201526b496e76616c6964207479706560a01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156131865761318661315e565b500390565b60008160001904831182151516156131a5576131a561315e565b500290565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526010908201526f4d303a206e6f7420666f722073616c6560801b604082015260600190565b6020808252600f908201526e4d333a207a65726f20746f6b656e7360881b604082015260600190565b6020808252600c908201526b4d343a20746f6f206d616e7960a01b604082015260600190565b6020808252600e908201526d269a9d1036b4b73a103332bbb2b960911b604082015260600190565b60006000198214156132b0576132b061315e565b5060010190565b600082198211156132ca576132ca61315e565b500190565b6000816132de576132de61315e565b506000190190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613318816017850160208801612b95565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613349816028840160208801612b95565b01602801949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600083516133b9818460208801612b95565b8351908301906133cd818360208801612b95565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061340990830184612bc1565b9695505050505050565b60006020828403121561342557600080fd5b815161199f81612b5f565b634e487b7160e01b600052601260045260246000fd5b60008261345557613455613430565b500490565b60008261346957613469613430565b500690565b634e487b7160e01b600052603160045260246000fdfedc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be67609f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220594c14f50da34d82f34110d1276c6ebc5411db58e7c0c6bd83662b25982925a664736f6c63430008090033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.