ch4ot1c / zfaucet

Simple Zcash faucet built with Node.
http://zfaucet.org/
GNU Affero General Public License v3.0
0 stars 1 forks source link

zfaucet

Simple BTCP + Zcash(ZEC) faucet built with Node.

Originally by super3

Build Status Coverage Status License GitHub contributors dependencies Status devDependencies Status

DB and BTCP Setup

Download and Install RethinkDB

source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb

Create Index for Timestamp

npm install -g recli
recli 'r.db("test").tableCreate("payouts")'
recli 'r.table("payouts").indexCreate("timestamp")'

Install Bitcoin Private

Use the BTCPrivate/BitcoinPrivate Instructions as a guide to building + installing the daemon. You will have to fully sync the node before you can send any payments.

Install Redis

wget http://download.redis.io/releases/redis-4.0.9.tar.gz
tar xzf redis-4.0.9.tar.gz
cd redis-4.0.9
make
src/redis-server

Install & Run

Clone the repo.

cd ~
git clone https://github.com/ch4ot1c/zfaucet
cd ~/zfaucet
npm install

Save this under ~/zfaucet/.env.

RPCUSER=[BTCP RPC Username]
RPCPASS=[BTCP RPC Password]
PORT=[Webserver Port]
COINHIVEPUBKEY=[Coinhive Public Key]
COINHIVEPRIVKEY=[Coinhive Private Key]
WITHDRAWTHRESHOLD=[Coinhive Hashes Needed to Withdraw]

Run with PM2.

npm install pm2 -g
pm2 start process.json

Code Update Script

We run this as a crontab */5 * * * * ~/script.sh every 5 minutes.

#!/usr/bin/env sh
cd ~/zfaucet
git fetch && git reset --hard origin/master

Original Contributors (:clap:)

super3 montyanderson marktellez
super3 montyanderson marktellez