Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Centralized Dapps to read from Dapps game
biga816
July 19, 2018
Technology
1
1.6k
Centralized Dapps to read from Dapps game
biga816
July 19, 2018
Tweet
Share
More Decks by biga816
See All by biga816
BlockchainTokyo23.pdf
biga816
1
310
BuidlMeetupVol2.pdf
biga816
0
17
Service Worker Cache Problems
biga816
0
1k
Consider how distributed IPFS is
biga816
2
2.9k
Usage of ethereum libraries for dapps
biga816
0
4.1k
Other Decks in Technology
See All in Technology
RDRA + JavaによるレジャーSaaSプロダクトの要件定義と実装のシームレスな接続
jjebejj
PRO
3
760
Meet passkeys
satotakeshi
1
130
Introduction To Technical Writing
olawanle_joel
0
100
Custom GitHub Actions by Java
kazamori
0
290
モブに早く慣れたい人のためのガイド / A Guide to Getting Started Quickly with Mob Programming
cybozuinsideout
PRO
2
1.9k
History of the ML system in KARTE
kargo113
1
660
【Pythonデータ分析勉強会#33】「DearPyGuiに入門しました」の続き~Image-Processing-Node-Editor~
kazuhitotakahashi
0
180
OPENLOGI Company Profile
hr01
0
670
miisan's career talk
mii3king
0
230
【toranoana.deno#7】Denoからwasmを呼び出す基礎
toranoana
0
130
Strategyパターン
hankehly
0
160
Design for Humans: How to make better modernization decisions
indualagarsamy
2
130
Featured
See All Featured
WebSockets: Embracing the real-time Web
robhawkes
57
5.3k
How To Stay Up To Date on Web Technology
chriscoyier
780
250k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
181
15k
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
213
11k
What the flash - Photography Introduction
edds
62
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
The Cult of Friendly URLs
andyhume
68
4.8k
Designing Experiences People Love
moore
130
22k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
172
8.4k
Support Driven Design
roundedbygravity
86
8.5k
Intergalactic Javascript Robots from Outer Space
tanoku
261
25k
Infographics Made Easy
chrislema
233
17k
Transcript
Dappsゲームから読み解く CentralizedなDapps Akihiro Tanaka(@biga816)
⾃⼰紹介 • 元AccentureのWeb&Mobileエンジニア • Trident Artsチーフエンジニア • DApps絶賛開発中
DAppsゲームは 本当にDecentralizedなのか?
DAppsとは • ⾮中央集権型アプリケーション(Decentralized Applications) • 以下の3つの定義を満たす(byビットコイン研究所ブログ) 1. アプリケーションは、オープンソースであること。オペレーションは⾃動であり、中央のコ ントロール主体を持たないこと。トークン、データ、レコード、などにつき、暗号化されて 分散化されたブロックチェーンを利⽤していること。
2. アプリケーションは、オープンに流通可能な、暗号トークンを持っていること。アプリケー ションの利⽤に際してトークンを利⽤すること。参加者には、そのトークンによってリワー ド(報酬)が⽀払われること。 3. アプリケーションはマーケットやユーザーからの改善要求によりプロトコルを改善していく こと。この改善は、ユーザーのコンセンサスによること。 <参考>http://doublehash.me/what-is-dapps/
CryptokittiesとEtheremonのシステム構成 からDappsの姿を読み解いてみる
Cryptokittiesのシステム構成 Webサーバ (express, react) APIサーバ My Kitties Marketplace App Kitty
Detail (Breed, Sell, Gift) ファイルサーバ GCP Client ERC721 Node (Metamask) DB バッチ 処理?? ERC721 Node (Own node? Infura?) web3.js
Cryptokittiesのコントラクト contract KittyAccessControl { event ContractUpgrade(address newContract); address public ceoAddress;
address public cfoAddress; address public cooAddress; bool public paused = false; modifier onlyCEO() { require(msg.sender == ceoAddress); _; } modifier onlyCFO() { require(msg.sender == cfoAddress); _; } modifier onlyCOO() { require(msg.sender == cooAddress); _; } modifier onlyCLevel() { require( msg.sender == cooAddress || msg.sender == ceoAddress || msg.sender == cfoAddress ); _; } : : modifier whenNotPaused() { require(!paused); _; } modifier whenPaused { require(paused); _; } function pause() external onlyCLevel whenNotPaused { paused = true; } function unpause() public onlyCEO whenPaused { paused = false; } }
Etheremonのシステム構成 My Monstar Market App Battle ファイルサーバ Client ERC721 Node
(Metamask) DB バッチ 処理?? ERC721 Node (Own node? Infura?) web3.js Webサーバ (react) APIサーバ
Etheremonのコントラクト contract BasicAccessControl { address public owner; uint16 public totalModerators
= 0; mapping (address => bool) public moderators; bool public isMaintaining = true; function BasicAccessControl() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyModerators() { require(moderators[msg.sender] == true); _; } modifier isActive { require(!isMaintaining); _; } function ChangeOwner(address _newOwner) onlyOwner public { if (_newOwner != address(0)) { owner = _newOwner; } } : : function AddModerator(address _newModerator) onlyOwner public { if (moderators[_newModerator] == false) { moderators[_newModerator] = true; totalModerators += 1; } } function RemoveModerator(address _oldModerator) onlyOwner public { if (moderators[_oldModerator] == true) { moderators[_oldModerator] = false; totalModerators -= 1; } } function UpdateMaintaining(bool _isMaintaining) onlyOwner public { isMaintaining = _isMaintaining; } }
%ecentralized "QQlications →$entralized "QQlications
DApps(CApps)とは • ⾮中央集権型アプリケーション(Decentralized Applications) • ブロックチェーンを活⽤したアプリケーション 1. ⾮中央集権型に設計することが可能である。(ただし、多くのDAppsゲームは中央集権型の設 計) 2.
⾮改ざん性や透明性といったブロックチェーンの特性を⽣かしている。
⾯⽩い(クソみたいな) DApps作ろうぜ!
Thank you Twitter: @biga816 Qiita: biga816