project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

ChromeExt+ChatOnWeb3WithTokenGatingContent

XMTP web3 chat improvement that with chrome notification, token gating and NFT unlocking widget in chat box ;)

ChromeExt+ChatOnWeb3WithTokenGatingContent

Created At

HackFS 2022

Winner of

trophy

3️⃣5️⃣ IPFS/Filecoin — Storage Mage

Project Description

We build a chrome extension that can notify users that they have new messages coming from XMTP. And we inject into the XMTP Chat Opensource code with LIT and IPFS(via NFT.Storage) that provide users a token gating chat UX. Users can send images with title/description and NFT gating contract addresses that only users with the NFT in their wallet can unlock the image. This can be used as chat 2 earn or selling while chatting

How it's Made

Tech We used

Features && Sponsor Technology Explain

  • User can receive new XMTP message notification via our Chrome Notification Extension
  • IPFS & Filecoin NFT.Storage
    • we build the useNFTStorage hook to provide a utils for our application to interact with IPFS: code
    • upload encryptedFile to IPFS: code
    • upload encryptedFile metadata json to IPFS: code
    • get json data from IPFS by the getJson function write in useNFTStorage hook: code
    • fetch the encryptedFile via nftstorage.link url: code
  • Polygon
    • We deploy an ERC721 NFT contact to mumbai testnet to test our token gating contract polygonscan link
    • It's an ERC721 contract with ERC2981 interface implement: code
    • It can admin with some params: code
      • Provide white list addresses with mint number specific
      • toggle reveal/opened/publicMint status
      • setup public mint price
      • setup royalty value
      • mint with white list or public mint: code
  • XMTP && LIT
    • User can send token gating content in chat box
      • Inject ipfs file upload logic and combine it with LIT token gating: TokenGatingModal code
      • Input ERC721 contract address
      • select image and gating with LIT
        • show preview before submit(without gating)
          • encrypt with LIT
      • generate metadata CID
      • submit metadata CID as message content
    • User can unlock token gating content in message list
    • Chat message content with the NFT gating UX MessageContent code
    • unlock button to wait for user to unlock the chat message
    • LitProvider to provide LIT init and helper function
background image mobile

Join the mailing list

Get the latest news and updates