Sign inSign up

chainflag/eth-faucet

By chainflag

•Updated 8 months ago

https://github.com/chainflag/eth-faucet

Image
1

7.5K

chainflag/eth-faucet repository overview

⁠eth-faucet

The faucet is a web application with the goal of distributing small amounts of Ether in private and test networks.

⁠Get started

⁠Run with Docker
  • Use private key as sender
docker run -d -p 8080:8080 -e WEB3_PROVIDER="rpc endpoint" -e PRIVATE_KEY="hex private key" chainflag/eth-faucet:1.0.0 -httpport 8080
  • Use keystore file as sender
docker run -d -p 8080:8080 -e WEB3_PROVIDER="rpc endpoint" -e KEYSTORE="keystore path" -v `pwd`/keystore:/app/keystore -v `pwd`/password.txt:/app/password.txt chainflag/eth-faucet:1.0.0 -httpport 8080

Optional Flags

FlagDescriptionDefault Value
-chainnameNetwork name to display on the frontendtestnet
-httpportListener port to serve HTTP connection8080
-intervalNumber of minutes to wait between funding rounds1440
-payoutNumber of Ethers to transfer per user request1
-proxycountCount of reverse proxies in front of the server0
-queuecapMaximum transactions waiting to be sent100
⁠Deploy to Heroku
heroku create
heroku buildpacks:add heroku/nodejs
heroku buildpacks:add heroku/go
heroku config:set WEB3_PROVIDER=rpc endpoint
heroku config:set PRIVATE_KEY=hex private key
git push heroku main
heroku open

or

Deploy

⁠Development

⁠Prerequisites
  • Go (1.16 or later)
  • Node.js
⁠Build
  1. Clone the repository and navigate to the app’s directory
git clone https://github.com/chainflag/eth-faucet.git
cd eth-faucet
  1. Bundle Frontend web with Rollup
npm run build

For more details, please refer to the web readme⁠

  1. Build binary application to run faucet
go build
export WEB3_PROVIDER=https://ropsten.infura.io
export PRIVATE_KEY=secret
./eth-faucet

⁠License

This project is licensed under the MIT License

Tag summary

Content type

Image

Digest

sha256:ac642796b…

Size

7.8 MB

Last updated

10 months ago

docker pull chainflag/eth-faucet