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
September 07, 2022
Technology
0
140
BBc-1 と Ethereum 入門 / Introduction to BBc-1 and Ethereum
2022年9月7日(水)、ブロックチェーンハブ主催のブロックチェーンアカデミーにて使用したスライドです。
Kenji Saito
PRO
September 07, 2022
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
LLM とプロンプトエンジニアリング/チューターをビルドする / LLM and Prompt Engineering and Building Tutors
ks91
PRO
0
250
講師自己紹介 / Lecturer's Self-Introduction
ks91
PRO
0
82
講師研究紹介 / Lecturer's Research Introduction
ks91
PRO
0
67
Discord とビルダー&チャットボットの使い方 / How to use Discord and Builder & Chatbots
ks91
PRO
0
160
研究って何だっけ / What's Research?
ks91
PRO
0
27
ブロックチェーンと分散ファイナンス概論 / Introduction to Blockchain and Decentralized Finance
ks91
PRO
0
18
招き猫コマロ— ネットワーク贈答経済のエージェント / Manekineko Komaro - Network Gift Economy Agent
ks91
PRO
0
17
Implementation of Blockchain Ecosystems
ks91
PRO
0
12
Other Decks in Technology
See All in Technology
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
360
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
いつか使うかも貯金してたらめちゃめちゃ機能が増えてた話
riyaamemiya
0
330
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
370
LangSmith入門―トレース/評価/プロンプト管理などを担うLLMアプリ開発プラットフォーム
os1ma
3
340
DMM.com アルファ室採用案内資料
hsugita
1
160
20240418_Google ColabにLLMが搭載されたようなのでPython x データ分析の勉強方法を考えてみる
doradora09
0
140
DevOpsメトリクスとアウトカムの接続にトライ!開発プロセスを通して計測できるメトリクスの活用方法
ham0215
2
240
本当のAWS基礎
toru_kubota
0
530
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
6
3.8k
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
530
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
1
120
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
What's in a price? How to price your products and services
michaelherold
237
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
24
2k
BBQ
matthewcrist
80
8.8k
How GitHub (no longer) Works
holman
304
140k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Raft: Consensus for Rubyists
vanstee
132
6.3k
Unsuck your backbone
ammeep
663
57k
Product Roadmaps are Hard
iamctodd
44
9.7k
The Language of Interfaces
destraynor
151
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Transcript
1 BBc-1 Ethereum CSO /
[email protected]
— 1 BBc-1 Ethereum
— 2022-09-07 – p.1/36
https://speakerdeck.com/ks91 — 1 BBc-1 Ethereum — 2022-09-07 – 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 2022.8 → ( ) — 1 BBc-1 Ethereum — 2022-09-07 – p.3/36
BBc-1 (Beyond Blockchain One) Ethereum — 1 BBc-1 Ethereum —
2022-09-07 – p.4/36
1. Ethereum 2. Ethereum 3. Ethereum 4. 5. BBc-1 —
1 BBc-1 Ethereum — 2022-09-07 – p.5/36
1. Ethereum — 1 BBc-1 Ethereum — 2022-09-07 – p.6/36
( ) (BP : Blockchain Property ) BP-1 : (
) BP-2 : ( )( ) BP-3 : ( ) ( ) ( ) — 1 BBc-1 Ethereum — 2022-09-07 – p.7/36
1) ( ) 2) (= ) 3) ⇒ (= )
⇒ · / 1:1 NFT / (dependable ) — 1 BBc-1 Ethereum — 2022-09-07 – p.8/36
/DLT ( ) Bitcoin ( ) Open Assets Protocol (OAP)
( ) Ethereum (2.0) (Dapps ( ) ) ( ) Polkadot (Web3 Foundation) ( ) (DLT) ( ) Hyperledger (Linux Foundation) Fabric (IBM/DAH), Sawtooth (Intel), Iroha ( ), Indy, Besu Corda (R3), . . . , BBc-1 ( ) — 1 BBc-1 Ethereum — 2022-09-07 – p.9/36
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 Dapps ( / / ) — 1 BBc-1 Ethereum — 2022-09-07 – p.10/36
2. Ethereum macOS (Big Sur 11.6.4) ( Monterey 12.5.1 )
+ Homebrew Linux (Ubuntu 22.04) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie — 1 BBc-1 Ethereum — 2022-09-07 – 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.16 (9/6 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) — 1 BBc-1 Ethereum — 2022-09-07 – 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-09-07 – 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-09-07 – 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-09-07 – 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-09-07 – p.16/36
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.19.1 (9/6 ) — 1 BBc-1 Ethereum — 2022-09-07 – p.17/36
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token — 1 BBc-1 Ethereum — 2022-09-07 – 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-09-07 – p.19/36
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() — 1 BBc-1 Ethereum — 2022-09-07 – p.20/36
3. Ethereum — 1 BBc-1 Ethereum — 2022-09-07 – p.21/36
— 1 BBc-1 Ethereum — 2022-09-07 – p.22/36
. . . — 1 BBc-1 Ethereum — 2022-09-07 –
p.23/36
vs. — 1 BBc-1 Ethereum — 2022-09-07 – p.24/36
= run — 1 BBc-1 Ethereum — 2022-09-07 – p.25/36
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM — 1 BBc-1 Ethereum — 2022-09-07 – p.26/36
EVM : Ethereum Virtual Machine (validator) ⇒ Gas — 1
BBc-1 Ethereum — 2022-09-07 – p.27/36
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python — 1 BBc-1 Ethereum — 2022-09-07 – 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-09-07 – p.29/36
Ethereum — 1 BBc-1 Ethereum — 2022-09-07 – p.30/36
4. Ethereum ropsten — 1 BBc-1 Ethereum — 2022-09-07 –
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-09-07 – 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 10.0ETH https://faucet.egorfine.com ( ) https://metamask.io/ — 1 BBc-1 Ethereum — 2022-09-07 – 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-09-07 – p.34/36
5. BBc-1 https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof — 1 BBc-1 Ethereum — 2022-09-07 –
p.35/36
2 BBc-1 Ethereum I : — 1 BBc-1 Ethereum —
2022-09-07 – p.36/36