SlideShare a Scribd company logo
1 of 23
Download to read offline
ETHEREUMF O R J AVA S C R I P T D E V E L O P E R S
GreeceJS #21 @panosjee
Panos Papadopoulos

Founder GreeceJS
I am a software engineer that joined the
other side of the Force
I am a Partner at Marathon VC
I was a founder at BugSense and Greece JS
Hello!
I Am Panos
You can contact me at @panosjee
Ethereum aims to be the global, decentralised,
unstoppable, uncensorable computer.
(Using blockchain and ponies of course)
ETHEREUM
I should have ICO’ed back then
The crazy 2017 Ethereum rally
THE BLOCKCHAINIn case you are living under a rock
But way more complex in the case of Ethereum
Every 14 seconds the results
of the programs execution are
shared and verified across all
the nodes of the network. The
new state is written in the
blockchain.
Ethereum programs are called Smart
Contracts and are usually written in
Solidity, Viper and LLL. Smart Contracts
can be accessed via the web thanks to
web3.js
Ethereum listens to other
nodes and executes
program that compile to
Ethereum Virtual Machine
Users run an Ethereum
client, usually geth (the
official client written in Go)
Ethereum for dummies
Nodes
EVM
Smart
Contracts
Ether
Smart Contract execution and
storage costs. The cost is
called gas and can be
purchased for Ether the native
currency of the network
Enterprise Ethereum is an
official effort to bring private
Ethereum networks to the
corporate world.
Corporate friendly
14 seconds block generation
makes for quick transactions
and “fast” socially scalable
programs.
Fast
Elliptical cryptography used
for wallets, PoW to secure
blockchain (might change to
PoS)
Secure
Ethereum creates a
computing platform that
cannot be stopped or altered
Uncensorable
Ethereum is one the most
well performing crypto-
currencies of 2017.
Asset
Ethereum has a large
enthusiastic community
building blocks and dapps
Community
ETHEREUM CORE FEATURES
The Ether issuance model
What is the use case
for smart contracts?
Automate lawyers and trusted 3rd parties out of existence.
Think processes that require trust:
- Financial instruments
- Voting
- Tickets
- Registries
- Ballots
- Marketplaces
- Scams aka ICOs
The main toolset includes the official smart
contract language solidity and web3.js
npm install solc
npm install web3
npm install solium
npm install truffle
npm install ethereumjs-testrpc
Oh and Meteor is a thing for the Ethereum
community.
Tools
A wallet stores your private &
public keys that generate
addresses and sign your
transactions.
At a minimum you need a
wallet to store & send Ether,
interact & deploy smart
contracts. Holding your keys
makes you sovereign.
Popular wallets:
- MyEtherWallet
- Mist
- Coinbase (exchange)
Wallet
Running your node is
educational, useful and
wasteful (good luck syncing).
Geth is the official client
Parity has f***d up several
times.
Implementations in Python, JS,
C++, Java. Use at your own
risk.
Clients expose console, JSON-
RPC, logs.
Node (or not)
WHAT YOU NEED TO START
““Writing smart
contracts on
Ethereum is a
pleasure and the
tools are great”
No one, 2017
LET’S ICO GreeceJS
Pump
Throw decentralisation buzz works
Release whitepaper
Dump
Cash out
Bro down
testrpc is a Node.js based Ethereum client for testing and development.
It uses ethereumjs to simulate full client behavior and make developing
Ethereum applications much faster. It also includes all popular RPC
functions and features (like events) and can be run deterministically to
make development a breeze.

Sanity tip: use -db to keep accounts after restarts
Tools: ethereum-jsonrpc
Install, sync & run a full client is a hassle (but also the point)
This is probably the most portable and most convenient way to install Solidity
locally.
A platform-independent JavaScript library is provided by compiling the C++ source
into JavaScript using Emscripten. It can be used in projects directly (such as
Remix). Please refer to the solc-js repository for instructions.
Tools: solc-js
The fastest way to install the Solidity compiler
To make your app work on Ethereum, you can use the web3 object provided by
the web3.js library. Under the hood it communicates to a local node through
RPC calls. web3.js works with any Ethereum node, which exposes an RPC layer.
Tools: web3.js
The library that exposes Ethereum to rest of us
web3 runs in the browser. If web3 is loaded and can access Ethereum keys then
you can run any Dapp in your browser. 

The most common way to inject web3 into a window and be able to control an
Ethereum wallet is the Metamask Chrome plugin.
MetaMask is a bridge that allows you to visit the distributed web of tomorrow in
your browser today. It allows you to run Ethereum dApps right in your browser
without running a full Ethereum node. (because Mist sucks)

