ethCasino
is a hub that allows users to launch Game
s from the casino offering.
For this POC I have implemented a TicTacToe
2-player game (that doesnt rely on randomness).
The idea is that players can bet some ether, which is frozen during the game, and gets released to the winner, or splitted in case of a draw.
Each game is a new smart contract deployed by the Casino
smart contract the UI connects to.
The Casino
contract keeps track of the active games and redirects the users to the actual game's smart contract address.
It is also funny to see the drastic effect of the gas fees on bets under 10 ether, but it is annecdotical for this POC.
0x7659610a697EF7901D9Cbdb95e67835FA5546E60
http://jirojo2.github.io/blockchain-developer-bootcamp-final-project
- Claim funds for idle games
- Prevent players from never ending the game or abusing the timeout against other players
- Proxy contract for
Casino
to allow updates
client/ react frontend
contracts/ solidity smart contracts code
migrations/ truffle migrations
test/ truffle tests
- Ganache UI on port 7575
npm install
&&truffle migrate --reset --network development
cd client
&&npm install
&&npm start
- Open one browser with Metamask on http://localhost:3000 (Account 1)
- Open another browser with Metamask on http://localhost:3000 (Account 2)