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
スマートコントラクトと分散ファイナンス / Smart Contracts and Decen...
Search
Kenji Saito
PRO
June 26, 2023
Technology
0
180
スマートコントラクトと分散ファイナンス / Smart Contracts and Decentralized Finance
早稲田大学大学院経営管理研究科「フィンテック ─ 金融革新とインターネット」2023 夏クォーターの第7-8回で使用したスライドです。
Kenji Saito
PRO
June 26, 2023
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
スマートコントラクトと分散ファイナンス / Smart Contracts and Decentralized Finance
ks91
PRO
0
24
シン・ブロックチェーン / Truth of Blockchain
ks91
PRO
0
69
パスワード/パスフレーズと認証 / Password, Passphrase and Authentication
ks91
PRO
0
30
git と GitHub / git and GitHub
ks91
PRO
0
29
ソフトウェアの開発と保守 / Software Development and Maintenance
ks91
PRO
0
39
インターネットの特徴 / Features of the Internet
ks91
PRO
0
26
インターネットのガバナンス / Governance of the Internet
ks91
PRO
0
27
暗号学的ハッシュ関数 / Cryptographic Hash Function
ks91
PRO
0
33
デジタル署名 / Digital Signature
ks91
PRO
0
28
Other Decks in Technology
See All in Technology
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
220
Amplifyとゼロからはじめた AIコーディング 成果と展望
mkdev10
1
360
AIエージェントの継続的改善のためオブザーバビリティ
pharma_x_tech
6
1.4k
IIWレポートからみるID業界で話題のMCP
fujie
0
730
BigQuery Remote FunctionでLooker Studioをインタラクティブ化
cuebic9bic
2
230
A2Aのクライアントを自作する
rynsuke
1
150
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
170
20250623 Findy Lunch LT Brown
3150
0
780
Observability infrastructure behind the trillion-messages scale Kafka platform
lycorptech_jp
PRO
0
130
成立するElixirの再束縛(再代入)可という選択
kubell_hr
0
950
Agentic DevOps時代の生存戦略
kkamegawa
0
1k
初めてのAzure FunctionsをClaude Codeで作ってみた / My first Azure Functions using Claude Code
hideakiaoyagi
1
190
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
The Invisible Side of Design
smashingmag
299
51k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
660
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Six Lessons from altMBA
skipperchong
28
3.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
For a Future-Friendly Web
brad_frost
179
9.8k
Transcript
Financial technology on the street. Generated by Stable Diffusion XL
Beta — 2023 7-8 (WBS) — 2023 7-8 — 2023-06-26 – p.1/78
https://speakerdeck.com/ks91 — 2023 7-8 — 2023-06-26 – p.2/78
( ) 1 6 5 (1) • 2 6 5
(2) • 3 6 12 Web3 (1) • 4 6 12 Web3 (2) • 5 6 19 (1) • 6 6 19 (2) • 7 6 26 (1) • 8 6 26 (2) • 9 7 3 (1) 10 7 3 (2) 11 7 10 (1) 12 7 10 (2) 13 7 24 (1) 14 7 24 (2) 12 — 2023 7-8 — 2023-06-26 – p.3/78
( 20 ) 1 2 3 4 (TCP/IP ) 5
6 7 8 9 10 World Wide Web 11 Web API 12 13 git GitHub 14 (6/19 ) / (2 ) OK / — 2023 7-8 — 2023-06-26 – p.4/78
( ) Web3 (1) — Web3 (2) — — 2023
7-8 — 2023-06-26 – p.5/78
( ) Ethereum Ethereum ← (DeFi) ( ) — 2023
7-8 — 2023-06-26 – p.6/78
— 2023 7-8 — 2023-06-26 – p.7/78
Bitcoin ϏοτίΠϯωοτϫʔΫ ɾ ճͷʮ࠾۷ʯྔ ຖʹݮ ɾ߹ܭ ສ
#5$ ·Ͱ औҾͷొ खྉ खྉ औҾͷঝೝ ϚΠχϯά࣌ ϚΠχϯά ࠾۷ ֬తաఔ ฏۉ ͓͖ʹޭ ૹۚࢦ֤͕ࣔࣗͭ ϓϥΠϕʔτΩʔͰ ແͨ͘͠Β࠶ൃߦෆՄ ϚΠφʔ ࠾۷ऀ ࢧ͍ɾ྆ସ ͳͲͷܦࡁ׆ಈ ར༻ऀ ϒϩοΫνΣʔϯ ݩா Πϯλʔωοτ্ͷԾωοτϫʔΫ ʜ ˞#5$ϏοτίΠϯͷ୯Ґ #5$ ରԠ ϒϩοΫ ϒϩοΫ ϒϩοΫ औҾ ૹۚ औҾͷه ΞυϨε Ѽઌ ϓϥΠϕʔτΩʔ ຊਓͷূ໌ — 2023 7-8 — 2023-06-26 – p.8/78
— 2023 7-8 — 2023-06-26 – p.9/78
(Bitcoin ) ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O
ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ͍ͪΜهɾॻ͖͑ͷίετ͕ߴ͍ྺ࢙ ࠷վ͟Μ͠ʹ͍͘ྺ࢙ ͕༗ޮ ͻͱͭखલͷϒϩοΫͷ ʮμΠδΣετʯ σδλϧॺ໊͞Εͨ ʮτϥϯβΫγϣϯ औҾ ʯ ϒϩοΫΛ࡞ΔͨΊʹɺͦͷʮμΠδΣετʯ͕͋ΔҎԼͱ͍͏݅Λຬͨͨ͠Γ 1SPPGPG8PSL Ծ௨՟ͷ࣋ͪʹԠͨ͡ݖརΛͬͨථͰউͬͨΓ 1SPPGPG4UBLF ͢Δඞཁ͕͋Δ ίετ͕͔͔Δ ϒϩοΫΛ࡞ΔਓͦͷதʹࣗʹѼͯͨ Ծ௨՟ͰͷใुΛॻ͖ࠐΉ͜ͱ͕Ͱ͖ɺ ͦͷϒϩοΫ͕༗ޮͳྺ࢙ͷதʹ͋Δ߹ʹ ݶΓใु༗ޮͱͳΔ τϥϯβΫγϣϯͷଘࡏΛ֬ೝ͢Δ ͨΊͷޮతͳํ๏͕ఏڙ͞ΕΔ ਖ਼ੑ ଘࡏੑ །Ұੑ Proof of Work ( ) (Proof of Stake ) . . . → — 2023 7-8 — 2023-06-26 – p.10/78
∼ UTXO (= ) → UTXO : (= ); Unspent
TX(Transaction) Output — 2023 7-8 — 2023-06-26 – p.11/78
∼ ท൪߸O ท൪߸O ท൪߸O લทͷμΠδΣετ λʔήοτҎԼͰͳ͍ͱ͍͚ͳ͍ Έͩ͠ίʔφʔ μΠδΣετ͕λʔήοτҎԼʹͳΔΑ͏ʹೖΕΔదͳ༰
( ) → — 2023 7-8 — 2023-06-26 – p.12/78
∼ ϖʔδ൪߸O ϖʔδ൪߸O ϖʔδ൪߸O ϖʔδ൪߸O ϖʔδ൪߸O
ϖʔδ൪߸O ϖʔδ൪߸O ϖʔδ൪߸O ͬͪ͜ͷྺ࢙͕༗ޮ ( (= ) ) — 2023 7-8 — 2023-06-26 – p.13/78
0 and/or Bitcoin “The Times 03/Jan/2009 Chancellor on brink of
second bailout for banks” 2009 1 3 2 https://www.blockchain.com/explorer 0 BTC Block “Hex to ASCII Text Converter” — 2023 7-8 — 2023-06-26 – p.14/78
: ( ( ) ) ( ) — 2023 7-8
— 2023-06-26 – p.15/78
(Hyperledger (Linux Foundation) ) ( ) ( ) ( )
( ) IoT / / ( , ) — 2023 7-8 — 2023-06-26 – p.16/78
: Bitcoin . . . : Proof of Existence, Everledger,
. . . ( ) ( ) / × = ( ) NFT (Non Fungible Token) — 2023 7-8 — 2023-06-26 – p.17/78
( ) จ ॻ จ ॻ จ ॻ
จ ॻ จ ॻ O μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ حͷ߹ ෳ͢Δ ɾจॻ ΛಘͨΫϥΠΞϯτɺಉ࣌ʹূ໌ཁૉͱͯ͠ɺϒϧʔͰࣔ͞ΕΔμΠδΣετͱ֤ʑ͕ࠨӈͷͲͪΒʹҐஔ͢Δ͔Λड͚औΔɻ ɾΫϥΠΞϯτจॻ ͷμΠδΣετ͔Β࢝Ίͯɺ࿈͖݁͢Ұ࿈ͷμΠδΣετΛΔ͜ͱʹͳΔͷͰɺϚʔΫϧϧʔτʹࢸΔ·Ͱͷ ɹܭࢉΛ࠶ݱͰ͖ɺಘΒΕͨϚʔΫϧϧʔτ͕ϒϩοΫνΣʔϯʹه͞Ε͍ͯΔͱҰக͢Δ͜ͱΛ֬ೝͰ͖Δɻ ɾͦͷܭࢉݪཧͷཧղͱඞཁͳใ͕͋Ε୭Ͱ࠶ݱͰ͖Δ จॻ ͷଘࡏͱͦͷ༰ূ໌͞ΕΔɻ ˞μΠδΣετݩͷσʔλ͕ ɹϏοτͰҟͳΔͱશ͘ҟͳΔ ɹͱͳΓɺ·ͨɺμΠδΣετ ɹ͔ΒݩͷσʔλΛਪଌ͢Δ͜ͱ ɹͰ͖ͳ͍ɻ ˞ઍɾສͷจॻΛϚʔΫϧʹͯ͠ ɹͦͷͷߴ͞ߴʑʙ ఔ ه͢Δ ಡΈग़ͤΔ ূ໌Λ ඞཁͱ͢Δऀʹ ։ࣔ͞ΕΔใ ެ։͞ΕΔใ ϚʔΫϧϧʔτ Ϛ ồ Ϋ ϧ γ ε ς Ϝ ͕ อ ͠ ֤ Ϣ ồ β ʹ ෦ త ʹ ͑ Δ ʜʜ ʜʜ ʜʜ ʜʜ ʜʜ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ ϒϩοΫνΣʔϯ ʜ ʜ — 2023 7-8 — 2023-06-26 – p.18/78
: ⇒ LINE → → ( ) ( ) ⇒
( ) → → → . . . — 2023 7-8 — 2023-06-26 – p.19/78
— 2023 7-8 — 2023-06-26 – p.20/78
(2009 1 ∼2023 6 ) 2 → 2 2 →
→ — 2023 7-8 — 2023-06-26 – p.21/78
10 ATM 1 ATM 1 : http://www.slideshare.net/yamaz2/ss-58813038 ⇒ ( (
) ) — 2023 7-8 — 2023-06-26 – p.22/78
— 2023 7-8 — 2023-06-26 – p.23/78
The DAO ( ) Ethereum The DAO Split ( )
360 ETH (50∼60 ) (2016/6/17) ( ) ( ; ) (2016/7/20 ) — 2023 7-8 — 2023-06-26 – p.24/78
( ) ( ) ( vs. ) ( ) (
) ( ) ⇒ ( : BBc-1, BBc-2) : : — 2023 7-8 — 2023-06-26 – p.25/78
: SF — 2023 7-8 — 2023-06-26 – p.26/78
3. SF Web3 2023 6 22 ( ) 23:59 JST
( ) Waseda Moodle — 2023 7-8 — 2023-06-26 – p.27/78
. . . . . . 37 30 (6/24( )
) ( ) SF ( ) (17) / (4) / (4) / ( ) (2) / (2) / (1) ( ) (19) / (5) / (3) / (1) / (1) / (1) — 2023 7-8 — 2023-06-26 – p.28/78
Y : EduContract 1 : EduContract Proof of Learning 2
: 3 3 : EduContract 4 : AI EduContract — 2023 7-8 — 2023-06-26 – p.29/78
Y — 5 : 6 : EduContract : : ⇒
= — 2023 7-8 — 2023-06-26 – p.30/78
N 20xx Gas Gas ⇒ — 2023 7-8 — 2023-06-26
– p.31/78
O ⇒ — 2023 7-8 — 2023-06-26 – p.32/78
F NFT ⇒ gas — 2023 7-8 — 2023-06-26 –
p.33/78
T 1 gas ID ⇒ gas ETH gas ( (
) + ( )) gas ETH ETH ETH — 2023 7-8 — 2023-06-26 – p.34/78
C ChatGPT ⇒ ( ) GPT-4 : OpenAI. 2023. “GPT-4
Technical Report”. Available at: https://doi.org/10.48550/arXiv.2303.08774. p.8 Figure 5 — 2023 7-8 — 2023-06-26 – p.35/78
C NFT Gas Price gwei JPY USD ⇒ https://www.cryps.info/ja/Gwei_ _JPY/
1 Gwei 0.00027071 JPY NFT 1,834,415 gas https://etherscan.io/gastracker gas 15 Gwei 1,834,415 (gas) × 15 (Gwei/gas) × 0.00027071 (JPY/Gwei) ≃ 7,449 JPY — 2023 7-8 — 2023-06-26 – p.36/78
N ⇒ . . . — 2023 7-8 — 2023-06-26
– p.37/78
K ⇒ ( ) ( ) ( ; ) —
2023 7-8 — 2023-06-26 – p.38/78
Ethereum Ethereum ( ) — 2023 7-8 — 2023-06-26 –
p.39/78
— 2023 7-8 — 2023-06-26 – p.40/78
Ethereum · → · → · → — 2023 7-8
— 2023-06-26 – p.41/78
↑ — 2023 7-8 — 2023-06-26 – p.42/78
(by ) 1. 2. ( ) ( ) . .
. cf. by McLuhan cf. by McLuhan → — 2023 7-8 — 2023-06-26 – p.43/78
by ⇒ ⇒ — 2023 7-8 — 2023-06-26 – p.44/78
by SNS AI AI ⇒ ( ) ⇒ — 2023
7-8 — 2023-06-26 – p.45/78
Ethereum EVM (Ethereum Virtual Machine) — 2023 7-8 — 2023-06-26
– p.46/78
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” (Dec. 2013∼) 12 ( ) (= ) = = ( ) CPU ⇒ DApps DApps = / — 2023 7-8 — 2023-06-26 – p.47/78
= ( ) run = → — 2023 7-8 —
2023-06-26 – p.48/78
[Lamport 1984][Schneider 1990] ( ) (1) 0 ( ) (2)
(3) (4) ( ) ← — 2023 7-8 — 2023-06-26 – p.49/78
Ether (ETH) Ethereum EOA : Externally-Owned Account ( ) (
) ( ) ( ) ← Ether ( ) EVM EVM = Ethereum = — 2023 7-8 — 2023-06-26 – p.50/78
EVM : Ethereum Virtual Machine ঢ়ଶ ֎෦ΞΫλʔ ΞΧϯτ &7. ίʔυ
&UIFSˠ(BT ىಈ ίϯτϥΫτ ϝοηʔδ͔ɺ৽͍ࣗ͠ಈΦϒδΣΫτ ΞΧϯτؒͰΓऔΓ͞ΕΔσʔλ&UIFS ετϨʔδ ঢ়ଶ` τϥϯβΫγϣϯ ηοτ σδλϧॺ໊ &7. ਓؒͱ͔ ࣗಈ ΦϒδΣΫτ ( ) Gas ( EVM = ( burn)) — 2023 7-8 — 2023-06-26 – p.51/78
/ / (1) Ethereum Bitcoin ( OK) 1 — 2023
7-8 — 2023-06-26 – p.52/78
/ / (2) 3 ( ) · ( ) (
) 1 — 2023 7-8 — 2023-06-26 – p.53/78
/ / (3) ( ) ( ) 1 ( )
1,500 3,000 Ethereum 2022 9 — 2023 7-8 — 2023-06-26 – p.54/78
/ / (4) Gwei Gwei ETH 32 ETH ( )
ETH ETH · 32 ETH ( OK) · 16 ETH ( ) 12 ( ) ( ) 1 — 2023 7-8 — 2023-06-26 – p.55/78
/ / (5) 32 1 (384 ) ( ) (
) 2 3 ( ) 256 512 — 2023 7-8 — 2023-06-26 – p.56/78
/ / (6) ( ) 5 2 3 (36 )
— 2023 7-8 — 2023-06-26 – p.57/78
/ / (7) ( ) ( ) DAO (RANDAO) 1
— 2023 7-8 — 2023-06-26 – p.58/78
Ethereum ߹ҙ͞Εͨཤྺ ϩʔΧϧʹෳΛҡ࣋
ϒϩοΫ εϩοτ ඵִؒ εϩοτͰ ΤϙοΫ ҉߸ֶతμΠδΣετ ϒϩοΫνΣʔϯͷҡ࣋ࢀՃऀ͕ϩʔΧϧʹཧ͢Δσʔλۭؒ ࣌ؒ ΑΓ৽͍͠ه ΦϒδΣΫτ τʔΫϯγεςϜͷεϚʔτίϯτϥΫτ ֤Ϣʔβͷ ߴͷঢ়ଶ ঢ়ଶ` ঢ়ଶ`` τϥϯβΫγϣϯ ΦϒδΣΫτͷੜ ·ͨঢ়ଶભҠͷࢦࣔ ແޮͳཤྺ ω ỽ τ ϫ ồ Ϋ Λ ௨ ͠ ͯ ૹ ड ৴ ͞ Ε Δ ϩ ồ Χ ϧ ʹ ࣋ ͭ ܨ͙ͨΊʹ&5) Ͱͷσϙδοτͱ σϙδοτ૯ֹͷ ♤ ૬ͷϢʔβʹΑΔ ΤϙοΫͷূݴ͕ඞཁ શΦϒδΣΫτͷભҠޙͷঢ়ଶ ͕ϋογϡ˞ʹू͞Ε ͦͷ ϧʔτ͕ϒϩοΫʹॻ͔ΕΔ ঢ়ଶભҠ ˞ϋογϡσʔλ܈ͷ҉߸ֶతμΠδΣετ ϋογϡ ɹΛߏʹදݱͨ͠ͷͰ ෆ߹ͷݕग़ʹ༻͍ΒΕΔ ETH ( ) ⇒ ETH = Ethereum Virtual Machine (EVM) 2 3 ETH ⇒ ETH — 2023 7-8 — 2023-06-26 – p.59/78
Ethereum (ex. ) (ex. ) ⇒ → — 2023 7-8
— 2023-06-26 – p.60/78
— 2023 7-8 — 2023-06-26 – p.61/78
ERC-20 ERC (Ethereum Request for Comments) 20 https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md (EIP: Ethereum
Improvement Proposal) ← EIP ( ) contract ERC20 { function totalSupply() constant returns (uint totalSupply); function balanceOf(address _owner) constant returns (uint balance); function transfer(address _to, uint _value) returns (bool success); function transferFrom(address _from, address _to, uint _value) returns (bool success); function approve(address _spender, uint _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint remaining); event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } name/ , symbol/ , decimals/ approve allowance ERC-777 ( ) — 2023 7-8 — 2023-06-26 – p.62/78
ERC-20 ERC-20 ← ( ) ( ) ⇒ ERC-20 (
ERC-20 ) ERC-20 ⇒ — 2023 7-8 — 2023-06-26 – p.63/78
(fungible) ERC-20 → ERC-223 (draft) or ERC-777 ( )( )
(non-fungible) ERC-721 ( ) ( ) ERC-1155 ( ) ERC-3525 (SLOT ) — 2023 7-8 — 2023-06-26 – p.64/78
— τʔΫϯ ସ՟ฎ εϚʔτίϯτϥΫτ ݕূՄೳͳঢ়ଶϚγϯ ϓϩϏφϯε དྷྺূ໌ ସՄೳ ঈؐෆೳ
ସՄೳ ঈؐՄೳ ସෆೳ ঈؐՄೳ ସෆೳ ঈؐෆೳ ূ໌͢Δ ಉఆ͢Δ ࢧ͍ ࠷ॳͷԠ༻ *%Χʔυ ηΩϡϦςΟ τʔΫϯ ূ݊ ηϯαʔ ྲྀɾ Ҩݴॻ อݥਃ ͢Δ ײ͢Δ தԝۜߦ σδλϧ௨՟ ҭήʔϜ ൿີ伴Λ͑Δ͔Βຊਓʁ ෛ࠴ Ξηοτͷ දݱΛҠసͰ͖Δʁ ొ͞Εͨίʔυͱ ͦͷ࣮ߦϩάͱ݁Ռͷ ਅਖ਼ੑΛ୲อͰ͖Δʁ ݖҖ͕ Կ͔ͷ༰Λূ໌͢Δʁ ࣋ଓ͢Δଘࡏʹ͍ͭͯ هΛΞοϓσʔτՄʁ ओମ͕͍ͳ͘ͳͬͯ աڈͷσʔλ༗ޮʁ /'5 Ұൠతͳ ೝࣝ ػೳͷ ੳ݁Ռ — 2023 7-8 — 2023-06-26 – p.65/78
— 2023 7-8 — 2023-06-26 – p.66/78
transfer settle, retrieve asset, retrieve token 3 — 2023 7-8
— 2023-06-26 – p.67/78
( ( )) ( ) / / — 2023 7-8
— 2023-06-26 – p.68/78
— 1. ( ) 2. ( ) 3. ( )
— 2023 7-8 — 2023-06-26 – p.69/78
token (ERC-20 ) $ brownie bake token GitHub git clone
$ git clone https://github.com/ks91/sample-smart-contracts.git sample-smart-contracts contracts, scripts tests token Token — 2023 7-8 — 2023-06-26 – p.70/78
OneTimeEscrow settle() function settle() public returns (bool) { require(_token_.balanceOf(address(this)) >=
_price_); /* this */ require(_asset_.getOwner() == address(this)); _token_.transfer(_seller_ , _price_); _asset_.transfer(_buyer_); emit Settled(); /* */ return true; } settle() transfer $ brownie compile — 2023 7-8 — 2023-06-26 – p.71/78
(1) from brownie import * import pytest seller = accounts[0]
buyer = accounts[1] def test_deploy_and_settle(Token, IndivisibleAsset, OneTimeEscrow): asset = accounts[0].deploy(IndivisibleAsset, "5322 Endo", "mˆ2", 300) token = accounts[0].deploy(Token, "Test Token", "TEST", 18, "1000 ether") — 2023 7-8 — 2023-06-26 – p.72/78
(2) token.transfer(buyer, 300, {’from’: accounts[0]}) escrow = accounts[0].deploy(OneTimeEscrow, token, buyer,
asset, seller, 300) accounts[0]/seller accounts[1]/buyer 300 300 TX buyer seller 300 bake Token 300 ETH wei — 2023 7-8 — 2023-06-26 – p.73/78
(3) token.transfer(escrow, 300, {’from’: buyer}) asset.transfer(escrow, {’from’: seller}) assert token.balanceOf(seller)
== 999999999999999999700 assert token.balanceOf(buyer) == 0 assert token.balanceOf(escrow) == 300 assert asset.getOwner() == escrow buyer ( ) 300 seller ( ) — 2023 7-8 — 2023-06-26 – p.74/78
(4) escrow.settle({’from’: seller}) assert token.balanceOf(seller) == 1000000000000000000000 assert token.balanceOf(buyer) ==
0 assert token.balanceOf(escrow) == 0 assert asset.getOwner() == buyer settle() seller OK — 2023 7-8 — 2023-06-26 – p.75/78
— 2023 7-8 — 2023-06-26 – p.76/78
4. × OK Web3 2023 6 30 ( ) 23:59
JST ( ) Waseda Moodle — 2023 7-8 — 2023-06-26 – p.77/78
— 2023 7-8 — 2023-06-26 – p.78/78