A smart contract to allow two parties to place a bar bet arbitrated by a third party, and a React frontend to interact with the contract via web3.js and Metamask.
- Clone the repo:
git clone https://github.com/owenauch/bar-bet-ethereum.git
- Install dependencies:
npm install
- Install truffle globally (if you don't already have it):
npm install -g truffle
- Start private dev blockchain:
truffle develop
- Compile the contracts (while in truffle develop console):
compile
- Migrate the contracts:
migrate
- Outside the truffle develop console, start up the webserver:
npm run start
- Set MetaMask private network to
http://127.0.0.1:9545
You're free to start settling bets in Ether on the development network!