Submit Search
Upload
Smart contract and Solidity
•
3 likes
•
1,253 views
겨울 정
Follow
스마트 컨트랙트에 관한 개요와 이더리움의 스마트 컨트랙트 코드를 작성할 수 있는 Solidity에 대해 코드를 통해 알아보는 슬라이드입니다.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 27
Download now
Download to read offline
Recommended
Solidity Simple Tutorial EN
Solidity Simple Tutorial EN
Nicholas Lin
Solidity
Solidity
gavofyork
Blockchain Coding Dojo - BlockchainHub Graz
Blockchain Coding Dojo - BlockchainHub Graz
BlockchainHub Graz
Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015
Rhea Myers
Smart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathon
Sittiphol Phanvilai
Hands on with smart contracts 2. Presentation for the Blockchain Applications...
Hands on with smart contracts 2. Presentation for the Blockchain Applications...
Gene Leybzon
Dex and Uniswap
Dex and Uniswap
Gene Leybzon
Hands on with smart contracts
Hands on with smart contracts
Gene Leybzon
Recommended
Solidity Simple Tutorial EN
Solidity Simple Tutorial EN
Nicholas Lin
Solidity
Solidity
gavofyork
Blockchain Coding Dojo - BlockchainHub Graz
Blockchain Coding Dojo - BlockchainHub Graz
BlockchainHub Graz
Ethereum Contracts - Coinfest 2015
Ethereum Contracts - Coinfest 2015
Rhea Myers
Smart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathon
Sittiphol Phanvilai
Hands on with smart contracts 2. Presentation for the Blockchain Applications...
Hands on with smart contracts 2. Presentation for the Blockchain Applications...
Gene Leybzon
Dex and Uniswap
Dex and Uniswap
Gene Leybzon
Hands on with smart contracts
Hands on with smart contracts
Gene Leybzon
Accessing decentralized finance on Ethereum blockchain
Accessing decentralized finance on Ethereum blockchain
Gene Leybzon
Smart Contracts with Solidity hands-on training session
Smart Contracts with Solidity hands-on training session
Gene Leybzon
Hello world contract
Hello world contract
Gene Leybzon
Solidity Security and Best Coding Practices
Solidity Security and Best Coding Practices
Gene Leybzon
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
Gene Leybzon
Blockchain and smart contracts day 2
Blockchain and smart contracts day 2
Gene Leybzon
Oop1
Oop1
Vaibhav Bajaj
Libbitcoin slides
Libbitcoin slides
swansontec
Oop lab report
Oop lab report
khasmanjalali
Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)
Ryan Casey
Principais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-las
Júlio Campos
Textile
Textile
Vanessa Lošić
Js interpreter interpreted
Js interpreter interpreted
Martha Schumann
Advanced smart contract
Advanced smart contract
Đoàn Thái Thiên Lộc
Oracles
Oracles
Gene Leybzon
The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189
Mahmoud Samir Fayed
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics
Andreas Jakl
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp
Qtum How To Make EVM Run On UTXO Model - Patrick Dai
Qtum How To Make EVM Run On UTXO Model - Patrick Dai
Qtum
The Ring programming language version 1.5.3 book - Part 92 of 184
The Ring programming language version 1.5.3 book - Part 92 of 184
Mahmoud Samir Fayed
How to be a smart contract engineer
How to be a smart contract engineer
Oded Noam
“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey
EIT Digital Alumni
More Related Content
What's hot
Accessing decentralized finance on Ethereum blockchain
Accessing decentralized finance on Ethereum blockchain
Gene Leybzon
Smart Contracts with Solidity hands-on training session
Smart Contracts with Solidity hands-on training session
Gene Leybzon
Hello world contract
Hello world contract
Gene Leybzon
Solidity Security and Best Coding Practices
Solidity Security and Best Coding Practices
Gene Leybzon
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
Gene Leybzon
Blockchain and smart contracts day 2
Blockchain and smart contracts day 2
Gene Leybzon
Oop1
Oop1
Vaibhav Bajaj
Libbitcoin slides
Libbitcoin slides
swansontec
Oop lab report
Oop lab report
khasmanjalali
Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)
Ryan Casey
Principais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-las
Júlio Campos
Textile
Textile
Vanessa Lošić
Js interpreter interpreted
Js interpreter interpreted
Martha Schumann
Advanced smart contract
Advanced smart contract
Đoàn Thái Thiên Lộc
Oracles
Oracles
Gene Leybzon
The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189
Mahmoud Samir Fayed
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics
Andreas Jakl
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp
Qtum How To Make EVM Run On UTXO Model - Patrick Dai
Qtum How To Make EVM Run On UTXO Model - Patrick Dai
Qtum
The Ring programming language version 1.5.3 book - Part 92 of 184
The Ring programming language version 1.5.3 book - Part 92 of 184
Mahmoud Samir Fayed
What's hot
(20)
Accessing decentralized finance on Ethereum blockchain
Accessing decentralized finance on Ethereum blockchain
Smart Contracts with Solidity hands-on training session
Smart Contracts with Solidity hands-on training session
Hello world contract
Hello world contract
Solidity Security and Best Coding Practices
Solidity Security and Best Coding Practices
Hands on with Smart Contracts session #3
Hands on with Smart Contracts session #3
Blockchain and smart contracts day 2
Blockchain and smart contracts day 2
Oop1
Oop1
Libbitcoin slides
Libbitcoin slides
Oop lab report
Oop lab report
Meteor and Bitcoin (Lightning Talk)
Meteor and Bitcoin (Lightning Talk)
Principais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-las
Textile
Textile
Js interpreter interpreted
Js interpreter interpreted
Advanced smart contract
Advanced smart contract
Oracles
Oracles
The Ring programming language version 1.6 book - Part 25 of 189
The Ring programming language version 1.6 book - Part 25 of 189
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics
Jarmo van de Seijp Shadbox ERC223
Jarmo van de Seijp Shadbox ERC223
Qtum How To Make EVM Run On UTXO Model - Patrick Dai
Qtum How To Make EVM Run On UTXO Model - Patrick Dai
The Ring programming language version 1.5.3 book - Part 92 of 184
The Ring programming language version 1.5.3 book - Part 92 of 184
Similar to Smart contract and Solidity
How to be a smart contract engineer
How to be a smart contract engineer
Oded Noam
“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey
EIT Digital Alumni
Droid on Chain - Berry Ventura Lev, Kik
Droid on Chain - Berry Ventura Lev, Kik
DroidConTLV
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Napier University
First impression of the new cloud native programming language ballerina
First impression of the new cloud native programming language ballerina
Richárd Kovács
Security in the blockchain
Security in the blockchain
Bellaj Badr
Understanding Algorand's smart contract language
Understanding Algorand's smart contract language
Vanessa Lošić
Ethereum: Coding Society
Ethereum: Coding Society
gavofyork
Ethereum hackers
Ethereum hackers
gavofyork
Geth important commands
Geth important commands
NexThoughts Technologies
Token platform based on sidechain
Token platform based on sidechain
Luniverse Dunamu
A Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts Bytecode
Shakacon
C sharp 8
C sharp 8
Germán Küber
用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構
Bo-Yi Wu
Use Geth to Access a Deployed Contract
Use Geth to Access a Deployed Contract
KC Tam
solc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contracts
Akos Hajdu
ERC20 Token Contract
ERC20 Token Contract
KC Tam
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Tomoaki Sato
Programming smart contracts in solidity
Programming smart contracts in solidity
Emanuel Mota
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
GeeksLab Odessa
Similar to Smart contract and Solidity
(20)
How to be a smart contract engineer
How to be a smart contract engineer
“Create your own cryptocurrency in an hour” - Sandip Pandey
“Create your own cryptocurrency in an hour” - Sandip Pandey
Droid on Chain - Berry Ventura Lev, Kik
Droid on Chain - Berry Ventura Lev, Kik
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
Robust Programming of Smart Contracts in Solidity+, RK Shyamasundar
First impression of the new cloud native programming language ballerina
First impression of the new cloud native programming language ballerina
Security in the blockchain
Security in the blockchain
Understanding Algorand's smart contract language
Understanding Algorand's smart contract language
Ethereum: Coding Society
Ethereum: Coding Society
Ethereum hackers
Ethereum hackers
Geth important commands
Geth important commands
Token platform based on sidechain
Token platform based on sidechain
A Decompiler for Blackhain-Based Smart Contracts Bytecode
A Decompiler for Blackhain-Based Smart Contracts Bytecode
C sharp 8
C sharp 8
用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構
Use Geth to Access a Deployed Contract
Use Geth to Access a Deployed Contract
solc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contracts
ERC20 Token Contract
ERC20 Token Contract
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Programming smart contracts in solidity
Programming smart contracts in solidity
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Recently uploaded
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
Hiroshi SHIBATA
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
HarshalMandlekar2
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
panagenda
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
MounikaPolabathina
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
Skynet Technologies
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Ravi Sanghani
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Mydbops
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Curtis Poe
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
IES VE
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
ThousandEyes
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
AliaaTarek5
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LoriGlavin3
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Kari Kakkonen
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Knoldus Inc.
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Alkin Tezuysal
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Recently uploaded
(20)
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Smart contract and Solidity
1.
Smart Contract &
Solidity Solidity winterj.me@gmail.com JungWinter
2.
Smart Contract
3.
Smart Contract • •
1994 Nick Szabo • • Transaction
4.
Smart Contract
5.
• • •
6.
• • Contacting external
services, Enforcing on-chain payments • (= )
7.
Ethereum Contract
8.
Bitcoin Contract • Script
• OPCODE • Output Input Public Key HASH CHECKSIG Private Key TRUE
9.
Ethereum Contract • Turing Complete
• APPLY(S)=S’ (APPLY: , S: , S’: ) • Smart Contract • Loop , Contract Account, Block Transaction , Gas
10.
Loop Gas • Operation
Gas Cost • Transaction fee = Gas_used * Gas_price[Gwei] 1 Gwei = 0.000000001 ETH • Gas = Gas
11.
Smart Contract Code •
Smart Contract Smart Contract Code • EVM(Ethereum Virtual Machine) EVM • • Mutan: C Deprecated • LLL: Low level OPCODE • Serpent: Python • Solidity: Javascript
12.
Smart Contract (https://maniara.github.io/sc_lecture.pdf)
13.
Solidity
14.
Solidity Hello World pragma
solidity ^0.4.0; contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; } } pragma constant returns uint http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html
15.
Solidity Hello World pragma
solidity ^0.4.0; contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; } } pragma constant returns uint ^0.4.0 Solidity 0.5.0 npm ^1.2.3 → >=1.2.3 <2.0.0 ^0.2.3 → >=0.2.3 <0.3.0 ^0.0.3 → >=0.0.3 <0.0.4
16.
Solidity Hello World pragma
solidity ^0.4.0; contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; } } pragma constant returns uint constant State constant Gas Modifier . 0.4.16 constant view pure constant view alias pure pure
17.
Solidity Hello World pragma
solidity ^0.4.0; contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; } } pragma constant returns uint return 1
18.
Solidity Hello World pragma
solidity ^0.4.0; contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; } } pragma constant returns uint uint unsigned int uint8 uint256 uint uint256
19.
Solidity Code →
Byte Code SMART CONTRACT (http://goodjoon.tistory.com/261)
20.
SMART CONTRACT (http://goodjoon.tistory.com/261) dApp Contract
Meta data
21.
pragma solidity ^0.4.0; contract
Coin{ address public minter; mapping (address => uint ) public balances; event Sent (address from, address to, uint amount); function Coin() { minter = msg.sender; } function mint(address receiver, uint amount) { if (msg.sender != minter) return; balances[receiver] += amount; } function send(address receiver, uint amount) { if (balances[msg.sender] < amount) return; balances[msg.sender] -= amount; balances[receiver] += amount; Sent(msg.sender, receiver, amount); } } http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html address public mapping event msg
22.
address public mapping event msg http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html 20byte( ) balance(
), transfer( ) Python dict . mapping(address => uint) address key uint value dict public address public minter; function minter() returns (address) { return minter; } ), msg.sender , msg.value Wei(Ether) .data, .gas, .sig . listener
23.
(3)— (https://medium.com/@soonhyungjung/
- - -3- - - -44a9d58d687a)
24.
pragma solidity^0.4.0; contract Bank
{ uint totalDeposit; mapping(address=> uint) balanceOf; function deposit() payable { balanceOf[msg.sender] += msg.value; totalDeposit += msg.value; } function withdraw(uint _amount) payable { balanceOf[msg.sender] -= _amount; totalDeposit -= _amount; msg.sender.call.value(_amount)(); // msg.sender.transfer(_amount); } function getTotalBalance() constant returns(uint) { return totalDeposit; } function getBalance(address _account) constant returns(uint) { return balanceOf[_account]; } } payable
25.
payable & modifier pragma
solidity ^0.4.11; contract Purchase { address public seller; modifier onlySeller() { // Modifier require(msg.sender == seller); _; } function abort() onlySeller { // Modifier usage // ... } } Solidity modifier payable (https://medium.com/@ggogun/solidity -modifier- -payable-d892a833920c) Python Decorator, Ruby on Rails before_filter _; modifier .
26.
TODO • Solidity Voting
• Campaign & Crowdfunding • Custom Token
27.
• Why Many
Smart Contract Use Cases Are Simply Impossible (https:// www.coindesk.com/three-smart-contract-misconceptions/) • Calculating Costs in Ethereum Contracts (https://hackernoon.com/ether-purchase- power-df40a38c5a2f) • Gas Cost from Yellow Paper (http://bit.ly/2xfBHWN) • SMART CONTRACT - (http://goodjoon.tistory.com/253) • SMART CONTRACT (http://goodjoon.tistory.com/261) • dApp (http://www.chaintalk.io/archive/lecture/86) • Solidity (https://www.gitbook.com/book/ggs134/solidityguide) • Solidity (https://solidity.readthedocs.io/en/develop/)
Download now