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
April 06, 2022
Technology
0
200
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
2022年4月6日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミーにて使用したスライドです。
Kenji Saito
PRO
April 06, 2022
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
コバヤシマルテスト ─ 勝ち目のないゲームに抗いながら旅する心の旅路 / Kobayashi Maru Test - a mental journey of defiance against a game that cannot be won
ks91
PRO
0
3
セキュリティ戦略・発表と総括 / Security Strategies, Presentation and Conclusions
ks91
PRO
1
31
暗号資産の経済学・イントロダクション / Economics of Cryptocurrencies (Introduction)
ks91
PRO
0
20
AI とデジタルトランスフォーメーション / AI and Digital Transformation
ks91
PRO
0
10
インシデントレスポンス演習 II / Incident Response Exercise II
ks91
PRO
0
36
A思考の自動化とX 思考の行方 / Automation of A Thinking and the Future of X Thinking
ks91
PRO
0
23
サイバー戦の現在と未来 / Present and Future of Cyber Warfare
ks91
PRO
0
69
サイバー攻撃・防御とサイバー法 / Cyber Attacks, Defenses and Cyber Law
ks91
PRO
0
50
インシデントレスポンス演習I / Incident Response Exercise I
ks91
PRO
0
63
Other Decks in Technology
See All in Technology
AWS IAMのアンチパターン/AWSが考える最低権限実現へのアプローチ概略(JAWS-UG朝会#59資料改修20分版)
htan
0
330
コミュニティサービスに「あなたへ」フィードを リリースするまでの試行錯誤
takapy
1
140
RAGのサービスをリリースして1年3ヶ月が経ちました
segavvy
4
900
AOAI Dev Day - Opening Session
yoshidashingo
2
430
開発と事業を繋ぐ!SREのオブザーバビリティ戦略 ~ Developers Summit 2024 Summer ~
leveragestech
0
620
地理情報とAPIのトレンド
nagix
0
160
成長期に歩みを止めないための創業期の開発文化形成
mayah
6
420
LLMアプリケーションの評価の実践と課題 ~PharmaXにおける今後の展望~
pharma_x_tech
2
160
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
サービス開発を前に進めるために 新米リードエンジニアが 取り組んだこと / Steps Taken by a Novice Lead Engineer to Advance Service Development
nologyance
0
180
Github Actions 로 Android 팀의 효율성 극대화
hadonghyun
0
160
AIエージェントを現場に導入する目線とは
masahiro_nishimi
1
1.5k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
13
430
How GitHub (no longer) Works
holman
305
140k
Docker and Python
trallard
37
2.9k
Navigating Team Friction
lara
181
13k
A better future with KSS
kneath
231
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
A Tale of Four Properties
chriscoyier
155
22k
Build your cross-platform service in a week with App Engine
jlugia
227
17k
Thoughts on Productivity
jonyablonski
64
4.1k
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
How to Think Like a Performance Engineer
csswizardry
4
590
Transcript
1 BBc-1 Ethereum CSO /
[email protected]
— 1 BBc-1 Ethereum
— 2022-04-06 – p.1/36
https://speakerdeck.com/ks91 — 1 BBc-1 Ethereum — 2022-04-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 2021.12 VR 2022.3 ( (VR) ) → ( ) — 1 BBc-1 Ethereum — 2022-04-06 – p.3/36
BBc-1 (Beyond Blockchain One) Ethereum — 1 BBc-1 Ethereum —
2022-04-06 – p.4/36
1. Ethereum 2. Ethereum 3. Ethereum 4. 5. BBc-1 —
1 BBc-1 Ethereum — 2022-04-06 – p.5/36
1. Ethereum — 1 BBc-1 Ethereum — 2022-04-06 – p.6/36
( ) (BP : Blockchain Property ) BP-1 : (
) BP-2 : ( )( ) BP-3 : ( ) ( ) ( ) — 1 BBc-1 Ethereum — 2022-04-06 – p.7/36
1) ( ) 2) (= ) 3) ⇒ (= )
⇒ · / 1:1 NFT / (dependable ) — 1 BBc-1 Ethereum — 2022-04-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 — 2022-04-06 – p.9/36
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 Dapps ( / / ) — 1 BBc-1 Ethereum — 2022-04-06 – p.10/36
2. Ethereum macOS (Big Sur 11.6.4) + Homebrew Linux (Ubuntu
20.04.4) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie — 1 BBc-1 Ethereum — 2022-04-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.13 (4/6 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 BBc-1 Ethereum — 2022-04-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 — 2022-04-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 — 2022-04-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 — 2022-04-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 — 2022-04-06 – p.16/36
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.18.1 (4/6 ) — 1 BBc-1 Ethereum — 2022-04-06 – p.17/36
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token — 1 BBc-1 Ethereum — 2022-04-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 — 2022-04-06 – p.19/36
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 BBc-1 Ethereum — 2022-04-06 – p.20/36
3. Ethereum — 1 BBc-1 Ethereum — 2022-04-06 – p.21/36
— 1 BBc-1 Ethereum — 2022-04-06 – p.22/36
. . . — 1 BBc-1 Ethereum — 2022-04-06 –
p.23/36
vs. — 1 BBc-1 Ethereum — 2022-04-06 – p.24/36
= run — 1 BBc-1 Ethereum — 2022-04-06 – p.25/36
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM — 1 BBc-1 Ethereum — 2022-04-06 – p.26/36
EVM : Ethereum Virtual Machine (validator) ⇒ Gas — 1
BBc-1 Ethereum — 2022-04-06 – p.27/36
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python — 1 BBc-1 Ethereum — 2022-04-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 — 2022-04-06 – p.29/36
Ethereum — 1 BBc-1 Ethereum — 2022-04-06 – p.30/36
4. Ethereum ropsten — 1 BBc-1 Ethereum — 2022-04-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 — 2022-04-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 — 2022-04-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 — 2022-04-06 – p.34/36
5. BBc-1 https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof — 1 BBc-1 Ethereum — 2022-04-06 –
p.35/36
2 BBc-1 Ethereum I : — 1 BBc-1 Ethereum —
2022-04-06 – p.36/36