SlideShare a Scribd company logo
@RicardoAponte
Create your first Smart Contract with Ethereum
By Ricardo Aponte
@RicardoAponte
About me
@RicardoAponte
Agenda
What is Ethereum
What are Smart Contracts
What is Gas, Gas Limit and Gas Price
What are Denominations, Wei, Babbage, Lovelace, etc...
What is Solidity
Let’s Code our first Smart Contract!
@RicardoAponte
What is Ethereum
● Open-source, public, blockchain-based distributed computing platform that
runs Smart Contracts
● Applications (Smart Contracts) run exactly as programmed
● No possibilities of downtime, censorship, fraud or third-party interference
● Apps run on a custom blockchain
● Uses Ether as fuel for operating
@RicardoAponte
What is a Smart Contract
● Collection of Code (Functions) and Data (State)
● Resides at a specific address
● Pass messages between them
● Turing Complete
● Live on the blockchain in and EVM bytecode
● Written on a high level language such as Solidity
@RicardoAponte
Developer
Users
@RicardoAponte
What is Gas
Unit of measurement
Each operation has a cost
Analogy:
Electricity is measured by kilowatts per hour
Fuel like Gasoline and/or Diesel are measured in Gallons or Liters
Executing a Smart Contract is measured by Gas
Default: 21000 Gas
@RicardoAponte
Gas Price
The cost of unit of Gas the user is willing to pay
● With a car, it's $2.50 (price) per gallon (unit).
● With Ethereum, it's 20 GWEI (price) per gas (unit).
The costs:
● With a car, 10 gallons at $2.50 = $25
● With Ethereum, 21000 units of gas at 20 GWEI = 0.00042 ETH
The higher the Gas Price the more encouraged miners are to process your
transaction. https://ethgasstation.info/
@RicardoAponte
Gas Limit
● The maximum amount of units of gas you are willing to spend on a
transaction
● Prevents users from overly spending gas in a transaction
● All unused gas is refunded at the end of a transaction
● If not enough gas is specified to cover the computational resources you use
your transaction will fail due to an Out of Gas Error.
@RicardoAponte
What are Denominations
Ethereum is divisible by 18 decimal places and each one is a name tribute.
● Wei = 1 quintillionth (0.0000000000000000001) tribute to Wei Dai
● Babagge = 1 quadrillionth of (0.0000000000000001) tribute to Charles
Babagge
● Lovelace = 1 trillionth (0.0000000000001) tribute to Ada Lovelace
● Shannon = 1 billionth (0.0000000001) tribute to Claude Shannon
● Szabo = 1 millionth (0.0000001) tribute to Nick Szabo
● Finney = 1 thousandth (0.0001) tribute to Hal Finney
@RicardoAponte
What is Solidity
● Language similar to Javascript
● Allows to develop Smart Contracts
● Compiles to EVM bytecode
● Flagship language of Ethereum and most popular
@RicardoAponte
Solidity Concepts
Pragma
Contract (Class)
Data types (variables, scope)
● string
● uint
● map
● address
Functions
● public
● private
● internal
Global Object
● msg
Gas (The price you pay for the code you
execute) Anti-DoS
Naming conventions
@RicardoAponte
What we’ll code
The Problem:
● There is a group of people who want to eat pizza and want to pay for their
share
The Solution:
● Create a Smart Contract that will allow the group of people to pay for the
pizza and once the pizza is paid for, the pizza will be made and delivered
@RicardoAponte
Pizza Factory Smart Contract Flow
1. Define and store a Pizza Factory owner
2. Define a pizza name and price
3. Define storage for user payments
4. Create a Function to allow users to pay for pizza
5. Create a Function to transfer payment to owner in order to make the pizza
6. Challenge Round!
@RicardoAponte
Let’s Code our first Smart Contract
What we’ll use:
http://remix.ethereum.org/
@RicardoAponte
Other Resources
Complete Guide: http://solidity.readthedocs.io/en/latest/
Style Guide: http://solidity.readthedocs.io/en/develop/style-guide.html
Security Considerations: http://solidity.readthedocs.io/en/develop/security-
considerations.html
OpenZeppelin: https://github.com/OpenZeppelin
CryptoZombies: https://cryptozombies.io/
@RicardoAponte
PizzaPlace.sol
pragma solidity ^0.4.19;
contract PizzaPrice {
// Define owner
// Define Payment information
// Initialize Contract
// Define Pizza name and value in wei
// Define Users
// Pay for Pizza
// Make Pizza
}

