Lottery as a Smart Contract: The Execution
This is part 2 of the “Lottery as a Smart Contract” series. In part 1, I described the business logic behind the Lottery Smart Contract. Here, I will demonstrate how this contract is executed. To run this, you will need:
The Lottery Smart Contract codes here. A detailed documentation of what the codes do is in part 3 here.
The learning outcomes of this series of posts is to demonstrate the use of State and the calling of an external JSON web service using the Oraclize library. Ambitious readers, feel free to turn this into a business, although I wouldn’t try myself. The legitimacy of this contract is in question as I have explained in part 1.
Execution
Create a new contract in Remix. Copy and paste Lottery.sol into your code window. Select “Settings” in the tab to change the version of the Solidity compiler compiling this contract to 0.4.19 because this is the version of Solidity compiler that this contract was developed for.