Professional Documents
Culture Documents
Sovereign Yes No
Decentralized No yes
Smart No yes
Why we use crypto currency ?
Fast and cheap
Easy to use
Free to transfer and hold
Decentralized control
Privacy and Security
Transparency is maintained through public
ledger system.
Reduced Fraud
Some crypto currencies
Year Name Description
Ethereum Networking
Peer reputation Peer
Encrypted Handshake
preference
Encrypt transport
Node discovery P2P networking
Ethereum Protocol
Contracts
Mining
Transactions
Decentralized Application
(Dapp)
• Dapp is an application that uses smart contracts.
• Dapp provides a user-friendly interface to smart contracts
• Dapp main components are smart contract and files for web user interface front-end/back-end
Step 4 contracts
Dapp Creation
Workflow
1. Send smart contract
for compilation
Compiler
Smart Contract
2. Contract binary
Front end
HTML/CSS
(index. html)
3. Deploy Contract
Front end
App.(js)
4. Contract address and
ABI sent back to Dapp Ethereum Client
Back-end
-Geth
(Javascript) -PyEthApp
◦ Go the Go Ethereum (geth) site and download the binary for your
operating system.
Environment Setup:
> eth.blockNumber
1472
> eth.getBalance(eth.accounts[0])
7.36e+21
Cryptocurrency: Ethereum
> web3.fromWei(eth.getBalance(eth.accounts[0]))
385
Cryptocurrency: Ethereum
Trying to list all accounts :
> eth.accounts []
In the console, peer it with the first node by using the "enode" variable
where the host part is replaced with the IP address:
admin.addPeer("enode://
6fc14916cefae9082d017a9266a4eed4360719838ba656f59c7bbfdeffc7d9
33bfeceeae0d7cbdc2f82da2129a6524828ac00afa6778413f0cb
2633427745d83@10.0.0.216:30303")
Cryptocurrency: Ethereum
Cryptocurrency: Ethereum
Application Template: Many-to-one for
IoT
Account
Modifiers
IoT
Device
Call/Transactions
Account
Events
User
State Variables
Account Address . address public owner
.mapping (address=>unit) public usersPaid
Creates Creat .unit public numUsers
/ Owns Transaction: e
Create Contract
Contract
Account Keys Contract
Owner
(Private & Public)
Functions
.SmartSwitch()
Account Balance .payToSwitch()
(Ether) .refundUser(address recipeint, unit amount)
Refund a User .withdrawFunds()
Transaction:
.kill()
refundUser()
Withdraw funds in
Transaction:
withdrawFunds(
) Modifiers
Contract account
.onlyOwner()
Users
Events
Send Ether to .Deposit(address_from, unit_amount)
sends Transaction: smart Switch .Refund(address_to, unit_amount)
transactions contract
Accounts paytoSwitch(
)
.value
Smart Contract
IoT Device
Economic Social
Technolog
y
Environmental Legal
Smart Cities Ecosystem
Citizens applications portal (Smart Apps Center) Digital signage
Command center
To aggregate and share urban data
Vertical applications
Security
Public Mobility Urban/ Smart retail Smart Smar
City infrastructure management safety services services home
environ services t
Lights Traffic Parking Waste ment buildi
monitori ng
ng servic
es
City objects/sensors/actuators
How we can think Blockchain for Smart
City?
dApp dApp
Smart Environment Smart Government Smart Mobility
dApp
dApp
Internet
Smart City Infrastructure
Questions?