Decentralized autonomous lottery. Submit the hash of a chosen random number and pay 2 ethers then reveal the chosen random number and given ticket number. One round consists of submission and reveal stages which are 1 day long. Withdraw the prize anytime after the round ends. Runs on Ropsten Test Network. You need Metamask or another wallet to interact.
1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th | 10th |
---|---|---|---|---|---|---|---|---|---|
50000 | 25000 | 10000 | 7500 | 5000 | 2500 | 1000 | 900 | 800 | 700 |
11th | 12th | 13th | 14th | 15th | 16th | 17th | 18th | 19th | 20th |
---|---|---|---|---|---|---|---|---|---|
600 | 500 | 450 | 400 | 350 | 300 | 250 | 200 | 150 | 100 |
Last 4 digits | Last 3 digits | Last 2 digits |
---|---|---|
40 | 10 | 4 |
If enough money to pay for all the prizes is not collected, then cots of tickets (2 ethers) are refunded.
$ npm install -g ganache-cli
$ npm install -g truffle
$ npm install
$ ganache-cli
$ npm test
It is setup using GitHub Actions in .github/workflows/lint.yml
Feel free to contribute according to the semistandard rules and latest ECMAScript Specification.
You can distribute this software freely under GNU GPL v3.0.