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
BlockchainHackathon2019 ワークショップ ~ Twitterとブロックチ...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
daisuke sato
February 09, 2019
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BlockchainHackathon2019 ワークショップ ~ Twitterとブロックチェーンを使ったアイデンティフィケーションの実現~
このスライドは、経産省主催のブロックチェーンハッカソン2019のワークショップで使用されたスライドです。
daisuke sato
February 09, 2019
More Decks by daisuke sato
See All by daisuke sato
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
830
社内仮想通貨をモバイルDappとしてつくってみた
daisuke310vvv
1
3.1k
Other Decks in Technology
See All in Technology
Kiro Crewをはじめよう
kizawa2020
1
100
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
670
AIに攻撃される前に、AIに攻撃させる
tsuchikazu
0
160
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
290
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
1
130
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
120
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
550
購入ドメインでの課題と取り組み
ykagano
0
150
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
320
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
220
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
570
Featured
See All Featured
Accessibility Awareness
sabderemane
1
240
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Facilitating Awesome Meetings
lara
57
7.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
New Earth Scene 8
popppiees
4
2.7k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
The Language of Interfaces
destraynor
162
27k
Building an army of robots
kneath
307
47k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Transcript
Blockchain Hackathon 2019 Daisuke Sato
ࣗݾհ • ࠤ౻ େี • Co-Founder and CTO at Popshoot,
Inc • iOS/αʔόɾΠϯϑϥ
Popshoot, Inc • ۀ3 • ϞόΠϧΞϓϦͷ։ൃɾӡ༻ • ΠʔαϦΞϜ
ϋϯζΦϯͷత 1. gethoΛͬͯεϜʔζͳDApp։ൃ͕Ͱ͖ΔΑ͏ʹͳΔ 2. ࣮ࡍʹDApp։ൃΛମݧ͢Δ͜ͱͰϋοΧιϯͷ͕͔Γͱ ͢Δ
λΠϜεέδϡʔϧ • 10: gethoͱࠓ࡞Δͷʹ͍ͭͯ • 20: ϋϯζΦϯ • 15: ࣭ٙԠ&Ճ՝
• 05: ·ͱΊ
ࢿྉ • ࠓͷεϥΠυࢿྉ • ϋϯζΦϯ༻ͷϨϙδτϦ github.com/popshootjapan/blockchain_hackathon_2019 • slackνϟϯωϧ #getho-ws ※
νϟϯωϧͰ࣭͋Είϝϯτ͍ͯͩ͘͠͞
ҙ 1. python3ܥͩͱϥΠϒϥϦ͕ϏϧυͰ͖·ͤΜ • python2ܥΛ͏Α͏ʹ͍ͯͩ͘͠͞(PATHΛม͑Δ) 2. ϋϯζΦϯ༻ʹ४උͨ͠ͷશͯ։ൃڥԼΛఆ͍ͯ͠ ·͢ͷͰɺຊ൪Ͱ༻͠ͳ͍Ͱ͍ͩ͘͞
gethoʹ͍ͭͯ
gethoͱ DApp։ൃͷͨΊͷ։ൃϓϥοτϑΥʔϜ
ςετ༻ͷϓϥΠϕʔ τϊʔυ ίϯτϥΫτͷσϓϩΠઌͱ ͯ͠༻Ͱ͖ɺνʔϜͰڞ༗ Մೳɻ
εϚʔτίϯτϥΫτ ͷGUI࣮ߦڥ ίϯτϥΫτͷؔΛGUI্ Ͱ࣮ߦՄೳ
ͦͷଞ • HTTP/WebScoketରԠ • σϑΥϧτΞΧϯτʹ100ETH • CLI • ※ϊʔυ4࣌ؒͰҰ࣌ఀࢭ(࠶ىಈՄ)
ࠓ࡞Δͷ TwitterͱϒϩοΫνΣʔϯΛͬͨΞΠσϯςΟϑΟέʔγϣ ϯͷ࣮ݱ ؆୯ʹ͍͏ͱ, ࣗͷΞυϨεͷূ໌ΛTwitterΛ࣮ͬͯݱ͢Δ
ΞυϨεͷূ໌ʁ • ༑ୡʹૹ͍ۚͨ࣌͠ʹɺڭ͑ΒΕͨΞυϨε͕ຊʹͦͷਓ ͷͷ͔Ͳ͏͔Λূ໌͢Δʹʁ • ͦͷΞυϨεͱൿີ伴ʹΑΔॺ໊ͷݕূ͕Ͱ͖ͨιʔγϟϧ ΞΧϯτͱඥ͍͍ͮͯΕɺͦͷΞυϨεͷΛূ໌͢ Δ͜ͱ͕Ͱ͖Δ • ඥͮ͘ιʔγϟϧΞΧϯτͷ͕૿͑Δ΄ͲɺͦͷΞυϨ
εͷ৴པ্͕͍ͬͯ͘
ొϑϩʔ 1. ࣗͷTwitterΞΧϯτID(ྫ: @st_dsk)ʹରͯ͠ΥϨοτ ΞυϨεͷൿີ伴Ͱॺ໊ 2. ॺ໊ͨ͠จࣈྻΛTwitterʹߘ 3. πΠʔτURL͔Βॺ໊Λऔಘ͠ɺͦͷॺ໊ͱTwitterΞΧϯ τIDΛίϯτϥΫτͷొ༻ؔʹ͛Δ
4. ίϯτϥΫτͰݕূ͠ɺޭ͢ΕΥϨοτΞυϨεͱ TwitterΞΧϯτIDΛඥ͚ͮͯϒϩοΫνΣʔϯʹॻ͖ࠐΉ
Demo
ϋϯζΦϯ
gethoΞΧϯτ࡞ getho.ioʹΞΫηε͠ɺΞΧϯτͷొ
gethoμογϡϘʔυ ઐ༻ͷϓϥΠϕʔτϊʔυͱυϝΠϯ͕࡞ΒΕ·͢
ϋϯζΦϯ༻ͷϨϙδτϦΛ४උ URL: github.com/popshootjapan/blockchain_hackathon_2019 ϨϙδτϦͷμϯϩʔυ $ git clone
[email protected]
:popshootjapan/ blockchain_hackathon_2019.git ґଘϥΠϒϥϦͷΠϯετʔϧ
$ npm install (※ python2ܥඞਢ)
TwitterIdentifyίϯτϥΫτ ./contracts/TwitterIdentify.sol contract TwitterIdentify { // ΞυϨεͱTwitterΞΧϯτIDͷmapping mapping(address => string)
public twitterIdentifications; function identify(string twitterId, bytes32 hash, bytes signature) public { ... } function ecverify(bytes32 hash, bytes signature) internal pure returns(address sig_address) { ... } }
ίϯτϥΫτσϓϩΠ ./migrations/2_deploy_TwitterIdetify.js var TwitterIdentify = artifacts.require("./TwitterIdentify.sol"); module.exports = function(deployer) {
deployer.deploy(TwitterIdentify); };
ίϯτϥΫτσϓϩΠ ※<YOUR SUBDOMAIN>ͷ෦Λॻ͖͍͑ͯͩ͘͞ ./truffle-config.js module.exports = { networks: { getho:
{ host: "<YOUR SUBDOMAIN>.getho.io/jsonrpc", port: 80, network_id: 1010, gas: 4712388 } } }
ίϯτϥΫτσϓϩΠ $ ./node_modules/.bin/truffle migrate --network getho
μογϡϘʔυ্ͰTx֬ೝ͕Ͱ͖·͢
webαʔόىಈ <YOUR SUBDOMAIN>ͱ<CONTARCT ADDRESS>Λॻ͖͑ ͍ͯͩ͘͞ ./app.js var web3 = new
Web3('http://<YOUR SUBDOMAIN>.getho.io:80/jsonrpc'); const contractAddr = '<CONTRACT ADDRESS>';
webαʔόىಈ $ node app.js αʔό্ཱ͕͕ͪΔͱɺ http://localhost:3000ʹΞΫηεͰ͖·͢
gethoʹίϯτϥΫτΞοϓϩʔυ ϩάΠϯ $ ./getho_osx login ϊʔυҰཡऔಘ $ ./getho_osx nodes ίϯτϥΫτͷΞοϓϩʔυ
$ ./getho_osx upload ./builds/contracts/ TwitterIdentify.json -s <YOUR SUBDOMAIN>
gethoʹίϯτϥΫτΞοϓϩʔυ μογϡϘʔυʹՃ͞Ε·͢(※ը໘ӈԼ)
GUIͰ࣮ߦ ؔͷ࣮ߦ͕Ͱ͖·͢
࣭ٙԠ&Ճ՝ • ίϯτϥΫτʹॺ໊ͨ͠URLΛอ࣋͢Δ • ॺ໊ͨ͠URLͷϦϯΫΛWeb্ʹදࣔͤ͞Δ (※ ͑ͷ࣮additional_practiceϒϥϯνʹ͋Γ·͢)
·ͱΊ • gethoͷհ • ࣗͷΞυϨεͷূ໌ΛTwitterΛ࣮ͬͯݱ͢ΔDApp ։ൃϋϯζΦϯ
͋Γ͕ͱ͏͍͟͝·ͨ͠ ϋοΧιϯ͕Μ͍ͬͯͩ͘͞!