MetaMask includes a secure identity vault, providing a user interface (duh) to
manage your identities on different sites and sign blockchain transactions.

Bonus: IPFS Station Chrome plugin allows you to access IPFS urls seamlessly
from your local IPFS node, and take a look at its stats.
Tools: Metamask
Make Chrome Ethereum-aware
Truffle is the most popular development framework for Ethereum.
Truffle gives structure to your smart contract and help you compile, test,
deploy and migrate.
EthPM is the package manager for Smart Contracts B-E-W-A-R-E
You can write tests in both JS and Solidity. When it comes to “trusted”
computing you cannot escape tests!
Tools: Truffle
Let’s use some JS skills to manage Solidity dapps life cycle
candy maple cake sugar pudding cream honey rich smooth crumble sweet treat
Version pragma: Solidity upgrades break things, make sure the target is right!
Functions execute code internally or externally
Function Modifiers aka decorators
Events change the state, therefore you pay for their execution. Events are dispatched signals the
smart contracts can fire. DApps, or anything connected to Ethereum JSON-RPC API, can listen to
these events and act accordingly. Event can be indexed, so that the event history is searchable later.
event Deposit(address from, uint value);
Anatomy of a smart contract
Demo Time!
Deploy a smart contract
Choose a network (testrpc, testnets: [morden, ropsten, kovan, rinkeby], live)
Have enough gas to pay for deployment
When you deploy you become the owner of the contract unless if specified otherwise
Contract is deployed at an address. App.contracts.GreeceJSToken.deployed().then
ABI (Application Binary Interface) is generated without you cannot interact with web3.js.
ENS (Ethereum Naming System) to the rescue.
Store your web3.js at Swarm or IPFS
Tools: Remix
Tools: Etherscan
Blockchain browser
- Transaction explorer
- Block explorer
- Inspect smart contracts
- Monitor addresses
- See logs
Thanks!
Let’s talk @panosjee panos@marathon.vc
Any questions?

More Related Content

What's hot

Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015Rhea Myers
 
Solidity Simple Tutorial EN
Solidity Simple Tutorial ENSolidity Simple Tutorial EN
Solidity Simple Tutorial ENNicholas Lin
 
Blockchain Coding Dojo - BlockchainHub Graz
Blockchain Coding Dojo - BlockchainHub GrazBlockchain Coding Dojo - BlockchainHub Graz
Blockchain Coding Dojo - BlockchainHub GrazBlockchainHub Graz
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block ChainSanatPandoh
 
OpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainOpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainGene Leybzon
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Simplilearn
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Tomoaki Sato
 
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Gene Leybzon
 
The Ethereum Experience
The Ethereum ExperienceThe Ethereum Experience
The Ethereum ExperienceEthereum
 
Building Ðapps on the Ethereum Platform
Building Ðapps on the Ethereum PlatformBuilding Ðapps on the Ethereum Platform
Building Ðapps on the Ethereum PlatformFabian Vogelsteller
 
Ethereum Web3.js - Some tips for the developer
Ethereum Web3.js - Some  tips  for  the developer Ethereum Web3.js - Some  tips  for  the developer
Ethereum Web3.js - Some tips for the developer 炫成 林
 
Blockchain Development Trends 2021
Blockchain Development Trends 2021Blockchain Development Trends 2021
Blockchain Development Trends 2021ShareDocView.com
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for DevelopersShimi Bandiel
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Zvi Avraham
 
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.jsFelix Crisan
 
The world computer
The world computerThe world computer
The world computergavofyork
 

What's hot (20)

Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015
 
Ethereum
EthereumEthereum
Ethereum
 
Solidity Simple Tutorial EN
Solidity Simple Tutorial ENSolidity Simple Tutorial EN
Solidity Simple Tutorial EN
 
Blockchain Coding Dojo - BlockchainHub Graz
Blockchain Coding Dojo - BlockchainHub GrazBlockchain Coding Dojo - BlockchainHub Graz
Blockchain Coding Dojo - BlockchainHub Graz
 
Ethereum Smart contract
Ethereum Smart contractEthereum Smart contract
Ethereum Smart contract
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
OpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainOpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chain
 
Ethereum bxl
Ethereum bxlEthereum bxl
Ethereum bxl
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Dapps 101
Dapps 101Dapps 101
Dapps 101
 
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
 
The Ethereum Experience
The Ethereum ExperienceThe Ethereum Experience
The Ethereum Experience
 
Building Ðapps on the Ethereum Platform
Building Ðapps on the Ethereum PlatformBuilding Ðapps on the Ethereum Platform
Building Ðapps on the Ethereum Platform
 
