SlideShare a Scribd company logo
How to develop Decentralized App
on Ethereum
Feb-2018
Phi Huynh & Thien Nguyen
Follow us on
https://facebook.com/devcafevn
https://slideshare.com/devcafevn https://github.com/devcafevn
Agenda
• Blockchain introduction
• Ethereum
• Đapp – General architecture
• Đapp – Environment development
• Đapp – Demo building Auction application
Digital Signature
Hash
• Arbitrary input
• Same length output
• Unlikely that two inputs
share the same output
Blocks
Blockchain
• Distributed (Everybody keep their own copy of the ledger)
• Transaction immutability achieved by way of blocks & chaining
• Leverages consensus mechanism for validating the
transactions
• Uses cryptography for trust, accountability, security
• There is no single point of failure
How to develop Decentralized App (ĐApp) on Ethereum
Ethereum
• A blockchain app platform that runs smart
contracts
Go Ethereum Client
Geth
ÐΞVp2p [TCP, 30303]
> JS API Console
IPC-RPC
WS-RPC [8546]
JSON-RPC [HTTP, 8545]
Disabled by default
Disabled by default
Ethereum Network
• Network Id = 1
• Morden: Network Id = 2 (retired)
• Ropsten: Network Id = 3
• Rinkerby: Network Id = 4
• Kovan: Network Id = 42
• Network Id = Asigned
Live Network
Testnet
Private Network
Demo
Setup private Ethereum network
Setup private Ethereum network
• Install geth https://geth.ethereum.org/downloads/
• Create genesis.json
• Initialize geth node “$ geth init path/to/genesis.json”
• Start geth
• Attach to geth
• JS console
• Create account
• Start mining
https://github.com/devcafevn/ethereum-auction-app/tree/master/private-network
Using Ethereum Wallet and MetaMask
Ethereum Wallet MetaMask
You can install the MetaMask add-on in Chrome,
Firefox, Opera
https://github.com/ethereum/mist/releases
Ethereum account types
• Has an address
• Controlled by a private key
• Has an address
• No private key
• Holds and run code
External Owned
Account
Contract Account
Denominations
Unit Wei Value Wei
wei 1 wei 1
Kwei (babbage) 1e3 wei 1,000
Mwei (lovelace) 1e6 wei 1,000,000
Gwei (shannon) 1e9 wei 1,000,000,000
microether (szabo) 1e12 wei 1,000,000,000,000
milliether (finney) 1e15 wei 1,000,000,000,000,000
ether 1e18 wei 1,000,000,000,000,000,000
GAS
• Gas is the unit in which EVM resource usage is measured
• Gas limit (start gas): max amount of gas you willing to spend
• Gas price: price of gas on ether you willing to pay. Miners
decides the minimal acceptable price
Transaction Fee = Gas used * Gas price
Gas used < Gas limit
=> Refund
Gas used > Gas limit
=> Out of gas exception, no change made
Dapp development
Remix
• https://remix.ethereum.org
• Writing your first smart contract
pragma solidity ^0.4.0;
contract MyAccount {
uint private myBalance;
function MyAccount(uint _myBalance) public{
myBalance = _myBalance;
}
function getBalance() public constant returns(uint){
return myBalance;
}
function add(uint _amount) public returns(uint){
myBalance += _amount;
return myBalance;
}
}
Dapp - general architecture
Network
Dapp - General architecture 2
Network
DB
Server
Demo
Online Auction App
Online Auction App
• Everyone can send their bids to
a contract
• The highest current bid is visible
to every one
• At the end of the bidding period
- The highest bid is sent to the
beneficiary
- Other bidders can withdraw their
bids
Source code: https://github.com/devcafevn/ethereum-auction-app
Image source: https://kryptomoney.com/italian-auction-house-now-accepting-payments-
bitcoins/
Blockchain Landscape Big Picture
Developer Tools Fin Tech File Storage
Gaming
Social
Digital Asset
Video
Security
And much much more …
SMART CONTRACTS
TOMO
CHAIN
Blockchain – Innovation Journey
When the journey began
2008
Adopting Tokenomics
2nd., beyond
currency
Inter organizational
cooperation
3rd., Smart Contracts
PoS, Scaling, on-chain,
off-chain, …
https://hbr.org/2017/02/a-brief-history-of-blockchain
Q & A
Share to get more
THANK YOU
https://facebook.com/devcafevn
Ad

More Related Content

What's hot (20)

Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...
Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...
Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...
Ingo Weber
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
Eric Cattoir
 
What is Hyperledger Technology?
What is Hyperledger Technology?What is Hyperledger Technology?
What is Hyperledger Technology?
Blockchain Council
 
What is MultiChain Technology?
What is MultiChain Technology?What is MultiChain Technology?
What is MultiChain Technology?
Blockchain Council
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Ingo Weber
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
Aayt Bahaa
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
Benjamin Fuentes
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
Rashi Singh
 
Litecoin Crypto Currency Bootcamp
Litecoin Crypto Currency BootcampLitecoin Crypto Currency Bootcamp
Litecoin Crypto Currency Bootcamp
Joseph Holbrook, Chief Learning Officer (CLO)
 
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise BlockchainHyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Altoros
 
BLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGYBLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGY
garishma bhatia
 
Information security in private blockchains
Information security in private blockchainsInformation security in private blockchains
Information security in private blockchains
Coin Sciences Ltd
 
Introduction to blockchain
Introduction to blockchainIntroduction to blockchain
Introduction to blockchain
Priyab Satoshi
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN ExplosionMetadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
Coin Sciences Ltd
 
Tangle: An alternative to Block chain for future of crypto currency
Tangle: An alternative to Block chain for future of crypto currency Tangle: An alternative to Block chain for future of crypto currency
Tangle: An alternative to Block chain for future of crypto currency
Kishor Datta Gupta
 
Introducing the Blockchain and Distributed Ledger Technology
Introducing the Blockchain and  Distributed Ledger TechnologyIntroducing the Blockchain and  Distributed Ledger Technology
Introducing the Blockchain and Distributed Ledger Technology
Jollen Chen
 
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Digipolis Antwerpen
 
Software Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for BlockchainSoftware Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for Blockchain
Ingo Weber
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Дмитрий Плахов
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
Oded Noam
 
Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...
Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...
Blockchains and Smart Contracts: Architecture Design and Model-Driven Develop...
Ingo Weber
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
Eric Cattoir
 
What is Hyperledger Technology?
What is Hyperledger Technology?What is Hyperledger Technology?
What is Hyperledger Technology?
Blockchain Council
 
What is MultiChain Technology?
What is MultiChain Technology?What is MultiChain Technology?
What is MultiChain Technology?
Blockchain Council
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020Analysing Data from Blockchains - Keynote @ SOCCA 2020
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Ingo Weber
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
Aayt Bahaa
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
Benjamin Fuentes
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
Rashi Singh
 
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise BlockchainHyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Hyperledger Sawtooth Lake Intel's OSS Contribution to Enterprise Blockchain
Altoros
 
Information security in private blockchains
Information security in private blockchainsInformation security in private blockchains
Information security in private blockchains
Coin Sciences Ltd
 
Introduction to blockchain
Introduction to blockchainIntroduction to blockchain
Introduction to blockchain
Priyab Satoshi
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN ExplosionMetadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
Coin Sciences Ltd
 
Tangle: An alternative to Block chain for future of crypto currency
Tangle: An alternative to Block chain for future of crypto currency Tangle: An alternative to Block chain for future of crypto currency
Tangle: An alternative to Block chain for future of crypto currency
Kishor Datta Gupta
 
Introducing the Blockchain and Distributed Ledger Technology
Introducing the Blockchain and  Distributed Ledger TechnologyIntroducing the Blockchain and  Distributed Ledger Technology
Introducing the Blockchain and Distributed Ledger Technology
Jollen Chen
 
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Digipolis Antwerpen
 
Software Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for BlockchainSoftware Architecture and Model-Driven Engineering for Blockchain
Software Architecture and Model-Driven Engineering for Blockchain
Ingo Weber
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Дмитрий Плахов
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
Oded Noam
 

Similar to How to develop Decentralized App (ĐApp) on Ethereum (20)

B4uConference_ethereum
B4uConference_ethereumB4uConference_ethereum
B4uConference_ethereum
Hoa Le
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
Eno Bassey
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
Ethereum
EthereumEthereum
Ethereum
Brian Yap
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
Hu Kenneth
 
Ethereum dapps20171205
Ethereum dapps20171205Ethereum dapps20171205
Ethereum dapps20171205
Hu Kenneth
 
Create your first Smart Contract with Solidity
Create your first Smart Contract with SolidityCreate your first Smart Contract with Solidity
Create your first Smart Contract with Solidity
Ricardo Aponte
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
keepsmile22
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereumBuild your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
Mehran Pourvahab
 
Ethereum and its Applications| Introduction to Ethereum.pptx
Ethereum and its Applications| Introduction to Ethereum.pptxEthereum and its Applications| Introduction to Ethereum.pptx
Ethereum and its Applications| Introduction to Ethereum.pptx
ROHITAHUJA66
 
Ethereum A to Z
Ethereum A to ZEthereum A to Z
Ethereum A to Z
Dongsam Byun
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
Gautam Anand
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
Shimi Bandiel
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
malikmayank
 
Ceilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdfCeilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdf
OpenStack Foundation
 
The Ethereum Geth Client
The Ethereum Geth ClientThe Ethereum Geth Client
The Ethereum Geth Client
Arnold Pham
 
Ethereum_New.pptx
Ethereum_New.pptxEthereum_New.pptx
Ethereum_New.pptx
SATISHKUMARPRAJAPATI4
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
Stefaan Ponnet
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
 
CCS339 Unit IV is explained in detail for easy understanding
CCS339 Unit IV is explained in detail for easy understandingCCS339 Unit IV is explained in detail for easy understanding
CCS339 Unit IV is explained in detail for easy understanding
santhikala3
 
B4uConference_ethereum
B4uConference_ethereumB4uConference_ethereum
B4uConference_ethereum
Hoa Le
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
Eno Bassey
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
Hu Kenneth
 
Ethereum dapps20171205
Ethereum dapps20171205Ethereum dapps20171205
Ethereum dapps20171205
Hu Kenneth
 
Create your first Smart Contract with Solidity
Create your first Smart Contract with SolidityCreate your first Smart Contract with Solidity
Create your first Smart Contract with Solidity
Ricardo Aponte
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereumBuild your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
Mehran Pourvahab
 
Ethereum and its Applications| Introduction to Ethereum.pptx
Ethereum and its Applications| Introduction to Ethereum.pptxEthereum and its Applications| Introduction to Ethereum.pptx
Ethereum and its Applications| Introduction to Ethereum.pptx
ROHITAHUJA66
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
Gautam Anand
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
Shimi Bandiel
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
malikmayank
 
Ceilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdfCeilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdf
OpenStack Foundation
 
The Ethereum Geth Client
The Ethereum Geth ClientThe Ethereum Geth Client
The Ethereum Geth Client
Arnold Pham
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
Stefaan Ponnet
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
 
CCS339 Unit IV is explained in detail for easy understanding
CCS339 Unit IV is explained in detail for easy understandingCCS339 Unit IV is explained in detail for easy understanding
CCS339 Unit IV is explained in detail for easy understanding
santhikala3
 
Ad

Recently uploaded (20)

Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Ad

