I need to create an ERC20 token which transfer and reception is restricted by a membership, indicated by an NFT (ERC721) in the sender's and receiver's address/wallet.
How can I check in the ERC20 transfer() function whether the sender and receiver are owner of that particular NFT (ERC721, membership)?