Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.16 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.16 KB

Vercel

This is a minimal example of how to token-gate a VR Next.js page using Lit Protocol, getServerSideProps and aframe-react to render a VR scene.

This token gates a /protected page checking to see if the user has a Good Faith Paradigm ERC1155 token #490643.

To run this example:

  1. Clone the repo and install dependencies
git clone git@github.com:dabit3/nextjs-lit-token-gating.git

cd nextjs-lit-token-gating

npm install
  1. Update the accessControlConditions with the contract address of the NFT you'd like to use:
const accessControlConditions = [
  {
    contractAddress: '0xd07dc4262BCDbf85190C01c996b4C06a461d2430',
    standardContractType: 'ERC1155',
    chain: 'ethereum',
    method: 'balanceOf',
    parameters: [
      ':userAddress',
      '490643'
    ],
    returnValueTest: {
      comparator: '>',
      value: '0'
    }
  }
]
  1. Start the app
npm run dev