Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧰 CosmosKit Airdrops

Test License: MIT

Find unclaimed Cosmos airdrops in 5 seconds.

Check 50+ Cosmos chains for unclaimed airdrops with a single wallet address. Built for the Cosmos community.

CosmosKit Preview

✨ Features

  • πŸ” Instant Checking - Scan all Cosmos chains in 5 seconds
  • πŸ”’ 100% Safe - Read-only access, never asks for private keys
  • πŸ’° Real USD Values - See exactly how much you can claim
  • ⚑ Smart Caching - Fast repeated lookups
  • 🎯 All Major Chains - Juno, Osmosis, Stargaze, and more

πŸš€ Quick Start

Prerequisites

Backend Setup

# Navigate to backend
cd backend

# Install Go dependencies
go mod download

# Create environment file
cp .env.example .env

# Run the server
go run main.go

The backend will start on http://localhost:8080

Frontend Setup

# Navigate to frontend (in a new terminal)
cd frontend

# Install dependencies
npm install

# Create environment file
cp .env.local.example .env.local

# Run development server
npm run dev

The frontend will start on http://localhost:3000

πŸ“ Project Structure

cosmoskit-airdrops/
β”œβ”€β”€ backend/                  # Go backend
β”‚   β”œβ”€β”€ main.go              # Entry point
β”‚   β”œβ”€β”€ handlers/            # HTTP handlers
β”‚   β”‚   └── airdrop.go
β”‚   β”œβ”€β”€ models/              # Data models
β”‚   β”‚   └── airdrop.go
β”‚   β”œβ”€β”€ services/            # Business logic
β”‚   β”‚   β”œβ”€β”€ checker.go       # Airdrop checking logic
β”‚   β”‚   └── cache.go         # Caching service
β”‚   └── data/
β”‚       └── airdrops.json    # Airdrop registry
β”‚
└── frontend/                # Next.js frontend
    β”œβ”€β”€ pages/
    β”‚   β”œβ”€β”€ index.tsx        # Landing page
    β”‚   β”œβ”€β”€ check.tsx        # Checker page
    β”‚   └── _app.tsx
    β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ WalletConnect.tsx
    β”‚   └── AirdropResults.tsx
    └── styles/
        └── globals.css

πŸ”§ API Reference

Check Wallet for Airdrops

POST /api/check
Content-Type: application/json

{
  "address": "cosmos1..."
}

Response:

{
  "address": "cosmos1...",
  "total_usd": 1250.50,
  "total_airdrops": 3,
  "airdrops": [
    {
      "airdrop_id": "juno-wynd",
      "name": "Wynd Airdrop",
      "chain": "juno",
      "amount": "1000",
      "amount_usd": 500.00,
      "claim_url": "https://app.wynddao.com/airdrop",
      "logo": "https://app.wynddao.com/logo.png",
      "expires_at": "2025-12-31"
    }
  ],
  "cached_at": "2024-01-15T10:30:00Z"
}

List All Airdrops

GET /api/airdrops

Response:

{
  "airdrops": [...],
  "total": 50
}

🌍 Adding New Airdrops

Edit backend/data/airdrops.json:

{
  "id": "chain-name",
  "name": "Airdrop Name",
  "chain": "chain",
  "chain_id": "chain-1",
  "contract_addr": "contract_address",
  "rpc": "grpc.endpoint.com:9090",
  "token_denom": "TOKEN",
  "snapshot_date": "2023-01-01T00:00:00Z",
  "claim_end_date": "2025-12-31T23:59:59Z",
  "status": "active",
  "description": "Description here",
  "website": "https://claim-site.com",
  "logo": "https://logo-url.png"
}

Restart the backend to load new airdrops.

πŸš€ Deployment

Deploy Backend to Railway

# Install Railway CLI
npm install -g @railway/cli

# Login
railway login

# Initialize and deploy
cd backend
railway init
railway up

# Set environment variables in Railway dashboard
PORT=8080

# Get your backend URL (e.g., https://your-app.up.railway.app)

Deploy Frontend to Vercel

# Install Vercel CLI
npm install -g vercel

# Deploy
cd frontend
vercel

# Set environment variable in Vercel dashboard
NEXT_PUBLIC_API_URL=https://your-backend.up.railway.app

# Deploy to production
vercel --prod

Custom Domain Setup

  1. Vercel Dashboard β†’ Settings β†’ Domains β†’ Add your domain
  2. DNS Provider β†’ Add CNAME record: @ β†’ cname.vercel-dns.com
  3. Wait 10-60 minutes for DNS propagation

πŸ§ͺ Testing

Test Backend

# Check health
curl http://localhost:8080/health

# Check wallet
curl -X POST http://localhost:8080/api/check \
  -H "Content-Type: application/json" \
  -d '{"address":"cosmos1..."}'

# List airdrops
curl http://localhost:8080/api/airdrops

Test Frontend

  1. Visit http://localhost:3000
  2. Click "Check Airdrops"
  3. Connect Keplr or enter address
  4. Verify results display correctly

πŸ“Š Tech Stack

Backend

  • Go - High-performance backend
  • Fiber - Fast web framework
  • CosmWasm - Smart contract queries
  • gRPC - Blockchain communication

Frontend

  • Next.js - React framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Axios - HTTP requests

🀝 Contributing

Contributions welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

MIT License - see LICENSE file for details

πŸ™ Acknowledgments

  • Cosmos community for inspiration
  • Keplr wallet for seamless integration
  • All the amazing Cosmos projects

πŸ“ž Support


Built with πŸ’œ for the Cosmos ecosystem

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages