Skip to content

hadzija7/fortune-teller-frame

Repository files navigation

FortuneTeller

FortuneTeller is a Farcaster frame application that calculates onchain fortune for the users. Users answer specific questions to the wizard. Then the wizard casts its spells and tells the fortune.

DISCLAIMER

The purpose of FortuneTeller is to demonstrate how ORA's AI Oracle works. The codebase is NOT audited. Use it at your own risk.

Architecture

FortuneTeller frame uses ORA's Onchain AI Oracle to generate Onchain Fortune for the users.

  1. Once the user answers all the questions, fortune request is generated and sent to the FortuneTeller contract
  2. The request is passed to the Onchain AI Oracle
  3. Onchain AI Oracle uses Llama3 model to generate fortune in a textual representation. This is then passed to StableDiffusion model in order to generate visual representation of the fortune.
  4. Users can mint an AI generated NFT for their fortune.

alt text

Technologies

ORA's Onchain AI Oracle

By using Onchain AI Oracle, we can verify that the fortune is actually told by Llama3 AI model and that the image is generated by StableDiffusion.

ORA's Onchain AI Oracle uses opML technology to prove AI inference results.

Farcaster protocol

Farcaster protocol enables interactive and fun experience for the users.

Base Blockchain

FortuneTeller contracts are deployed on Base to allow fast and affordable blockchain transactions. FortuneTeller frame uses @coinbase/onchainkit to build frames with an ease.

Local Setup

  1. Run the development server: yarn dev
  2. Use ngrok to expose your local frame
  3. Test the frame with https://warpcast.com/~/developers/frames

If you don't want to use ngrok, you can test the frame using local debugger from frames.js.

Video Demo

FortuneTeller Demo

Future Work

We encourage community to build on top of this repository and explore new use cases.

Some of the steps that could be done in the future:

  • Add proxy pattern to enable upgradability of application in the future
  • Integrate ORA's rng oracle, to enable more random fortune telling
  • create a dashboard for minted NFTs

Learn More

For further readings check:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published