Simple BTCP + Zcash(ZEC) faucet built with Node.
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
npm install -g recli
recli 'r.db("test").tableCreate("payouts")'
recli 'r.table("payouts").indexCreate("timestamp")'
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.
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
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
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
super3 | montyanderson | marktellez |