SlideShare a Scribd company logo
1 of 32
SMART CONTRACTS
HANDS-ON
Writing smart contracts in
Solidity
BLOCKCHAIN CONCEPTS
ā€¢ Accounts
ā€¢ Contracts
ā€¢ Messages
TWO TYPES OF ACCOUNTS
Account
StorageBalance Code
<>
Externally Owned Account
StorageBalance
Account
StorageBalance Code
<>
Contract
StorageBalance Code
<>
CONTRACTS
Contracts are accounts that contain code
Store the state
ā€¢ Example:
keeps account
balance
Source of notifications
(events)
ā€¢ Example: messaging
service that forwards
only messages when
certain conditions are
met
Mapping - relationship
between users
ā€¢ Example: mapping
real-world financial
contract to Etherium
contract
Act like a software
library
ā€¢ Example:
return calculated
value based on
message arguments
CALLS AND MESSAGES
Contract A Contract B
Message Call
ā€¢ Source
ā€¢ Target
ā€¢ Data Payload
ā€¢ Ether
ā€¢ Gas
ā€¢ Return Data
Externally
owned
account
Message CallSend Transaction
Call
WHAT CONTRACT CAN DO?
Read internal state
ā€¢ contract
ReadStateDemo {
ā€¢ uint public state;
ā€¢ function read() {
ā€¢ console.log(ā€œState:
"+state);
ā€¢ }
ā€¢ }
Modify internal State
ā€¢ contract
ModStateDemo {
ā€¢ uint public state;
ā€¢ function update() {
ā€¢ state=state+1;
ā€¢ }
ā€¢ }
Consume message
ā€¢ contract
ReadStateDemo {
ā€¢ uint public state;
ā€¢ function hi() {
ā€¢ console.log(ā€œHello
from: ā€œ "+msg.sender
+ ā€œ to ā€œ + msg.
receiver);
ā€¢ }
ā€¢ }
Trigger execution of
another contract
ā€¢ contract CallDemo {
ā€¢ function send(address
receiver, uint amount)
public {
ā€¢ Sent(msg.sender,
receiver, amount);
ā€¢ }
ā€¢ }
GET TEST ETHER
Navigate to Ropsten
faucet
https://faucet.ropsten.be/
Enter your public key
SOLIDITY Data Types
Functions
ELEMENTARY DATA TYPES
Data Type Example
uint<M> , M=1,2,4, ā€¦, 256
int<M>, uint, int
Unsigned/signed integer uint256 counter = 1;
address 160-bit value that does not
allow any arithmetic
operations. It is suitable for
storing addresses of
contracts or keypairs
belonging to external
persons
address owner =
msg.sender;
bool Same as uint8 but values are
0 or 1
Bool b = 0;
fixed<M>x<N>
ufixed<M>x<N>
Signed fixed-point decimal
number of M bits
fixed128x19 f = 1.1;
bytes<M>, M=1..32 Binary of M bytes bytes32 n=123;
function Same as bytes24 Function f;
ARRAYS
Data Type Example
<type>[M] fixed-length array of fixed-
length type
byte[100]
<type>[] variable-length array of
fixed-length type
byte[]
bytes dynamic sized byte sequence bytes ab;
string dynamic sized Unicode
string
String s = ā€œStringā€;
fixed<M>x<N>
ufixed<M>x<N>
Signed fixed-point decimal
number of M bits
fixed128x19 f = 1.1;
FUNCTIONS
Functions
Constant
Transactional
Function Visibility
External Can be called via
transactions
Public Can be called via
messages or locally
Internal Only locally called or
from derived contracts
Private Locally called
pragma solidity^0.4.12;
contract Test {
function test(uint[20] a) public returns (uint){
return a[10]*2;
}
function test2(uint[20] a) external returns (uint){
return a[10]*2; }
}
}
PRACTICE
ā€¢ Create account on
apidapp
ā€¢ Get Test Ether
ā€¢ Hello World!
HELLO WORLD CONTRACT
pragma solidity ^0.5.0;
contract HelloWorld {
function getMessage() public view
returns(string memory){
return("Hello, blockchain meetup!");
}
}
PUBLISHING SMART CONTRACTS
WITH APIDAPP
Write Code
Create and
fund wallet
Publish
Contract
REGISTER ACCOUNT ON
APIDAPP.COMhttps://www.apidapp.com/register-2/
CREATE ROPSTEN NETWORK
WALLET
GET TEST ETHER
https://www.apidapp.com/wallet/?blockchain=ropsten
CHECK YOUR TEST ETHER
https://www.apidapp.com/account/?blockchain=ropsten&account={your_ac
count_id_here}
CREATE CONTRACThttps://www.apidapp.com/smart-
contract/?blockchain=ropsten&account={your-account-id-here}
GET CONTRACT ADDRESS
{"status":"done","details":{"blockchain":"ropsten","receipt":{"HelloWorld":{"blockHash":"0x521a
bec4935d70d24e64a765006d4555ea0fe2fd2823e25728d7712a2673fc25","blockNumber":528
5003,"contractAddress":"0x619782740F37FA717CC304b8F85bFBB17b0911B3","cumulative
GasUsed":134499,"from":"0xa2b5ba8f63234d55e7267b7f9e9dc168a21a2002","gasUsed":13
4499,"logs":[],"logsBloom":"0x000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000","status":true,"to":null,"transactionHash":"0x42f8793fe7be8254b260812
0631f21bbf400faf47a8944542f24b745ccf409fa","transactionIndex":0,"abi":"https://s3.amazon
aws.com/apidapp/69e971b5-5bee-4cb5-aae7-
d171f551bd02/0x619782740F37FA717CC304b8F85bFBB17b0911B3.abi"}},"status":"https://s
3.amazonaws.com/apidapp/69e971b5-5bee-4cb5-aae7-d171f551bd02/status.json"}}
CHECK THE CONTRACT IN
BLOCKCHAIN EXPLORERhttps://ropsten.etherscan.io/address/{contract-
address}
CALL CONTRACT
Install Postman
Install ApiDapp API
Collection
Make a call to contract
INSTALL POSTMAN
https://www.getpostman.com/downloads/
INSTALL APIDAPP API COLLECTION
https://www.getpostman.com/collections/3e9b6746316696d1b
CONFIGURE CALL CONTRACT
ENTER CONTRACT ADDRESS
CONFIGURE CALL CONTRACT
CHECK FUNCTION NAME
MAKE A CALL TO CONTRACT
MORE COMPLEX CODE EXAMPLE,
ERC20
contract Erc20Token
constructor
totalSupply()
balanceOf()
transfer()
transferFrom()
approve()
allowance()
VERY SIMPLE ERC20 CONTRACT
pragma solidity >=0.4.22 <0.6.0;
contract MyToken {
mapping (address => uint256) public balanceOf;
constructor() public {
balanceOf[msg.sender] = 10000; // Give the creator all initial tokens
}
function transfer(address _to, uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
return true;
}
}
EVEN MORE COMPLEX CODE
EXAMPLE, VOTING
contract Ballot
Voter
Voter
Voter
Voter
Proposal
Proposal
Proposal
Proposal
Chairperson
constructor
giveRightToVote()
delegate()
vote()
winningProposal()
winnerName()
QUESTIONS
STAY IN TOUCH
Gene Leybzon https://www.linkedin.com/in/leybzon/
https://www.meetup.com/members/90744
20/
https://www.leybzon.com

More Related Content

What's hot

Smart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathonSmart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathonSittiphol Phanvilai
Ā 
Smart contract and Solidity
Smart contract and SoliditySmart contract and Solidity
Smart contract and Solidityź²Øģšø ģ •
Ā 
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
Ā 
Solidity
SoliditySolidity
Soliditygavofyork
Ā 
ā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandey
ā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandeyā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandey
ā€œCreate your own cryptocurrency in an hourā€ - Sandip PandeyEIT Digital Alumni
Ā 
ERC20 Token Contract
ERC20 Token ContractERC20 Token Contract
ERC20 Token ContractKC Tam
Ā 
Oop lab report
Oop lab reportOop lab report
Oop lab reportkhasmanjalali
Ā 
Principais vulnerabilidades em Smart Contracts e como evitĆ”-las
Principais vulnerabilidades em Smart Contracts e como evitĆ”-lasPrincipais vulnerabilidades em Smart Contracts e como evitĆ”-las
Principais vulnerabilidades em Smart Contracts e como evitĆ”-lasJĆŗlio Campos
Ā 
(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...
(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...
(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...Microsoft Argentina y Uruguay [Official Space]
Ā 
Ejemplos Programas Descompilados
Ejemplos Programas DescompiladosEjemplos Programas Descompilados
Ejemplos Programas DescompiladosLuis Viteri
Ā 
Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015Rhea Myers
Ā 
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223Jarmo van de Seijp
Ā 
Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"
Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"
Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"OdessaJS Conf
Ā 
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session ė³‘ģ™„ ģž„
Ā 
Migrating our micro services from Java to Kotlin 2.0
Migrating our micro services from Java to Kotlin 2.0Migrating our micro services from Java to Kotlin 2.0
Migrating our micro services from Java to Kotlin 2.0Bjƶrn Wendland
Ā 
Hands on with smart contracts
Hands on with smart contractsHands on with smart contracts
Hands on with smart contractsGene Leybzon
Ā 

What's hot (20)

Smart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathonSmart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathon
Ā 
Smart contract and Solidity
Smart contract and SoliditySmart contract and Solidity
Smart contract and Solidity
Ā 
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
Ā 
Solidity
SoliditySolidity
Solidity
Ā 
ā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandey
ā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandeyā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandey
ā€œCreate your own cryptocurrency in an hourā€ - Sandip Pandey
Ā 
ERC20 Token Contract
ERC20 Token ContractERC20 Token Contract
ERC20 Token Contract
Ā 
Oop1
Oop1Oop1
Oop1
Ā 
Oop lab report
Oop lab reportOop lab report
Oop lab report
Ā 
Principais vulnerabilidades em Smart Contracts e como evitĆ”-las
Principais vulnerabilidades em Smart Contracts e como evitĆ”-lasPrincipais vulnerabilidades em Smart Contracts e como evitĆ”-las
Principais vulnerabilidades em Smart Contracts e como evitĆ”-las
Ā 
(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...
(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...
(18.03.2009) Cumuy Invita - Iniciando el aƱo conociendo nuevas tecnologƭas - ...
Ā 
Ejemplos Programas Descompilados
Ejemplos Programas DescompiladosEjemplos Programas Descompilados
Ejemplos Programas Descompilados
Ā 
Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015
Ā 
Advanced smart contract
Advanced smart contractAdvanced smart contract
Advanced smart contract
Ā 
Ac2
Ac2Ac2
Ac2
Ā 
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223
Ā 
Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"
Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"
Timur Shemsedinov "ŠŸŠøшу Š½Š° ŠŗŠ¾Š»Š±ŠµŠŗŠ°Ń…, Š° чтŠ¾... (ŠŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Šµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼ŠøрŠ¾Š²Š°Š½ŠøŠµ)"
Ā 
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
Ā 
Migrating our micro services from Java to Kotlin 2.0
Migrating our micro services from Java to Kotlin 2.0Migrating our micro services from Java to Kotlin 2.0
Migrating our micro services from Java to Kotlin 2.0
Ā 
Hands on with smart contracts
Hands on with smart contractsHands on with smart contracts
Hands on with smart contracts
Ā 

Similar to Smart Contracts with Solidity hands-on training session

Hands on with smart contracts
Hands on with smart contractsHands on with smart contracts
Hands on with smart contractsGene Leybzon
Ā 
Algorand Smart Contracts
Algorand Smart ContractsAlgorand Smart Contracts
Algorand Smart Contractsssusercc3bf81
Ā 
Blockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton SitnikovBlockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton SitnikovDataFest Tbilisi
Ā 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchainBellaj Badr
Ā 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationredaxe12
Ā 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Arnaud Le Hors
Ā 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & RESTSanthu Rao
Ā 
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.jsFelix Crisan
Ā 
RIA services exposing & consuming queries
RIA services exposing & consuming queriesRIA services exposing & consuming queries
RIA services exposing & consuming queriesiedotnetug
Ā 
Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features WSO2
Ā 
Understanding Algorand's smart contract language
Understanding Algorand's smart contract language   Understanding Algorand's smart contract language
Understanding Algorand's smart contract language Vanessa LoÅ”ić
Ā 
Ethereum
EthereumEthereum
EthereumV C
Ā 
.NET 4.0 Code Contracts (2010)
.NET 4.0 Code Contracts (2010).NET 4.0 Code Contracts (2010)
.NET 4.0 Code Contracts (2010)Koen Metsu
Ā 
Hyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveHyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveDan Selman
Ā 
From CRUD to messages: a true story
From CRUD to messages: a true storyFrom CRUD to messages: a true story
From CRUD to messages: a true storyAlessandro Melchiori
Ā 
Control Transactions using PowerCenter
Control Transactions using PowerCenterControl Transactions using PowerCenter
Control Transactions using PowerCenterEdureka!
Ā 

Similar to Smart Contracts with Solidity hands-on training session (20)

Hands on with smart contracts
Hands on with smart contractsHands on with smart contracts
Hands on with smart contracts
Ā 
Algorand Smart Contracts
Algorand Smart ContractsAlgorand Smart Contracts
Algorand Smart Contracts
Ā 
Blockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton SitnikovBlockchain technology-in-fin tech - Anton Sitnikov
Blockchain technology-in-fin tech - Anton Sitnikov
Ā 
Security in the blockchain
Security in the blockchainSecurity in the blockchain
Security in the blockchain
Ā 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
Ā 
Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618Hyperledger Fabric Application Development 20190618
Hyperledger Fabric Application Development 20190618
Ā 
Code Contracts API In .NET
Code Contracts API In .NETCode Contracts API In .NET
Code Contracts API In .NET
Ā 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
Ā 
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.js
Ā 
RIA services exposing & consuming queries
RIA services exposing & consuming queriesRIA services exposing & consuming queries
RIA services exposing & consuming queries
Ā 
Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features Complex Event Processor 3.0.0 - An overview of upcoming features
Complex Event Processor 3.0.0 - An overview of upcoming features
Ā 
Understanding Algorand's smart contract language
Understanding Algorand's smart contract language   Understanding Algorand's smart contract language
Understanding Algorand's smart contract language
Ā 
Ethereum
EthereumEthereum
Ethereum
Ā 
.NET 4.0 Code Contracts (2010)
.NET 4.0 Code Contracts (2010).NET 4.0 Code Contracts (2010)
.NET 4.0 Code Contracts (2010)
Ā 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
Ā 
Hyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveHyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep Dive
Ā 
From CRUD to messages: a true story
From CRUD to messages: a true storyFrom CRUD to messages: a true story
From CRUD to messages: a true story
Ā 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
Ā 
CFInterop
CFInteropCFInterop
CFInterop
Ā 
Control Transactions using PowerCenter
Control Transactions using PowerCenterControl Transactions using PowerCenter
Control Transactions using PowerCenter
Ā 

More from Gene Leybzon

Generative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlowGenerative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlowGene Leybzon
Ā 
Generative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second SessionGenerative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second SessionGene Leybzon
Ā 
Generative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First SessionGenerative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First SessionGene Leybzon
Ā 
Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Gene Leybzon
Ā 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxGene Leybzon
Ā 
Ethereum in Enterprise.pptx
Ethereum in Enterprise.pptxEthereum in Enterprise.pptx
Ethereum in Enterprise.pptxGene Leybzon
Ā 
ERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptxERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptxGene Leybzon
Ā 
Onchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptxOnchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptxGene Leybzon
Ā 
Onchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptxOnchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptxGene Leybzon
Ā 
Web3 File Storage Options
Web3 File Storage OptionsWeb3 File Storage Options
Web3 File Storage OptionsGene Leybzon
Ā 
Web3 Full Stack Development
Web3 Full Stack DevelopmentWeb3 Full Stack Development
Web3 Full Stack DevelopmentGene Leybzon
Ā 
Instantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standardInstantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standardGene Leybzon
Ā 
Non-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceNon-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceGene Leybzon
Ā 
The Art of non-fungible tokens
The Art of non-fungible tokensThe Art of non-fungible tokens
The Art of non-fungible tokensGene Leybzon
Ā 
Graph protocol for accessing information about blockchains and d apps
Graph protocol for accessing information about blockchains and d appsGraph protocol for accessing information about blockchains and d apps
Graph protocol for accessing information about blockchains and d appsGene Leybzon
Ā 
Substrate Framework
Substrate FrameworkSubstrate Framework
Substrate FrameworkGene Leybzon
Ā 
OpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainOpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainGene Leybzon
Ā 
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of BlockchainsChainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of BlockchainsGene Leybzon
Ā 

More from Gene Leybzon (20)

Generative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlowGenerative AI Application Development using LangChain and LangFlow
Generative AI Application Development using LangChain and LangFlow
Ā 
Chat GPTs
Chat GPTsChat GPTs
Chat GPTs
Ā 
Generative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second SessionGenerative AI Use cases for Enterprise - Second Session
Generative AI Use cases for Enterprise - Second Session
Ā 
Generative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First SessionGenerative AI Use-cases for Enterprise - First Session
Generative AI Use-cases for Enterprise - First Session
Ā 
Non-fungible tokens (nfts)
Non-fungible tokens (nfts)Non-fungible tokens (nfts)
Non-fungible tokens (nfts)
Ā 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptx
Ā 
Ethereum in Enterprise.pptx
Ethereum in Enterprise.pptxEthereum in Enterprise.pptx
Ethereum in Enterprise.pptx
Ā 
ERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptxERC-4907 Rentable NFT Standard.pptx
ERC-4907 Rentable NFT Standard.pptx
Ā 
Onchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptxOnchain Decentralized Governance 2.pptx
Onchain Decentralized Governance 2.pptx
Ā 
Onchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptxOnchain Decentralized Governance.pptx
Onchain Decentralized Governance.pptx
Ā 
Web3 File Storage Options
Web3 File Storage OptionsWeb3 File Storage Options
Web3 File Storage Options
Ā 
Web3 Full Stack Development
Web3 Full Stack DevelopmentWeb3 Full Stack Development
Web3 Full Stack Development
Ā 
Instantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standardInstantly tradeable NFT contracts based on ERC-1155 standard
Instantly tradeable NFT contracts based on ERC-1155 standard
Ā 
Non-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceNon-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplace
Ā 
The Art of non-fungible tokens
The Art of non-fungible tokensThe Art of non-fungible tokens
The Art of non-fungible tokens
Ā 
Graph protocol for accessing information about blockchains and d apps
Graph protocol for accessing information about blockchains and d appsGraph protocol for accessing information about blockchains and d apps
Graph protocol for accessing information about blockchains and d apps
Ā 
Substrate Framework
Substrate FrameworkSubstrate Framework
Substrate Framework
Ā 
Chainlink
ChainlinkChainlink
Chainlink
Ā 
OpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chainOpenZeppelin + Remix + BNB smart chain
OpenZeppelin + Remix + BNB smart chain
Ā 
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of BlockchainsChainlink, Cosmos, Kusama, Polkadot:   Approaches to the Internet of Blockchains
Chainlink, Cosmos, Kusama, Polkadot: Approaches to the Internet of Blockchains
Ā 

Recently uploaded

Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
Ā 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
Ā 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
Ā 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
Ā 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
Ā 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxnuruddin69
Ā 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
Ā 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
Ā 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
Ā 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
Ā 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
Ā 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
Ā 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
Ā 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
Ā 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
Ā 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
Ā 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
Ā 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
Ā 
BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...
BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...
BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...Call Girls Mumbai
Ā 

Recently uploaded (20)

Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
Ā 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
Ā 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Ā 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
Ā 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Ā 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
Ā 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
Ā 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
Ā 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
Ā 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
Ā 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
Ā 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
Ā 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
Ā 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Ā 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
Ā 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
Ā 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
Ā 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
Ā 
BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...
BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...
BhubaneswaršŸŒ¹Call Girls Bhubaneswar ā¤Komal 9777949614 šŸ’Ÿ Full Trusted CALL GIRL...
Ā 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Ā 

Smart Contracts with Solidity hands-on training session

Editor's Notes

  1. Every account has a persistent key-value store mapping 256-bit words to 256-bit words called storage Accounts can be externally owned or contracts
  2. Message:Ā This is contract-to-contract. These are not delayed by mining because they are part of the transaction execution. Transaction: Like a message, but originates with an externally owned account. It's always a transaction that gets things started, but multiple messages may be fired off to complete the action. Ethereum also has two modes of execution. These modes are indifferent to the syntax or vernacular in the client that summoned the contract. So, the important things are to know which one is appropriate, and how to select it in your client of choice. sendTransaction:Ā Transaction is sent to the network and verified by miners. Sender gets a transaction hash initially since no results are available until after the transaction is mined. These are potentially state-changing. call:Ā Transaction is executed locally on the user's local machine which alone evaluates the result. These are read-only and fast. They can't change the blockchain in any way because they are never sent to the network. Most languages/platforms don't have this idea of running the code in either "read-only/dry run/practice" mode and "read-write/real world/sticky" mode. (https://ethereum.stackexchange.com/questions/12065/what-is-the-difference-between-a-call-message-call-and-a-message)
  3. https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
  4. https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
  5. https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices
  6. http://leybzon.blogspot.com/2018/01/hello-world-from-solidity.html
  7. https://www.apidapp.com/register-2/
  8. https://www.apidapp.com/wallet/?blockchain=ropsten https://faucet.ropsten.be/
  9. https://www.apidapp.com/account/?blockchain=ropsten&account={your_account_id_here}
  10. https://www.apidap.com/smart-contract/?blockchain=ropsten&account={your-account-id-here}
  11. https://www.getpostman.com/collections/3e9b6746316696d1b7f7 In Postman: Import ->Import from link->Enter link->[Import Button]
  12. https://en.wikipedia.org/wiki/ERC-20
  13. Auction https://solidity.readthedocs.io/en/v0.5.3/solidity-by-example.html