Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 2.08 KB

README.md

File metadata and controls

69 lines (52 loc) · 2.08 KB

Faucet for aleph-node chain

This repo is a fork of https://github.com/paritytech/polkadot-testnet-faucet, yet it is now its own being:

  • it has the same codebase as the upstream repo when it comes to basic functionality (sending tokens), although that codebase is pretty old (from 2019)
  • it does not have matrix functionality
  • it has AlephZero own branding
  • It is used only on Devnet and Tesnet environments.

Development

Setup dependencies and git hooks

yarn install
yarn simple-git-hooks

To launch a hot-reloading dev environment

yarn dev:backend

To launch faucet frontend

yarn page

and then open http://localhost:5556 in your web browser.

Docker development

docker build --tag faucet:latest -f Dockerfile . 
docker run --rm -it --network=host --name faucet faucet:latest dev:backend
docker run --rm -it --network=host --name faucet-frontend faucet:latest page

Server environment variables

Setup a .env file with the following variables, example

FAUCET_ACCOUNT_MNEMONIC="this is a fake mnemonic"
NETWORK_DECIMALS=12
PORT=5555
RPC_ENDPOINT="http://localhost:9944"
GOOGLE_CAPTCHA_PRIVATE=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
GOOGLE_CAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
NETWORK_UNIT="DZERO"
COOLDOWN=100
BACKEND_URL=http://localhost:5555
DRIP_AMOUNT=150
ENV=Devnet

Recaptcha keys

  • Both GOOGLE_CAPTCHA_PRIVATE and GOOGLE_CAPTCHA_SITE_KEY are optional,
  • there is no default GOOGLE_CAPTCHA_PRIVATE value - if not given, there's no captcha widget displayed,
  • GOOGLE_CAPTCHA_SITE_KEY is hardcoded but can be overwritten.
  • GOOGLE_CAPTCHA_PRIVATE and GOOGLE_CAPTCHA_SITE_KEY in above snippet are official Google ones for CI testing purposes

Google captcha secret key is a public well-known test key, do not use for production purposes!