In this chapter, we’re going to take a look at a practical application of blockchain technologies by creating a sports betting distributed application (dapp) from scratch. We will:
• Set up a full development environment
• Write and explain in detail the Ethereum Solidity code to perform the betting application functionality
Our dapp will be modeled off PeerBet, an open-source peer-to-peer sports betting platform. If you’d like to view a working version of the code we are about to implement, the PeerBet main code repository can be found at https://github.com/k26dr/peerbet and a working implementation can found at peerbet.co. A branch has been set up for the simplified version used in the book ...