This sprite runner game is fully integrated with Farcaster as a Mini App with on-chain payment gating for score reveal.
- ✅ Farcaster Frame SDK integration
- ✅ Wagmi v2 for wallet connection
- ✅ On-chain payment gating (0.00001 ETH on Base)
- ✅ Transaction confirmation tracking
- ✅ Mobile-optimized for Warpcast
- ✅ Fallback for non-Farcaster environments
Edit lib/farcaster/config.ts:
export const PAYMENT_CONFIG = {
RECIPIENT_ADDRESS: "0xYOUR_WALLET_ADDRESS_HERE" as `0x${string}`,
PAYMENT_AMOUNT: "0.00001",
CHAIN_ID: 8453, // Base mainnet
}Replace the URLs in farcaster.json with your deployed domain:
homeUrl: Your production URLiconUrl: Your app icon (256x256px recommended)splashImageUrl: Splash screen (1200x630px recommended)
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod- Go to https://warpcast.com/~/developers
- Create a new Mini App
- Upload your
farcaster.jsonfile - Submit your app URL
- Wait for approval
- Game Over: Player reaches game over screen
- Payment Gate: If in Farcaster, score is hidden behind payment
- Connect Wallet: Player connects Farcaster wallet
- Pay: Player pays 0.00001 ETH on Base network
- Confirm: Transaction is confirmed on-chain
- Reveal: Score is revealed and player can save to leaderboard
npm run dev- Scores will be visible immediately (no payment required)
- Full game functionality works
- Deploy to production
- Share your app URL in a Warpcast cast
- Click the cast to open in Mini App mode
- Test the payment flow
- Chain: Base (Chain ID: 8453)
- Payment Amount: 0.00001 ETH
- Required Balance: ~0.0001 ETH (including gas)
- Ensure wallet has sufficient ETH on Base
- Check that RECIPIENT_ADDRESS is valid
- Verify you're on Base network
- Check browser console for errors
- Verify running inside Warpcast app
- Check Farcaster SDK version compatibility
- Check Base network status
- Verify gas settings
- Check wallet transaction history
For production, you can add these to Vercel:
NEXT_PUBLIC_RECIPIENT_ADDRESS: Override payment recipientNEXT_PUBLIC_PAYMENT_AMOUNT: Override payment amount
For issues with:
- Game functionality: Check GitHub issues
- Farcaster integration: https://docs.farcaster.xyz/
- Wagmi/Viem: https://wagmi.sh/