This faucet provides ETH / MATIC used on test networks such as Optimism Goerli, Arbitrum Goerli, Polygon Mumbai...
A "mock ERC20 contract" can also be plugged to this faucet to distribute a certain amount of test ERC20 tokens.
In order to avoid Sybil attacks, which would drain the faucet, addresses that wish to claim test ETH/MATIC are required to hold a Humanbound Token. When claiming, the timestamp associated with the transaction is recorded on-chain by address (as lastDrip
). This allows us to enforce a cooldown period, preventing addresses to claim ETH/MATIC too frequently.
The amount of native tokens, ERC20 tokens to drip as well as the cooldown time are all configurable (see Faucet.sol
).
The network supported are defined as environment variable by NEXT_PUBLIC_SUPPORTED_CHAINS
# Install pnpm
npm i -g pnpm
# Install dependencies
pnpm install
# Copy & fill environments
cp packages/frontend/.env.local.example packages/frontend/.env.local
cp packages/contracts/.env.example packages/contracts/.env
# Generate contract-types, start local hardhat node, and start frontend with turborepo
pnpm dev
# Only start frontend
pnpm frontend:dev
This app uses hardhat-deploy. To deploy run one of the commands:
pnpm deploy:<network>
This will populate the packages>contracts>deployments
with the details of the deployment, including the address the contract was deployed to.