SlideShare a Scribd company logo
1 of 15
CREATING SMART
CONTRACTS
PRESENTED BY:
DEEPAK ARYAL
2019PCS2010
What Is a Smart Contract?
Fundamentally, a “smart contract” is a set of coded computer
functions.
◦ May incorporate the elements of a binding contract (e.g., offer, acceptance,
and consideration), or may simply execute certain terms of a contract.
◦ Allows self-executing computer code to take actions at specified times and/or
based on reference to the occurrence or non-occurrence of an action or event
(e.g., delivery of an asset, weather conditions, or exchange of goods).
Smart contacts can be used for any type of transaction — it doesn’t
have to be financial.
Characters of Smart Contracts
A “smart contract” is not necessarily “smart.”
◦ The operation is only as smart as the information feed it receives
and the machine code that directs it.
A “smart contract” may not be a legally binding contract.
◦ It may be a gift or some other non-contractual transfer.
◦ It may be only part of a broader contract.
◦ To the extent a smart contract violates the law, it would not be
binding or enforceable.
Benefits of smart contract
• No intermediaries are needed, as the smart contract is executed
automatically
• The smart contract is executed quickly and independently of any
traditional financial n institution
• The contract can't be tampered with because it's immutable
• The transaction fee is low, costing almost nothing compared to
traditional payment systems
What are Smart Contracts Currently Being
Used For?
• Insurance Companies
• Health Systems
Health systems will use smart contracts to record and safely transfer data.
• Governments
smart contracts running on the blockchain can make voting systems completely
trustless and much more secure
• Business Management
Businesses can benefit massively from smart contracts. Instead of paying staff to run
payrolls, they can use smart contracts.
• ICOs ((Initial Coin Offering)
An ICO is a crowdfunding system for new applications that use blockchain technology.
One create a smart contract and a token for that smart contract.
How are Smart Contracts Created?
Smart contracts can be built on multiple blockchain platforms, including Ethereum
and NEO.
Ethereum is the most popular choice for developers
◦ Smart contracts are developed using Ethereum’s original coding language, called Solidity.
Neo smart contract can be used directly by almost any high-level programming language.
◦ Supported languages are C#, VB.Net, F#, Java, Kotlin, Python, GO, JavaScript
How the Ethereum platform executes
smart contracts
Before diving into building an Ethereum smart contract, you should have a clear
understanding of what’s under the hood of the Ethereum blockchain platform and
how exactly it executes smart contracts.
◦ Ethereum Virtual Machine (EVM)
a special virtual machine that’s an interpreter for the assembly language.
◦ Solidity
Solidity is the smart contract language on Ethereum. It’s a general-purpose programming
language developed on top of the EVM.
◦ Gas
Reward given to miners for processing the smart contract and adding it to blockchain
Step-by-step guide to building a
smart contract on Ethereum
Requirements
◦ Node.js − A JavaScript runtime environment for server-side programming.
◦ Truffle − A popular Ethereum development framework that allows you to write and test
smart contracts.
◦ Ganache CLI − An Ethereum remote procedure call (RPC) client within the Truffle
framework;
◦ Web3.js − An Ethereum JavaScript API that communicates with the Ethereum network
through RPC calls.
◦ Parity − A fast and secure Ethereum client for managing accounts, tokens, and so on.
◦ Visual Studio Code − A functional code editor; in fact, you’re welcome to use any other
editor.
Step #1 : Introducing two parties to an Ethereum
smart contract
Any smart contract is concluded by two sides.
◦ The client, who needs to get some home service done.
◦ The tasker, who completes a task and gets paid for it.
A client pays a tasker for fulfilling a task, so you should add a payment amount to
the smart contract as well; we called it payAmount.
Step #2: Enabling a client to transfer money to a
smart contract
A smart contract acts like a separate account that can either send
money to a tasker or send it back to a client. But first, a client must be
able to send money to the smart contract.
NOTE : nobody but a client can transfer money to a smart contract
and that it’s impossible for anyone to increase the payAmount:
Step #3: Allowing a smart contract to transfer
money to a tasker
Smart contract must be able to automatically send money to a tasker
as soon as a client confirms that the task has been completed.
◦ we need to introduce a new role in the smart contract – a deployer,
which is a web application on blockchain marketplace
◦ specify that only a deployer can initiate a transfer of money to a
tasker.
Step #4: Deploying your smart contract
The smart contract in Solidity is ready so there’s one final step −
compile and then deploy it.
◦ Create Ethereum wallets
◦ Get Ether on the Ropsten testnet( to check if wallet is working or
not)
◦ Compile the smart contract with Truffle
We’ve already built a smart contract written in Solidity, but it should be turned into a .json
file for deployment. Use Truffle to compile your smart contract; it will create a .json file
◦ Run a deployment script
◦ Execute your smart contract
Once your smart contract is deployed, you can execute it. To do this, you need to specify
the wallets for the client, tasker, and deployer and the reward for the tasker.
How Smart Contracts Will Change
the World
Smart contracts have huge potential. Not only do they streamline
transactions, they can revolutionize whole industries such as real estate,
banking, ecommerce, and healthcare.
If smart contracts fulfill their purpose, perhaps we’ll one day live in a world
that is free of middlemen.
◦ The best thing about having no middlemen is the fact that we save
a lot of money. Not only that, but we would no longer need to trust
anyone, either.
It can reduce fraud, delays and the overall cost of many things.
THANK YOU

More Related Content

What's hot

How To Become A Blockchain Engineer
How To Become A Blockchain EngineerHow To Become A Blockchain Engineer
How To Become A Blockchain Engineer101 Blockchains
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to BlockchainMalak Abu Hammad
 
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...Edureka!
 
How does blockchain work
How does blockchain workHow does blockchain work
How does blockchain workShishir Aryal
 
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...Simplilearn
 
Examples of Smart Contracts
Examples of Smart ContractsExamples of Smart Contracts
Examples of Smart Contracts101 Blockchains
 
Basic introduction in blockchain, smart contracts, permissioned ledgers
Basic introduction in blockchain, smart contracts, permissioned ledgersBasic introduction in blockchain, smart contracts, permissioned ledgers
Basic introduction in blockchain, smart contracts, permissioned ledgersKoen Vingerhoets
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain TechnologyNimmy Solomon
 
An Introduction to Blockchain Technology
An Introduction to Blockchain Technology An Introduction to Blockchain Technology
An Introduction to Blockchain Technology Niuversity
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshellDaniel Chan
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainJitendra Chittoda
 
Blockchain and Smart Contracts (Series: Blockchain Basics)
Blockchain and Smart Contracts (Series: Blockchain Basics)Blockchain and Smart Contracts (Series: Blockchain Basics)
Blockchain and Smart Contracts (Series: Blockchain Basics)Financial Poise
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureNuri Cankaya
 

What's hot (20)

How To Become A Blockchain Engineer
How To Become A Blockchain EngineerHow To Become A Blockchain Engineer
How To Become A Blockchain Engineer
 
Blockchain concepts
Blockchain conceptsBlockchain concepts
Blockchain concepts
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
 
How does blockchain work
How does blockchain workHow does blockchain work
How does blockchain work
 
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
 
Examples of Smart Contracts
Examples of Smart ContractsExamples of Smart Contracts
Examples of Smart Contracts
 
Top 5 DeFi Applications
Top 5 DeFi ApplicationsTop 5 DeFi Applications
Top 5 DeFi Applications
 
Basic introduction in blockchain, smart contracts, permissioned ledgers
Basic introduction in blockchain, smart contracts, permissioned ledgersBasic introduction in blockchain, smart contracts, permissioned ledgers
Basic introduction in blockchain, smart contracts, permissioned ledgers
 
Blockchain Technology
Blockchain TechnologyBlockchain Technology
Blockchain Technology
 
BLOCKCHAIN
BLOCKCHAINBLOCKCHAIN
BLOCKCHAIN
 
An Introduction to Blockchain Technology
An Introduction to Blockchain Technology An Introduction to Blockchain Technology
An Introduction to Blockchain Technology
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain
BlockchainBlockchain
Blockchain
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshell
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & Blockchain
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain and Smart Contracts (Series: Blockchain Basics)
Blockchain and Smart Contracts (Series: Blockchain Basics)Blockchain and Smart Contracts (Series: Blockchain Basics)
Blockchain and Smart Contracts (Series: Blockchain Basics)
 
Blockchain ppt
Blockchain pptBlockchain ppt
Blockchain ppt
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on Azure
 

Similar to Creating Smart Contract

Smartcontracts..pptx
Smartcontracts..pptxSmartcontracts..pptx
Smartcontracts..pptxkajalbansal30
 
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánEvent Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánJuan Ignacio Pérez Sacristán
 
Smart contract development top considerations
Smart contract development   top considerationsSmart contract development   top considerations
Smart contract development top considerationsDevelopcoins
 
Defi smart contract development company
Defi smart contract development companyDefi smart contract development company
Defi smart contract development companyBrugusoftwaresolutions
 
Interesting Facts About Ethereum Smart contract Development
Interesting Facts About Ethereum Smart contract DevelopmentInteresting Facts About Ethereum Smart contract Development
Interesting Facts About Ethereum Smart contract DevelopmentDevelopcoins
 
Ethereum smart contract development company
Ethereum smart contract development companyEthereum smart contract development company
Ethereum smart contract development companyDevelopcoins
 
Demystifying Smart Contracts
Demystifying Smart ContractsDemystifying Smart Contracts
Demystifying Smart ContractsBernard Peh
 
How does smart contract work ?
How does smart contract work  ?How does smart contract work  ?
How does smart contract work ?Blockchain Council
 
Blockchain smart contracts ethereum smart contract creation
Blockchain smart contracts   ethereum smart contract creationBlockchain smart contracts   ethereum smart contract creation
Blockchain smart contracts ethereum smart contract creationCodezeros
 
Top 8 blockchain based smart contract platforms
Top 8 blockchain based smart contract platformsTop 8 blockchain based smart contract platforms
Top 8 blockchain based smart contract platformsBlockchain Council
 
Smart contracts
Smart contractsSmart contracts
Smart contractsCoinGape
 
How NFTs And Smart Contracts Interact With Each Other
How NFTs And Smart Contracts Interact With Each OtherHow NFTs And Smart Contracts Interact With Each Other
How NFTs And Smart Contracts Interact With Each OtherIonixx Technologies Inc.
 
Hyperledger development & smart contract development
Hyperledger development & smart contract developmentHyperledger development & smart contract development
Hyperledger development & smart contract developmentgavraskaranand
 
The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained Flexsin
 
Why smart contract audit services are in demand
Why smart contract audit services are in demandWhy smart contract audit services are in demand
Why smart contract audit services are in demandshira william
 

Similar to Creating Smart Contract (20)

Smartcontracts..pptx
Smartcontracts..pptxSmartcontracts..pptx
Smartcontracts..pptx
 
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez SacristánEvent Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán
 
Smart contract development top considerations
Smart contract development   top considerationsSmart contract development   top considerations
Smart contract development top considerations
 
Defi smart contract development company
Defi smart contract development companyDefi smart contract development company
Defi smart contract development company
 
Interesting Facts About Ethereum Smart contract Development
Interesting Facts About Ethereum Smart contract DevelopmentInteresting Facts About Ethereum Smart contract Development
Interesting Facts About Ethereum Smart contract Development
 
Smart contract and smart contracts oracles
Smart contract and smart contracts oracles Smart contract and smart contracts oracles
Smart contract and smart contracts oracles
 
Blockchain 2.0
Blockchain 2.0Blockchain 2.0
Blockchain 2.0
 
Ethereum smart contract development company
Ethereum smart contract development companyEthereum smart contract development company
Ethereum smart contract development company
 
Smart contract and smart contract oracles
Smart contract and smart contract oraclesSmart contract and smart contract oracles
Smart contract and smart contract oracles
 
Smart contract and smart contract oracles
Smart contract and smart contract oraclesSmart contract and smart contract oracles
Smart contract and smart contract oracles
 
Demystifying Smart Contracts
Demystifying Smart ContractsDemystifying Smart Contracts
Demystifying Smart Contracts
 
How does smart contract work ?
How does smart contract work  ?How does smart contract work  ?
How does smart contract work ?
 
Blockchain smart contracts ethereum smart contract creation
Blockchain smart contracts   ethereum smart contract creationBlockchain smart contracts   ethereum smart contract creation
Blockchain smart contracts ethereum smart contract creation
 
Top 8 blockchain based smart contract platforms
Top 8 blockchain based smart contract platformsTop 8 blockchain based smart contract platforms
Top 8 blockchain based smart contract platforms
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
How NFTs And Smart Contracts Interact With Each Other
How NFTs And Smart Contracts Interact With Each OtherHow NFTs And Smart Contracts Interact With Each Other
How NFTs And Smart Contracts Interact With Each Other
 
Hyperledger development & smart contract development
Hyperledger development & smart contract developmentHyperledger development & smart contract development
Hyperledger development & smart contract development
 
The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained The Benefits Of Smart Contracts Development Explored And Explained
The Benefits Of Smart Contracts Development Explored And Explained
 
PRESENTATION
PRESENTATIONPRESENTATION
PRESENTATION
 
Why smart contract audit services are in demand
Why smart contract audit services are in demandWhy smart contract audit services are in demand
Why smart contract audit services are in demand
 

Recently uploaded

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Creating Smart Contract

  • 2. What Is a Smart Contract? Fundamentally, a “smart contract” is a set of coded computer functions. ◦ May incorporate the elements of a binding contract (e.g., offer, acceptance, and consideration), or may simply execute certain terms of a contract. ◦ Allows self-executing computer code to take actions at specified times and/or based on reference to the occurrence or non-occurrence of an action or event (e.g., delivery of an asset, weather conditions, or exchange of goods). Smart contacts can be used for any type of transaction — it doesn’t have to be financial.
  • 3. Characters of Smart Contracts A “smart contract” is not necessarily “smart.” ◦ The operation is only as smart as the information feed it receives and the machine code that directs it. A “smart contract” may not be a legally binding contract. ◦ It may be a gift or some other non-contractual transfer. ◦ It may be only part of a broader contract. ◦ To the extent a smart contract violates the law, it would not be binding or enforceable.
  • 4. Benefits of smart contract • No intermediaries are needed, as the smart contract is executed automatically • The smart contract is executed quickly and independently of any traditional financial n institution • The contract can't be tampered with because it's immutable • The transaction fee is low, costing almost nothing compared to traditional payment systems
  • 5. What are Smart Contracts Currently Being Used For? • Insurance Companies • Health Systems Health systems will use smart contracts to record and safely transfer data. • Governments smart contracts running on the blockchain can make voting systems completely trustless and much more secure • Business Management Businesses can benefit massively from smart contracts. Instead of paying staff to run payrolls, they can use smart contracts. • ICOs ((Initial Coin Offering) An ICO is a crowdfunding system for new applications that use blockchain technology. One create a smart contract and a token for that smart contract.
  • 6. How are Smart Contracts Created? Smart contracts can be built on multiple blockchain platforms, including Ethereum and NEO. Ethereum is the most popular choice for developers ◦ Smart contracts are developed using Ethereum’s original coding language, called Solidity. Neo smart contract can be used directly by almost any high-level programming language. ◦ Supported languages are C#, VB.Net, F#, Java, Kotlin, Python, GO, JavaScript
  • 7. How the Ethereum platform executes smart contracts Before diving into building an Ethereum smart contract, you should have a clear understanding of what’s under the hood of the Ethereum blockchain platform and how exactly it executes smart contracts. ◦ Ethereum Virtual Machine (EVM) a special virtual machine that’s an interpreter for the assembly language. ◦ Solidity Solidity is the smart contract language on Ethereum. It’s a general-purpose programming language developed on top of the EVM. ◦ Gas Reward given to miners for processing the smart contract and adding it to blockchain
  • 8. Step-by-step guide to building a smart contract on Ethereum
  • 9. Requirements ◦ Node.js − A JavaScript runtime environment for server-side programming. ◦ Truffle − A popular Ethereum development framework that allows you to write and test smart contracts. ◦ Ganache CLI − An Ethereum remote procedure call (RPC) client within the Truffle framework; ◦ Web3.js − An Ethereum JavaScript API that communicates with the Ethereum network through RPC calls. ◦ Parity − A fast and secure Ethereum client for managing accounts, tokens, and so on. ◦ Visual Studio Code − A functional code editor; in fact, you’re welcome to use any other editor.
  • 10. Step #1 : Introducing two parties to an Ethereum smart contract Any smart contract is concluded by two sides. ◦ The client, who needs to get some home service done. ◦ The tasker, who completes a task and gets paid for it. A client pays a tasker for fulfilling a task, so you should add a payment amount to the smart contract as well; we called it payAmount.
  • 11. Step #2: Enabling a client to transfer money to a smart contract A smart contract acts like a separate account that can either send money to a tasker or send it back to a client. But first, a client must be able to send money to the smart contract. NOTE : nobody but a client can transfer money to a smart contract and that it’s impossible for anyone to increase the payAmount:
  • 12. Step #3: Allowing a smart contract to transfer money to a tasker Smart contract must be able to automatically send money to a tasker as soon as a client confirms that the task has been completed. ◦ we need to introduce a new role in the smart contract – a deployer, which is a web application on blockchain marketplace ◦ specify that only a deployer can initiate a transfer of money to a tasker.
  • 13. Step #4: Deploying your smart contract The smart contract in Solidity is ready so there’s one final step − compile and then deploy it. ◦ Create Ethereum wallets ◦ Get Ether on the Ropsten testnet( to check if wallet is working or not) ◦ Compile the smart contract with Truffle We’ve already built a smart contract written in Solidity, but it should be turned into a .json file for deployment. Use Truffle to compile your smart contract; it will create a .json file ◦ Run a deployment script ◦ Execute your smart contract Once your smart contract is deployed, you can execute it. To do this, you need to specify the wallets for the client, tasker, and deployer and the reward for the tasker.
  • 14. How Smart Contracts Will Change the World Smart contracts have huge potential. Not only do they streamline transactions, they can revolutionize whole industries such as real estate, banking, ecommerce, and healthcare. If smart contracts fulfill their purpose, perhaps we’ll one day live in a world that is free of middlemen. ◦ The best thing about having no middlemen is the fact that we save a lot of money. Not only that, but we would no longer need to trust anyone, either. It can reduce fraud, delays and the overall cost of many things.