Ethereum Web3.js - Some tips for the developer
Ethereum Web3.js - Some  tips  for  the developer Ethereum Web3.js - Some  tips  for  the developer
Ethereum Web3.js - Some tips for the developer
 
Blockchain Development Trends 2021
Blockchain Development Trends 2021Blockchain Development Trends 2021
Blockchain Development Trends 2021
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
 
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.js
 
The world computer
The world computerThe world computer
The world computer
 

Similar to ETHEREUM FOR JAVASCRIPT DEVELOPERS

10 most used blockchain tools in 2021 for blockchain development
10 most used blockchain tools in 2021 for blockchain development10 most used blockchain tools in 2021 for blockchain development
10 most used blockchain tools in 2021 for blockchain developmentAmniAugustine
 
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 applicationAnthony Chow
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications malikmayank
 
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 RingBlock 16
 
Ethereum (Blockchain Network)
Ethereum (Blockchain Network)Ethereum (Blockchain Network)
Ethereum (Blockchain Network)Qais Ammari
 
10 Best Programming Languages for Blockchain in 2023.pdf
10 Best Programming Languages for Blockchain in 2023.pdf10 Best Programming Languages for Blockchain in 2023.pdf
10 Best Programming Languages for Blockchain in 2023.pdfWDP Technologies
 
Ethereum introduction
Ethereum introductionEthereum introduction
Ethereum introductionkesavan N B
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshellDaniel Chan
 
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDevCamp Campinas
 
Eraswap Network (ESN): A unique Blockchain Network!
 Eraswap Network (ESN): A unique Blockchain Network! Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!RAJPATEL933
 
Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!AlishaShamim1
 

Similar to ETHEREUM FOR JAVASCRIPT DEVELOPERS (20)

10 most used blockchain tools in 2021 for blockchain development
10 most used blockchain tools in 2021 for blockchain development10 most used blockchain tools in 2021 for blockchain development
10 most used blockchain tools in 2021 for blockchain 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
 
All About Ethereum
All About EthereumAll About Ethereum
All About Ethereum
 
Exploring ethereum
Exploring ethereumExploring ethereum
Exploring ethereum
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
 
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
 
How to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contractHow to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contract
 
Ethereum (Blockchain Network)
Ethereum (Blockchain Network)Ethereum (Blockchain Network)
Ethereum (Blockchain Network)
 
What is ethereum
What is ethereumWhat is ethereum
What is ethereum
 
10 Best Programming Languages for Blockchain in 2023.pdf
10 Best Programming Languages for Blockchain in 2023.pdf10 Best Programming Languages for Blockchain in 2023.pdf
10 Best Programming Languages for Blockchain in 2023.pdf
 
Ethereum introduction
Ethereum introductionEthereum introduction
Ethereum introduction
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshell
 
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 
Eraswap Network (ESN): A unique Blockchain Network!
 Eraswap Network (ESN): A unique Blockchain Network! Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!
 
EraSwap White Paper
EraSwap White PaperEraSwap White Paper
EraSwap White Paper
 
Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!Eraswap Network (ESN): A unique Blockchain Network!
Eraswap Network (ESN): A unique Blockchain Network!
 
Esn whitepaper
Esn whitepaperEsn whitepaper
Esn whitepaper
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

