The official faucet for GenLayer Testnet Asimov. Claim free GEN tokens to build and test on the network.
Live at testnet-faucet.genlayer.foundation
- 100 GEN per claim — enough to get started building
- Rate limiting — 1 claim per wallet per 24h, 5 claims per IP per 24h
- Balance threshold — wallets with >1,000 GEN are ineligible
- CAPTCHA protection — Cloudflare Turnstile to prevent abuse
- Concurrent safety — Redis-based locking prevents double-sends
- Fair counting — rate limits only consumed after successful transaction
- Add network — one-click MetaMask/wallet integration for Testnet Asimov
- Next.js 16 (App Router, TypeScript)
- Tailwind CSS v4
- viem for blockchain interactions
- Upstash Redis for rate limiting and statistics
- Cloudflare Turnstile for bot protection
- Deployed on Vercel
| Parameter | Value |
|---|---|
| Network | GenLayer Testnet Asimov |
| Chain ID | 4221 |
| Currency | GEN (18 decimals) |
| RPC | https://zksync-os-testnet-genlayer.zksync.dev |
| Explorer | explorer-asimov.genlayer.com |
- Node.js 18+
- An Upstash Redis instance
- A Cloudflare Turnstile site key and secret
- A funded wallet on GenLayer Testnet Asimov
- Clone the repo:
git clone https://github.com/genlayer-foundation/testnet-faucet.git
cd testnet-faucet- Install dependencies:
npm install- Copy the env template and fill in your values:
cp .env.example .env.local-
Configure environment variables (see below).
-
Start the dev server:
npm run devThe app will be running at http://localhost:3000.
| Variable | Description | Required |
|---|---|---|
FAUCET_PRIVATE_KEY |
Private key of the funded faucet wallet | Yes |
RPC_URL |
GenLayer Testnet RPC endpoint | Yes |
NEXT_PUBLIC_TURNSTILE_SITE_KEY |
Cloudflare Turnstile site key | Yes |
TURNSTILE_SECRET_KEY |
Cloudflare Turnstile secret key | Yes |
KV_REST_API_URL |
Upstash Redis REST URL | Yes |
KV_REST_API_TOKEN |
Upstash Redis REST token | Yes |
NEXT_PUBLIC_EXPLORER_URL |
Block explorer URL | No |
NEXT_PUBLIC_CHAIN_ID |
Chain ID (default: 4221) |
No |
CLAIM_AMOUNT |
GEN per claim (default: 100) |
No |
NEXT_PUBLIC_CLAIM_AMOUNT |
Displayed claim amount (default: 100) |
No |
BALANCE_THRESHOLD |
Max recipient balance (default: 1000) |
No |
NEXT_PUBLIC_APP_URL |
Canonical URL for metadata | No |
For local development, Turnstile provides test keys that always pass:
NEXT_PUBLIC_TURNSTILE_SITE_KEY=1x00000000000000000000AA
TURNSTILE_SECRET_KEY=1x0000000000000000000000000000000AA
Request a token claim.
{
"address": "0x...",
"turnstileToken": "..."
}Success (200):
{
"success": true,
"txHash": "0x...",
"explorerUrl": "https://explorer-asimov.genlayer.com/tx/0x..."
}Rate limited (429):
{
"success": false,
"error": "This address has already claimed GEN in the last 24 hours.",
"retryAfter": 43200
}Public statistics endpoint (cached for 30s).
{
"totalClaims": 1234,
"uniqueAddresses": 567
}The claim flow performs the following checks in order:
- Input validation (valid Ethereum address format)
- Cloudflare Turnstile CAPTCHA verification
- IP rate limit check (5 per 24h)
- Address rate limit check (1 per 24h)
- Recipient balance threshold check (<1,000 GEN)
- Redis lock acquisition (prevents concurrent claims)
- Faucet balance check (sufficient funds)
- Transaction send
- Rate limit and stats recorded (only on success)
- Lock release
MIT