-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Getting Started
Fork this repo
Rename the forked repo as {{Your-github-username}}.github.io
ssh git clone git@github.com:{{Your-github-username}}/{{Your-github-username}}.github.io.git
or
https git 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
Understanding the Repo for development
Setup
We will be using node v8 or node v10
cd smart-contracts
yarn install or npm install
cd ../frontend
yarn install or npm install
yarn start or npm run start
Smart Contracts
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
Frontend
The frontend is built using the create-react-app project with Typescript. To interact with the chain, we use Ethers.js.