ETHEREUM FOR JAVASCRIPT DEVELOPERS

  • 1. ETHEREUMF O R J AVA S C R I P T D E V E L O P E R S GreeceJS #21 @panosjee Panos Papadopoulos
 Founder GreeceJS
  • 2. I am a software engineer that joined the other side of the Force I am a Partner at Marathon VC I was a founder at BugSense and Greece JS Hello! I Am Panos You can contact me at @panosjee
  • 3. Ethereum aims to be the global, decentralised, unstoppable, uncensorable computer. (Using blockchain and ponies of course) ETHEREUM
  • 4. I should have ICO’ed back then
  • 5. The crazy 2017 Ethereum rally
  • 6. THE BLOCKCHAINIn case you are living under a rock But way more complex in the case of Ethereum
  • 7. Every 14 seconds the results of the programs execution are shared and verified across all the nodes of the network. The new state is written in the blockchain. Ethereum programs are called Smart Contracts and are usually written in Solidity, Viper and LLL. Smart Contracts can be accessed via the web thanks to web3.js Ethereum listens to other nodes and executes program that compile to Ethereum Virtual Machine Users run an Ethereum client, usually geth (the official client written in Go) Ethereum for dummies Nodes EVM Smart Contracts Ether Smart Contract execution and storage costs. The cost is called gas and can be purchased for Ether the native currency of the network
  • 8. Enterprise Ethereum is an official effort to bring private Ethereum networks to the corporate world. Corporate friendly 14 seconds block generation makes for quick transactions and “fast” socially scalable programs. Fast Elliptical cryptography used for wallets, PoW to secure blockchain (might change to PoS) Secure Ethereum creates a computing platform that cannot be stopped or altered Uncensorable Ethereum is one the most well performing crypto- currencies of 2017. Asset Ethereum has a large enthusiastic community building blocks and dapps Community ETHEREUM CORE FEATURES
  • 10. What is the use case for smart contracts? Automate lawyers and trusted 3rd parties out of existence. Think processes that require trust: - Financial instruments - Voting - Tickets - Registries - Ballots - Marketplaces - Scams aka ICOs
  • 11. The main toolset includes the official smart contract language solidity and web3.js npm install solc npm install web3 npm install solium npm install truffle npm install ethereumjs-testrpc Oh and Meteor is a thing for the Ethereum community. Tools A wallet stores your private & public keys that generate addresses and sign your transactions. At a minimum you need a wallet to store & send Ether, interact & deploy smart contracts. Holding your keys makes you sovereign. Popular wallets: - MyEtherWallet - Mist - Coinbase (exchange) Wallet Running your node is educational, useful and wasteful (good luck syncing). Geth is the official client Parity has f***d up several times. Implementations in Python, JS, C++, Java. Use at your own risk. Clients expose console, JSON- RPC, logs. Node (or not) WHAT YOU NEED TO START
  • 12. ““Writing smart contracts on Ethereum is a pleasure and the tools are great” No one, 2017
  • 13. LET’S ICO GreeceJS Pump Throw decentralisation buzz works Release whitepaper Dump Cash out Bro down
  • 14. testrpc is a Node.js based Ethereum client for testing and development. It uses ethereumjs to simulate full client behavior and make developing Ethereum applications much faster. It also includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze. Sanity tip: use -db to keep accounts after restarts Tools: ethereum-jsonrpc Install, sync & run a full client is a hassle (but also the point)
  • 15. This is probably the most portable and most convenient way to install Solidity locally. A platform-independent JavaScript library is provided by compiling the C++ source into JavaScript using Emscripten. It can be used in projects directly (such as Remix). Please refer to the solc-js repository for instructions. Tools: solc-js The fastest way to install the Solidity compiler
  • 16. To make your app work on Ethereum, you can use the web3 object provided by the web3.js library. Under the hood it communicates to a local node through RPC calls. web3.js works with any Ethereum node, which exposes an RPC layer. Tools: web3.js The library that exposes Ethereum to rest of us web3 runs in the browser. If web3 is loaded and can access Ethereum keys then you can run any Dapp in your browser. The most common way to inject web3 into a window and be able to control an Ethereum wallet is the Metamask Chrome plugin.
  • 17. MetaMask is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run Ethereum dApps right in your browser without running a full Ethereum node. (because Mist sucks) MetaMask includes a secure identity vault, providing a user interface (duh) to manage your identities on different sites and sign blockchain transactions. Bonus: IPFS Station Chrome plugin allows you to access IPFS urls seamlessly from your local IPFS node, and take a look at its stats. Tools: Metamask Make Chrome Ethereum-aware
  • 18. Truffle is the most popular development framework for Ethereum. Truffle gives structure to your smart contract and help you compile, test, deploy and migrate. EthPM is the package manager for Smart Contracts B-E-W-A-R-E You can write tests in both JS and Solidity. When it comes to “trusted” computing you cannot escape tests! Tools: Truffle Let’s use some JS skills to manage Solidity dapps life cycle candy maple cake sugar pudding cream honey rich smooth crumble sweet treat
  • 19. Version pragma: Solidity upgrades break things, make sure the target is right! Functions execute code internally or externally Function Modifiers aka decorators Events change the state, therefore you pay for their execution. Events are dispatched signals the smart contracts can fire. DApps, or anything connected to Ethereum JSON-RPC API, can listen to these events and act accordingly. Event can be indexed, so that the event history is searchable later. event Deposit(address from, uint value); Anatomy of a smart contract Demo Time!
  • 20. Deploy a smart contract Choose a network (testrpc, testnets: [morden, ropsten, kovan, rinkeby], live) Have enough gas to pay for deployment When you deploy you become the owner of the contract unless if specified otherwise Contract is deployed at an address. App.contracts.GreeceJSToken.deployed().then ABI (Application Binary Interface) is generated without you cannot interact with web3.js. ENS (Ethereum Naming System) to the rescue. Store your web3.js at Swarm or IPFS
  • 22. Tools: Etherscan Blockchain browser - Transaction explorer - Block explorer - Inspect smart contracts - Monitor addresses - See logs
  • 23. Thanks! Let’s talk @panosjee panos@marathon.vc Any questions?