seq-faucet

command module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 1 Imported by: 0

README

seq-faucet

Build Release Report Go License

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

Features

  • Allow to configure the funding account via private key
  • Asynchronous processing Txs to achieve parallel execution of user requests
  • Rate limiting by ETH address and IP address as a precaution against spam
  • Prevent X-Forwarded-For spoofing by specifying the count of reverse proxies

Get started

Prerequisites
  • Go (1.16 or later)
  • Node.js
  • Yarn
Installation
  1. Clone the repository and navigate to the app’s directory
git clone https://github.com/astriaorg/seq-faucet.git
cd seq-faucet
  1. Bundle Frontend web with Vite
go generate
  1. Build Go project
go build -o seq-faucet

Usage

Use private key to fund users

./seq-faucet -wallet.provider tcp://sequencer.localdev.me:80 -wallet.privkey privkey
Configuration

You can configure the funder by using environment variables instead of command-line flags as follows:

export WEB3_PROVIDER=tcp://sequencer.localdev.me:80
export PRIVATE_KEY=0x...

Then run the faucet application without the wallet command-line flags:

./seq-faucet -httpport 8080

Optional Flags

The following are the available command-line flags(excluding above wallet flags):

Flag Description Default Value
-httpport Listener port to serve HTTP connection 8080
-proxycount Count of reverse proxies in front of the server 0
-queuecap Maximum transactions waiting to be sent 100
-faucet.amount Number of Ethers to transfer per user request 1
-faucet.minutes Number of minutes to wait between funding rounds 1440
-faucet.name Network name to display on the frontend testnet
Docker deployment
docker run -d -p 8080:8080 -e WEB3_PROVIDER=tcp://sequencer.localdev.me:80 -e PRIVATE_KEY=0x... astriaorg/seq-faucet:1.1.0
Build the Docker image
docker buildx build -t ghcr.io/astriaorg/seq-faucet:0.0.1-local .

License

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL