A validator oracle that monitors YouTube and airdrops NFTs to contract holders.
This is a YouTube Validator Oracle that:
- Watches
@tooomuchmoxiepodcastYouTube channel (every 45 min) - Validates when videos hit 500 VIEWS or 25 LIKES 💥
- Queries Drop1155 contract:
0xaE12B3Eb30aAF06161354D6295246854956F3983for all holders - Mints NFT with video thumbnail on Arbitrum
- Airdrops to EVERY Drop1155 holder automatically 🚀
Secure server wallet. No exposed keys. Just pure automation.
Run these in Supabase SQL Editor: ```sql -- scripts/001-create-youtube-milestones-table.sql -- scripts/002-create-monitored-channels-table.sql -- scripts/003-create-wavz-config-table.sql ```
```env
YOUTUBE_API_KEY=your_key_here
SUPABASE_URL=https://xxx.supabase.co SUPABASE_SERVICE_ROLE_KEY=your_key
THIRDWEB_CLIENT_ID=your_client_id THIRDWEB_SECRET_KEY=your_secret
PRIVATE_KEY=0x1234567890abcdef...
DROP1155_ADDR=0xaE12B3Eb30aAF06161354D6295246854956F3983 MILESTONE_EDITIONS_ADDR=0xYourERC1155Contract
VIEW_MILESTONE=500 LIKE_MILESTONE=25
CRON_SECRET=random_secret_string ```
```bash vercel --prod ```
Done. Runs every 45 minutes automatically.
``` Vercel Cron (45 min) ↓ Watch YouTube (@tooomuchmoxiepodcast) ↓ Milestone hit? (500 views OR 25 likes) ↓ Query Drop1155 contract for holders ← VALIDATOR PART ↓ Mint NFT with server wallet + Airdrop to ALL holders ↓ DONE! 🎉 ```
See ORACLE_EXPLAINED.md for detailed breakdown.
- Vercel Cron: Triggers polling every 45 minutes
- YouTube API: Fetches video stats
- Supabase: Tracks milestone state
- Thirdweb SDK: Mints & airdrops via server wallet
- Arbitrum: Where NFTs live
- Vercel Pro: $20/month (required for cron)
- Gas: ~$5-20/month (Arbitrum is cheap)
- Everything else: Free
/app/api/cron/poll-youtube/route.ts- Cron endpoint/lib/polling/poll.ts- Main logic/lib/youtube/api.ts- YouTube integration/lib/nft/mint.ts- NFT minting with server walletvercel.json- Cron config (45 min)
ORACLE_EXPLAINED.md- How the validator oracle works (ELI5)TEST_ORACLE.md- How to test it manuallyDEPLOYMENT.md- Full setup guideRATE_LIMITS.md- Why 45 minutesFIXED.md- What was fixed
Check Vercel logs if shit breaks. Everything is logged with [ORACLE], [YouTube], [NFT] prefixes.
Built for @tooomuchmoxiepodcast 🎙️