Skip to main content
Version: v4

Run the faucet

The faucet dispenses test coins to accounts that prove control of their key: the requester signs a challenge with the wallet key of the account to fund, exchanges it for a short-lived token, and asks for coins. Quotas are derived from the chain's own transaction index, so the service keeps no database. The frontend's Get VNA action calls it.

Configuration​

VariableRequiredMeaning
CHAIN_IDyesChecked against both endpoints at start
RPC_ENDPOINT, API_ENDPOINTyesA node with the transaction indexer enabled
FAUCET_MNEMONICyesThe funded faucet account; secret
DEFAULT_AMOUNT, MAX_AMOUNT_PER_HOUR, MAX_AMOUNT_PER_DAY, MAX_GLOBAL_AMOUNT_PER_DAY, MIN_BALANCEnoBase-denom integers; defaults 10, 50, 300, 5000 and 100 VNA
CORS_ORIGINSfor browsersThe frontend's origin
RATE_LIMIT_PER_MINUTE, TRUST_PROXYnoPer-IP budget; read the client IP from the proxy header
docker run -d -p 3000:3000 --env-file .env veranalabs/verana-faucet:<version>
curl -s http://localhost:3000/v1/info | jq '{chainId, faucetAddress, available, defaultAmount}'

One instance per faucet account: dispenses are serialised and the quota overlay is in memory.

Next​

  • Reference: Faucet API. Specification: Faucet v4.