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
Web3 技術のリアリティ(デモンストレーション) / The Reality of Web3...
Search
Kenji Saito
PRO
June 16, 2023
Technology
0
76
Web3 技術のリアリティ(デモンストレーション) / The Reality of Web3 Technology (Demonstration)
2023年6月16日(金)、幕張メッセで開催された Interop Tokyo 2023 カンファレンスでの講演に使用したスライドです。
Kenji Saito
PRO
June 16, 2023
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
市民科学にAI はどう活用できるか / How AI Can Be Used for Citizen Science
ks91
PRO
0
9
グリーンマイニングが Bitcoin プロトコルに及ぼす影響 / Impact of Green Mining on the Bitcoin Protocol
ks91
PRO
0
18
FinTech 13-14 : Ideathon, Presentations and Conclusions
ks91
PRO
0
55
デザイン相談会 / Design Consultation
ks91
PRO
0
13
FinTech 11-12 : Cyber-Physical Society and Future of Finance
ks91
PRO
0
52
メタ自然選択と製品トレーサビリティー / Meta-Natural Selection and Product Traceability
ks91
PRO
0
8
伝統的金融に呑まれる分散型金融 / Decentralised Finance Engulfed by Traditional Finance
ks91
PRO
0
15
ウェブサービスデザイン 2 / Web Service Design 2
ks91
PRO
0
25
生成AI による論文執筆サポートの手引き(ワークショップ) / A guide to supporting dissertation writing with generative AI (workshop)
ks91
PRO
0
250
Other Decks in Technology
See All in Technology
AGIについてChatGPTに聞いてみた
blueb
0
130
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
560
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
490
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.2k
SDN の Hype Cycle を一通り経験してみて思うこと / Going through the Hype Cycle of SDN
mshindo
1
110
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
200
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Why Our Code Smells
bkeepers
PRO
334
57k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
We Have a Design System, Now What?
morganepeng
50
7.2k
Writing Fast Ruby
sferik
627
61k
Ruby is Unlike a Banana
tanoku
97
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Code Reviewing Like a Champion
maltzj
520
39k
4 Signs Your Business is Dying
shpigford
180
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Transcript
Web3 ( ) Web3 — 2023-06-16 – p.1/22
Web3 Web 3.0 World Wide Web Web 2.0 “web3.py” Python
Ethereum NFT( ) Web3 Web3 — 2023-06-16 – p.2/22
Web3 Web3 Web3 — 2023-06-16 – p.3/22
Web 1-2-3 ͍ΘΏΔ 8FC 8FC ͷۚ༥Խ Ϣʔβ͕ࣗʮ؆୯ʹʯσʔλͷੜ࢈ऀʹ ͏ͻͱͭ ͷࢭ༲ ࢭ༲
4FNBOUJD8FC l8FCzॳग़ 8FC ˠ8FC 8FC ৫ʹ ཧͤͣ͞ɺ σʔλΛϢʔβͷ खʹऔΓͦ͏ ͯ͢ͷ ͯ͢Λ ۚ༥τʔΫϯԽͯ͠ ղܾ͠Α͏ #FSOFST-FF ͷ #FSOFST-FF ͷ 0` 3FJMMZ ͷ 8PPE ͷ #JUDPJO ε ϊ ồ σ ϯ ࣄ ݅ Ϧ ồ Ϛ ϯ ɾ γ ἀ ỽ Ϋ Π ϯ λ ồ ω ỽ τ ༻ Խ &UIFSFVN 4PMJE ϓϩδΣΫτ Ϣʔβࣗͱ ެӹͷͨΊʹ σʔλࣗ༝ʹ ׆༻Ͱ͖͍ͯΔ͔ʁ Web3 — 2023-06-16 – p.4/22
Web 3.0 Web3 Web 1.0 (Berners-Lee) : Read × Write
→ Web 2.0 (O’Reilly) : Read × Write ← (Web 1.0 ) Web 3.0 (Berners-Lee) → Solid (Social linked data) Web 3.0 → Web3 (Wood) Ethereum ← web3.js, web3.py Web3 (Dixon) : Read × Write × Own (Bloomberg) Web3 — 2023-06-16 – p.5/22
python 3.10.7 solc 0.8.19 ( ) (Solidity ( ) )
node v20.2.0 ganache v7.8.0 (Ethereum RPC + ) eth-brownie 1.19.3 (Python Ethereum ) web3 5.31.3 (Python Ethereum ) py-solc-x 1.1.1 (Solidity Python + ) macOS Monterey 12.6.6 Web3 — 2023-06-16 – p.6/22
Python3 eth-brownie . . . $ python3 -m venv demoenv
$ source demoenv/bin/activate $ pip install -U pip $ pip install wheel $ pip install eth-brownie web3.py Web3 — 2023-06-16 – p.7/22
Ethereum Python NFT Web3 — 2023-06-16 – p.8/22
: Bitcoin . . . : ( : ) (
) : : : ⇒ Web3 — 2023-06-16 – p.9/22
Ethereum ߹ҙ͞Εͨཤྺ ϩʔΧϧʹෳΛҡ࣋
ϒϩοΫ εϩοτ ඵִؒ εϩοτͰ ΤϙοΫ ҉߸ֶతμΠδΣετ ϒϩοΫνΣʔϯͷҡ࣋ࢀՃऀ͕ϩʔΧϧʹཧ͢Δσʔλۭؒ ࣌ؒ ΑΓ৽͍͠ه ΦϒδΣΫτ τʔΫϯγεςϜͷεϚʔτίϯτϥΫτ ֤Ϣʔβͷ ߴͷঢ়ଶ ঢ়ଶ` ঢ়ଶ`` τϥϯβΫγϣϯ ΦϒδΣΫτͷੜ ·ͨঢ়ଶભҠͷࢦࣔ ແޮͳཤྺ ω ỽ τ ϫ ồ Ϋ Λ ௨ ͠ ͯ ૹ ड ৴ ͞ Ε Δ ϩ ồ Χ ϧ ʹ ࣋ ͭ ܨ͙ͨΊʹ&5) Ͱͷσϙδοτͱ σϙδοτ૯ֹͷ ♤ ૬ͷϢʔβʹΑΔ ΤϙοΫͷূݴ͕ඞཁ શΦϒδΣΫτͷભҠޙͷঢ়ଶ ͕ϋογϡ˞ʹू͞Ε ͦͷ ϧʔτ͕ϒϩοΫʹॻ͔ΕΔ ঢ়ଶભҠ ˞ϋογϡσʔλ܈ͷ҉߸ֶతμΠδΣετ ϋογϡ ɹΛߏʹදݱͨ͠ͷͰ ෆ߹ͷݕग़ʹ༻͍ΒΕΔ . . . ETH ETH Web3 — 2023-06-16 – p.10/22
Ethereum Ethereum $ brownie console # eth-brownie (Python ) #
↓ Python >>> network.disconnect() # ( ) >>> network.connect(’mainnet’) # Ethereum >>> web3.eth.block_number # >>> web3.eth.get_block( ) # >>> web3.eth.get_block( ).get(’timestamp’) # >>> import datetime >>> dt = datetime.datetime.fromtimestamp( ) >>> print(dt) # Web3 — 2023-06-16 – p.11/22
&UIFSFVNωοτϫʔΫ &7. &0" &5) ߴ &5) (BT εϚʔτ ίϯτϥΫτ
ϝοηʔδʹΑΔ ݺͼग़͠ τϥϯβ Ϋγϣϯ ॺ໊ͯ͠ ೖ ϒϩοΫʹ ΈࠐΈˠ όϦσʔλ Ϣʔβ ॲ ཧ ˞(BT ܭࢉࢿݯͷྔΛද͢ ˞(BT ༻ྉΛ &5) Ͱࢧ͏Ϣʔβ͕τϥϯβΫγϣϯΛೖ͠ͳ͍ݶΓ ɹεϚʔτίϯτϥΫτಈ࡞͠ͳ͍ . . . Ethereum (EVM) ETH ↑ DAO Web3 — 2023-06-16 – p.12/22
$ brownie bake nft nft ( ) contracts SimpleCollectible.sol ERC-721
NFT $ cd nft # nft $ brownie console # eth-brownie (Python ) >>> network.disconnect() # >>> network.connect(’goerli’) # Ethereum >>> accounts.add( ) # >>> collectible = SimpleCollectible.deploy({’from’: accounts[0]}) # NFT 1,834,415 Gas Web3 — 2023-06-16 – p.13/22
NFT (Non-Fungible Token) 1 → ( ) → ( )
( ) ( ) NFT NFT Web3 — 2023-06-16 – p.14/22
ERC-721 NFT τʔΫϯ *% ൪߸ 63- ΞυϨε 63- /'5 Ұҙ
Ұҙʁ Ұҙʁ Ұҙ ࣄ্࣮ Ұҙ ެ։伴ͷ μΠδΣετ ϝλσʔλ ίϯτϥΫτͱ͍͏ఆٛҬ ˞ͦͷίϯτϥΫτͱ͍͏ఆٛҬͷதͰ ࣮ઢҹͰࣔͨ͠ҰҙੑΛอূ͢Δʹա͗ͳ͍ ˞ഁઢҹͰࣔͨ͠Ұҙੑ ࣮ɾӡ༻ͷ࣍ୈͰอূͰ͖Δ ɹྫ͑ 63- ʹͦΕ͕ࢦ͢Ϧιʔεͷ҉߸ֶతμΠδΣετΛؚΊΔ͜ͱ ྫ *1'4 ͷར༻ ʹΑΓ ɹ ʮ63-ˠσʔλʯͷҰҙੑΛอͯΔ ͦͷ߹Ͱʮσʔλˠ63-ʯͷҰҙੑແ͍ ରσʔλ ը૾ ॴ༗ऀ ϝλσʔλ 63- ରσʔλ 63- ൿີ伴 Ұҙ Ұҙʁ Ϣʔβ Ұҙʁ Web3 — 2023-06-16 – p.15/22
NFT URL NFT >>> collectible.createCollectible( URL) # NFT URL NFT
NFT >>> network.disconnect() # >>> network.connect(’mainnet’) # Ethereum >>> collectible = SimpleCollectible.at(’ ’) # >>> collectible.ownerOf(OpenSea NFT ID) # >>> collectible.tokenURI(OpenSea NFT ID) # Web3 — 2023-06-16 – p.16/22
NFT σʔλ " ϒϩοΫνΣʔϯ #⒩ ʜ ʜ ϒϩοΫνΣʔϯ #⒪ ʜ
ʜ εϚʔτίϯτϥΫτ $⒩ εϚʔτίϯτϥΫτ $⒪ ಛఆͷετϨʔδ ˞Ͳ͜ʹஔ͔ΕΑ͏ͱ ɹ͍͠σʔλಉ͡ͷ ϒϩοΫνΣʔϯ͕ಉ͡Ͱҟͳͬͯ ͍ͯ εϚʔτίϯτϥΫτ͕ҟͳ ΔΠϯελϯεͳΒఆٛҬผͱͳΔ ଟ͘ͷ߹ ې͡ΒΕͳ͍ ېࢭͰ͖ͳ͍ ˞/'5 ͕σʔλΛࢦ͢ํࣜͱσʔλΛ֨ೲ͢Δํࣜ σʔλͷՄ༻ੑҟͳΔͱͯ͠ҰҙੑʹؔΘΔੑ࣭มΘΒͳ͍ ಉҰ εϚʔτίϯτϥΫτ $⒫ εϚʔτίϯτϥΫτ $⒬ /'5⒩ /'5⒪ /'5⒫ /'5⒬ /'5⒮ /'5⒭ σʔλ " ېͣΔΑ͏ͳ ઃܭίετߴ ېࢭͰ͖ͳ͍ Web3 — 2023-06-16 – p.17/22
NFT NFT NFT >>> collectible.ownerOf( NFT ID) # >>> collectible.ownerOf(
NFT ID) # NFT Ethereum Ethereum NFT NFT Ethereum Lazy Minting (?) ( ) (Gas ) Web3 — 2023-06-16 – p.18/22
DAO (Decentralized Autonomous Organization) Web3 — 2023-06-16 – p.19/22
DAO ෦ࢿຊˢ͋Δ ɹɹɹɹˣͳ͍ தԝʹࣗಈ ɹɹɹɹɹWT ɹɹɹɹɹɹதԝʹਓؒ શͳ "* σʔϞϯ˞ ϑΥʔϥϜ˞
XFC αʔϏε ϩϘοτΛ %"0 %"QQ˞ ݹయత৫ ɹɹɹɹɹपลʹਓؒ ɹɹɹɹWT पลʹࣗಈ ˞%"QQεϚʔτίϯτϥΫτʹΑΔΞϓϦέʔγϣϯ %FDFOUSBMJ[FE"QQ ˞ϑΥʔϥϜਓʑ͕ಛఆͷʹ͍ͭͯٞͨ͠ΓใΛަͨ͠Γ͢Δ ˞σʔϞϯόοΫάϥϯυͰՔಇ͠ ΠϕϯτʹࣗಈతʹରԠ͢ΔϓϩάϥϜ . . . Buterin DAO (2014) Web3 — 2023-06-16 – p.20/22
DAO Bitcoin DAO → DAO Ethereum DAO → . .
. DAO ( ) ( ) DAO → . . . ( ) ↑ ( ) ← Web3 — 2023-06-16 – p.21/22
( . . . ) · DAO Web 2.0 .
. . Web3 — 2023-06-16 – p.22/22