More Related Content

Similar to Create your first Smart Contract with Solidity

Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
Shimi Bandiel
 
Prototyping products for the Internet of Things using JavaScript
Prototyping products for the Internet of Things using JavaScriptPrototyping products for the Internet of Things using JavaScript
Prototyping products for the Internet of Things using JavaScript
J On The Beach
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Codemotion
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
Akshay Kumar
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
Week 4 - DApps, Smart Contracts, and Decentralized Incentive Systems
Week 4 - DApps, Smart Contracts, and Decentralized Incentive SystemsWeek 4 - DApps, Smart Contracts, and Decentralized Incentive Systems
Week 4 - DApps, Smart Contracts, and Decentralized Incentive Systems
Roger Royse
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Algorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandAlgorand Educate: Intro to Algorand
Algorand Educate: Intro to Algorand
TinaBregovi
 
Introduction to ethereum_public
Introduction to ethereum_publicIntroduction to ethereum_public
Introduction to ethereum_public
antitree
 
Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business ApplicationsBlockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business Applications
Matthias Zimmermann
 
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
Priyanka Aash
 
Blockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoinBlockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoin
Aludirk Wong
 
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
Sathish VJ
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
Bambang Purnomosidi D. P.
 
StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721
TinaBregovi
 
Crypto currency of The Future.pptx
Crypto currency of The Future.pptxCrypto currency of The Future.pptx
Crypto currency of The Future.pptx
NileenaVijayan2
 
Blockchain Development
Blockchain DevelopmentBlockchain Development
Blockchain Development
preetikumara
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
Destry Saul
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
Hu Kenneth
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
INAMULLAH699891
 

Similar to Create your first Smart Contract with Solidity (20)

Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
 
Prototyping products for the Internet of Things using JavaScript
Prototyping products for the Internet of Things using JavaScriptPrototyping products for the Internet of Things using JavaScript
Prototyping products for the Internet of Things using JavaScript
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
Week 4 - DApps, Smart Contracts, and Decentralized Incentive Systems
Week 4 - DApps, Smart Contracts, and Decentralized Incentive SystemsWeek 4 - DApps, Smart Contracts, and Decentralized Incentive Systems
Week 4 - DApps, Smart Contracts, and Decentralized Incentive Systems
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
Algorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandAlgorand Educate: Intro to Algorand
Algorand Educate: Intro to Algorand
 
Introduction to ethereum_public
Introduction to ethereum_publicIntroduction to ethereum_public
Introduction to ethereum_public
 
Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business ApplicationsBlockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business Applications
 
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
 
Blockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoinBlockchain for creative content - What we do in LikeCoin
Blockchain for creative content - What we do in LikeCoin
 
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
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
 
StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721
 
Crypto currency of The Future.pptx
Crypto currency of The Future.pptxCrypto currency of The Future.pptx
Crypto currency of The Future.pptx
 
Blockchain Development
Blockchain DevelopmentBlockchain Development
Blockchain Development
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
 

Recently uploaded

Secure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceSecure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
ICS
 
Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)
alowpalsadig
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
OnePlan Solutions
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
kalichargn70th171
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Vince Scalabrino
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
campbellclarkson
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
Streamlining End-to-End Testing Automation
Streamlining End-to-End Testing AutomationStreamlining End-to-End Testing Automation
Streamlining End-to-End Testing Automation
Anand Bagmar
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
widenerjobeyrl638
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
kalichargn70th171
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
dhavalvaghelanectarb
 

Recently uploaded (20)

Secure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceSecure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
 
bgiolcb
bgiolcbbgiolcb
bgiolcb
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
Streamlining End-to-End Testing Automation
Streamlining End-to-End Testing AutomationStreamlining End-to-End Testing Automation
Streamlining End-to-End Testing Automation
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
 

