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.
yarn install
Uses sqlite file, no start needed.
yarn migrations:run
Definition with explanation is in ./env.faucet.config.json
Copy example file to real env and change its values:
$ cp .env.example .env
yarn dev
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"}'
There are git hooks you can set up by running
yarn simple-git-hooks
- update entities in
src/db/entity
- run
yarn migrations:generate src/db/migration/<migration_name>
- import generated migration to
src/db/dataSource.ts
Please refer to the E2E Readme. They don't run.
An official substrate-faucet helm chart is available for deploying the faucet.
- 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