Published using Google Docs
[Workshop] Beyond Cryptocurrency
Updated automatically every 5 minutes

[Workshop] Beyond Cryptocurrency

Blockchain, Smart Contracts & Oracles

This is the workshop portion of an example presentation. The purpose of this workshop is to demonstrate the use of an oracle to initiate a request for real-world data from a blockchain smart contract and update the state of the smart contract with the oracle's response.

Preparation & Requirements

This workshop assumes a basic familiarity with Ethereum smart contract development. Workshop participants will need access to a web browser and an Ethereum "wallet", such as Metamask or the built-in wallet of the Brave browser. In order to use the wallet to interact with the Ethereum blockchain, it is necessary to fund it with Ether.

Steps

  1. Navigate to the Remix web IDE and load the workshop code from GitHub.
  2. Use the Remix Solidity compiler to compile the workshop code. You can safely ignore any compiler warnings.
  3. Use Remix and the Ethereum wallet to deploy the compiled YoutubeViews contract to the Ropsten Ethereum network.
  1. Once the contract has deployed, use Remix to inspect the value of the deployed contract's viewsCount state variable; its value should be the empty string.
  2. Use Remix to invoke the update function on the deployed contract with the following settings:
  1. After the transaction has been confirmed, use Remix to inspect the value of the viewsCount state variable; its value should be (roughly) equivalent to the text that specifies the number of views on this YouTube video.

© Dan Forbes <dan@danforbes.dev> 2020