A cross-chain comment wall built for Farcaster where users can post messages permanently on Celo and Arbitrum blockchains.
- 🌱 Post on Celo - Ultra-low gas fees
- 🦄 Post on Arbitrum - L2 speed with Ethereum security
- ♾️ Forever Onchain - Messages stored permanently on blockchain
- 🔄 Real-time Updates - See new comments instantly
- 💙 Like Comments - Engage with messages
- 🎨 Beautiful UI - Modern, responsive design
- Node.js 18+ installed
- A wallet with Celo/Arbitrum tokens for gas fees
- Neynar API key (get from neynar.com)
- WalletConnect Project ID (get from cloud.walletconnect.com)
- Clone the repository
git clone https://github.com/yourusername/onchain-comment-wall.git
cd onchain-comment-wall- Install dependencies
npm install- Set up environment variables
cp .env.example .env.localEdit .env.local and add your keys:
PRIVATE_KEY=your_private_key_here
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id
NEXT_PUBLIC_NEYNAR_CLIENT_ID=your_neynar_key- Compile smart contracts
npm run compile- Deploy contracts
Deploy to Celo testnet:
npm run deploy:celo -- --network celoTestnetDeploy to Arbitrum testnet:
npm run deploy:arbitrum -- --network arbitrumSepolia- Update contract addresses
After deployment, copy the contract addresses to .env.local:
NEXT_PUBLIC_CELO_CONTRACT_ADDRESS=0x...
NEXT_PUBLIC_ARBITRUM_CONTRACT_ADDRESS=0x...- Run the development server
npm run devOpen http://localhost:3000 in your browser.
onchain-comment-wall/
├── contracts/ # Smart contracts
│ ├── CommentWall.sol # Main contract
│ └── deploy.js # Deployment script
├── src/
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Libraries and configs
│ └── types/ # TypeScript types
├── .env.example # Environment variables template
├── hardhat.config.js # Hardhat configuration
├── package.json # Dependencies
└── README.md # This file
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run compile- Compile smart contractsnpm run test- Run contract testsnpm run deploy:celo- Deploy to Celonpm run deploy:arbitrum- Deploy to Arbitrum
- Push your code to GitHub
- Import project on Vercel
- Add environment variables
- Deploy!
Celo Mainnet:
npm run deploy:celo -- --network celoArbitrum One:
npm run deploy:arbitrum -- --network arbitrum- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Blockchain: Solidity, Hardhat
- Web3: Wagmi, Viem, RainbowKit
- Chains: Celo, Arbitrum
The CommentWall.sol contract stores messages onchain with:
- User address
- Message content (max 280 characters)
- Farcaster ID
- Timestamp
- Like count
Key functions:
postComment(message, fid)- Post a new commentlikeComment(id)- Like a commentgetRecentComments(count)- Get recent commentsgetTotalComments()- Get total comment count
- Never commit
.env.localfile - Keep your private keys secure
- Test on testnets before mainnet deployment
- Smart contracts are unaudited - use at your own risk
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Built for the Farcaster community
- Powered by Celo and Arbitrum
- Inspired by the need for permanent, cross-chain messaging
If you have any questions or run into issues:
- Open an issue on GitHub
- Tag us on Farcaster
Made with ❤️ for Farcaster