SlideShare a Scribd company logo
1 of 28
How to develop Decentralized
Apps on Ethereum
Thien Nguyen
About me
• Native name: Nguyễn Lê Quỳnh Thiện
• From: Vietnam
• Engineering Manager at NashTech
• Founder of SimplCommerce
• Microsoft MVP
• @thiennlq
Agenda
• Blockchain – Key points
• Ethereum – Introduction
• DApp – Environment development
• DApp – General architecture
• DApp – Demo building auction application
Bitcoin History
• “Bitcoin: A Peer-to-Peer Electronic Cash System” Nov, 2008 by Satoshi
Nakamoto https://bitcoin.org/bitcoin.pdf
• First implementation released in Jan 2009 by Satoshi Nakamoto
How bitcoin works
DB
Digital Signature
Hash Function
• Arbitrary input
• Same length output
• Unlikely that two inputs share
the same output
Merkle Trees (Hashes of hashes)
https://www.youtube.com/watch?v=-SMliFtoPn8
Blocks
Proof of Work
https://www.youtube.com/watch?v=bBC-nXj3Ng4
Blockchains
• 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
Blockchain – Innovation Journey
https://www.youtube.com/watch?v=-SMliFtoPn8
Ethereum Accounts
• Has an address
• Controlled by a private key
• Has an address
• No private key
• Holds and run code
External Owned Account
Contract Account
Go Etherum Client
Geth
ÐΞVp2p [TCP, 30303]
> JS API Console
IPC-RPC
WS-RPC [8546]
JSON-RPC [HTTP, 8545]
Disabled by default
Disabled by default
Ethereum Networks
• Network Id = 1
• Morden: Network Id = 2 (retired)
• Ropsten: Network Id = 3
• Rinkerby: Network Id = 4
• Kovan: Network Id = 42
• Network Id = Assigned
Live Network
Testnet
Private Network
DEMO
Setup a private Ethereum network
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
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
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
JSON-RPC / WS-RPC
DApp - General Architecture 2
Network
DB
Server
REST API
Demo
Online Auction Application
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
Image source: https://kryptomoney.com/italian-auction-house-now-accepting-payments-
bitcoins/
Source code: https://github.com/devcafevn/ethereum-auction-app
References
• https://bitcoin.org/bitcoin.pdf
• https://www.ethereum.org/
• http://www.ethdocs.org/en/latest/
• https://solidity.readthedocs.io/en/v0.4.25/
• https://www.youtube.com/watch?v=bBC-nXj3Ng4
• https://www.youtube.com/watch?v=-SMliFtoPn8
• https://github.com/devcafevn/ethereum-auction-app
Thank you!

More Related Content

What's hot

Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eveguest91855c
 
Introducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpaddenIntroducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpaddenmacbrained
 
Network programming using python
Network programming using pythonNetwork programming using python
Network programming using pythonAli Nezhad
 
Kubernetes Nedir?
Kubernetes Nedir?Kubernetes Nedir?
Kubernetes Nedir?AnkaraCloud
 
#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2ProfessionalVMware
 
Guillotina: The Asyncio REST Resource API
Guillotina: The Asyncio REST Resource APIGuillotina: The Asyncio REST Resource API
Guillotina: The Asyncio REST Resource APINathan Van Gheem
 
Introduction to Python Asyncio
Introduction to Python AsyncioIntroduction to Python Asyncio
Introduction to Python AsyncioNathan Van Gheem
 
Netty: asynchronous data transfer
Netty: asynchronous data transferNetty: asynchronous data transfer
Netty: asynchronous data transferVictor Cherkassky
 
Asynchronous Python A Gentle Introduction
Asynchronous Python A Gentle IntroductionAsynchronous Python A Gentle Introduction
Asynchronous Python A Gentle IntroductionPyData
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Henryk Konsek
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortalsHenryk Konsek
 

What's hot (16)

What is Node.js
What is Node.jsWhat is Node.js
What is Node.js
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
 
Introducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpaddenIntroducing Docker to Mac Management – Nick McSpadden
Introducing Docker to Mac Management – Nick McSpadden
 
