This repository contains the bitcoin lottery I wrote a while ago. Please, feel free to fork and use this code for whatever reasons you want.
This server get the list of today's transactions to specified address, then once a day it transfers a portion of received funds to a random wallet, a portion distributed to all the participants and a portion to the lottery revenue wallet.
- bitcoin-draw-server — Bitcoin-draw server code
- bitcoin-draw-website — Bitcoin-draw website code
- Clone this repo:
git clone https://github.com/backmeupplz/bitcoin-draw-server
- Launch the mongo database locally
- Create
.env
file with environment variables - Run
npm i
in the root folder - Run
npm run start
TELEGRAM_TOKEN
— Telegram bot token for admin reportsLOTTERY_WALLET
— main BTC lottery walletREVENUE_WALLET
— revenue BTC walletLOTTERY_PRIVATE_KEY
— main BTC lottery private keyBTC_DB_URL
— url of the mongo db used
MIT — use for any purpose. Would be great if you could leave a note about the original developers. Thanks!