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...
Search
Kenji Saito
PRO
May 12, 2021
Technology
0
91
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
2021年5月12日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミー「実践!スマートコントラクトプログラミング 」第1回にて使用したスライドです。
Kenji Saito
PRO
May 12, 2021
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
We Never Took the Kobayashi Maru Test Until Now. What Do You Think of Our Solutions? — Journeys of the Mind Through a No-Win Game
ks91
PRO
0
4
思いつきが武器になる:研究というゲームを始めよう / Ideas Are Your Equipments : Let the Game of Research Begin!
ks91
PRO
0
59
ロボットを雰囲気(ヴァイブ)でプログラミングするこどもたち / Children Vibe-Programming Robots
ks91
PRO
0
21
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 3
ks91
PRO
0
29
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 2
ks91
PRO
0
31
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 1
ks91
PRO
0
150
未来へのフォワードキャスト / Forward Cast to the Future
ks91
PRO
0
82
発表と総括 / Presentations and Summary
ks91
PRO
0
59
サイバーフィジカル社会、金融の未来とアイデアソン / Cyber Physical Society, Future of Finance, and Ideathon
ks91
PRO
0
76
Other Decks in Technology
See All in Technology
RAID6 を楔形文字で組んで現代人を怖がらせましょう(実装編)
mimifuwa
1
310
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.6k
Android Studio の 新しいAI機能を試してみよう / Try out the new AI features in Android Studio
yanzm
0
280
会社にデータエンジニアがいることでできるようになること
10xinc
9
1.6k
現場が抱える様々な問題は “組織設計上” の問題によって生じていることがある / Team-oriented Organization Design 20250827
mtx2s
6
1.5k
あとはAIに任せて人間は自由に生きる
kentaro
3
1.2k
「AI2027」を紐解く ― AGI・ASI・シンギュラリティ
masayamoriofficial
0
110
「守る」から「進化させる」セキュリティへ ~AWS re:Inforce 2025参加報告~ / AWS re:Inforce 2025 Participation Report
yuj1osm
1
140
Postman MCP 関連機能アップデート / Postman MCP feature updates
yokawasa
1
160
Goss: Faiss向けの新しい本番環境対応 Goバインディング #coefl_go_jp
bengo4com
0
1.4k
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
5
1.6k
Yahoo!ニュースにおけるソフトウェア開発
lycorptech_jp
PRO
0
380
Featured
See All Featured
How GitHub (no longer) Works
holman
315
140k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Visualization
eitanlees
147
16k
Code Review Best Practice
trishagee
70
19k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
BBQ
matthewcrist
89
9.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fireside Chat
paigeccino
39
3.6k
Speed Design
sergeychernyshev
32
1.1k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Transcript
1 BBc-1 Ethereum CSO /
[email protected]
— 1 BBc-1 Ethereum
— 2021-05-12 – p.1/36
https://speakerdeck.com/ks91 — 1 BBc-1 Ethereum — 2021-05-12 – p.2/36
( ) SFC ( ) CSO (Chief Science Officer) 1993
( ) 2006 ( ) SFC 20 P2P (Peer-to-Peer) ( 2019 9 ) 2011 2018 2019 2021 VR 2021.5 → ( ) — 1 BBc-1 Ethereum — 2021-05-12 – p.3/36
BBc-1 (Beyond Blockchain One) Ethereum — 1 BBc-1 Ethereum —
2021-05-12 – p.4/36
1. Ethereum 2. Ethereum 3. Ethereum 4. 5. BBc-1 —
1 BBc-1 Ethereum — 2021-05-12 – p.5/36
1. Ethereum — 1 BBc-1 Ethereum — 2021-05-12 – p.6/36
(BP : Blockchain Property ) BP-1 : BP-2 : BP-3
: ( ) ( ) — 1 BBc-1 Ethereum — 2021-05-12 – p.7/36
1) 2) (= ) 3) ⇒ (= ) ⇒ ·
/ (dependable ) — 1 BBc-1 Ethereum — 2021-05-12 – p.8/36
/DLT ( ) Bitcoin ( ) Open Assets Protocol (OAP)
( ) Ethereum (2.0) (Dapps ( ) ) ( ) (DLT) ( ) Hyperledger (Linux Foundation) Fabric (IBM/DAH), Sawtooth (Intel), Iroha ( ), Indy, Besu Polkadot (Web3 Foundation) ( ; Ethereum 2.0 ) Corda (R3), . . . , BBc-1 ( ) — 1 BBc-1 Ethereum — 2021-05-12 – p.9/36
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 Dapps ( / / ) — 1 BBc-1 Ethereum — 2021-05-12 – p.10/36
2. Ethereum macOS (Big Sur 11.3) + Homebrew Linux (Ubuntu
20.04) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie — 1 BBc-1 Ethereum — 2021-05-12 – p.11/36
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.4 (5/11 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 BBc-1 Ethereum — 2021-05-12 – p.12/36
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 — 2021-05-12 – p.13/36
Python3 macOS $ brew install
[email protected]
python3 python 3.9 (12/2
) 3.9 3.8 3.9 $ 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 BBc-1 Ethereum — 2021-05-12 – p.14/36
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 — 2021-05-12 – p.15/36
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 BBc-1 Ethereum — 2021-05-12 – p.16/36
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.14.6 (5/10 ) — 1 BBc-1 Ethereum — 2021-05-12 – p.17/36
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token — 1 BBc-1 Ethereum — 2021-05-12 – p.18/36
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 BBc-1 Ethereum — 2021-05-12 – p.19/36
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 BBc-1 Ethereum — 2021-05-12 – p.20/36
3. Ethereum — 1 BBc-1 Ethereum — 2021-05-12 – p.21/36
— 1 BBc-1 Ethereum — 2021-05-12 – p.22/36
. . . — 1 BBc-1 Ethereum — 2021-05-12 –
p.23/36
vs. — 1 BBc-1 Ethereum — 2021-05-12 – p.24/36
= run — 1 BBc-1 Ethereum — 2021-05-12 – p.25/36
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM — 1 BBc-1 Ethereum — 2021-05-12 – p.26/36
EVM : Ethereum Virtual Machine (validator) ⇒ Gas — 1
BBc-1 Ethereum — 2021-05-12 – p.27/36
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python — 1 BBc-1 Ethereum — 2021-05-12 – p.28/36
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 — 2021-05-12 – p.29/36
Ethereum — 1 BBc-1 Ethereum — 2021-05-12 – p.30/36
4. Ethereum ropsten — 1 BBc-1 Ethereum — 2021-05-12 –
p.31/36
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 BBc-1 Ethereum — 2021-05-12 – p.32/36
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 Testnet ETH Faucet 5.0ETH https://faucet.dimensions.network/ ( ) https://metamask.io/ — 1 BBc-1 Ethereum — 2021-05-12 – p.33/36
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() ETH >>> accounts[0].transfer(accounts[1], "1 ether") — 1 BBc-1 Ethereum — 2021-05-12 – p.34/36
5. BBc-1 https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof — 1 BBc-1 Ethereum — 2021-05-12 –
p.35/36
2 BBc-1 Ethereum I : — 1 BBc-1 Ethereum —
2021-05-12 – p.36/36