From f9bd1544455d518aa1fb2987fb3d67b2a96c5829 Mon Sep 17 00:00:00 2001 From: iczc Date: Thu, 8 Aug 2024 00:13:42 +0800 Subject: [PATCH] chore: bump version to 1.2.0 --- .goreleaser.yml | 2 +- README.md | 34 +++++++++++++++++----------------- cmd/server.go | 2 +- web/jsconfig.json | 2 +- web/package.json | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index dbe3db6..4ffb95e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -22,7 +22,7 @@ builds: archives: - name_template: >- - {{- .ProjectName }}_ + {{- .ProjectName }}_{{.Version}}_ {{- title .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 diff --git a/README.md b/README.md index 4246b2e..2804bfb 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,16 @@ The faucet is a web application with the goal of distributing small amounts of E ## Features -* Allow to configure the funding account via private key or keystore -* 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 +* Configure the funding account using a private key or keystore +* Implement CAPTCHA verification to prevent abuse +* Rate-limit requests by ETH address and IP address to prevent spam +* Prevent X-Forwarded-For spoofing by specifying the number of reverse proxies ## Get started ### Prerequisites -* Go (1.17 or later) +* Go (version 1.17 or later) * Node.js ### Installation @@ -30,7 +30,7 @@ git clone https://github.com/chainflag/eth-faucet.git cd eth-faucet ``` -2. Bundle Frontend web with Vite +2. Bundle frontend with Vite ```bash go generate ``` @@ -42,13 +42,13 @@ go build -o eth-faucet ## Usage -**Use private key to fund users** +**Use a private key** ```bash ./eth-faucet -httpport 8080 -wallet.provider http://localhost:8545 -wallet.privkey privkey ``` -**Use keystore to fund users** +**Use a keystore** ```bash ./eth-faucet -httpport 8080 -wallet.provider http://localhost:8545 -wallet.keyjson keystore -wallet.keypass password.txt @@ -56,18 +56,18 @@ go build -o eth-faucet ### Configuration -You can configure the funder by using environment variables instead of command-line flags as follows: +You can configure the funding account by using environment variables instead of command-line flags: ```bash -export WEB3_PROVIDER=rpc endpoint -export PRIVATE_KEY=hex private key +export WEB3_PROVIDER=rpc_endpoint +export PRIVATE_KEY=hex_private_key ``` or ```bash -export WEB3_PROVIDER=rpc endpoint -export KEYSTORE=keystore path -echo "your keystore password" > `pwd`/password.txt +export WEB3_PROVIDER=rpc_endpoint +export KEYSTORE=keystore_path +echo "your_keystore_password" > `pwd`/password.txt ``` Then run the faucet application without the wallet command-line flags: @@ -83,7 +83,7 @@ The following are the available command-line flags(excluding above wallet flags) |-------------------|--------------------------------------------------|---------------| | -httpport | Listener port to serve HTTP connection | 8080 | | -proxycount | Count of reverse proxies in front of the server | 0 | -| -faucet.amount | Number of Ethers to transfer per user request | 1 | +| -faucet.amount | Number of Ethers to transfer per user request | 1.0 | | -faucet.minutes | Number of minutes to wait between funding rounds | 1440 | | -faucet.name | Network name to display on the frontend | testnet | | -faucet.symbol | Token symbol to display on the frontend | ETH | @@ -93,13 +93,13 @@ The following are the available command-line flags(excluding above wallet flags) ### Docker deployment ```bash -docker run -d -p 8080:8080 -e WEB3_PROVIDER=rpc endpoint -e PRIVATE_KEY=hex private key chainflag/eth-faucet:1.1.0 +docker run -d -p 8080:8080 -e WEB3_PROVIDER=rpc_endpoint -e PRIVATE_KEY=hex_private_key chainflag/eth-faucet:1.2.0 ``` or ```bash -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.1.0 +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.2.0 ``` ## License diff --git a/cmd/server.go b/cmd/server.go index 2b82277..aed84fc 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -17,7 +17,7 @@ import ( ) var ( - appVersion = "v1.1.0" + appVersion = "v1.2.0" chainIDMap = map[string]int{"sepolia": 11155111, "holesky": 17000} httpPortFlag = flag.Int("httpport", 8080, "Listener port to serve HTTP connection") diff --git a/web/jsconfig.json b/web/jsconfig.json index 53dd573..5696a2d 100644 --- a/web/jsconfig.json +++ b/web/jsconfig.json @@ -29,4 +29,4 @@ * to avoid limiting type declarations. */ "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] -} \ No newline at end of file +} diff --git a/web/package.json b/web/package.json index 5328f54..13d5fd9 100644 --- a/web/package.json +++ b/web/package.json @@ -1,7 +1,7 @@ { "name": "eth-faucet", "private": true, - "version": "1.1.0", + "version": "1.2.0", "type": "module", "scripts": { "dev": "vite",