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
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
Search
Kenji Saito
PRO
May 13, 2020
Technology
2
190
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
2020年5月13日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミー「実践!スマートコントラクトプログラミング 」第1回にて使用したスライドです。
Kenji Saito
PRO
May 13, 2020
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
ゼミ紹介 : 公共の利益のためのデジタルトランスフォーメーション / Zemi Introduction : Digital Transformation for Public Good
ks91
PRO
0
26
強者の側にいたら『テクノロジーで不自由なく』ではない / If you side with the powerful, then it is not like people can live without any inconvenience because of the technology.
ks91
PRO
0
54
アカデミーキャンプ 2024冬「都の西北でAI(アイ) を叫ぶ(準備編)」DAY 2 / Academy Camp 2024 Winter "Shouting AI in the Northwest of the Capital" DAY 2
ks91
PRO
0
45
アカデミーキャンプ 2024冬「都の西北でAI(アイ) を叫ぶ(準備編)」DAY 1 / Academy Camp 2024 Winter "Shouting AI in the Northwest of the Capital" DAY 1
ks91
PRO
0
40
続・衣食住をテクノロジーで不自由なく / Technology Ensures Food, Clothing, and Housing
ks91
PRO
0
43
ブロックチェーン技術の来し方行く末 / The Coming and Going of Blockchain Technology
ks91
PRO
0
44
言うことを聞かないこどもたちになってもらうためのAI活用論 / Using AI to Prevent Children from Listening to Others
ks91
PRO
0
75
LaTeX と Overleaf によるショートペーパー作成 / Short Paper Writing with LaTeX and Overleaf
ks91
PRO
0
36
GPT-4 を用いたデータ分析 / Data Analysis Using GPT-4
ks91
PRO
0
51
Other Decks in Technology
See All in Technology
生成AI・LLM時代における 機械学習エンジニアとしてのキャリア戦略・開発戦略 / my-career-and-development-strategies-for-ml-engineer-2024
yuya4
4
300
LLM + RAG を使った SORACOM Support Bot の裏側の歴史
soracom
PRO
1
640
KTC_DBRE.pdf
_awache
0
290
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
7
100k
どう買う?Azure
kuniteru
1
190
これまでのキャリアとこれからMLエンジニアとしてどう動くか
masatakashiwagi
0
350
Introduction to Jetpack Compose
pohjus
1
110
「XX試験の環境作ってよ」と言われた時によく使うAWSのソリューションについて
bun913
0
120
プッシュ型子育てサービスを、先行プロジェクト実施自治体において開始します
govtechtokyo
0
250
サービス成長と共に肥大化するモノレポ、長くなるCI時間 / As services grow, monorepos get bigger and CI time gets longer
kohbis
5
2.1k
技育祭2024春 LT Finatextホールディングス
kevinrobot34
1
160
OpenTelemetry実践 はじめの一歩
taxin
0
310
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
59
3.8k
Designing the Hi-DPI Web
ddemaree
275
33k
The Brand Is Dead. Long Live the Brand.
mthomps
48
21k
Being A Developer After 40
akosma
56
580k
Why Our Code Smells
bkeepers
PRO
330
56k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Building Adaptive Systems
keathley
29
1.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
153
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.2k
Transcript
1 BBc-1 Ethereum CSO /
[email protected]
— 1 BBc-1 Ethereum
— 2020-05-13 – p.1/34
https://speakerdeck.com/ks91 — 1 BBc-1 Ethereum — 2020-05-13 – p.2/34
( ) SFC / ( ) CSO (Chief Science Officer)
1993 ( ) 2006 ( ) SFC 19 P2P (Peer-to-Peer) ( 9 ) 2011 2018 2019 2019 2020 “STAY HOME, ENJOY LIFE” (in Zoom) → ( ) — 1 BBc-1 Ethereum — 2020-05-13 – p.3/34
BBc-1 (Beyond Blockchain One) Ethereum — 1 BBc-1 Ethereum —
2020-05-13 – p.4/34
1. Ethereum 2. Ethereum 3. Ethereum 4. 5. BBc-1 —
1 BBc-1 Ethereum — 2020-05-13 – p.5/34
1. Ethereum — 1 BBc-1 Ethereum — 2020-05-13 – p.6/34
1) 2) (= ) 3) ⇒ (= ) ⇒ ·
/ (dependable ) — 1 BBc-1 Ethereum — 2020-05-13 – p.7/34
/DLT ( ) Bitcoin ( ) Open Assets Protocol (OAP)
( ) Ethereum (Dapps ( ) ) ( ) EOS (↓ ) (DLT) ( ) Hyperledger (Linux Foundation) Fabric (IBM/DAH), Sawtooth (Intel), Iroha ( ) Corda (R3), . . . , BBc-1 ( ) — 1 BBc-1 Ethereum — 2020-05-13 – p.8/34
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 Dapps ( / / ) — 1 BBc-1 Ethereum — 2020-05-13 – p.9/34
2. Ethereum macOS (Catalina 10.15.4) + Homebrew Linux (Ubuntu 18.04)
Windows 10 + Windows Subsystem for Linux (Ubuntu 18.04 ) Ethereum solidity brownie — 1 BBc-1 Ethereum — 2020-05-13 – p.10/34
Solidity Ethereum http://solidity.readthedocs.io/en/latest/installing-solidity.html Linux (on Windows) “sudo apt”, macOS “brew”
solc 0.6.7 (5/13 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 BBc-1 Ethereum — 2020-05-13 – p.11/34
Python3 macOS $ brew install python3 Linux $ sudo add-apt-repository
ppa:deadsnakes/ppa $ sudo apt update $ sudo apt install python3.7 python3.7-dev python3.7-venv python3.7-tk 16.10 python3(.7) apt python3.8 — 1 BBc-1 Ethereum — 2020-05-13 – p.12/34
macOS : . . . macOS wget brew dyld: Library
not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib $ brew uninstall --force gettext $ brew install gettext — 1 BBc-1 Ethereum — 2020-05-13 – p.13/34
Python (venv) macOS ‘python3.7’ ‘python3’ $ python3.7 -m venv bbc1env
$ source bbc1env/bin/activate (bbc1env) $ pip install -U pip (bbc1env) $ pip install wheel bbc1env ( BBc-1 ) ( ) (bbc1env) $ deactivate — 1 BBc-1 Ethereum — 2020-05-13 – p.14/34
Ganache CLI Ethereum RPC npm ( ) macOS https://qiita.com/kyosuke5_20/items/c5f68fc9d89b84c0df09 Linux
https://qiita.com/seibe/items/36cef7df85fe2cefa3ea npm Ganache CLI $ sudo npm install -g ganache-cli — 1 BBc-1 Ethereum — 2020-05-13 – p.15/34
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.8.4 (5/13 ) — 1 BBc-1 Ethereum — 2020-05-13 – p.16/34
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token ( ) $ brownie compile ( ) $ pytest tests — 1 BBc-1 Ethereum — 2020-05-13 – p.17/34
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 BBc-1 Ethereum — 2020-05-13 – p.18/34
3. Ethereum — 1 BBc-1 Ethereum — 2020-05-13 – p.19/34
— 1 BBc-1 Ethereum — 2020-05-13 – p.20/34
. . . — 1 BBc-1 Ethereum — 2020-05-13 –
p.21/34
vs. — 1 BBc-1 Ethereum — 2020-05-13 – p.22/34
= run — 1 BBc-1 Ethereum — 2020-05-13 – p.23/34
Ether Ethereum EOA : Externally-Owned Account Ether EVM EVM —
1 BBc-1 Ethereum — 2020-05-13 – p.24/34
EVM : Ethereum Virtual Machine Gas — 1 BBc-1 Ethereum
— 2020-05-13 – p.25/34
EVM : : Solidity — JavaScript LLL — Lisp Vyper
— Python — 1 BBc-1 Ethereum — 2020-05-13 – p.26/34
Solidity ( ) pragma solidityˆ0.5.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 BBc-1 Ethereum — 2020-05-13 – p.27/34
Ethereum — 1 BBc-1 Ethereum — 2020-05-13 – p.28/34
4. Ethereum ropsten — 1 BBc-1 Ethereum — 2020-05-13 –
p.29/34
infura.io Brownie https://infura.io SIGN UP PROJECT ID infura Ethereum API
infura . . . infura.io PROJECT ID Brownie “brownie-config.yaml” . . . YAML WEB3_INFURA_PROJECT_ID PROJECT ID (∼/.bash_profile ) $ export WEB3_INFURA_PROJECT_ID= PROJECT ID — 1 BBc-1 Ethereum — 2020-05-13 – p.30/34
ropsten ETH brownie console ropsten >>> network.disconnect() >>> network.connect(’ropsten’) >>>
len(accounts) 0 >>> accounts.add() <LocalAccount object ’ 16 ’> >>> accounts[0].private_key 16 >>> quit() Ropsten Ethereum Faucet 1.0ETH https://faucet.ropsten.be ( ) https://metamask.io/ — 1 BBc-1 Ethereum — 2020-05-13 – p.31/34
ropsten ETH brownie console ropsten ETH >>> network.disconnect() >>> network.connect(’ropsten’)
>>> len(accounts) 0 >>> accounts.add( 16 ) <LocalAccount object ’ 16 ’> >>> accounts[0].balace() ETH >>> quit() — 1 BBc-1 Ethereum — 2020-05-13 – p.32/34
5. BBc-1 https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof — 1 BBc-1 Ethereum — 2020-05-13 –
p.33/34
2 BBc-1 Ethereum I : — 1 BBc-1 Ethereum —
2020-05-13 – p.34/34