Skip to content

ren2140eth/farpot-mini

Repository files navigation

Farpot

A Farcaster Mini App for buying and gifting Megapot lottery tickets on Base — straight from your feed. 1 USDC per ticket, daily drawings, real prizes.

Live: https://farpot.vercel.app

Farpot is an independent community front-end. It is not affiliated with or endorsed by Megapot — it's powered by Megapot's public, permissionless on-chain lottery contracts. "Megapot" is a trademark of its respective owner; used here for descriptive attribution only.

Features

  • 🎰 Buy Megapot tickets in-app — pick your own 5 + bonusball, or quick-pick
  • 🎁 Gift a ticket to any Farcaster user by @username (resolves their verified Base address via Neynar)
  • 🏆 Results tab — past drawings + your own ticket history, with in-app claim winnings
  • 📣 Share-to-cast after a buy, plus optional post-draw "check your results" notifications
  • 🟣 Signed Farcaster manifest — renders as a Mini App embed in Farcaster clients
  • ⚡ USDC approve → buy flow via wagmi + viem on Base

Stack

Getting started

npm install
cp .env.example .env.local   # then fill in the values
npm run dev

Open http://localhost:3000.

Environment

See .env.example. The app runs against public Base RPCs out of the box; an OnchainKit API key and a Neynar key unlock wallet RPC and gift-by-handle lookup. Nothing secret is committed — .env* is gitignored.

Contract addresses, ABIs, and the referral wallet live in src/lib/constants.ts — the single source of truth. The flow is always USDC approvebuyTickets.

Deploying your own

  1. Deploy to Vercel and set the env vars (set NEXT_PUBLIC_URL to your final domain).
  2. Re-sign the manifest for your domain. The accountAssociation in src/lib/minikit.config.ts is bound to farpot.vercel.app and signed by the original author's Farcaster account — it will not validate on your domain. Regenerate it with the Farcaster Manifest Tool and replace those three values.
  3. The REFERRAL_WALLET in constants.ts earns the protocol's 10% referral fee on each sale. Point it at your own address if you deploy your own instance.

License

MIT © ren2140eth

About

Farcaster Mini App to gift & buy Megapot lottery tickets on Base — pick-5 + bonusball, gift by @username, in-app claim. Powered by Megapot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors