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
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

More Related Content

What's hot

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
 

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...
 
Anatomy of a hyperledger application
Anatomy of a hyperledger applicationAnatomy of a hyperledger application
Anatomy of a hyperledger application
 
What is Hyperledger Technology?
What is Hyperledger Technology?What is Hyperledger Technology?
What is Hyperledger Technology?
 
What is MultiChain Technology?
What is MultiChain Technology?What is MultiChain Technology?
What is MultiChain Technology?
 
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
 
Blockchain technology
Blockchain technologyBlockchain technology
Blockchain technology
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
Litecoin Crypto Currency Bootcamp
Litecoin Crypto Currency BootcampLitecoin Crypto Currency Bootcamp
Litecoin Crypto Currency Bootcamp
 
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
 
BLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGYBLOCKCHAIN TECHNOLOGY
BLOCKCHAIN TECHNOLOGY
 
Information security in private blockchains
Information security in private blockchainsInformation security in private blockchains
Information security in private blockchains
 
Introduction to blockchain
Introduction to blockchainIntroduction to blockchain
Introduction to blockchain
 
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
 
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
 
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
 
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?
 
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
 
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
Доклад Владимира Бичева на третьем митапе сообщества блокчейн-разработчиков С...
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 

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

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 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
 
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 zeromqRuben Tan
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
Evan McGee
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
Codemotion
 

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

B4uConference_ethereum
B4uConference_ethereumB4uConference_ethereum
B4uConference_ethereum
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Ethereum
EthereumEthereum
Ethereum
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
 
Ethereum dapps20171205
Ethereum dapps20171205Ethereum dapps20171205
Ethereum dapps20171205
 
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
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
 
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
 
Ethereum A to Z
Ethereum A to ZEthereum A to Z
Ethereum A to Z
 
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
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
 
Ceilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdfCeilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdf
 
The Ethereum Geth Client
The Ethereum Geth ClientThe Ethereum Geth Client
The Ethereum Geth Client
 
Ethereum_New.pptx
Ethereum_New.pptxEthereum_New.pptx
Ethereum_New.pptx
 
Ingredients for creating dapps
Ingredients for creating dappsIngredients for creating dapps
Ingredients for creating dapps
 
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
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
 

Recently uploaded

In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 

Recently uploaded (20)

In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 

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
  • 8.
  • 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