This is a ChatGPT generated text adventure game called The Quest for the Three Keys where players are sent on a quest to find three keys in the enchanted forest. When a player finds a key the LLM rewards the player by minting an NFT.

Components Used

Getting Started

Install packages:

yarn install
# or
npm install

Environment Variables

As outlined in .env.example file:

  • OPENAI_API_KEY - your API key from OpenAI
  • THIRDWEB_ENGINE_URL - URL for thirdweb Engine
  • THIRDWEB_ENGINE_ACCESS_TOKEN - access token created on thirdweb Dashboard
  • NEXT_PUBLIC_THIRDWEB_CLIENT_ID - thirdweb client API key with embedded wallets enabled

Smart Contract Setup

An Edition contract should be deployed to the Arbitrum Sepolia blockchain minted with token id 0 a "Crimson" key, token id 1 an "Azure" key and token id 2 a "Golden" key ( example contract )

Once deployed two constants should be updated in the lib/constants.ts file:

  • KEYS_SMART_CONTRACT_ADDRESS - the address of your Edition smart contract
  • ENGINE_MINTER_WALLET_ADDRESS - the address of the Engine backend wallet that has MINTER role on smart contract

Running the App

To run:

yarn dev
# or
npm run dev

Learn More

To learn more about thirdweb, take a look at the following resources: