SlideShare a Scribd company logo
1 of 24
Download to read offline
Introduction to Ethereum,
Solidity & DApps
1
By: Vishal Sahu & Vijay Shukla
Agenda
● Introduction
● Ethereum
● Installation
● Ethereum basics
● Geth
● Web3
● Solidity
● Smart Contracts
● Dapps
2
Ethereum Introduction
3
Ethereum is an open software platform based on blockchain technology that enables developers to
build and deploy decentralized applications.
Ethereum is a distributed public blockchain network.
While the Bitcoin blockchain is used to track ownership of digital currency (bitcoins), the Ethereum
blockchain focuses on running the programming code of any decentralized application.
Ether is a cryptocurrency whose blockchain is generated by the Ethereum platform. Ether can be
transferred between accounts and used to compensate participant mining nodes for computations
performed.
History
4
Ethereum was proposed in late 2013 by Vitalik
Buterin, a cryptocurrency researcher and
programmer.
Development was funded by an online
crowdsale that took place between July and
August 2014.
The system went live on 30 July 2015, with 11.9
million coins "premined" for the crowdsale.
This accounts for about 13 percent of the total
circulating supply.
Ethereum Installation
5
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum
sudo apt-get install solc
Geth & Ethereum Command Line
6
● It is implemented in Go language.
● By installing and running geth, you can take part in the ethereum frontier
network.
● Mine Ether
● Transfer fund between different addresses.
● Create smart contract and deploy it.
● Explore entire block history.
● And much more.
Geth Commands
● Use geth command to open console.
● geth --datadir [folder_name] --ethash.dagdir [dag_dir] init
[genesis_location]
● By default it runs on 8545 port, but you can change it by using --rpcport
[port_number].
Genesis Block
{
"nonce": "0xdeadbeefdeadbeef",
"timestamp": "0x00",
"parentHash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x686f727365",
"gasLimit": "0x08000000",
"difficulty": "0x0400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": { },
"config": {
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
}
What Geth can do?
● Create a node
● Create an Account
● Check Account Balance
● Unlock Account
● Start Mining (earn ether)
● Create more accounts
● Transfer funds between them
● Create more nodes
● Add Peers
● Attach More Console
● Contract Creation
● Deploy Contract
● Interact with Contract
● Smart Contract is just a phrase used to describe computer code that can facilitate the exchange
of money, content, property, shares, or anything of value.
● When running on the blockchain a smart contract becomes like a self-operating computer
program that automatically executes when specific conditions are met.
● Because smart contracts run on the blockchain, they run exactly as programmed without any
possibility of censorship, downtime, fraud or third party interference
11
Smart Contracts
● Solidity is a contract-oriented, high-level language for implementing smart
contracts.
● It was influenced by C++, Python and JavaScript and is designed to target
the Ethereum Virtual Machine (EVM).
● Solidity is statically typed, supports inheritance, libraries and complex
user-defined types among other features.
12
Solidity
pragma solidity ^0.4.0;
contract Counter {
int private count = 0;
function incrementCounter() public {
count += 1;
}
function decrementCounter() public {
count -= 1;
}
function getCount() public constant returns (int) {
return count;
}
}
13
Smart Contracts Sample
● A DApp has its backend code running on decentralized peer-to-peer
network.
● A DApp can have frontend code and user interfaces written in any
language (like any other app) that can makes call to its backend.
● Frontend(HTML+CSS+JS) Web page + Backend(Solidity Smart Contract)
Programing Code + Server(TestRPC) Private Blockchain/Dummy Network
on Ethereum Platform.
15
DApp (Decentralised App)
16
● Immutability – A third party cannot make any changes to data.
● Corruption & tamper proof – Apps are based on a network formed
around the principle of consensus, making censorship impossible.
● Secure – With no central point of failure and secured using cryptography,
applications are well protected against hacking attacks and fraudulent
activities.
● Zero downtime – Apps never go down and can never be switched off.
17
DApps Advantages
CryptoCities
CryptoKitties
22
Questions?
1. https://blockgeeks.com/guides/smart-contracts/
2. https://github.com/ethereum/wiki/wiki/JSON-RPC
3. https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options
4. https://github.com/ethereum/web3.js
5. https://github.com/ethereum/wiki/wiki/JavaScript-API
6. https://www.stateofthedapps.com/
7. https://medium.com/taipei-ethereum-meetup/beginners-guide-to-ethereum-3-explain-the-ge
nesis-file-and-use-it-to-customize-your-blockchain-552eb6265145
8. https://arvanaghi.com/blog/explaining-the-genesis-block-in-ethereum/
9. https://medium.com/crypto-currently/build-your-first-smart-contract-fc36a8ff50ca
24
References

More Related Content

What's hot

Examples of Smart Contracts
Examples of Smart ContractsExamples of Smart Contracts
Examples of Smart Contracts
101 Blockchains
 
Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Non-fungible tokens (nfts)
Non-fungible tokens (nfts)
Gene Leybzon
 

What's hot (20)

Blockchain consensus algorithms
Blockchain consensus algorithmsBlockchain consensus algorithms
Blockchain consensus algorithms
 
Blockchain Study(1) - What is Blockchain?
Blockchain Study(1) - What is Blockchain?Blockchain Study(1) - What is Blockchain?
Blockchain Study(1) - What is Blockchain?
 
Blockchain
BlockchainBlockchain
Blockchain
 
Block chain technology and its applications
Block chain technology and its applications Block chain technology and its applications
Block chain technology and its applications
 
Blockchain
BlockchainBlockchain
Blockchain
 
All About Ethereum
All About EthereumAll About Ethereum
All About Ethereum
 
Blockchain
BlockchainBlockchain
Blockchain
 
Examples of Smart Contracts
Examples of Smart ContractsExamples of Smart Contracts
Examples of Smart Contracts
 
Blockchain Presentation
Blockchain PresentationBlockchain Presentation
Blockchain Presentation
 
BLOCK CHAIN
BLOCK CHAINBLOCK CHAIN
BLOCK CHAIN
 
How does blockchain work
How does blockchain workHow does blockchain work
How does blockchain work
 
Blockchain 2.0
Blockchain 2.0Blockchain 2.0
Blockchain 2.0
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Non-fungible tokens (nfts)
Non-fungible tokens (nfts)
 
Blockchain concepts
Blockchain conceptsBlockchain concepts
Blockchain concepts
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain
BlockchainBlockchain
Blockchain
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsUnderstanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
 
Blockchain Introduction Presentation
Blockchain Introduction PresentationBlockchain Introduction Presentation
Blockchain Introduction Presentation
 

Similar to Ethereum

Similar to Ethereum (20)

Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
 
Ethereum
EthereumEthereum
Ethereum
 
Ethereum introduction
Ethereum introductionEthereum introduction
Ethereum introduction
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumThe JavaScript toolset for development on Ethereum
The JavaScript toolset for development on Ethereum
 
Javascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract developmentJavascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract development
 
Build your own Blockchain with the right tool for your application
Build your own Blockchain with the right tool for your applicationBuild your own Blockchain with the right tool for your application
Build your own Blockchain with the right tool for your application
 
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
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat
 
gething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientgething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang client
 
Geth important commands
Geth important commandsGeth important commands
Geth important commands
 
EthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptxEthereumBlockchainMarch3 (1).pptx
EthereumBlockchainMarch3 (1).pptx
 
BlockchainLAB Hackathon
BlockchainLAB HackathonBlockchainLAB Hackathon
BlockchainLAB Hackathon
 
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
 
The Decentralized Developer Toolbox by Petros Ring
The Decentralized Developer Toolbox by Petros RingThe Decentralized Developer Toolbox by Petros Ring
The Decentralized Developer Toolbox by Petros Ring
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Block chain
Block chainBlock chain
Block chain
 
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract DeathsBlockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
 
Exploring ethereum
Exploring ethereumExploring ethereum
Exploring ethereum
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloud
 

More from NexThoughts Technologies

More from NexThoughts Technologies (20)

Alexa skill
Alexa skillAlexa skill
Alexa skill
 
GraalVM
GraalVMGraalVM
GraalVM
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Apache commons
Apache commonsApache commons
Apache commons
 
HazelCast
HazelCastHazelCast
HazelCast
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
Microservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & ReduxMicroservice Architecture using Spring Boot with React & Redux
Microservice Architecture using Spring Boot with React & Redux
 
Swagger
SwaggerSwagger
Swagger
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Arango DB
Arango DBArango DB
Arango DB
 
Jython
JythonJython
Jython
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Smart Contract samples
Smart Contract samplesSmart Contract samples
Smart Contract samples
 
My Doc of geth
My Doc of gethMy Doc of geth
My Doc of geth
 
Ethereum genesis
Ethereum genesisEthereum genesis
Ethereum genesis
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 
Google authentication
Google authenticationGoogle authentication
Google authentication
 
Java 9 Features
Java 9 FeaturesJava 9 Features
Java 9 Features
 
Postgresql
PostgresqlPostgresql
Postgresql
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Ethereum

  • 1. Introduction to Ethereum, Solidity & DApps 1 By: Vishal Sahu & Vijay Shukla
  • 2. Agenda ● Introduction ● Ethereum ● Installation ● Ethereum basics ● Geth ● Web3 ● Solidity ● Smart Contracts ● Dapps 2
  • 3. Ethereum Introduction 3 Ethereum is an open software platform based on blockchain technology that enables developers to build and deploy decentralized applications. Ethereum is a distributed public blockchain network. While the Bitcoin blockchain is used to track ownership of digital currency (bitcoins), the Ethereum blockchain focuses on running the programming code of any decentralized application. Ether is a cryptocurrency whose blockchain is generated by the Ethereum platform. Ether can be transferred between accounts and used to compensate participant mining nodes for computations performed.
  • 4. History 4 Ethereum was proposed in late 2013 by Vitalik Buterin, a cryptocurrency researcher and programmer. Development was funded by an online crowdsale that took place between July and August 2014. The system went live on 30 July 2015, with 11.9 million coins "premined" for the crowdsale. This accounts for about 13 percent of the total circulating supply.
  • 5. Ethereum Installation 5 sudo apt-get install software-properties-common sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get update sudo apt-get install ethereum sudo apt-get install solc
  • 6. Geth & Ethereum Command Line 6 ● It is implemented in Go language. ● By installing and running geth, you can take part in the ethereum frontier network. ● Mine Ether ● Transfer fund between different addresses. ● Create smart contract and deploy it. ● Explore entire block history. ● And much more.
  • 7. Geth Commands ● Use geth command to open console. ● geth --datadir [folder_name] --ethash.dagdir [dag_dir] init [genesis_location] ● By default it runs on 8545 port, but you can change it by using --rpcport [port_number].
  • 8. Genesis Block { "nonce": "0xdeadbeefdeadbeef", "timestamp": "0x00", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x686f727365", "gasLimit": "0x08000000", "difficulty": "0x0400", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x3333333333333333333333333333333333333333", "alloc": { }, "config": { "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, }
  • 9. What Geth can do? ● Create a node ● Create an Account ● Check Account Balance ● Unlock Account ● Start Mining (earn ether) ● Create more accounts ● Transfer funds between them ● Create more nodes ● Add Peers ● Attach More Console ● Contract Creation ● Deploy Contract ● Interact with Contract
  • 10.
  • 11. ● Smart Contract is just a phrase used to describe computer code that can facilitate the exchange of money, content, property, shares, or anything of value. ● When running on the blockchain a smart contract becomes like a self-operating computer program that automatically executes when specific conditions are met. ● Because smart contracts run on the blockchain, they run exactly as programmed without any possibility of censorship, downtime, fraud or third party interference 11 Smart Contracts
  • 12. ● Solidity is a contract-oriented, high-level language for implementing smart contracts. ● It was influenced by C++, Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM). ● Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features. 12 Solidity
  • 13. pragma solidity ^0.4.0; contract Counter { int private count = 0; function incrementCounter() public { count += 1; } function decrementCounter() public { count -= 1; } function getCount() public constant returns (int) { return count; } } 13 Smart Contracts Sample
  • 14.
  • 15. ● A DApp has its backend code running on decentralized peer-to-peer network. ● A DApp can have frontend code and user interfaces written in any language (like any other app) that can makes call to its backend. ● Frontend(HTML+CSS+JS) Web page + Backend(Solidity Smart Contract) Programing Code + Server(TestRPC) Private Blockchain/Dummy Network on Ethereum Platform. 15 DApp (Decentralised App)
  • 16. 16
  • 17. ● Immutability – A third party cannot make any changes to data. ● Corruption & tamper proof – Apps are based on a network formed around the principle of consensus, making censorship impossible. ● Secure – With no central point of failure and secured using cryptography, applications are well protected against hacking attacks and fraudulent activities. ● Zero downtime – Apps never go down and can never be switched off. 17 DApps Advantages
  • 19.
  • 20.
  • 21.
  • 23.
  • 24. 1. https://blockgeeks.com/guides/smart-contracts/ 2. https://github.com/ethereum/wiki/wiki/JSON-RPC 3. https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options 4. https://github.com/ethereum/web3.js 5. https://github.com/ethereum/wiki/wiki/JavaScript-API 6. https://www.stateofthedapps.com/ 7. https://medium.com/taipei-ethereum-meetup/beginners-guide-to-ethereum-3-explain-the-ge nesis-file-and-use-it-to-customize-your-blockchain-552eb6265145 8. https://arvanaghi.com/blog/explaining-the-genesis-block-in-ethereum/ 9. https://medium.com/crypto-currently/build-your-first-smart-contract-fc36a8ff50ca 24 References