1 / 16

SIGCSE Workshop #108 - Programming Smart Contracts in Ethereum Blockchain using Solidity

SIGCSE Workshop #108 - Programming Smart Contracts in Ethereum Blockchain using Solidity. Debasis Bhattacharya, JD, DBA – UH Maui College, HI Mohammad Azhar , PhD – CUNY BMCC, NY Mario Canul – UH Maui College, HI Saxon Knight – UH Maui College, HI Rajiv Malkan – Lone Star College, TX

race
Download Presentation

SIGCSE Workshop #108 - Programming Smart Contracts in Ethereum Blockchain using Solidity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SIGCSE Workshop #108 - Programming Smart Contracts in Ethereum Blockchain using Solidity Debasis Bhattacharya, JD, DBA – UH Maui College, HI Mohammad Azhar, PhD – CUNY BMCC, NY Mario Canul – UH Maui College, HI Saxon Knight – UH Maui College, HI Rajiv Malkan – Lone Star College, TX Takashi Sugimura, PhD – UH Maui College, HI http://maui.hawaii.edu/cybersecurity debasisb@hawaii.edu University of Hawaii Maui College February 27, 2019 Supported by NSF ATE Award # 1700562

  2. Agenda • Module 1 - Cryptocurrencies • Bitcoin Basics, Mining, Consensus, Security – (20 minutes) • Module 2 - Ethereum and Blockchain • Ethereum Basics, Cryptography, Wallets, Transactions – (20 minutes) • Module 3 - Smart Contracts • Smart Contracts and Demo – (15 minutes) • Break – (5 minutes) • Lab - Programming a simple Smart Contract using Solidity – (90 minutes) • Module 4 - Distributed Apps (DApps) • Transition to the classroom (30 minutes) • Next Steps… SIGCSE 2019 Blockchain Workshop #108 - Module 2

  3. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  4. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  5. Source: https://ubri.ripple.com/faq/ SIGCSE 2019 Blockchain Workshop #108 - Module 2

  6. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  7. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  8. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  9. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  10. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  11. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  12. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  13. SIGCSE 2019 Blockchain Workshop #108 - Module 2

  14. Demo – Hello World Smart Contracton Remix – Solidity IDE pragma solidity >= 0.4.22 <0.6.0; contract Mortal{ address owner; constructor() public { owner = msg.sender; } function die() public { if(msg.sender == owner) selfdestruct(msg.sender); } } contract Helloworld is Mortal{ string output = "Hello, World!"; function printHello() public view returns (string memory) { return output; } } SIGCSE 2019 Blockchain Workshop #108 - Module 2

  15. Demo Instructions • Copy the code and paste into Remix at https://remix.Ethereum.org • Since it is the latest compiler, click on Start to compile or (Ctrl-S) • Once compiled, click on Run tab • In Run, make sure Environment is set to JavaScript VM • Click on pink button Deploy under Helloworld • A smart contract Helloworld will be deployed in memory • Click on Helloworldsmartcontract at bottom of screen (at memory location in blockchain) to access its functions – die and printHello • Click on printHello function to see output “0: string: Hello, World” • Click on die function to remove smart contract from blockchain SIGCSE 2019 Blockchain Workshop #108 - Module 2

  16. References • Ethereum Overview and Tutorial – Josh Quintal Truffle, 2017 • Solidity Tutorial to Smart Contracts – Intro to Smart Contracts • Installing the Solidity Compiler - Using npm/NodeJS, Docker etc. • Code Examples in Solidity – Voting, Blind Auction, Safe Purchase etc. • Solidity Style Guide – Solidity v0.5.4 • Ethereum Command Line tools (CLI) – Geth and Eth from Ethereum Network • Ethereum Greeter Smart Contract – Sample tutorial from Ethereum • Truffle Suite Download – Download the Truffle Software • Ganache Suite Download – Download the Ganache Software • Setting up a Pet Shop Dapp – Truffle Tutorial • Building React Native Dapps– Truffle Tutorial with Drizzle v1.3+ SIGCSE 2019 Blockchain Workshop #108 - Module 2

More Related