THIS IS NOT PRODUCTION READY AND SHOULD NOT BE USED IN ANY WAY IN PRODUCTION.
DoubleOrNothing is a coin flip game built on Thunder.
- Fork this repo
- Rename the forked repo as {{Your-github-username}}.github.io
- ssh
git clone [email protected]:{{Your-github-username}}/{{Your-github-username}}.github.io.git
or
httpsgit clone https://github.com/{{Your-github-username}}/{{Your-github-username}}.github.io.git
cd {{Your-github-username}}.git.hub.io.git
git commit --allow-empty -m "bump"
git push
*Note: If you see the error “push declined due to email privacy restrictions”, you will need to allow command line pushes that expose your email address. This under “Settings”, “Emails”- It will take ~10 mins for Github to create your page. It can be accessed at
https://{{Your-github-username}}.github.io
- While you wait, make sure to have Metamask installed
- Set it up to a new Custom RPC url: https://mainnet-rpc.thundercore.com
- When your page is built, you should be able to play the game
We will be using node v8 or node v10
cd smart-contracts
yarn install
ornpm install
cd ../frontend
yarn install
ornpm install
yarn start
ornpm run start
This project uses Truffle to handle all of the smart contract related work.
In the /smart-contracts/contracts
folder, you will find DoubleOrNothing.sol
which contains the game logic.
After you make any updates to it, you will have to redeploy the contract.
yarn migrate --network development/thunder --reset
or npm run migrate -- --network development/thunder --reset
** Development points to localhost:8545 Ganache
** To deploy on thunder, you must add a mnemonic to /smart-contracts/truffle-config.js
The frontend is built using the create-react-app project with Typescript. To interact with the chain, we use Ethers.js.