Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
スマートコントラクトと分散ファイナンス / Smart Contracts and Decen...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kenji Saito
PRO
June 28, 2025
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
スマートコントラクトと分散ファイナンス / Smart Contracts and Decentralized Finance
早稲田大学大学院経営管理研究科「フィンテック ─ 金融革新とインターネット」2025 夏の第7-8回で使用したスライドです。
Kenji Saito
PRO
June 28, 2025
More Decks by Kenji Saito
See All by Kenji Saito
アカデミーキャンプ 2026秋「位置ゲーに秀でよ!ウチらとヤツらのゲーム・デザイン」DAY 2 / Academy Camp 2026 Fall - Excel at Location-Based Games! Our and Their Game Design DAY 2
ks91
PRO
0
72
アカデミーキャンプ 2026秋「位置ゲーに秀でよ!ウチらとヤツらのゲーム・デザイン」DAY 1 / Academy Camp 2026 Fall - Excel at Location-Based Games! Our and Their Game Design DAY 1
ks91
PRO
0
27
責任2.0/3.0 ∼ 知的創造過程の脱領土化 / Responsibility 2.0 and 3.0: The Deterritorialization of the Intellectual Creative Process
ks91
PRO
0
33
国と地域のマネジメントと AGI / National and Regional Management and AGI
ks91
PRO
0
25
2026 年度「AI による研究・教育サポート」ワークショップ (教員向け) / AY 2026 “AI-Based Research and Education Support” Workshop (For Faculty)
ks91
PRO
0
47
エージェント化するAI:現在地とその先に起きる変化 / AI as Agents: The Current State and the Changes Ahead
ks91
PRO
0
220
文化的ループ (推論, エージェント) と思考プロセスの検証可能性 / Cultural Loops (Inference, Agents) and the Verifiability of Thought Processes
ks91
PRO
0
49
アカデミーキャンプ2026 夏 「ヤツらを究めろ!ウチらとヤツらの自由研究∼ シーズン2」DAY 3 / Academy Camp 2026 Summer: Master Them! Our Independent Research Project with Them—Season 2 DAY3
ks91
PRO
0
93
アカデミーキャンプ2026 夏 「ヤツらを究めろ!ウチらとヤツらの自由研究∼ シーズン2」DAY 1 / Academy Camp 2026 Summer: Master Them! Our Independent Research Project with Them—Season 2 DAY1
ks91
PRO
0
82
Other Decks in Technology
See All in Technology
データ_AIの事業の勝敗をわけるもの
nek0128
1
410
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
660
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
350
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
31
26k
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.1k
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
0
110
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
AI に書かせたその API、 “信頼” できますか?
nagix
0
120
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
0
290
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
250
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.3k
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Amusing Abliteration
ianozsvald
1
300
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Navigating Weather and Climate Data
rabernat
0
520
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
380
Typedesign – Prime Four
hannesfritz
42
3.2k
Transcript
Light and Shadow — Generated by Stable Diffusion 3.5 —
2025 7-8 (WBS) — 2025 7-8 — 2025-06-30 – p.1/75
https://speakerdeck.com/ks91/collections/fintech-2025-summer — 2025 7-8 — 2025-06-30 – p.2/75
( ) 1 6 9 (1) • 2 6 9
(2) • 3 6 16 Web3 (1) • 4 6 16 Web3 (2) • 5 6 23 (1) • 6 6 23 (2) • 7 6 30 (1) • 8 6 30 (2) • 9 7 7 (1) 10 7 7 (2) 11 7 14 (1) 12 7 14 (2) 13 7 21 (1) 14 7 21 (2) W-IOI ( ) — 2025 7-8 — 2025-06-30 – p.3/75
( 20 ) 1 ↑ 2 ↓ 2025 3 4
(TCP/IP ) 5 6 7 8 ↑ 9 ↓ 2024 ( ) 10 World Wide Web 11 Web API 12 * 13 git GitHub 14 (6/23 ) / (2 ) OK / — 2025 7-8 — 2025-06-30 – p.4/75
( ) Web3 (1) — Web3 (2) — — 2025
7-8 — 2025-06-30 – p.5/75
Ethereum — 2025 7-8 — 2025-06-30 – p.6/75
(+ ) — 2025 7-8 — 2025-06-30 – p.7/75
ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O
ϒϩοΫ൪߸O ϒϩοΫ൪߸O ͍ͪΜهɾॻ͖͑ͷίετ͕ߴ͍ྺ࢙ ࠷վ͟Μ͠ʹ͍͘ྺ࢙ ͕༗ޮ ͻͱͭखલͷϒϩοΫͷ ʮμΠδΣετʯ σδλϧॺ໊͞Εͨ ʮτϥϯβΫγϣϯ औҾ ʯ ϒϩοΫΛ࡞ΔͨΊʹɺͦͷʮμΠδΣετʯ͕͋ΔҎԼͱ͍͏݅Λຬͨͨ͠Γ 1SPPGPG8PSL ҉߸ࢿ࢈ͷσϙδοτʹԠͨ͡ݖརΛͬͨථͰউͬͨΓ 1SPPGPG4UBLF ͢Δඞཁ͕͋Δ ίετ͕͔͔Δ ϒϩοΫΛ࡞ΔਓͦͷதʹࣗʹѼͯͨ ҉߸ࢿ࢈ͰͷใुΛॻ͖ࠐΉ͜ͱ͕Ͱ͖ɺ ͦͷϒϩοΫ͕༗ޮͳྺ࢙ͷதʹ͋Δ߹ʹ ݶΓใु༗ޮͱͳΔ τϥϯβΫγϣϯͷଘࡏΛ֬ೝ͢Δ ͨΊͷޮతͳํ๏͕ఏڙ͞ΕΔ ਖ਼ੑ ଘࡏੑ །Ұੑ Proof of Work ( ) (Proof of Stake ) . . . → — 2025 7-8 — 2025-06-30 – p.8/75
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” — 2025 7-8 — 2025-06-30 – p.9/75
: ( ( ) ) ( ) — 2025 7-8
— 2025-06-30 – p.10/75
(Hyperledger ) ( ) ( ) ( ) ( )
IoT / / ( , ) — 2025 7-8 — 2025-06-30 – p.11/75
: Bitcoin . . . : Proof of Existence, Everledger,
. . . ( ) ( ) × = NFT (Non Fungible Token) — 2025 7-8 — 2025-06-30 – p.12/75
( ) จ ॻ จ ॻ จ ॻ
จ ॻ จ ॻ O μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ حͷ߹ ෳ͢Δ ɾจॻ ΛಘͨΫϥΠΞϯτɺಉ࣌ʹূ໌ཁૉͱͯ͠ɺϒϧʔͰࣔ͞ΕΔμΠδΣετͱ֤ʑ͕ࠨӈͷͲͪΒʹҐஔ͢Δ͔Λड͚औΔɻ ɾΫϥΠΞϯτจॻ ͷμΠδΣετ͔Β࢝Ίͯɺ࿈͖݁͢Ұ࿈ͷμΠδΣετΛΔ͜ͱʹͳΔͷͰɺϚʔΫϧϧʔτʹࢸΔ·Ͱͷ ɹܭࢉΛ࠶ݱͰ͖ɺಘΒΕͨϚʔΫϧϧʔτ͕ϒϩοΫνΣʔϯʹه͞Ε͍ͯΔͱҰக͢Δ͜ͱΛ֬ೝͰ͖Δɻ ɾͦͷܭࢉݪཧͷཧղͱඞཁͳใ͕͋Ε୭Ͱ࠶ݱͰ͖Δ จॻ ͷଘࡏͱͦͷ༰ূ໌͞ΕΔɻ ˞μΠδΣετݩͷσʔλ͕ ɹϏοτͰҟͳΔͱશ͘ҟͳΔ ɹͱͳΓɺ·ͨɺμΠδΣετ ɹ͔ΒݩͷσʔλΛਪଌ͢Δ͜ͱ ɹͰ͖ͳ͍ɻ ˞ઍɾສͷจॻΛϚʔΫϧʹͯ͠ ɹͦͷͷߴ͞ߴʑʙ ఔ ه͢Δ ಡΈग़ͤΔ ূ໌Λ ඞཁͱ͢Δऀʹ ։ࣔ͞ΕΔใ ެ։͞ΕΔใ ϚʔΫϧϧʔτ Ϛ ồ Ϋ ϧ γ ε ς Ϝ ͕ อ ͠ ֤ Ϣ ồ β ʹ ෦ త ʹ ͑ Δ ʜʜ ʜʜ ʜʜ ʜʜ ʜʜ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ ϒϩοΫνΣʔϯ ʜ ʜ — 2025 7-8 — 2025-06-30 – p.13/75
: ⇒ LINE → → → ( ) ( )
⇒ ( ) → → → . . . — 2025 7-8 — 2025-06-30 – p.14/75
( ( )) ( ) / / — 2025 7-8
— 2025-06-30 – p.15/75
— 1. ( ) 2. ( ) 3. ( )
— 2025 7-8 — 2025-06-30 – p.16/75
— 2025 7-8 — 2025-06-30 – p.17/75
Bitcoin (2009 1 ∼2025 6 ) 2 → 2 2
→ → — 2025 7-8 — 2025-06-30 – p.18/75
( ) -12 -9 -7 -5 -3 -1 1 3
5 7 9 11 Time Zone (UTC-relative) Capacity (GW) Bitcoin 0 20 40 60 80 100 120 140 ( — Bitcoin 19GW) Solar power by country ( ) 17GW (13 ) Bitcoin 13 Bitcoin 1 4 4.25GW 29 UTC — 2025 7-8 — 2025-06-30 – p.19/75
10 ATM 1 ATM 1 : http://www.slideshare.net/yamaz2/ss-58813038 ⇒ ( (
) ) — 2025 7-8 — 2025-06-30 – p.20/75
— 2025 7-8 — 2025-06-30 – p.21/75
The DAO ( ) Ethereum The DAO Split ( )
360 ETH (50∼60 ) (2016/6/17) ( ) ( ; ) (2016/7/20 ) — 2025 7-8 — 2025-06-30 – p.22/75
(Ethereum (?); ) ( ) ( ) ( vs. )
( ) ( ) ( ) ⇒ ( : BBc-1, BBc-2) : : — 2025 7-8 — 2025-06-30 – p.23/75
SF — 2025 7-8 — 2025-06-30 – p.24/75
3. (1) SF (2) 2025 6 26 ( ) 23:59
JST ( ) Waseda Moodle — 2025 7-8 — 2025-06-30 – p.25/75
. . . . . . 17 13 (6/27( )
) ( ) ( ) ( ) ( Moodle ) H N Y H (← B. ) I Y M — 2025 7-8 — 2025-06-30 – p.26/75
A ⇒ — 2025 7-8 — 2025-06-30 – p.27/75
( )( ) ະདྷͷܦࡁࣾձ աظͷܦࡁࣾձ ࣌ؒ ݱঢ়ͷܦࡁࣾձ ՟ฎγεςϜ ͷϋοΫ ҉߸ࢿ࢈ͷࢢՁ֨ʹ
ґଘ͢ΔΈ ؆୯ʹͭͿͤΔͥ "* ʹΑͬͯॻ͖͑ΒΕͳ͍ ਅਖ਼ͳهΛԼࢧ͑ ҉߸ࢿ࢈ͷࢢՁ֨ʹґଘ͠ͳ͍ ҉߸ࢿ࢈ແؔͳ ٛͷݕӾهج൫ ՟ฎͷ ΠϯηϯςΟϒͰ ۦಈ "* ΤʔδΣϯτ ϩϘςΟΫε γϯɾ%"0 "* ͕ਓؒͷ࿑ಇྗΛར༻͢Δ ϝλɾωΠνϟʔ ਓؒͷ࿑ಇྗ ՟ฎͷ ΠϯηϯςΟϒͰ ۦಈ ࿑ಇͰͳ͍Կ͔ ϒϩοΫνΣʔϯ ҉߸ࢿ࢈ͱ͔ ·͋ͦ͏͍ͬͨͷ ҉߸ࢿ࢈·͋ؔͳͯ͘ 0, ࣮ࡍʹࣾձͷʹཱͭϑΟϯςοΫ — 2025 7-8 — 2025-06-30 – p.28/75
H ⇒ Bitcoin bitcoin ( ) ( . . .
) — 2025 7-8 — 2025-06-30 – p.29/75
A ( ) ⇒ Bitcoin Proof of Work ( )
( ) Bitcoin Litecoin, Litecoin Monacoin Ethereum Proof of Stake ( ) Ethereum Proof of Stake — 2025 7-8 — 2025-06-30 – p.30/75
S DAO ( : ) ⇒ DAO — 2025 7-8
— 2025-06-30 – p.31/75
S ( ) ⇒ 12 24 (Hierarchical Deterministic (HD) Wallet)
(Social Recovery Wallet) — 2025 7-8 — 2025-06-30 – p.32/75
Y (= ) “ ” ⇒ X ( ) https://x.com/gassimanga/status/1878478764679586124
— 2025 7-8 — 2025-06-30 – p.33/75
M ⇒ AI — 2025 7-8 — 2025-06-30 – p.34/75
N DAO Pros and Cons ⇒ DAO DAO — 2025
7-8 — 2025-06-30 – p.35/75
Ethereum Ethereum ( ) — 2025 7-8 — 2025-06-30 –
p.36/75
— 2025 7-8 — 2025-06-30 – p.37/75
Ethereum · → · → · → — 2025 7-8
— 2025-06-30 – p.38/75
↑ — 2025 7-8 — 2025-06-30 – p.39/75
(by ) 1. 2. ( ) ( ) . .
. cf. by McLuhan cf. by McLuhan → — 2025 7-8 — 2025-06-30 – p.40/75
by ⇒ ⇒ — 2025 7-8 — 2025-06-30 – p.41/75
by SNS AI AI ⇒ ( ) ⇒ — 2025
7-8 — 2025-06-30 – p.42/75
Ethereum EVM (Ethereum Virtual Machine) — 2025 7-8 — 2025-06-30
– p.43/75
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” (Dec. 2013∼) 12 ( ) (= ) = = ( ) CPU ⇒ DApps DApps = / — 2025 7-8 — 2025-06-30 – p.44/75
= ( ) run = → — 2025 7-8 —
2025-06-30 – p.45/75
[Lamport 1984][Schneider 1990] ( ) (1) 0 ( ) (2)
(3) (4) ( ) ← — 2025 7-8 — 2025-06-30 – p.46/75
Ether (ETH) Ethereum EOA : Externally-Owned Account ( ) (
) ( ) ( ) ← Ether ( ) EVM EVM = Ethereum = — 2025 7-8 — 2025-06-30 – p.47/75
EVM : Ethereum Virtual Machine ঢ়ଶ ֎෦ΞΫλʔ ΞΧϯτ &7. ίʔυ
&UIFSˠ(BT ىಈ ίϯτϥΫτ ϝοηʔδ͔ɺ৽͍ࣗ͠ಈΦϒδΣΫτ ΞΧϯτؒͰΓऔΓ͞ΕΔσʔλ&UIFS ετϨʔδ ঢ়ଶ` τϥϯβΫγϣϯ ηοτ σδλϧॺ໊ &7. ਓؒͱ͔ ࣗಈ ΦϒδΣΫτ ( ) Gas ( EVM = ( burn)) — 2025 7-8 — 2025-06-30 – p.48/75
/ / (1) Ethereum Bitcoin ( OK) 1 — 2025
7-8 — 2025-06-30 – p.49/75
/ / (2) 3 ( ) · ( ) (
) 1 — 2025 7-8 — 2025-06-30 – p.50/75
/ / (3) ( ) ( ) 1 ( )
1,500 3,000 (← . . . ) Ethereum 2022 9 — 2025 7-8 — 2025-06-30 – p.51/75
/ / (4) Gwei Gwei ETH 32 ETH ( )
ETH ETH · 32 ETH ( OK) · 16 ETH ( ) 12 ( ) ( ) 1 — 2025 7-8 — 2025-06-30 – p.52/75
/ / (5) 32 1 (384 ) ( ) (
) 2 3 ( ) 256 512 — 2025 7-8 — 2025-06-30 – p.53/75
/ / (6) ( ) 5 2 3 (36 )
— 2025 7-8 — 2025-06-30 – p.54/75
/ / (7) ( ) ( ) DAO (RANDAO) 1
— 2025 7-8 — 2025-06-30 – p.55/75
Ethereum ߹ҙ͞Εͨཤྺ ϩʔΧϧʹෳΛҡ࣋
ϒϩοΫ εϩοτ ඵִؒ εϩοτͰ ΤϙοΫ ҉߸ֶతμΠδΣετ ϒϩοΫνΣʔϯͷҡ࣋ࢀՃऀ͕ϩʔΧϧʹཧ͢Δσʔλۭؒ ࣌ؒ ΑΓ৽͍͠ه ΦϒδΣΫτ τʔΫϯγεςϜͷεϚʔτίϯτϥΫτ ֤Ϣʔβͷ ߴͷঢ়ଶ ঢ়ଶ` ঢ়ଶ`` τϥϯβΫγϣϯ ΦϒδΣΫτͷੜ ·ͨঢ়ଶભҠͷࢦࣔ ແޮͳཤྺ ω ỽ τ ϫ ồ Ϋ Λ ௨ ͠ ͯ ૹ ड ৴ ͞ Ε Δ ϩ ồ Χ ϧ ʹ ࣋ ͭ ܨ͙ͨΊʹ&5) Ͱͷσϙδοτͱ σϙδοτ૯ֹͷ ♤ ૬ͷϢʔβʹΑΔ ΤϙοΫͷূݴ͕ඞཁ શΦϒδΣΫτͷભҠޙͷঢ়ଶ ͕ϋογϡ˞ʹू͞Ε ͦͷ ϧʔτ͕ϒϩοΫʹॻ͔ΕΔ ঢ়ଶભҠ ˞ϋογϡσʔλ܈ͷ҉߸ֶతμΠδΣετ ϋογϡ ɹΛߏʹදݱͨ͠ͷͰ ෆ߹ͷݕग़ʹ༻͍ΒΕΔ ETH ( ) ⇒ ETH = Ethereum Virtual Machine (EVM) 2 3 ETH ⇒ ETH — 2025 7-8 — 2025-06-30 – p.56/75
Ethereum (ex. ) (ex. ) ⇒ → — 2025 7-8
— 2025-06-30 – p.57/75
— 2025 7-8 — 2025-06-30 – p.58/75
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 ( ) — 2025 7-8 — 2025-06-30 – p.59/75
ERC-20 ERC-20 ← ( ) ( ) ⇒ ERC-20 (
ERC-20 ) ERC-20 ⇒ — 2025 7-8 — 2025-06-30 – p.60/75
(fungible) ERC-20 → ERC-223 (draft) or ERC-777 ( )( )
(non-fungible) ERC-721 ( ) ( ) ERC-1155 ( ) ERC-3525 (SLOT ) — 2025 7-8 — 2025-06-30 – p.61/75
— τʔΫϯ ସ՟ฎ εϚʔτίϯτϥΫτ ݕূՄೳͳঢ়ଶϚγϯ ϓϩϏφϯε དྷྺূ໌ ସՄೳ ঈؐෆೳ
ସՄೳ ঈؐՄೳ ସෆೳ ঈؐՄೳ ସෆೳ ঈؐෆೳ ূ໌͢Δ ಉఆ͢Δ ࢧ͍ ࠷ॳͷԠ༻ *%Χʔυ ηΩϡϦςΟ τʔΫϯ ূ݊ ηϯαʔ ྲྀɾ Ҩݴॻ อݥਃ ͢Δ ײ͢Δ தԝۜߦ σδλϧ௨՟ ҭήʔϜ ൿີ伴Λ͑Δ͔Βຊਓʁ ෛ࠴ Ξηοτͷ දݱΛҠసͰ͖Δʁ ొ͞Εͨίʔυͱ ͦͷ࣮ߦϩάͱ݁Ռͷ ਅਖ਼ੑΛ୲อͰ͖Δʁ ݖҖ͕ Կ͔ͷ༰Λূ໌͢Δʁ ࣋ଓ͢Δଘࡏʹ͍ͭͯ هΛΞοϓσʔτՄʁ ओମ͕͍ͳ͘ͳͬͯ աڈͷσʔλ༗ޮʁ /'5 Ұൠతͳ ೝࣝ ػೳͷ ੳ݁Ռ — 2025 7-8 — 2025-06-30 – p.62/75
— 2025 7-8 — 2025-06-30 – p.63/75
transfer settle, retrieve asset, retrieve token 3 — 2025 7-8
— 2025-06-30 – p.64/75
( ( )) ( ) / / — 2025 7-8
— 2025-06-30 – p.65/75
— 1. ( ) 2. ( ) 3. ( )
— 2025 7-8 — 2025-06-30 – p.66/75
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 — 2025 7-8 — 2025-06-30 – p.67/75
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 — 2025 7-8 — 2025-06-30 – p.68/75
(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") — 2025 7-8 — 2025-06-30 – p.69/75
(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 — 2025 7-8 — 2025-06-30 – p.70/75
(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 ( ) — 2025 7-8 — 2025-06-30 – p.71/75
(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 — 2025 7-8 — 2025-06-30 – p.72/75
— 2025 7-8 — 2025-06-30 – p.73/75
4. (1) × OK (2) 2025 7 3 ( )
23:59 JST ( ) Waseda Moodle — 2025 7-8 — 2025-06-30 – p.74/75
— 2025 7-8 — 2025-06-30 – p.75/75