Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
December 02, 2020
Technology
0
71
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
2020年12月2日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミー「実践!スマートコントラクトプログラミング 」第1回にて使用したスライドです。
Kenji Saito
PRO
December 02, 2020
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
LaTeX と Overleaf によるショートペーパー作成 / Short paper writing with LaTeX and Overleaf
ks91
PRO
0
12
R を用いた検定(補講) (1) — Welch 検定 / Tests using R (supplementary) (1) - Welch test
ks91
PRO
0
8
R を用いた検定(補講) (2) — カイ二乗検定 / Tests using R (supplementary) (2) - Chi-squared test
ks91
PRO
0
7
R を用いた分析(補講) (1) — 重回帰分析 / Analysis using R (supplementary) (1) - Multiple regression analysis
ks91
PRO
0
5
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R (supplementary) (2) - Generating artificial data
ks91
PRO
0
6
GPT-4 を用いたデータ分析 / Data analysis using GPT-4
ks91
PRO
0
8
GPT-4 を用いた論文生成 / Paper generation using GPT-4
ks91
PRO
0
8
棒グラフ、帯グラフ(、円グラフ) / Bar chart, band chart (, pie chart)
ks91
PRO
0
13
さまざまなグラフ描画(1) / Various graphical representations (1)
ks91
PRO
0
10
Other Decks in Technology
See All in Technology
セキュリティ運用って包括的にできていますか?SaaSを使って次のステップへ / Comprehensive Cyber Security Operations for Cloud Services Using SaaS
sakaitakeshi
0
280
【Oracle Cloud ウェビナー】【入門&再入門】はじめてのOracle Cloud Infrastructure [+最新情報]
oracle4engineer
PRO
2
160
そろそろOn-Callの通知音について考えてみよう (PagerDuty編)
tk3fftk
1
280
Microsoft Ignite 2024 Update 1 - AIとIoT関連の最新情報をどこよりも早く!
iotcomjpadmin
0
290
全社員に向けて生成AI活用を促進!~電通総研の生成AI活用ロードマップ~
iotcomjpadmin
0
290
LLMを「速く」「安く」 動かすには / CloudNative Days Winter 2024
pfn
PRO
5
1.2k
Entra ID の多要素認証(Japan Microsoft 365 コミュニティ カンファレンス 2024 )
murachiakira
0
1.7k
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
30
15k
241130紅白ぺぱ合戦LT「編集の技術」
toya524287
5
570
Oracle Cloud Infrastructure:2024年11月度サービス・アップデート
oracle4engineer
PRO
0
130
メインテーマはKubernetes
nwiizo
2
320
累計2500万着電を支える大規模 電話自動応答サービスのアーキテクチャ / Architecture of a Large-Scale Automated Phone Response Service Supporting 25 Million Cumulative Calls
ymachida
8
4.3k
Featured
See All Featured
Navigating Team Friction
lara
183
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
24k
We Have a Design System, Now What?
morganepeng
50
7.2k
Git: the NoSQL Database
bkeepers
PRO
427
64k
GraphQLとの向き合い方2022年版
quramy
44
13k
What's in a price? How to price your products and services
michaelherold
243
12k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Writing Fast Ruby
sferik
627
61k
How GitHub (no longer) Works
holman
310
140k
Scaling GitHub
holman
458
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Automating Front-end Workflow
addyosmani
1366
200k
Transcript
1 BBc-1 Ethereum CSO /
[email protected]
— 1 BBc-1 Ethereum
— 2020-12-02 – p.1/36
https://speakerdeck.com/ks91 — 1 BBc-1 Ethereum — 2020-12-02 – p.2/36
( ) SFC ( ) CSO (Chief Science Officer) 1993
( ) 2006 ( ) SFC 20 P2P (Peer-to-Peer) ( 9 ) 2011 2018 2019 2019 2020 2020 → ( ) — 1 BBc-1 Ethereum — 2020-12-02 – p.3/36
BBc-1 (Beyond Blockchain One) Ethereum — 1 BBc-1 Ethereum —
2020-12-02 – p.4/36
1. Ethereum 2. Ethereum 3. Ethereum 4. 5. BBc-1 —
1 BBc-1 Ethereum — 2020-12-02 – p.5/36
1. Ethereum — 1 BBc-1 Ethereum — 2020-12-02 – p.6/36
(BP : Blockchain Property ) BP-1 : BP-2 : BP-3
: ( ) ( ) — 1 BBc-1 Ethereum — 2020-12-02 – p.7/36
1) 2) (= ) 3) ⇒ (= ) ⇒ ·
/ (dependable ) — 1 BBc-1 Ethereum — 2020-12-02 – 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 — 2020-12-02 – p.9/36
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 Dapps ( / / ) — 1 BBc-1 Ethereum — 2020-12-02 – p.10/36
2. Ethereum macOS (Catalina 10.15.7) + Homebrew Linux (Ubuntu 18.04
and 20.04) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie — 1 BBc-1 Ethereum — 2020-12-02 – 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.7.5 (12/2 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 BBc-1 Ethereum — 2020-12-02 – 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 — 2020-12-02 – 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 — 2020-12-02 – 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 — 2020-12-02 – 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 — 2020-12-02 – p.16/36
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.12.1 (12/2 ) — 1 BBc-1 Ethereum — 2020-12-02 – p.17/36
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token — 1 BBc-1 Ethereum — 2020-12-02 – p.18/36
contracts version 0.5.17 Solidity ‘0.6.0’ ‘0.5.0’ (macOS Linux (x86/AMD64) )
$ brownie compile Linux (ARM) (AMD64 ) $ python # >>> import solcx >>> solcx.compile_solc(’0.5.17’) # >>> quit() /tmp ∼/.solcx/solc-v0.5.17 ( ) $ pytest tests — 1 BBc-1 Ethereum — 2020-12-02 – p.19/36
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 BBc-1 Ethereum — 2020-12-02 – p.20/36
3. Ethereum — 1 BBc-1 Ethereum — 2020-12-02 – p.21/36
— 1 BBc-1 Ethereum — 2020-12-02 – p.22/36
. . . — 1 BBc-1 Ethereum — 2020-12-02 –
p.23/36
vs. — 1 BBc-1 Ethereum — 2020-12-02 – p.24/36
= run — 1 BBc-1 Ethereum — 2020-12-02 – p.25/36
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM — 1 BBc-1 Ethereum — 2020-12-02 – p.26/36
EVM : Ethereum Virtual Machine (validator) ⇒ Gas — 1
BBc-1 Ethereum — 2020-12-02 – p.27/36
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python — 1 BBc-1 Ethereum — 2020-12-02 – 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 — 2020-12-02 – p.29/36
Ethereum — 1 BBc-1 Ethereum — 2020-12-02 – p.30/36
4. Ethereum ropsten — 1 BBc-1 Ethereum — 2020-12-02 –
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 — 2020-12-02 – 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 — 2020-12-02 – 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 — 2020-12-02 – p.34/36
5. BBc-1 https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof — 1 BBc-1 Ethereum — 2020-12-02 –
p.35/36
2 BBc-1 Ethereum I : — 1 BBc-1 Ethereum —
2020-12-02 – p.36/36