Download presentation
Presentation is loading. Please wait.
Published byBlaise O’Connor’ Modified over 5 years ago
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 University of Hawaii Maui College February 27, 2019 Supported by NSF ATE Award #
2
SIGCSE 2019 Blockchain Workshop #108 - Module 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… 2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
3
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
4
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
5
SIGCSE 2019 Blockchain Workshop #108 - Module 2
Source: 2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
6
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
7
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
8
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
9
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
10
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
11
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
12
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
13
SIGCSE 2019 Blockchain Workshop #108 - Module 2
2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
14
Demo – Hello World Smart Contract on Remix – Solidity IDE
pragma solidity >= <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; 2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
15
SIGCSE 2019 Blockchain Workshop #108 - Module 2
Demo Instructions Copy the code and paste into Remix at 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 Helloworld smart contract 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 2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
16
SIGCSE 2019 Blockchain Workshop #108 - Module 2
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+ 2/27/19 SIGCSE 2019 Blockchain Workshop #108 - Module 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.