Giter VIP home page Giter VIP logo

eth-faucet's Introduction

eth-faucet

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

Get started

Prerequisites

  • Go (1.16 or later)
  • Node.js

Installation

  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
  1. Build Go project
go build -o eth-faucet

Usage

  1. Set up Web3 Provider and Private Key
export WEB3_PROVIDER="rpc endpoint"
export PRIVATE_KEY="hex private key"
  1. Run the eth faucet application
./eth-faucet -httpport 8080

Optional Flags

Flag Description Default Value
-chainname Network name to display on the frontend testnet
-httpport Listener port to serve HTTP connection 8080
-interval Number of minutes to wait between funding rounds 1440
-payout Number of Ethers to transfer per user request 1
-proxycount Count of reverse proxies in front of the server 0
-queuecap Maximum transactions waiting to be sent 100

Docker deployment

  • 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
  • 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

Heroku deployment

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

License

Distributed under the MIT License. See LICENSE.txt for more information.

eth-faucet's People

Watchers

MoChain Official avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.