SlideShare a Scribd company logo
1
Vikas Grover
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
www.meetup.com/Blockchain-Revolution
Blockchain & Authoring Smart
Contracts
2
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Agenda
● Introduction
● Smart Contracts
● Test RPC and Geth
● Truffle
● Dapp
3
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Introduction
Blockchain creates a permanent, digitized chain of transactions, grouped in blocks,
allowing virtually anything of value to be tracked and traded, without requiring a
central point of control
Blockchain is a peer-to-peer distributed
ledger technology for a new generation of
transactional applications.
4
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
What is in Block
Header, Transaction Count, Block Content
Transaction
Input Output
5
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Public, Private, Consortium/Hybrid
First thing First – Do you even need a Blockchain?
● Database with Shared Access
● Who Controls the Functionality?
● Public or Private Transactions?
● Determining Consensus?
6
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Public, Private, Hybrid
● Public Blockchain: Fully Public, Secured by Cryptocurrencies (Proof
of work, Proof of Stake etc), Its for Anyone – Read, Send
Transactions, Participate in Consensus Process
● Private Blockchain: Controlled Access, Write permissions are kept
centralized to one organization, Read permissions may be public or
not (or some part may be public)
● Consortium/Hybrid Blockchain: Pre-selected set of nodes for eg: 15
financial institutions
7
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Public, Private, Hybrid
Public Blockchain
● Freedom
● Neutrality
● Openness
Private Blockchain
● Known Validator (51% risk
goes away)
● Cheaper Transactions
● Privacy
No way that there is going to be One way to do Blockchain
8
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Bitcoin – Digitally Signed
9
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Ethereum
● Founder of Ethereum - Vitalik Buterin (22 year old) won the 2014 World
Technology Award for invention of Blockchain.
● Ethereum to build programming tools to make Blockchain power
any/everything.
● Ethereum is Dynamic and Programmable. You can implement the way
you want. For eg: Using Java Script you can implement almost anything.
10
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
What is Better with Ethereum
11
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Smart Contract
Smart contracts are computer protocols that
facilitate, verify, or enforce the negotiation or
performance of a contract, or that make a
contractual clause unnecessary.
Smart contracts usually also have a user interface
and often emulate the logic of contractual clauses.
Trust the
Bank
Trust the
Code
12
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Smart Contract – Online Browser
13
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Smart Contract – Mist
14
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Different Needs Different Clients
● When Developing
● Ethereum JS TestRPC
● When Deploying:
● Geth
● Webthree
● Others
17
TRUFFLE
18
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Truffle
What is Truffle
● Development Environment
● Testing Framework
● Asset Pipeline
19
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Truffle
What do you get with Truffle
● Built-in smart contract compilation, linking, deployment and binary management.
● Automated contract testing with Mocha and Chai.
● Configurable build pipeline with support for custom build processes.
● Scriptable deployment & migrations framework
● Network management for deploying to many public & private networks.
● Interactive console for direct contract communication
● Instant rebuilding of assets during development.
● External script runner that executes scripts within a Truffle environment.
● Support for JavaScript, SASS, ES6 and JSX built-in.
21
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Getting Started with Truffle
● Getting Started
● Install Truffle
● Commands
● mkdir myproject
● cd myproject
● truffle init
● app
● contracts
● migrations
● test
● truffle.js
● truffle compile
22
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Testing with Truffle
● Automated Testing
● Mocha
● Assertion
● Chai
● All test files should be located in the ./tests directory. Truffle will only run test files with the following
file extensions: .js, .es, .es6, and .jsx. All other files are ignored.
23
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Interacting with SmartContract
● Use Web3
● Little Difficult though
● Use Ether Pudding
● Chai
● All test files should be located in the ./tests directory. Truffle will only run test files with the following
file extensions: .js, .es, .es6, and .jsx. All other files are ignored.
24
Dapp
25
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Dapp
● Frontend and Backend
● Reactive Programming – callback functions
● Web3.js
● version
● api
● node/getNode
● network/getNetwork
● ethereum/getEthereum
● whisper/getWhisper
● isConnected()
● setProvider(provider)
● CurrentProvider
● Etc etc etc
26
vgrover1515@gmail.com
Offline Slack Channel : www.tinyurl.com/letsdoblockchain
Thanks

More Related Content

PPTX
Understanding blockchain
PPTX
Ethereum Blockchain with Smart contract and ERC20
PPTX
Blockchain, Ethereum and Business Applications
PPTX
The Blockchain and JavaScript
PDF
Blockchain Programming
PDF
Blockchain - Presentacion Betabeers Galicia 10/12/2014
PDF
Blockchain for Beginners
PPTX
Tutorial blockchain technical overview-ss
Understanding blockchain
Ethereum Blockchain with Smart contract and ERC20
Blockchain, Ethereum and Business Applications
The Blockchain and JavaScript
Blockchain Programming
Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain for Beginners
Tutorial blockchain technical overview-ss

What's hot (20)

