Win the Pot is an Ethereum-based smart contract that gives players the opportunity to win a pot of Ether. The rules are simple:
- Send Ether to the contract address
- If your contribution puts the value of the pot at or above a certain threshold (randomly generated each game), then you win the pot
- The threshold is a random integer between 1 and 100
- If the pot threshold hasn't been reached by the end of the game time limit (2 hours), then your Ether becomes available for withdrawal
- You may only contribute to one game at a time
- The random threshold is generated using a combination of Oraclize (http://www.oraclize.it/) and the Random.org JSON-RPC API (https://api.random.org/json-rpc/1/)
- yarn 1.3.2
- npm 5.6.0
- node 8.9.4
- install dependencies:
yarn
- test:
yarn run test
yarn run compile
yarn run testrpc
(must get run beforemigrate
)yarn run migrate
yarn run coverage-testrpc
(must get run beforecoverage
)yarn run coverage