Skip to content

frequency-chain/testnet-faucet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frequency Testnet Faucet

Fork of paritytech/polkadot-testnet-faucet

E2E tests don't work right now, and the fork has diverged significantly and stopped being synched around v3.4

To test, follow instructions to launch the Faucet Server, then head over to the Faucet Client README and launch that.

Faucet Client Development

See Faucet Client README

Faucet Server Development

1. Install packages.

yarn install

2. start local database:

Uses sqlite file, no start needed.

3. run migrations:

yarn migrations:run

4. Configure environment variables

Definition with explanation is in ./env.faucet.config.json

Copy example file to real env and change its values:

$ cp .env.example .env

5. launch a hot-reloading dev environment (faucet server only)

yarn dev

POST request testing

For testing, you can use the public, testing hCaptcha values.

Example request using the test hCaptcha token:

curl -X POST \
  localhost:5555/drip/web \
  -H "Content-Type: application/json" \
  -d '{"address": "xxx", "captcha": "10000000-aaaa-bbbb-cccc-000000000001"}'

Other stuff

There are git hooks you can set up by running

yarn simple-git-hooks

creating migrations:

  • update entities in src/db/entity
  • run yarn migrations:generate src/db/migration/<migration_name>
  • import generated migration to src/db/dataSource.ts

End-to-end tests

Please refer to the E2E Readme. They don't run.

Helm chart

An official substrate-faucet helm chart is available for deploying the faucet.

Misc:

  • Bump API: yarn upgrade @polkadot/util@latest @polkadot/wasm-crypto@latest @polkadot/keyring@latest @polkadot/x-randomvalues@latest @polkadot/api@latest @polkadot/keyring@latest @polkadot/util-crypto@latest
  • Server can be queried for Prometheus metrics via /metrics
  • Readiness check URL via ready
  • Health check URL via /health

About

Frequency Testnet Faucet UI and backend based on Polkadot faucet

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • TypeScript 76.4%
  • Svelte 14.7%
  • Shell 3.0%
  • JavaScript 2.5%
  • CSS 1.8%
  • HTML 0.9%
  • Dockerfile 0.7%