PDF
Payment Protocols - Block Chain & Beyond
PDF
Technical toolkit for a blockchain startup
PPTX
Are blockchain and crypto interchangeable terms
PDF
Blockchain introduction
PDF
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
PPTX
Blockchain Ecosystem and Cryptocurrency Regulations
PDF
Python, Blockchain, and Byte-Size Change
PPTX
Anatomy of a blockchain
PDF
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
PPTX
A Quick Start To Blockchain by Seval Capraz
PPTX
Becoming a blockchain professional
PPTX
Ethereum Intro
PDF
Blockchain overview, use cases, implementations and challenges
PPTX
Blockchains 101
PDF
Blockchain explained
PPTX
bitcoin_presentation
PDF
Bitcoin, Banking and the Blockchain
PPTX
Blockchain and Bitcoin
PPTX
INTRO TO BLOCKCHAINS AND CRYPTOCURRENCY
PDF
Blockchain Technology: A Technical Introduction to Non-Technical People
Payment Protocols - Block Chain & Beyond
Technical toolkit for a blockchain startup
Are blockchain and crypto interchangeable terms
Blockchain introduction
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
Blockchain Ecosystem and Cryptocurrency Regulations
Python, Blockchain, and Byte-Size Change
Anatomy of a blockchain
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
A Quick Start To Blockchain by Seval Capraz
Becoming a blockchain professional
Ethereum Intro
Blockchain overview, use cases, implementations and challenges
Blockchains 101
Blockchain explained
bitcoin_presentation
Bitcoin, Banking and the Blockchain
Blockchain and Bitcoin
INTRO TO BLOCKCHAINS AND CRYPTOCURRENCY
Blockchain Technology: A Technical Introduction to Non-Technical People
Ad

Viewers also liked (20)

PPTX
Conceptualizing Smart Contracts
PDF
Blockchain Smart Contracts - getting from hype to reality
PPTX
Transformational leadership
PDF
Gawrisch Insights From Biophysical Studies On The Role Of Pufa For Function O...
ODP
Fenix, un Lenguaje de Desarrollo de Videojuegos
DOC
THE STAR FACTOR OFFER FORM
PPTX
Estimating Tail Parameters
PPTX
Foodland
PPSX
Candilejas milespowerpoints.com
PDF
Real money meets e money
PDF
11. genny magally
PDF
LinkedIn Company Page Update
PPTX
IktissadEvents App
DOC
Normativa gallega de piscinas
DOC
Yo te siento. irene cao
DOCX
2014 enero menu semana francesa
PPS
Integracion Cardio Respiratorio
PPTX
Enterprise Search: Potenziale und Fallstricke
PDF
Ethereum: Next steps...
Conceptualizing Smart Contracts
Blockchain Smart Contracts - getting from hype to reality
Transformational leadership
Gawrisch Insights From Biophysical Studies On The Role Of Pufa For Function O...
Fenix, un Lenguaje de Desarrollo de Videojuegos
THE STAR FACTOR OFFER FORM
Estimating Tail Parameters
Foodland
Candilejas milespowerpoints.com
Real money meets e money
11. genny magally
LinkedIn Company Page Update
IktissadEvents App
Normativa gallega de piscinas
Yo te siento. irene cao
2014 enero menu semana francesa
Integracion Cardio Respiratorio
Enterprise Search: Potenziale und Fallstricke
Ethereum: Next steps...
Ad

Similar to Blockchain - Introduction and Authoring Smart Contracts (20)

PDF
Introduction to Blockchain and Smart Contracts
PDF
New Business Models enabled by Blockchain
PDF
Introduction to Blockchain Development
PPTX
The blockchain ecosystem
PDF
TBBUG - Deep Dive (Part 1) - 2022Nov29.pdf
PDF
Click Ventures Blockchain Ecosystem Report 2018
PPTX
dfgsdjghkjsdhfg.pptx
PPTX
Blockchain: a Game-Changing Technology
PPTX
BlockChain for the Banker
PDF
Blockchain and BPM - Reflections on Four Years of Research and Applications
PDF
Blockchain In Action 1st Edition Bina Ramamurthy
PDF
A Gentle introduction to Blockchain with Ethereum
PDF
Introduction to Blockchain with an Ethereuem Hands-on
PDF
Understanding blockchains
PDF
Integrating blockchain and traditional web
PDF
Developing Blockchain Applications
PPTX
CCS339 Unit V BLOCKCHAIN APPLICATIONS .pptx
PPTX
Block chain application is explained in detail
PPTX
Session 3 introduction blockchain by franco 22 januari
PPTX
blockchain-introduction-public in education
Introduction to Blockchain and Smart Contracts
New Business Models enabled by Blockchain
Introduction to Blockchain Development
The blockchain ecosystem
TBBUG - Deep Dive (Part 1) - 2022Nov29.pdf
Click Ventures Blockchain Ecosystem Report 2018
dfgsdjghkjsdhfg.pptx
Blockchain: a Game-Changing Technology
BlockChain for the Banker
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain In Action 1st Edition Bina Ramamurthy
A Gentle introduction to Blockchain with Ethereum
Introduction to Blockchain with an Ethereuem Hands-on
Understanding blockchains
Integrating blockchain and traditional web
Developing Blockchain Applications
CCS339 Unit V BLOCKCHAIN APPLICATIONS .pptx
Block chain application is explained in detail
Session 3 introduction blockchain by franco 22 januari
blockchain-introduction-public in education

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PDF
Approach and Philosophy of On baking technology
PPTX
sap open course for s4hana steps from ECC to s4
MIND Revenue Release Quarter 2 2025 Press Release
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
NewMind AI Weekly Chronicles - August'25-Week II
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
Approach and Philosophy of On baking technology
sap open course for s4hana steps from ECC to s4

