Skip to content

ferric-sol/testnetfaucet

Repository files navigation

Testnet // Faucet

This app allows anyone to set up a Solana faucet.

Fill up your NEXT_PUBLIC_FAUCET_ADDRESS with some SOL, set the secret key and the airdrop amount and you're all set!

Getting Started

  1. Generate your faucet key
solana-keygen new --no-bip39-passphrase -o faucetkey.json
  1. Copy faucetkey.json (privatekey) and paste it into SENDER_SECRET_KEY on vercel (or in your .env.development.local)
cat faucetkey.json
  1. Copy faucet address (pubkey) and paste it into NEXT_PUBLIC_FAUCET_ADDRESS
solana-keygen pubkey faucetkey.json
  1. Set NEXT_PUBLIC_AIRDROP_AMOUNT

  2. Deploy

You need three environment variables in your .env.development.local file and on vercel:

  • NEXT_PUBLIC_FAUCET_ADDRESS - the address of your faucet account
  • SENDER_SECRET_KEY - the secret key to allow the app to send airdrops from the faucet account above
  • NEXT_PUBLIC_AIRDROP_AMOUNT - the amount of SOL to send in every airdrop

You can deploy your own faucet here:

Deploy with Vercel

Or, run on localhost:

npm i 
npm run dev

Open http://localhost:3000 with your browser to see the result.