Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ethereum 入門 / Introduction to Ethereum
Search
Kenji Saito
PRO
April 05, 2023
Technology
0
160
Ethereum 入門 / Introduction to Ethereum
2023年4月5日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミーにて使用したスライドです。
Kenji Saito
PRO
April 05, 2023
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
スマートコントラクトと分散ファイナンス / Smart Contracts and Decentralized Finance
ks91
PRO
0
25
シン・ブロックチェーン / Truth of Blockchain
ks91
PRO
0
69
パスワード/パスフレーズと認証 / Password, Passphrase and Authentication
ks91
PRO
0
30
git と GitHub / git and GitHub
ks91
PRO
0
29
ソフトウェアの開発と保守 / Software Development and Maintenance
ks91
PRO
0
42
インターネットの特徴 / Features of the Internet
ks91
PRO
0
26
インターネットのガバナンス / Governance of the Internet
ks91
PRO
0
28
暗号学的ハッシュ関数 / Cryptographic Hash Function
ks91
PRO
0
33
デジタル署名 / Digital Signature
ks91
PRO
0
28
Other Decks in Technology
See All in Technology
~宇宙最速~2025年AWS Summit レポート
satodesu
1
1.4k
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
2
160
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
100
Snowflake Summit 2025 データエンジニアリング関連新機能紹介 / Snowflake Summit 2025 What's New about Data Engineering
tiltmax3
0
250
AWS CDK 実践的アプローチ N選 / aws-cdk-practical-approaches
gotok365
4
520
Welcome to the LLM Club
koic
0
140
Clineを含めたAIエージェントを 大規模組織に導入し、投資対効果を考える / Introducing AI agents into your organization
i35_267
4
1.4k
IIWレポートからみるID業界で話題のMCP
fujie
0
740
Amazon ECS & AWS Fargate 運用アーキテクチャ2025 / Amazon ECS and AWS Fargate Ops Architecture 2025
iselegant
16
4.7k
Microsoft Build 2025 技術/製品動向 for Microsoft Startup Tech Community
torumakabe
1
210
OpenHands🤲にContributeしてみた
kotauchisunsun
0
220
AI技術トレンド勉強会 #1MCPの基礎と実務での応用
nisei_k
1
250
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Become a Pro
speakerdeck
PRO
28
5.4k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Optimizing for Happiness
mojombo
379
70k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Transcript
1 Ethereum CSO /
[email protected]
— 1 Ethereum — 2023-04-05
– p.1/33
https://speakerdeck.com/ks91 — 1 Ethereum — 2023-04-05 – p.2/33
( ) SFC ( ) CSO (Chief Science Officer) 1993
( ) 2006 ( ) SFC 22 P2P (Peer-to-Peer) 2011 ( ) 2018 2019 VR 2021.7 VR 2021.8 “ALL THESE WORLDS ARE YOURS” VR 2021.9 & VR 2022.3 2023 AI VR 2023.2-3 “POWER TO THE PEOPLE” → ( ) — 1 Ethereum — 2023-04-05 – p.3/33
1 Ethereum BBc (Beyond Blockchain) — 1 Ethereum — 2023-04-05
– p.4/33
1. Ethereum 2. Ethereum 3. Ethereum 4. — 1 Ethereum
— 2023-04-05 – p.5/33
1. Ethereum — 1 Ethereum — 2023-04-05 – p.6/33
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 12 ( 12 ) (= ) = ⇒ → Dapps ( / / ) — 1 Ethereum — 2023-04-05 – p.7/33
2. Ethereum macOS (Big Sur 11.6.4, Monterey 12.6.3) + Homebrew
Linux (Ubuntu 22.04) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie — 1 Ethereum — 2023-04-05 – p.8/33
Solidity Ethereum ( ) http://solidity.readthedocs.io/en/latest/installing-solidity.html Linux (on Windows) “sudo apt”,
macOS “brew” Linux ARM git clone dependencies solc 0.8.19 (4/5 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 Ethereum — 2023-04-05 – p.9/33
Ganache Ethereum RPC npm ( ) macOS https://qiita.com/kyosuke5_20/items/c5f68fc9d89b84c0df09 Linux https://qiita.com/seibe/items/36cef7df85fe2cefa3ea
npm Ganache $ sudo npm install -g ganache — 1 Ethereum — 2023-04-05 – p.10/33
Python3 macOS $ brew install python3 Python 3.8 Homebrew $
brew uninstall --ignore-dependencies
[email protected]
$ brew install
[email protected]
/usr/local/opt/
[email protected]
/bin/python3 Linux $ sudo apt update $ sudo apt install python3.8 python3.8-dev python3.8-venv python3.8-tk 16.10 python3(.8) apt (PPA ) python3 python3-dev python3-venv python3-tk — 1 Ethereum — 2023-04-05 – p.11/33
macOS : . . . macOS wget brew dyld: Library
not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib $ brew uninstall --force gettext $ brew install gettext — 1 Ethereum — 2023-04-05 – p.12/33
Python (venv) macOS (Linux python3 ) ‘python3.8’ ‘python3’ $ python3.8
-m venv bbc1env $ source bbc1env/bin/activate (bbc1env) $ pip install -U pip (bbc1env) $ pip install wheel bbc1env ( BBc-1(?) ) ( ) (bbc1env) $ deactivate — 1 Ethereum — 2023-04-05 – p.13/33
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.19.3 (4/5 ) — 1 Ethereum — 2023-04-05 – p.14/33
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token — 1 Ethereum — 2023-04-05 – p.15/33
contracts (macOS Linux (x86/AMD64) ) $ brownie compile Linux (ARM)
(AMD64 ) $ python # >>> import solcx >>> solcx.compile_solc(’0.6.12’) # >>> quit() /tmp ∼/.solcx/solc-v0.6.12 ( ) $ pytest tests — 1 Ethereum — 2023-04-05 – p.16/33
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 Ethereum — 2023-04-05 – p.17/33
3. Ethereum — 1 Ethereum — 2023-04-05 – p.18/33
( ) — 1 Ethereum — 2023-04-05 – p.19/33
. . . — 1 Ethereum — 2023-04-05 – p.20/33
vs. — 1 Ethereum — 2023-04-05 – p.21/33
= ( ) run ( ) — 1 Ethereum —
2023-04-05 – p.22/33
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM — 1 Ethereum — 2023-04-05 – p.23/33
EVM : Ethereum Virtual Machine ঢ়ଶ ֎෦ΞΫλʔ ΞΧϯτ &7. ίʔυ
&UIFSˠ(BT ىಈ ίϯτϥΫτ ϝοηʔδ͔ɺ৽͍ࣗ͠ಈΦϒδΣΫτ ΞΧϯτؒͰΓऔΓ͞ΕΔσʔλ&UIFS ετϨʔδ ঢ়ଶ` τϥϯβΫγϣϯ ηοτ σδλϧॺ໊ &7. ਓؒͱ͔ ࣗಈ ΦϒδΣΫτ Gas Gas ETH (Gas ) (burn ) ETH ( . . .) — 1 Ethereum — 2023-04-05 – p.24/33
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python — 1 Ethereum — 2023-04-05 – p.25/33
Solidity ( ) pragma solidityˆ0.7.0; contract IndivisibleAsset { /* */
string public _name; string public _symbol; uint256 public _quantity; address public _owner; constructor(string memory name, string memory symbol, uint256 quantity) public { _name = name; _symbol = symbol; _quantity = quantity; _owner = msg.sender; } function transfer(address to) public returns (bool) { require (_owner == msg.sender); _owner = to; return true; } } — 1 Ethereum — 2023-04-05 – p.26/33
( , ) (constructor) (deploy) = ( ) ( )
ETH Trusted Actor Model — 1 Ethereum — 2023-04-05 – p.27/33
Ethereum — 1 Ethereum — 2023-04-05 – p.28/33
4. Ethereum Görli — 1 Ethereum — 2023-04-05 – p.29/33
infura.io Brownie https://infura.io SIGN UP PROJECT ID infura Ethereum API
infura . . . infura.io PROJECT ID WEB3_INFURA_PROJECT_ID PROJECT ID (∼/.bash_profile ) $ export WEB3_INFURA_PROJECT_ID= PROJECT ID — 1 Ethereum — 2023-04-05 – p.30/33
G¨ orli ETH brownie console Görli >>> network.disconnect() >>> network.connect(’goerli’)
>>> len(accounts) 0 >>> accounts.add() <LocalAccount object ’ 16 ’> >>> accounts[0].private_key 16 >>> quit() Görli Testnet ETH Faucet ETH https://goerlifaucet.com ( ) ( ) https://metamask.io/ — 1 Ethereum — 2023-04-05 – p.31/33
G¨ orli ETH brownie console Görli ETH >>> network.disconnect() >>>
network.connect(’goerli’) >>> len(accounts) 0 >>> accounts.add( 16 ) <LocalAccount object ’ 16 ’> >>> accounts[0].balace() ETH >>> quit() ETH >>> accounts[0].transfer(accounts[1], "0.01 ether") — 1 Ethereum — 2023-04-05 – p.32/33
2 Ethereum I : ERC-20 — 1 Ethereum — 2023-04-05
– p.33/33