This is an example xdapp powered by Polymer, which allows users to bet on NBA matches on Optimistic chain, it records bets on base chain and rewards those who predict the outcomes correctly.
The frontend code can be found at https://github.com/0xVivaLabs/Bet-NBA
- Follow the installation instructions from ibc-app-solidity-template
- Add your
BDL_API_KEY
to the.env
file. You can obtain the key by registering at https://www.balldontlie.io/ - Update the NBA match date in
scripts/addMatches.js
andscripts/bet.js
. - Deploy the contract by running
just do-it
in your terminal.