The aim of this project is to provide a simple example of Web.js application.
- This Project use HTML and Vanilla Javascript to interact with Smart Contract using Web3.js as a bridge
- We chose Django to host the website.
- Connect Wallet
- Bet on Even or Odd
- Click "End Game" to Roll the dice then the Contract will give result & pay winners
- Others: Deposit, check History
- deposit() : Deposit some fund to Smart Contract. The Jackpot shouldn't be empty right? :)
- putInEven() : Bet on Even. You will send 0.01 test BNB to contract to play
- putInOdd() : Bet on Odd. You will send 0.01 test BNB to contract to play
- endBet() : Roll the dice then pay the winners (DOUBLE amount of their bets)
- Others... See the contract
For some reason I have to encrypt the file. Contact me(LinkedIn) for the file. It's free
This is the deployed smart contract from BSC Testnet. Feel free to send it some funds. It's free anyway :P 0x498B0384D00bB9ba49f4eD2C88bc257B110670bc