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
daisuke sato
March 09, 2018
Technology
1
3k
社内仮想通貨をモバイルDappとしてつくってみた
Hi-Ether Meetup - Block #1
daisuke sato
March 09, 2018
Tweet
Share
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
400
getho ~ Ethereum private nodes, tailored for you. ~
daisuke310vvv
0
800
Other Decks in Technology
See All in Technology
フレームワークを意識させないワークショップづくり
keigosuda
0
110
ComposeではないコードをCompose化する case ビズリーチ / DroidKaigi 2025 koyasai
visional_engineering_and_design
0
110
Simplifying Cloud Native app testing across environments with Dapr and Microcks
salaboy
0
150
AI駆動開発を推進するためにサービス開発チームで 取り組んでいること
noayaoshiro
0
260
小学4年生夏休みの自由研究「ぼくと Copilot エージェント」
taichinakamura
0
680
Git in Team
kawaguti
PRO
3
360
神回のメカニズムと再現方法/Mechanisms and Playbook for Kamikai scrumat2025
moriyuya
4
740
スタートアップにおけるこれからの「データ整備」
shomaekawa
2
440
[Codex Meetup Japan #1] Codex-Powered Mobile Apps Development
korodroid
2
500
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
210
社内報はAIにやらせよう / Let AI handle the company newsletter
saka2jp
8
1.4k
JAZUG 15周年記念 × JAT「AI Agent開発者必見:"今"のOracle技術で拡張するAzure × OCIの共存アーキテクチャ」
shisyu_gaku
1
160
Featured
See All Featured
Docker and Python
trallard
46
3.6k
Thoughts on Productivity
jonyablonski
70
4.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
3
380
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
How to Ace a Technical Interview
jacobian
280
24k
For a Future-Friendly Web
brad_frost
180
9.9k
KATA
mclloyd
32
15k
Six Lessons from altMBA
skipperchong
28
4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Building an army of robots
kneath
306
46k
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 ͋Γ͕ͱ͏͍͟͝·ͨ͠ ͍͖ͬͯ