Network programming using python
Network programming using pythonNetwork programming using python
Network programming using python
 
RSK sidechain
RSK sidechainRSK sidechain
RSK sidechain
 
Kubernetes Nedir?
Kubernetes Nedir?Kubernetes Nedir?
Kubernetes Nedir?
 
#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2
 
AsyncIO To Speed Up Your Crawler
AsyncIO To Speed Up Your CrawlerAsyncIO To Speed Up Your Crawler
AsyncIO To Speed Up Your Crawler
 
Guillotina: The Asyncio REST Resource API
Guillotina: The Asyncio REST Resource APIGuillotina: The Asyncio REST Resource API
Guillotina: The Asyncio REST Resource API
 
Introduction to Python Asyncio
Introduction to Python AsyncioIntroduction to Python Asyncio
Introduction to Python Asyncio
 
Netty: asynchronous data transfer
Netty: asynchronous data transferNetty: asynchronous data transfer
Netty: asynchronous data transfer
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
 
Asynchronous Python A Gentle Introduction
Asynchronous Python A Gentle IntroductionAsynchronous Python A Gentle Introduction
Asynchronous Python A Gentle Introduction
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.
 
London Hug 20/6 - Vault production
London Hug 20/6 - Vault productionLondon Hug 20/6 - Vault production
London Hug 20/6 - Vault production
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 

Similar to B4uConference_ethereum

How to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumHow to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumDEV Cafe
 
Ethereum dapps20171205
Ethereum dapps20171205Ethereum dapps20171205
Ethereum dapps20171205Hu Kenneth
 
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 ethereumMehran Pourvahab
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to EthereumArnold Pham
 
Ethereum - MetaMask&Remix&Smartcontract
Ethereum - MetaMask&Remix&SmartcontractEthereum - MetaMask&Remix&Smartcontract
Ethereum - MetaMask&Remix&SmartcontractHu Kenneth
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoinHu Kenneth
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for DevelopersShimi Bandiel
 
How to develop a distributed app on ethereum
How to develop a distributed app on ethereumHow to develop a distributed app on ethereum
How to develop a distributed app on ethereumMarco Ottolini
 
Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”
Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”
Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”Hacken_Ecosystem
 
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...Edureka!
 
Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business ApplicationsBlockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business ApplicationsMatthias Zimmermann
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications malikmayank
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingBeau Bullock
 
Ethereum for developer 16th Nov 2018
Ethereum for developer 16th Nov 2018Ethereum for developer 16th Nov 2018
Ethereum for developer 16th Nov 2018Hu Kenneth
 
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...OST | Open Simple Token
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdfBlockchain Chapter #4.pdf
Blockchain Chapter #4.pdfssuser79c46d1
 

Similar to B4uConference_ethereum (20)

How to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on EthereumHow to develop Decentralized App (ĐApp) on Ethereum
How to develop Decentralized App (ĐApp) on Ethereum
 
Ethereum dapps20171205
Ethereum dapps20171205Ethereum dapps20171205
Ethereum dapps20171205
 
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.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Ethereum - MetaMask&Remix&Smartcontract
Ethereum - MetaMask&Remix&SmartcontractEthereum - MetaMask&Remix&Smartcontract
Ethereum - MetaMask&Remix&Smartcontract
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
 
How to develop a distributed app on ethereum
How to develop a distributed app on ethereumHow to develop a distributed app on ethereum
How to develop a distributed app on ethereum
 
Ethereum A to Z
Ethereum A to ZEthereum A to Z
Ethereum A to Z
 
Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”
Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”
Ryan Stortz & Sophia D'Antoine - “EVM2VEC: Bug Discovery in Smart Contracts”
 
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
Ethereum Explained | Understanding Ethereum Blockchain Protocols | Ethereum C...
 
Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business ApplicationsBlockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business Applications
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
 
Ethereum
EthereumEthereum
Ethereum
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
 
Ethereum for developer 16th Nov 2018
Ethereum for developer 16th Nov 2018Ethereum for developer 16th Nov 2018
Ethereum for developer 16th Nov 2018
 
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
 
Evaluation of Ethereum
Evaluation of Ethereum Evaluation of Ethereum
Evaluation of Ethereum
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdfBlockchain Chapter #4.pdf
Blockchain Chapter #4.pdf
 

More from Hoa Le

Chương 9_Bộ phần mềm EC
Chương 9_Bộ phần mềm ECChương 9_Bộ phần mềm EC
Chương 9_Bộ phần mềm ECHoa Le
 
Chương 8_Bảo mật và an ninh mạng
Chương 8_Bảo mật và an ninh mạngChương 8_Bảo mật và an ninh mạng
Chương 8_Bảo mật và an ninh mạngHoa Le
 
Chương 7_Thanh toán trực tuyến_Phần 2
Chương 7_Thanh toán trực tuyến_Phần 2Chương 7_Thanh toán trực tuyến_Phần 2
Chương 7_Thanh toán trực tuyến_Phần 2Hoa Le
 
Chương 7_Thanh toán trực tuyến_Phần 1
Chương 7_Thanh toán trực tuyến_Phần 1Chương 7_Thanh toán trực tuyến_Phần 1
Chương 7_Thanh toán trực tuyến_Phần 1Hoa Le
 
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích HoàChương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích HoàHoa Le
 
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...Hoa Le
 
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...Hoa Le
 
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...Hoa Le
 
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích HoàChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích HoàHoa Le
 
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...Hoa Le
 
Chương 8 Phân tích CSDL kinh doanh với SQL
Chương 8 Phân tích CSDL kinh doanh với SQLChương 8 Phân tích CSDL kinh doanh với SQL
Chương 8 Phân tích CSDL kinh doanh với SQLHoa Le
 
Chương 6 CSDL Marketing
Chương 6 CSDL Marketing Chương 6 CSDL Marketing
Chương 6 CSDL Marketing Hoa Le
 
Chương 5 Chiến lược trong kinh doanh
Chương 5 Chiến lược trong kinh doanh Chương 5 Chiến lược trong kinh doanh
Chương 5 Chiến lược trong kinh doanh Hoa Le
 
Chương 4. Chuẩn hóa cơ sở dữ liệu
Chương 4. Chuẩn hóa cơ sở dữ liệu Chương 4. Chuẩn hóa cơ sở dữ liệu
Chương 4. Chuẩn hóa cơ sở dữ liệu Hoa Le
 
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)Hoa Le
 
Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Hoa Le
 
B4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackB4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackHoa Le
 
B4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningB4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningHoa Le
 
B4UConference_Design Big Data System
B4UConference_Design Big Data SystemB4UConference_Design Big Data System
B4UConference_Design Big Data SystemHoa Le
 
B4UCconference_Building a CI/CD pipeline with effortless steps
B4UCconference_Building a CI/CD pipeline with effortless stepsB4UCconference_Building a CI/CD pipeline with effortless steps
B4UCconference_Building a CI/CD pipeline with effortless stepsHoa Le
 

More from Hoa Le (20)

Chương 9_Bộ phần mềm EC
Chương 9_Bộ phần mềm ECChương 9_Bộ phần mềm EC
Chương 9_Bộ phần mềm EC
 
Chương 8_Bảo mật và an ninh mạng
Chương 8_Bảo mật và an ninh mạngChương 8_Bảo mật và an ninh mạng
Chương 8_Bảo mật và an ninh mạng
 
Chương 7_Thanh toán trực tuyến_Phần 2
Chương 7_Thanh toán trực tuyến_Phần 2Chương 7_Thanh toán trực tuyến_Phần 2
Chương 7_Thanh toán trực tuyến_Phần 2
 
Chương 7_Thanh toán trực tuyến_Phần 1
Chương 7_Thanh toán trực tuyến_Phần 1Chương 7_Thanh toán trực tuyến_Phần 1
Chương 7_Thanh toán trực tuyến_Phần 1
 
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích HoàChương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
 
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
 
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
 
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
 
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích HoàChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
 
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
 
Chương 8 Phân tích CSDL kinh doanh với SQL
Chương 8 Phân tích CSDL kinh doanh với SQLChương 8 Phân tích CSDL kinh doanh với SQL
Chương 8 Phân tích CSDL kinh doanh với SQL
 