Create your first Smart Contract with Solidity

  • 1. @RicardoAponte Create your first Smart Contract with Ethereum By Ricardo Aponte
  • 3. @RicardoAponte Agenda What is Ethereum What are Smart Contracts What is Gas, Gas Limit and Gas Price What are Denominations, Wei, Babbage, Lovelace, etc... What is Solidity Let’s Code our first Smart Contract!
  • 4. @RicardoAponte What is Ethereum ● Open-source, public, blockchain-based distributed computing platform that runs Smart Contracts ● Applications (Smart Contracts) run exactly as programmed ● No possibilities of downtime, censorship, fraud or third-party interference ● Apps run on a custom blockchain ● Uses Ether as fuel for operating
  • 5. @RicardoAponte What is a Smart Contract ● Collection of Code (Functions) and Data (State) ● Resides at a specific address ● Pass messages between them ● Turing Complete ● Live on the blockchain in and EVM bytecode ● Written on a high level language such as Solidity
  • 7. @RicardoAponte What is Gas Unit of measurement Each operation has a cost Analogy: Electricity is measured by kilowatts per hour Fuel like Gasoline and/or Diesel are measured in Gallons or Liters Executing a Smart Contract is measured by Gas Default: 21000 Gas
  • 8. @RicardoAponte Gas Price The cost of unit of Gas the user is willing to pay ● With a car, it's $2.50 (price) per gallon (unit). ● With Ethereum, it's 20 GWEI (price) per gas (unit). The costs: ● With a car, 10 gallons at $2.50 = $25 ● With Ethereum, 21000 units of gas at 20 GWEI = 0.00042 ETH The higher the Gas Price the more encouraged miners are to process your transaction. https://ethgasstation.info/
  • 9. @RicardoAponte Gas Limit ● The maximum amount of units of gas you are willing to spend on a transaction ● Prevents users from overly spending gas in a transaction ● All unused gas is refunded at the end of a transaction ● If not enough gas is specified to cover the computational resources you use your transaction will fail due to an Out of Gas Error.
  • 10. @RicardoAponte What are Denominations Ethereum is divisible by 18 decimal places and each one is a name tribute. ● Wei = 1 quintillionth (0.0000000000000000001) tribute to Wei Dai ● Babagge = 1 quadrillionth of (0.0000000000000001) tribute to Charles Babagge ● Lovelace = 1 trillionth (0.0000000000001) tribute to Ada Lovelace ● Shannon = 1 billionth (0.0000000001) tribute to Claude Shannon ● Szabo = 1 millionth (0.0000001) tribute to Nick Szabo ● Finney = 1 thousandth (0.0001) tribute to Hal Finney
  • 11. @RicardoAponte What is Solidity ● Language similar to Javascript ● Allows to develop Smart Contracts ● Compiles to EVM bytecode ● Flagship language of Ethereum and most popular
  • 12. @RicardoAponte Solidity Concepts Pragma Contract (Class) Data types (variables, scope) ● string ● uint ● map ● address Functions ● public ● private ● internal Global Object ● msg Gas (The price you pay for the code you execute) Anti-DoS Naming conventions
  • 13. @RicardoAponte What we’ll code The Problem: ● There is a group of people who want to eat pizza and want to pay for their share The Solution: ● Create a Smart Contract that will allow the group of people to pay for the pizza and once the pizza is paid for, the pizza will be made and delivered
  • 14. @RicardoAponte Pizza Factory Smart Contract Flow 1. Define and store a Pizza Factory owner 2. Define a pizza name and price 3. Define storage for user payments 4. Create a Function to allow users to pay for pizza 5. Create a Function to transfer payment to owner in order to make the pizza 6. Challenge Round!
  • 15. @RicardoAponte Let’s Code our first Smart Contract What we’ll use: http://remix.ethereum.org/
  • 16. @RicardoAponte Other Resources Complete Guide: http://solidity.readthedocs.io/en/latest/ Style Guide: http://solidity.readthedocs.io/en/develop/style-guide.html Security Considerations: http://solidity.readthedocs.io/en/develop/security- considerations.html OpenZeppelin: https://github.com/OpenZeppelin CryptoZombies: https://cryptozombies.io/
  • 17. @RicardoAponte PizzaPlace.sol pragma solidity ^0.4.19; contract PizzaPrice { // Define owner // Define Payment information // Initialize Contract // Define Pizza name and value in wei // Define Users // Pay for Pizza // Make Pizza }

Editor's Notes

  1. Make disclaimer that this is a technical workshop
  2. Turing complete: It could be used to solve any computation problem.