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:
- Clone the repo and install dependencies
git clone git@github.com:dabit3/nextjs-lit-token-gating.git
cd nextjs-lit-token-gating
npm install
- 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'
}
}
]
- Start the app
npm run dev