Chương 6 CSDL Marketing
Chương 6 CSDL Marketing Chương 6 CSDL Marketing
Chương 6 CSDL Marketing
 
Chương 5 Chiến lược trong kinh doanh
Chương 5 Chiến lược trong kinh doanh Chương 5 Chiến lược trong kinh doanh
Chương 5 Chiến lược trong kinh doanh
 
Chương 4. Chuẩn hóa cơ sở dữ liệu
Chương 4. Chuẩn hóa cơ sở dữ liệu Chương 4. Chuẩn hóa cơ sở dữ liệu
Chương 4. Chuẩn hóa cơ sở dữ liệu
 
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
 
Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL Chương 2. Các khái niệm trong CSDL
Chương 2. Các khái niệm trong CSDL
 
B4UConference_Sexy Angular Stack
B4UConference_Sexy Angular StackB4UConference_Sexy Angular Stack
B4UConference_Sexy Angular Stack
 
B4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningB4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearning
 
B4UConference_Design Big Data System
B4UConference_Design Big Data SystemB4UConference_Design Big Data System
B4UConference_Design Big Data System
 
B4UCconference_Building a CI/CD pipeline with effortless steps
B4UCconference_Building a CI/CD pipeline with effortless stepsB4UCconference_Building a CI/CD pipeline with effortless steps
B4UCconference_Building a CI/CD pipeline with effortless steps
 

Recently uploaded

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

B4uConference_ethereum

  • 1. How to develop Decentralized Apps on Ethereum Thien Nguyen
  • 2. About me • Native name: Nguyễn Lê Quỳnh Thiện • From: Vietnam • Engineering Manager at NashTech • Founder of SimplCommerce • Microsoft MVP • @thiennlq
  • 3. Agenda • Blockchain – Key points • Ethereum – Introduction • DApp – Environment development • DApp – General architecture • DApp – Demo building auction application
  • 4. Bitcoin History • “Bitcoin: A Peer-to-Peer Electronic Cash System” Nov, 2008 by Satoshi Nakamoto https://bitcoin.org/bitcoin.pdf • First implementation released in Jan 2009 by Satoshi Nakamoto
  • 7. Hash Function • Arbitrary input • Same length output • Unlikely that two inputs share the same output
  • 8. Merkle Trees (Hashes of hashes) https://www.youtube.com/watch?v=-SMliFtoPn8
  • 11. Blockchains • 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
  • 13.
  • 15. Ethereum Accounts • Has an address • Controlled by a private key • Has an address • No private key • Holds and run code External Owned Account Contract Account
  • 16. Go Etherum Client Geth ÐΞVp2p [TCP, 30303] > JS API Console IPC-RPC WS-RPC [8546] JSON-RPC [HTTP, 8545] Disabled by default Disabled by default
  • 17. Ethereum Networks • Network Id = 1 • Morden: Network Id = 2 (retired) • Ropsten: Network Id = 3 • Rinkerby: Network Id = 4 • Kovan: Network Id = 42 • Network Id = Assigned Live Network Testnet Private Network
  • 18. DEMO Setup a private Ethereum network https://github.com/devcafevn/ethereum-auction-app/tree/master/private-network
  • 19. 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
  • 20. 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
  • 21. 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
  • 22. 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; } }
  • 23. DApp - General Architecture Network JSON-RPC / WS-RPC
  • 24. DApp - General Architecture 2 Network DB Server REST API
  • 26. 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 Image source: https://kryptomoney.com/italian-auction-house-now-accepting-payments- bitcoins/ Source code: https://github.com/devcafevn/ethereum-auction-app
  • 27. References • https://bitcoin.org/bitcoin.pdf • https://www.ethereum.org/ • http://www.ethdocs.org/en/latest/ • https://solidity.readthedocs.io/en/v0.4.25/ • https://www.youtube.com/watch?v=bBC-nXj3Ng4 • https://www.youtube.com/watch?v=-SMliFtoPn8 • https://github.com/devcafevn/ethereum-auction-app