Blockchain - Introduction and Authoring Smart Contracts

  • 1. 1 Vikas Grover vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain www.meetup.com/Blockchain-Revolution Blockchain & Authoring Smart Contracts
  • 2. 2 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Agenda ● Introduction ● Smart Contracts ● Test RPC and Geth ● Truffle ● Dapp
  • 3. 3 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Introduction Blockchain creates a permanent, digitized chain of transactions, grouped in blocks, allowing virtually anything of value to be tracked and traded, without requiring a central point of control Blockchain is a peer-to-peer distributed ledger technology for a new generation of transactional applications.
  • 4. 4 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain What is in Block Header, Transaction Count, Block Content Transaction Input Output
  • 5. 5 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Public, Private, Consortium/Hybrid First thing First – Do you even need a Blockchain? ● Database with Shared Access ● Who Controls the Functionality? ● Public or Private Transactions? ● Determining Consensus?
  • 6. 6 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Public, Private, Hybrid ● Public Blockchain: Fully Public, Secured by Cryptocurrencies (Proof of work, Proof of Stake etc), Its for Anyone – Read, Send Transactions, Participate in Consensus Process ● Private Blockchain: Controlled Access, Write permissions are kept centralized to one organization, Read permissions may be public or not (or some part may be public) ● Consortium/Hybrid Blockchain: Pre-selected set of nodes for eg: 15 financial institutions
  • 7. 7 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Public, Private, Hybrid Public Blockchain ● Freedom ● Neutrality ● Openness Private Blockchain ● Known Validator (51% risk goes away) ● Cheaper Transactions ● Privacy No way that there is going to be One way to do Blockchain
  • 8. 8 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Bitcoin – Digitally Signed
  • 9. 9 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Ethereum ● Founder of Ethereum - Vitalik Buterin (22 year old) won the 2014 World Technology Award for invention of Blockchain. ● Ethereum to build programming tools to make Blockchain power any/everything. ● Ethereum is Dynamic and Programmable. You can implement the way you want. For eg: Using Java Script you can implement almost anything.
  • 10. 10 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain What is Better with Ethereum
  • 11. 11 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Smart Contract Smart contracts are computer protocols that facilitate, verify, or enforce the negotiation or performance of a contract, or that make a contractual clause unnecessary. Smart contracts usually also have a user interface and often emulate the logic of contractual clauses. Trust the Bank Trust the Code
  • 12. 12 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Smart Contract – Online Browser
  • 13. 13 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Smart Contract – Mist
  • 14. 14 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Different Needs Different Clients ● When Developing ● Ethereum JS TestRPC ● When Deploying: ● Geth ● Webthree ● Others
  • 16. 18 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Truffle What is Truffle ● Development Environment ● Testing Framework ● Asset Pipeline
  • 17. 19 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Truffle What do you get with Truffle ● Built-in smart contract compilation, linking, deployment and binary management. ● Automated contract testing with Mocha and Chai. ● Configurable build pipeline with support for custom build processes. ● Scriptable deployment & migrations framework ● Network management for deploying to many public & private networks. ● Interactive console for direct contract communication ● Instant rebuilding of assets during development. ● External script runner that executes scripts within a Truffle environment. ● Support for JavaScript, SASS, ES6 and JSX built-in.
  • 18. 21 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Getting Started with Truffle ● Getting Started ● Install Truffle ● Commands ● mkdir myproject ● cd myproject ● truffle init ● app ● contracts ● migrations ● test ● truffle.js ● truffle compile
  • 19. 22 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Testing with Truffle ● Automated Testing ● Mocha ● Assertion ● Chai ● All test files should be located in the ./tests directory. Truffle will only run test files with the following file extensions: .js, .es, .es6, and .jsx. All other files are ignored.
  • 20. 23 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Interacting with SmartContract ● Use Web3 ● Little Difficult though ● Use Ether Pudding ● Chai ● All test files should be located in the ./tests directory. Truffle will only run test files with the following file extensions: .js, .es, .es6, and .jsx. All other files are ignored.
  • 22. 25 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Dapp ● Frontend and Backend ● Reactive Programming – callback functions ● Web3.js ● version ● api ● node/getNode ● network/getNetwork ● ethereum/getEthereum ● whisper/getWhisper ● isConnected() ● setProvider(provider) ● CurrentProvider ● Etc etc etc
  • 23. 26 vgrover1515@gmail.com Offline Slack Channel : www.tinyurl.com/letsdoblockchain Thanks