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
社内仮想通貨をモバイルDappとしてつくってみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
daisuke sato
March 09, 2018
Technology
3.1k
1
Share
社内仮想通貨をモバイルDappとしてつくってみた
Hi-Ether Meetup - Block #1
daisuke sato
March 09, 2018
More Decks by daisuke sato
See All by daisuke sato
BlockchainHackathon2019 ワークショップ ~ Twitterとブロックチェーンを使ったアイデンティフィケーションの実現~
daisuke310vvv
0
220
gethoとTruffleを使った DApps開発ワークショップ
daisuke310vvv
0
150
gethoハッカソン -ハンズオン-
daisuke310vvv
1
1.1k
Hi-Con2018 より良いDApp開発をするための話と gethoについて
daisuke310vvv
1
420
getho ~ Ethereum private nodes, tailored for you. ~
daisuke310vvv
0
820
Other Decks in Technology
See All in Technology
テストコードのないプロジェクトにテストを根付かせる
tttol
0
160
TSKaigi 2026 - enumよ、さようなら
teamlab
PRO
3
550
まだ道半ば、AI-DLCを歩み始めている話
news_it_enj
2
180
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
140
実践 TanStack Start ― 新規プロダクトを開発して確立した、サーバーとクライアント境界の設計パターン / Practical TanStack Start Server-Client Boundary Patterns
kaminashi
2
320
TypeScript で Platform SDK を作る技術
toiroakr
1
300
ラズパイ & Picoで入門:Zephyr(RTOS)の環境構築からビルドまでの紹介
iotengineer22
0
240
イベントで大活躍する電子ペーパー名札 〜その3〜 / ビジュアルプログラミングIoTLT vol.23
you
PRO
0
140
Geek Woman の育ち方 〜コミュニティとAIと〜
chicaco
0
420
DI コンテナ自動生成ツールを実装してみた / intro-autodi
uhzz
0
870
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
240
Agentic AI時代における メルカリのAIガバナンスとガードレール実装
naoichihara
15
14k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
210
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Paper Plane
katiecoart
PRO
1
50k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
190
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
410
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
530
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Transcript
ࣾԾ௨՟Λ ϞόΠϧDappͱͯ͠ ͭͬͯ͘Έͨ Hi-Ether Meetup - Block #1 @st_dsk 0x00
ࣗݾհ ࠤ౻ େี(@st_dsk) Co-Founder & CTO at Popshoot, Inc #go
#swift #☕ medium.com/@st_dsk 0x01 Works + Dapp?
ΞδΣϯμ 0x03 • ࣾԾ௨՟Λ࡞ͬͯΈͨ • ϞόΠϧDapp։ൃʹඞཁͳ͜ͱ • ϥΠϒϥϦͷհ • ϞόΠϧDapp͕ීٴͨ͠ੈք
Ethereum 0x04 • EthereumΛษڧ࢝͠Ίͯ̍ϲ݄ • ʮϒϩοΫνΣʔϯΞϓϦέʔγϣϯ։ൃͷڭՊॻʯ
0x05 ໘ന͍
Go build something 0x06 ʮͱΓ͋͑ͣࣾԾ௨՟Ͱͭͬͯ͘ΈΔ͔ʯ
ΞδΣϯμ 0x07 • ࣾԾ௨՟Λ࡞ͬͯΈͨ • ϞόΠϧDapp։ൃʹඞཁͳ͜ͱ • ϥΠϒϥϦͷհ • ϞόΠϧDapp͕ීٴͨ͠ੈք
ࣾԾ௨՟Λ࡞ͬͯΈͨᶃ 0x08 ࣮ • ERC20ʹ४ڌͨ͠ಠࣗτʔΫϯͷൃߦ • ϓϥΠϕʔτϒϩοΫνΣʔϯ • JSONRPCܦ༝Ͱࢀর&τϥϯβΫ γϣϯͷൃߦ
ࣾԾ௨՟Λ࡞ͬͯΈͨᶄ 0x09 ͍ํ • ࣾһಉ࢜ͷૹۚ • ίʔώʔࣗ࡞ΦϑΟεάϦίͷ ࢧ͍ • ग़ࣾ࣌ؒͷه
• ࡿͷି͠ग़͠(IoTͱͷΈ߹Θͤ)
ࣾԾ௨՟Λ࡞ͬͯΈͨᶅ 0x0a ॴײ • ʮίʔώʔ1ഋ200ϝϧͰʯΈ͍ͨͳڞ௨୯Ґ͕Ͱָ͖͍ͯ͠ • ͍Ζ͍ΖαʔϏεΛ࡞ͬͯͷͤΔʹྑ͍࣮ݧ • ͔ࣾΒΞΠσΞ͕ͨ͘͞Μग़͖ͯͯՄೳੑΛײ͡Δ •
͍Ζ͍Ζ࡞͍͖͍ͬͯͨ
ΞδΣϯμ 0x0b • ࣾԾ௨՟Λ࡞ͬͯΈͨ • ϞόΠϧDapp։ൃʹඞཁͳ͜ͱ • ϥΠϒϥϦͷհ • ϞόΠϧDapp͕ීٴͨ͠ੈք
ϞόΠϧDappͱ 0x0c • ϒϩοΫνΣʔϯ্ʹߏஙͨ͠εϚʔτίϯτϥΫτΞϓ ϦέʔγϣϯΛ࣮ߦ͢ΔͨΊͷΫϥΠΞϯτΞϓϦ ϞόΠϧDapp ᶄεϚʔτίϯτϥΫτ ࣮ߦ ϒϩοΫνΣʔϯ ᶃ
τϥϯβΫγϣϯͷൃߦ (εϚʔτϑΥϯΞϓϦ)
ϒϥβDapp 0x0d • Webϒϥβ্Ͱಈ͘ • CryptoKittiesͷήʔϜ͕ྲྀߦத • MetaMaskΛ͏ͱγʔϜϨεʹૹۚͰ͖ΔͷͰ։ൃଆϢʔβʔଆ ศརʹ͑Δ
ϞόΠϧDapp 0x0d • Ͳ͏ͬͯ࡞Δʁ
࣮ύλʔϯ(JSONRPCܦ༝) 0x0f Ethereum Client Server (Wallet&Txॺ໊) ϞόΠϧDapp API Tx params
JSONRPC Signed Tx Ethereum Client Wallet App (Wallet&Txॺ໊) ϞόΠϧDapp URL Scheme? JSONRPC Signed Tx Ethereum Client ϞόΠϧDapp (Wallet&Txॺ໊) Tx params JSONRPC Signed Tx ᶃ αʔόʔͰΥϨοτཧ&Txൃߦ ᶄ ֎෦ΥϨοτΞϓϦ͔ΒTxൃߦ ᶅ ΞϓϦͰΥϨοτཧ&Txൃߦ
࣮ύλʔϯ(JSONRPCܦ༝) 0x10 Ethereum Client Server (Wallet&Txॺ໊) ϞόΠϧDapp API Tx params
JSONRPC Signed Tx Ethereum Client Wallet App (Wallet&Txॺ໊) ϞόΠϧDapp URL Scheme? JSONRPC Signed Tx Ethereum Client ϞόΠϧDapp (Wallet&Txॺ໊) Tx params JSONRPC Signed Tx ᶃ αʔόʔͰΥϨοτཧ&Txൃߦ ᶄ ֎෦ΥϨοτΞϓϦ͔ΒTxൃߦ ᶅ ΞϓϦͰΥϨοτཧ&Txൃߦ
ϞόΠϧDappʹඞཁͳཁૉ 0x0e • ΥϨοτ • ൿີ伴ΞυϨεͷੜ&ӬଓԽ • ABIύʔαʔ(✳ͨͩ͠ඞਢͰͳ͍) • ABI͔ΒίϯτϥΫτͷؔใΛऔಘ
• ؔγάωνϟͷϋογϡͱҾύϥϝʔλΛ࿈݁ͨ͠จࣈྻͷग़ྗ • Txੜͱॺ໊ • ൿີ伴Λ༻ͯ͠Txʹର͢Δॺ໊(ίϯτϥΫτʹରͯ͠มߋΛՃ͑Δ߹) • JSONRPCΫϥΠΞϯτ • EthereumΫϥΠΞϯτͱͷ௨৴(ϒϩοΫνΣʔϯͷࢀরTxൃߦͳͲ)
۩ମతͳϑϩʔ 0x11 • ERC20τʔΫϯͷtransferؔΛJSONRPCܦ༝ͰCall͢Δ 1. ΥϨοτ͔ΒΞυϨεͷੜ 2. ίϯτϥΫτͷؔγάωνϟͷsha3ϋογϡͱҾύϥϝʔλͷ256bitͷ16ਐจࣈྻ ͷ࿈݁ •
"0x" + "sha3(`transfer(address,uint256)`)" + "<ૹۚઌΞυϨε>" + "<ૹֹۚ>" • => τϥϯβΫγϣϯͷdataύϥϝʔλ 3. τϥϯβΫγϣϯੜ͠ɺൿີ伴Ͱॺ໊ 4. ॺ໊ͨ͠τϥϯβΫγϣϯΛRLPΤϯίʔσΟϯά => "0xf8aa0684ee6b280082d8...b50504ccf8721dafc7b47" 5. EthereumΫϥΠΞϯτʹରͯ͠JSONRPCͰeth_sendRawTransactionΛCall͢Δ > curl -X POST http://127.0.0.1:8545 --data `{ "jsonrpc": "2.0", "id": 1, "method": "eth_sendRawTransaction", "params": ["0xf8aa0684ee6b280082d8...b50504ccf8721dafc7b47"] }'
ΞδΣϯμ 0x12 • ࣾԾ௨՟Λ࡞ͬͯΈͨ • ϞόΠϧDapp։ൃʹඞཁͳ͜ͱ • ϥΠϒϥϦͷհ • ϞόΠϧDapp͕ීٴͨ͠ੈք
ϥΠϒϥϦ(iOS) 0x13 ΥϨοτ ABIύʔαʔ Txੜͱॺ໊ JSONRPC ΫϥΠΞϯτ web3swift (BANKEX/web3swift) ◦
passphrase/ BIP32,39,44 ◦ ◦ ◦ Geth Mobile (ethereum/go-ethereum) ◦ passphrase × ◦ × EthereumKit (yuzushiof/EthereumKit) ◦ BIP32,39,44 × ◦ ◦ ୯ҰػೳΛఏڙ͢ΔϥΠϒϥϦ: JSONRPCKit, RLP.swift, BigInt, CryptoSwift, etc... શ෦ͷͤܥϥΠϒϥϦ:
ΞδΣϯμ 0x14 • ࣾԾ௨՟Λ࡞ͬͯΈͨ • ϞόΠϧDapp։ൃʹඞཁͳ͜ͱ • ϥΠϒϥϦͷհ • ϞόΠϧDapp͕ීٴͨ͠ੈք
ϞόΠϧDapp͕ීٴͨ͠ੈքʁ 0x15 • ̍ਓ̍ΥϨοτ(ϝοηϯδϟʔΞϓϦͷΑ͏ʹʁ) • ͋ΒΏΔDapp͕εϚϗΛ௨ͯ͠ϒϩοΫνΣʔϯʹ • DecentralizedͳαʔϏεΛεϚϗ͔ΒڗडͰ͖Δੈք
ݱঢ়ͷ՝(ϞόΠϧDapp) 0x16 • πʔϧϥΠϒϥϦෆ • ࣗલͰ࣮ or Έ߹ΘͤΔඞཁ͕͋Δ • MetaMaskͷΑ͏ͳγʔϜϨεͳΥϨοτ͕ͳ͍
• ։ൃ͕ͮ͠Β͘ɺෆศͳ͜ͱ͕ଟ͍ • Ϣʔβʔ͕ѻ͍ʹ͍͘ • దͳUI/UX͕ଘࡏ͠ͳ͍ͷͰࡧ͕ඞཁ • ϞόΠϧͳΒͰͷ੍ͷதͰͷ࣮
·ͱΊ 0x17 • ϞόΠϧDapp͜Ε͔Β࢝·͍ͬͯ͘ • ΕΔ͜ͱͨ͘͞Μ͋Δ • ʮGo build somethingʯ͍ͯ͘͜͠ͱ͕ඞཁ
0x18 ͋Γ͕ͱ͏͍͟͝·ͨ͠ ͍͖ͬͯ