2.0.0 • Published 1 month ago

faucet-lab v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Faucet EVM Template

Testnet faucet template using Nextjs, Tailwind, hCaptcha and Redis

One click deploy

Deploy with Vercel

Demo

https://0xdeploy-faucet-demo.vercel.app/

Video Tutorial

npm.io

https://youtu.be/PcFfN_jrc_w

Environment Variables

PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000000
RPC_URL=https://rpc.ankr.com/eth_goerli
COOLDOWN_HOURS=2
VALUE=1230000000000000
NEXT_PUBLIC_HCAPTCHA_SITE_KEY=00000000-0000-0000-0000-000000000000
HCAPTCHA_SECRET=0x0000000000000000000000000000000000000000
REDIS_URI=redis://default:key@url.com:6379

npm.io

Definitions

PRIVATE_KEY: The private key of the wallet issuing funds. https://metamask.zendesk.com/hc/en-us/articles/360015289632

RPC_URL: RPC url of the blockchain https://www.ankr.com/rpc/

COOLDOWN_HOURS: Amount of hours users must wait to recieve funds again

VALUE: Value in smallest unit (ie: wei) https://eth-converter.com/

NEXT_PUBLIC_HCAPTCHA_SITE_KEY: Create hCaptcha account. Also known as Sitekey https://dashboard.hcaptcha.com/sites

HCAPTCHA_SECRET: Create hCpatcha account. Also known as Secret Key https://dashboard.hcaptcha.com/settings

REDIS_URI: Redis is an in-memory key-value database. https://redis.com/redis-enterprise-cloud/overview/

Getting Started Locally

First, run the development server:

npm run dev
# or
yarn dev

Copy then add .env varibles

cp .env.local.example .env.local

Modern browsers have strict CORS and CORB rules, so opening a file://URI that loads hCaptcha will not work

The simplest way to use a tool such as ngrok