Users can bet on various tournaments for different professional esports. For the time we have to develop this application and the fact that the API has a monthly cost, it will be limited to a list of 6 tournaments taken from a sample JSON given by the API provider for free for development.
- node.js - https://nodejs.dev/
- truffle -
npm install truffle -g
- ganache - https://www.trufflesuite.com/ganache
- run npm install from the project folder to install everything from node_modules folder
- Start ganache/ganache-cli (This is a personal ethereum blockchain)
- go to projects /contract folder where truffle-config.js file is placed. (Here we set up deployment options)
- run
truffle migrate --network development
to deploy a contract to development network - copy contract address and replace a variable
contractAddress
in config.js file in ./eth-bet/src/ - Go to eth-bet folder and run npm start to start the UI
- If backend is not properly connected, then an alert would popup in the browser window.
- Go to
/contract/
folder - Run
truffle migrate --network ropsten
- Wait until got a result simillar to what is on the image below.
- Populate predefined list of tournaments witin the UI.
- Backend
- React
- Participate in a tournament - Player can send a prediction for a tournament outcome.
- Backend
- React
- Split prizes between winners(Can be more than one).
- Backend
- React
- Binary choice(Either team A wins or team B).
- Backend
- React
- Show winners for the past tournaments.
- Backend
- React
- Set a number of players which can participate.
- Backend
- React
- Conclude tournament and send prizes.
- Backend
- React
- Send money back if no one won.
- Connect contract with UI instruction: https://docs.morpheuslabs.io/docs/connecting-the-smart-contract-to-a-webapp-step-by-step
- Hand on smart contract development training https://learning.oreilly.com/library/view/hands-on-smart-contract/9781492045250/ch05.html
- Web3js docs https://web3js.readthedocs.io/en/v1.3.0/
- Reactbootstrap is a combination of bootstrap framework and react components https://react-bootstrap.github.io/components/alerts/
- Bootstrap library https://getbootstrap.com/
Alex Silkin, Kevin Stepka
Project log
Date | Deliverables |
---|---|
10/20/20 | Create git repository |
11/7/2020 | Create project |
11/11/2020 | Write contract |
11/11/2020 | Setup deployment |
11/11/2020 | Setup infuraKey |
11/11/2020 | Setup ABI with fs module |
11/13/2020 | Connect UI and backend |
11/13/2020 | Participate form submission mechanism created |
11/14/2020 | Edited Readme according to the requirements |
11/23/2020 | Features list added |
11/25/2020 | Edited Bet.sol contract |
12/3/2020 | Added events to Bet.sol |
12/3/2020 | Added handler for no winners situation |