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
MCH Hackathon技術情報 / MCH Hackathon API
Search
Ryo Manzoku
April 20, 2019
Programming
0
470
MCH Hackathon技術情報 / MCH Hackathon API
2019-04-20 開催されたHackthon向けAPI情報です。
Ryo Manzoku
April 20, 2019
Tweet
Share
More Decks by Ryo Manzoku
See All by Ryo Manzoku
ブロックチェーンゲーム開発におけるチェーンの選び方 / How to select a blockchain for BCG
rmanzoku
0
530
NFTを取り巻く技術要素とAWS利活用 / Technology and AWS of NFT
rmanzoku
0
900
NFTを中心とした新しいゲームの形 / The new approach of gaming with NFT
rmanzoku
0
410
NFTへの招待 / Invitation to NFT
rmanzoku
0
1.5k
Stringをどうにかする / Managing Solidity String
rmanzoku
0
1.2k
ブロックチェーン時代の認証 / Authentication in the Blockchain Era
rmanzoku
8
3k
ERC-721をかぞえて / Enumerate ERC-721
rmanzoku
3
8k
MCH+ Hackathon #1
rmanzoku
0
290
AWS上で動く世界No.1ブロックチェーンゲーム / No1 Blockchain Game on AWS
rmanzoku
1
2.9k
Other Decks in Programming
See All in Programming
Outline View in SwiftUI
1024jp
1
340
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
110
受け取る人から提供する人になるということ
little_rubyist
0
250
flutterkaigi_2024.pdf
kyoheig3
0
160
Djangoの開発環境で工夫したこと - pre-commit / DevContainer
hiroki_yod
1
120
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1k
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
280
cmp.Or に感動した
otakakot
3
230
CSC509 Lecture 12
javiergs
PRO
0
160
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
610
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Six Lessons from altMBA
skipperchong
27
3.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Code Reviewing Like a Champion
maltzj
520
39k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
RailsConf 2023
tenderlove
29
900
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Being A Developer After 40
akosma
87
590k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Transcript
Hackthonٕज़ใ 2019–04-20 MCH Hackathon @rmanzoku
ҙ ͜͜Ͱհͨ͠ͷΛඞͣΘͳ͚ΕͳΒͳ͍Θ͚Ͱ͋ Γ·ͤΜɻ Ұ෦API͜ͷϋοΧιϯͷͨΊʹ࡞ͨ͠ͷͰ͢ɻ༧ࠂ ͳ͘มߋɺআ͞ΕΔ߹͕͋Γ·͢ɻ GitHubʹެ։ࡁΈ https://github.com/doublejumptokyo/mch-hackathon ͨΓલͷઆ໌Βͳ͍୯ޠ͕ͰΔ͔͠Ε·ͤΜ͕ɺ͜ ͷ͋ͱϝϯλʔͷํʑʹ࣭ͯ͠Έ͍ͯͩ͘͞ɻ
MyCryptoHeroesʹ͍ͭͯ
MyCryptoHeroes͓͞Β͍ ERC721ΛͬͨHero / Extension / LandSectorͷ Ethereum্ͷAsset Ethereum্Ͱͷॴ༗ݖΛӡӦॴ༗ͷεϚʔτίϯτ ϥΫτʹ༬͚Δ͜ͱͰɺCryptoWorldʢήʔϜʣͰ ར༻ՄೳʹͳΔʢLandSectorྫ֎ʣ
ήʔϜͷใҰ෦ެ։APIΛ௨ͯ͠ࢀরͰ͖Δ
MyCryptoHeroes͓͞Β͍ ϢʔβʔήʔϜʹUserIDΛ͍࣋ͬͯΔ UserIDͱEthereumΞυϨεΛඥ͚ͮͯཧ͍ͯ͠Δ EthereumΞυϨεΛެ։͢ΔػೳʹΑΓɺ༗ޮͳ ϢʔβʔEthereumΞυϨε͔ΒϢʔβʔใΛऔ ಘͰ͖Δ
ERC 721 / Metadata
ERC 721 Ethereumͷඪ४ن֨ͷҰͭͰNon-Fungible TokenʢNFTʣΛنఆ ͨ͠ΠϯλʔϑΣʔε NFTͱɺସෆՄೳͳͷ CryptoKittiesΛൃʹEthereum্ͰToken/Assetͷॴ༗ݖͳͲΛنఆ ࢀর࣮ͱͯ͠OpenZeppelinOSͷͷ͕༗໊ CryptoZombiesERC721 ERC20ͱൺֱ͞ΕΔ
ERC721 ར༻Πϝʔδ MCHΞηοτOpenZeppelinΛར༻ͨ͠ERC721ʹ ४ڌ͍ͯ͠ΔͷͰɺ͘ΘΕΔERC721ͱͯ͠ར༻ Ͱ͖Δ ϨϯσΟϯάͳͲ
ERC 721 Metadata MCHͷHero͕HeroͨΒ͠Ί͍ͯΔϝλใ Heroͷ໊લϨϕϧɺύϥϝʔλͳͲ ΦϑνΣʔϯใΛ͑ΔJSON APIͰ͋Δ͜ͱ͕ଟ͍ OpenSeabazaaar.ioͳͲ͜ͷใΛऔಘͯ͠දࣔͯ͠ ͍Δ MCH+Ͱɺ͜ͷMetadataΛ֦ு͢Δ͜ͱʹΑͬͯΞ
ηοτʹ͍ΖΜͳՁΛՃ͍͚ͯ͠ΔͷͰͳ͍͔
ERC 721 Metadata Hero https://www.mycryptoheroes.net/metadata/heroes/ 50010001 Extension https://www.mycryptoheroes.net/metadata/extensions/ 50010001 LandSector
https://www.mycryptoheroes.net/metadata/ landSectors/50010001
MCHใऔಘܥAPI
Ξηοτʹؔ͢ΔใAPI Skillઆ໌จͳͲͷऔಘ https://www.mycryptoheroes.net/experimental-api/skill/ 1001 HeroTypeͷऔಘ https://www.mycryptoheroes.net/experimental-api/ heroType/5001 ExtensionTypeͷऔಘ https://www.mycryptoheroes.net/experimental-api/ extensionType/5001
ϢʔβʔใAPI UserID͘͠EthereumΞυϨεͰϢʔβʔΛݕࡧ https://www.mycryptoheroes.net/experimental-api/ proxy/mch/users/10001 https://www.mycryptoheroes.net/experimental-api/ proxy/mch/users/ 0xd868711BD9a2C6F1548F5f4737f71DA67d821090 ޙऀEthreaumΞυϨεΛެ։͍ͯ͠Δ߹ͷΈ༗ޮ
MCHใऔಘܥAPIΠϝʔδ ਤؑότϧγϡϛϨʔλʔͳͲ
MarkingContract
Ethereum্ͰϢʔβʔใΛ͏ ʮϢʔβʔใʯ͋͘·ͰΦϑνΣʔϯͷใ Ethereum্ͰใΛѻ͏͜ͱ͕Ͱ͖ͳ͍ ϢʔβʔͷҙͰEthereum্ͷεϚʔτίϯτϥΫ τใΛॻ͖ࠐΈͰ͖ΔػೳΛՃ MarkingContractʢԾশʣΛσϓϩΠࡁΈ ։࢝࣌Ͱ50ਓҎ্ͷϢʔβʔ͕ެ։͍ͯ͠Δ
MarkingContractʢԾশʣ https://etherscan.io/address/ 0x0085C150c1eb0e084E50a80beA91bc414AA6cbaa ΦϑνΣʔϯͷϢʔβʔใΛهͨ͠ίϯτϥΫ τ ͋ΔEthereumΞυϨεͷϢʔβʔใɺPrime༗ແɺ Landॴଐใ͕औಘͰ͖Δ ϥϯυॴଐऀͷΞυϨεҰཡऔಘՄೳ
MarkingContractར༻Πϝʔδ ಁ໌ੑͷ͋ΔநબίϯτϥΫτ ϥϯυϝϯόʔઐ༻ϖʔδ MarkingContractʹใΛ͢͜ͱͰʓʓ͕Ͱ͖Δͱ ͍͏Ҋܴ GitHubʹιʔείʔυެ։ࡁΈ
֦ுMetadata
Ձ༰MetadataͰࢀরͰ͖Δ ΞηοτͷMetadataΛՃͰ͖Δ͜ͱͰɺMCHӡӦ Ҏ֎͕ՁΛ༩Ͱ͖Δ Ձ͕Ξηοτʹू·Δ͜ͱͰɺ༷ʑͳαʔϏεͷ HubʹͳΔ Ξηοτ͕ܧଓՄೳͳͷͱͯ͠ՁΛ࣋ͭΑ͏ʹ
Plus Meta APIʢԾশʣ ʮΞηοτͷՁ༰MetadataͰࢀরͰ͖Δʯͱ ͍͏ߟ͑ʹج͖ͮɺʮՁ༰ΛMetadataͱͯ͠ొ Ͱ͖ΔʯAPI ͜͜ͰMCHҰͭͷMetadataͰ͔͠ͳ͍
Plus Meta APIొ POST https://www.mycryptoheroes.net/experimental- api/plusmeta/heroes/50010001 { "iss": "0xd868711BD9a2C6F1548F5f4737f71DA67d821090", "metadata":
{ "sub": "my crypto derbies", "aud": [ "https://example.com/" ], "name": "deeeeep blue", "description": "͍͢͝", "attributes": { "hp": 100, "speed": 100, "skill": [ "dart", "sunny" ], "kind": "Mare" } } }
Plus Meta APIऔಘ GET https://www.mycryptoheroes.net/experimental- api/plusmeta/heroes/50010001
Plus Meta APIར༻Πϝʔδ MCHΞηοτΛͬͨϛχήʔϜͷ࡞ͱͦͷύϥ ϝʔλొ ΞηοτऔҾॴͳͲʹΑΔ৽ணใͷొ
࠶ҙࣄ߲ ͜͜Ͱհͨ͠ͷΛඞͣΘͳ͚ΕͳΒͳ͍Θ͚Ͱ͋ Γ·ͤΜɻ Ұ෦API͜ͷϋοΧιϯͷͨΊʹ࡞ͨ͠ͷͰ͢ɻ༧ࠂ ͳ͘มߋɺআ͞ΕΔ߹͕͋Γ·͢ɻ GitHubʹެ։ࡁΈ https://github.com/doublejumptokyo/mch-hackathon ͨΓલͷઆ໌Βͳ͍୯ޠ͕ͰΔ͔͠Ε·ͤΜ͕ɺ͜ ͷ͋ͱϝϯλʔͷํʑʹ࣭ͯ͠Έ͍ͯͩ͘͞ɻ
None