How to develop Decentralized App (ĐApp) on Ethereum

  • 1. How to develop Decentralized App on Ethereum Feb-2018 Phi Huynh & Thien Nguyen
  • 3. Agenda • Blockchain introduction • Ethereum • Đapp – General architecture • Đapp – Environment development • Đapp – Demo building Auction application
  • 5. Hash • Arbitrary input • Same length output • Unlikely that two inputs share the same output
  • 7. Blockchain • Distributed (Everybody keep their own copy of the ledger) • Transaction immutability achieved by way of blocks & chaining • Leverages consensus mechanism for validating the transactions • Uses cryptography for trust, accountability, security • There is no single point of failure
  • 9. Ethereum • A blockchain app platform that runs smart contracts
  • 10. Go Ethereum Client Geth ÐΞVp2p [TCP, 30303] > JS API Console IPC-RPC WS-RPC [8546] JSON-RPC [HTTP, 8545] Disabled by default Disabled by default
  • 11. Ethereum Network • Network Id = 1 • Morden: Network Id = 2 (retired) • Ropsten: Network Id = 3 • Rinkerby: Network Id = 4 • Kovan: Network Id = 42 • Network Id = Asigned Live Network Testnet Private Network
  • 13. Setup private Ethereum network • Install geth https://geth.ethereum.org/downloads/ • Create genesis.json • Initialize geth node “$ geth init path/to/genesis.json” • Start geth • Attach to geth • JS console • Create account • Start mining https://github.com/devcafevn/ethereum-auction-app/tree/master/private-network
  • 14. Using Ethereum Wallet and MetaMask Ethereum Wallet MetaMask You can install the MetaMask add-on in Chrome, Firefox, Opera https://github.com/ethereum/mist/releases
  • 15. Ethereum account types • Has an address • Controlled by a private key • Has an address • No private key • Holds and run code External Owned Account Contract Account
  • 16. Denominations Unit Wei Value Wei wei 1 wei 1 Kwei (babbage) 1e3 wei 1,000 Mwei (lovelace) 1e6 wei 1,000,000 Gwei (shannon) 1e9 wei 1,000,000,000 microether (szabo) 1e12 wei 1,000,000,000,000 milliether (finney) 1e15 wei 1,000,000,000,000,000 ether 1e18 wei 1,000,000,000,000,000,000
  • 17. GAS • Gas is the unit in which EVM resource usage is measured • Gas limit (start gas): max amount of gas you willing to spend • Gas price: price of gas on ether you willing to pay. Miners decides the minimal acceptable price Transaction Fee = Gas used * Gas price Gas used < Gas limit => Refund Gas used > Gas limit => Out of gas exception, no change made
  • 19. Remix • https://remix.ethereum.org • Writing your first smart contract pragma solidity ^0.4.0; contract MyAccount { uint private myBalance; function MyAccount(uint _myBalance) public{ myBalance = _myBalance; } function getBalance() public constant returns(uint){ return myBalance; } function add(uint _amount) public returns(uint){ myBalance += _amount; return myBalance; } }
  • 20. Dapp - general architecture Network
  • 21. Dapp - General architecture 2 Network DB Server
  • 23. Online Auction App • Everyone can send their bids to a contract • The highest current bid is visible to every one • At the end of the bidding period - The highest bid is sent to the beneficiary - Other bidders can withdraw their bids Source code: https://github.com/devcafevn/ethereum-auction-app Image source: https://kryptomoney.com/italian-auction-house-now-accepting-payments- bitcoins/
  • 24. Blockchain Landscape Big Picture Developer Tools Fin Tech File Storage Gaming Social Digital Asset Video Security And much much more … SMART CONTRACTS TOMO CHAIN
  • 25. Blockchain – Innovation Journey When the journey began 2008 Adopting Tokenomics 2nd., beyond currency Inter organizational cooperation 3rd., Smart Contracts PoS, Scaling, on-chain, off-chain, … https://hbr.org/2017/02/a-brief-history-of-blockchain
  • 26. Q & A Share to get more