DailyApp V12 adds automated social media verification for tasks on:
- Farcaster/Base (via Neynar API)
- Twitter (via Twitter API v2)
β
Backend Verification Service - Serverless API on Vercel
β
Smart Contract Integration - Role-based verification system
β
Supported Actions - Follow, Like, Recast/Retweet, Quote, Comment
β
Secure - Verifier role with AccessControl
Disco_DailyApp/
βββ Disco_DailyApp_contractSolidity.8.20_v.11.01/
β βββ contracts/
β β βββ DailyAppV12Secured.sol # Updated contract with verification
β βββ scripts/
β β βββ deploy-v12.js # Deployment script
β βββ ...
βββ verification-server/ # NEW: Backend service
βββ api/
β βββ index.js # Express app (Vercel entry)
βββ services/
β βββ neynar.service.js # Farcaster verification
β βββ twitter.service.js # Twitter verification
β βββ verification.service.js # Main orchestrator
βββ routes/
β βββ verify.routes.js # API endpoints
βββ config/
β βββ index.js # Configuration
βββ package.json
βββ vercel.json # Vercel config
βββ .env.example # Environment template
- Go to https://neynar.com
- Sign up and create an app
- Copy your API key
- Go to https://developer.twitter.com
- Apply for developer account
- Create a project and app
- Generate API keys and bearer token
cd Disco_DailyApp_contractSolidity.8.20_v.11.01
# Install dependencies
npm install
# Configure environment
cp .env.example .env
nano .env # Add TOKEN_ADDRESS, PRIVATE_KEY, etc.
# Deploy to testnet
npx hardhat run scripts/deploy-v12.js --network sepoliaImportant: Save the deployed contract address and verifier address from the output.
cd ../verification-server
# Install dependencies
npm install
# Configure environment
cp .env.example .env
nano .env # Add API keys and contract address
# Test locally
npm run dev
# Deploy to Vercel
vercel login
vercel
# Set environment variables in Vercel dashboard// Connect to deployed contract
const dailyApp = await ethers.getContractAt("DailyAppV12Secured", CONTRACT_ADDRESS);
// Add task requiring Farcaster follow verification
await dailyApp.addTask(
200, // 200 points reward
86400, // 24h cooldown
0, // No tier requirement
"Follow on Farcaster",
"https://warpcast.com/yourproject",
true // Requires verification β
);
// Add task requiring Twitter like verification
await dailyApp.addTask(
150,
86400,
0,
"Like our Tweet",
"https://twitter.com/yourproject/status/123...",
true // Requires verification β
);1. User completes social action (follow, like, etc.)
β
2. Frontend calls verification API
POST /api/verify/farcaster/follow
{ userAddress, taskId, fid, targetFid }
β
3. Backend verifies via Neynar/Twitter API
β
4. If verified, backend calls smart contract
markTaskAsVerified(userAddress, taskId)
β
5. User calls doTask() on contract
β
6. Contract checks verification flag
β
7. Points awarded, verification flag reset
# Follow
POST /api/verify/farcaster/follow
{
"userAddress": "0x...",
"taskId": 2,
"fid": 12345,
"targetFid": 67890
}
# Like Cast
POST /api/verify/farcaster/like
{
"userAddress": "0x...",
"taskId": 3,
"fid": 12345,
"castHash": "0x..."
}
# Recast, Quote, Comment - similar structure# Follow
POST /api/verify/twitter/follow
{
"userAddress": "0x...",
"taskId": 6,
"userId": "123456789",
"targetUserId": "987654321"
}
# Like, Retweet, Quote, Comment - similar structureconst VERIFIER_ROLE = ethers.keccak256(ethers.toUtf8Bytes("VERIFIER_ROLE"));
await dailyApp.grantRole(VERIFIER_ROLE, VERIFIER_WALLET_ADDRESS);Smart Contract (.env)
PRIVATE_KEY=your_deployer_private_key
TOKEN_ADDRESS=0x...
INITIAL_OWNER=0x...
VERIFIER_ADDRESS=0x... # Backend wallet addressVerification Server (.env)
NEYNAR_API_KEY=your_neynar_key
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
CONTRACT_ADDRESS=0x... # Deployed contract
VERIFIER_PRIVATE_KEY=your_verifier_wallet_key
RPC_URL=https://eth-sepolia.g.alchemy.com/v2/...# Terminal 1: Start local blockchain
npx hardhat node
# Terminal 2: Deploy contract
npx hardhat run scripts/deploy-v12.js --network localhost
# Terminal 3: Start verification server
cd verification-server
npm run dev
# Terminal 4: Test API
curl -X POST http://localhost:3000/api/verify/health- Deploy to Sepolia
- Deploy verification server to Vercel
- Create test tasks
- Perform social actions
- Call verification API
- Complete tasks on contract
// Check if task is verified for user
const isVerified = await dailyApp.isTaskVerified(userAddress, taskId);
// Check if user can do task
const [canDo, reason] = await dailyApp.canDoTask(userAddress, taskId);
console.log(canDo ? "Can do task" : `Cannot: ${reason}`);# Vercel logs
vercel logs
# Local logs
# Check console output in terminal- User hasn't completed social action
- Verification API not called
- Backend verification failed
- Check API logs
- Grant VERIFIER_ROLE to backend wallet
- Check contract address in .env
- Verify wallet address matches
- Check API key is valid
- Verify FID is correct
- Check rate limits
- Check bearer token is valid
- Verify user ID format
- May need elevated API access
- Use separate wallet for verifier - Don't use your main wallet
- Monitor API costs - Neynar and Twitter may have rate limits
- Cache verification results - Avoid duplicate API calls
- Implement rate limiting - Prevent spam
- Set up alerts - Monitor failed verifications
- Test thoroughly - Test all verification types before mainnet
- Documentation: See README files in each directory
- Issues: Check logs for error messages
- API Docs:
- Neynar: https://docs.neynar.com
- Twitter: https://developer.twitter.com/en/docs
Built with β€οΈ by DailyApp Team
Version 12 - January 2026