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
October 06, 2021
Technology
1
100
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
2021年10月6日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミー「BBc-1 と Ethereum 入門」にて使用したスライドです。
Kenji Saito
PRO
October 06, 2021
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
A Guide to Paper Writing Support with Generative AI - A Joint Zemi
ks91
PRO
0
6
正規分布と簡単な統計理論/t分布と信頼区間 / Normal distribution, simple statistical theory, t-distribution and confidence intervals
ks91
PRO
0
34
じわじわ迫ってきている自動化社会 (その先にメタ・ネイチャー) / The Slowly Approaching Automated Society (and its beyond: Meta-Nature)
ks91
PRO
0
6
起こりうる誤った推論/平均・分散・標準偏差・自由度 / Possible false inferences, means, variances, standard deviations and degrees of freedom
ks91
PRO
0
53
LaTeX と Overleaf によるショートペーパー作成 / Short paper writing with LaTeX and Overleaf
ks91
PRO
0
15
R を用いた検定(補講) (1) — Welch 検定 / Tests using R (supplementary) (1) - Welch test
ks91
PRO
0
9
R を用いた検定(補講) (2) — カイ二乗検定 / Tests using R (supplementary) (2) - Chi-squared test
ks91
PRO
0
8
R を用いた分析(補講) (1) — 重回帰分析 / Analysis using R (supplementary) (1) - Multiple regression analysis
ks91
PRO
0
7
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R (supplementary) (2) - Generating artificial data
ks91
PRO
0
6
Other Decks in Technology
See All in Technology
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
180
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
160
アップデート紹介:AWS Data Transfer Terminal
stknohg
PRO
0
160
私なりのAIのご紹介 [2024年版]
qt_luigi
1
100
『GRANBLUE FANTASY: Relink』続・最高の「没入感」を実現するカットシーン制作手法とそれを支える技術
cygames
0
130
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
2
150
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
240
Kubernetes環境のオブザーバビリティの次の一歩をOpenTelemetryで実現すると何がどうなるの? - CloudNative Days Winter 2024
katzchang
0
130
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
220
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
320
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
140
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
150
Featured
See All Featured
Designing for Performance
lara
604
68k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
It's Worth the Effort
3n
183
28k
Mobile First: as difficult as doing things right
swwweet
222
9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Cult of Friendly URLs
andyhume
78
6.1k
Making Projects Easy
brettharned
116
5.9k
Transcript
1 BBc-1 Ethereum CSO /
[email protected]
— 1 BBc-1 Ethereum
— 2021-10-06 – p.1/36
https://speakerdeck.com/ks91 — 1 BBc-1 Ethereum — 2021-10-06 – p.2/36
( ) SFC ( ) CSO (Chief Science Officer) 1993
( ) 2006 ( ) SFC 21 P2P (Peer-to-Peer) 2011 2018 2019 VR 2021.7 , VR 2021.8 “ALL THESE WORLDS ARE YOURS”, VR 2021.9 & ( (VR) ) → ( ) — 1 BBc-1 Ethereum — 2021-10-06 – p.3/36
BBc-1 (Beyond Blockchain One) Ethereum — 1 BBc-1 Ethereum —
2021-10-06 – p.4/36
1. Ethereum 2. Ethereum 3. Ethereum 4. 5. BBc-1 —
1 BBc-1 Ethereum — 2021-10-06 – p.5/36
1. Ethereum — 1 BBc-1 Ethereum — 2021-10-06 – p.6/36
(BP : Blockchain Property ) BP-1 : ( ) BP-2
: ( )( ) BP-3 : ( ) ( ) ( ) — 1 BBc-1 Ethereum — 2021-10-06 – p.7/36
1) ( ) 2) (= ) 3) ⇒ (= )
⇒ · / 1:1 NFT / (dependable ) — 1 BBc-1 Ethereum — 2021-10-06 – 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-10-06 – p.9/36
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 Dapps ( / / ) — 1 BBc-1 Ethereum — 2021-10-06 – p.10/36
2. Ethereum macOS (Big Sur 11.6) + Homebrew Linux (Ubuntu
20.04.3) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie — 1 BBc-1 Ethereum — 2021-10-06 – 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.9 (10/5 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 BBc-1 Ethereum — 2021-10-06 – 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-10-06 – 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-10-06 – 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-10-06 – 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-10-06 – p.16/36
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.16.4 (10/5 ) — 1 BBc-1 Ethereum — 2021-10-06 – p.17/36
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token — 1 BBc-1 Ethereum — 2021-10-06 – 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-10-06 – p.19/36
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 BBc-1 Ethereum — 2021-10-06 – p.20/36
3. Ethereum — 1 BBc-1 Ethereum — 2021-10-06 – p.21/36
— 1 BBc-1 Ethereum — 2021-10-06 – p.22/36
. . . — 1 BBc-1 Ethereum — 2021-10-06 –
p.23/36
vs. — 1 BBc-1 Ethereum — 2021-10-06 – p.24/36
= run — 1 BBc-1 Ethereum — 2021-10-06 – p.25/36
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM — 1 BBc-1 Ethereum — 2021-10-06 – p.26/36
EVM : Ethereum Virtual Machine (validator) ⇒ Gas — 1
BBc-1 Ethereum — 2021-10-06 – p.27/36
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python — 1 BBc-1 Ethereum — 2021-10-06 – 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-10-06 – p.29/36
Ethereum — 1 BBc-1 Ethereum — 2021-10-06 – p.30/36
4. Ethereum ropsten — 1 BBc-1 Ethereum — 2021-10-06 –
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-10-06 – 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-10-06 – 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-10-06 – p.34/36
5. BBc-1 https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof — 1 BBc-1 Ethereum — 2021-10-06 –
p.35/36
2 BBc-1 Ethereum I : — 1 BBc-1 Ethereum —
2021-10-06 – p.36/36