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
Blockchain x Slack botでピアボーナス
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ryo0301
August 21, 2020
Technology
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Blockchain x Slack botでピアボーナス
ryo0301
August 21, 2020
More Decks by ryo0301
See All by ryo0301
Quorum on AWS
ryo0301
0
660
国交省のデータをSolrで検索
ryo0301
3
1.3k
Other Decks in Technology
See All in Technology
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
3
1.6k
自律的なチームを作るためにTechPMがやらないこと
ny7760
1
520
Sinatra on PicoRuby ローカルでセルフホスト
bash0c7
0
100
Don't write the architecture only in the prompt.
neohsu
0
310
ゼロから作るWebアプリの新定番!?Amplify Gen 2 × AWS Blocksで実現する「開発速度とRDBの柔軟性のいいとこ取り」
amixedcolor
1
160
AIコーディングはじめました
miso
0
150
企画からFlutter実装まで、1つの機能を一貫して開発したプロセスと成果物
khiroyuki1003
1
160
E2Eってつらくないですか?E2Eの管理コストを下げる手段とその実践
akaboshinit
6
3k
超⼩型・多⾔語検索モデル Bekko Embedding
hotchpotch
1
110
生成AI時代のIAMのマニアックな話
takuros
6
2.5k
kintoneで在庫管理システムを作るときの要件定義・設計ポイント
kai0707
0
270
You Have Agency(サンキュー、Ruby)
snoozer05
PRO
5
690
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
529
40k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
370
GraphQLとの向き合い方2022年版
quramy
50
15k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Mind Mapping
helmedeiros
1
430
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
The SEO identity crisis: Don't let AI make you average
varn
0
630
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
BBQ
matthewcrist
90
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
WENDY [Excerpt]
tessaabrams
14
40k
Transcript
Blockchain x Slack bot で ピアボーナス
自己紹介 ❏ 物件検索エンジン ❏ AWS移行 ❏ 不動産情報コンソーシアム ADRE ❏ 社内通貨
LIFULL COIN 株式会社 LIFULL 秀野 亮 (@ryo0301)
目次 ❏ 社内通貨 LIFULL COIN ❏ 在宅勤務での課題 ❏ Slackでのピアボーナス機能 ❏
ブロックチェーンの送金の仕組み ❏ ピアボーナスの仕組み ❏ 余談:自作リバースプロキシ
社内通貨 LIFULL COIN
社内通貨 LIFULL COIN ❏ LIFULL COIN Wallet(口座管理アプリ) ❏ 残高の確認 ❏
送金と取引履歴 ❏ ベーシックインカム ❏ 投票(投げ銭)
動機:在宅勤務が始まって
在宅勤務でのコミュニケーション課題 ❏ コロナ禍で待望の在宅勤務が始まった ❏ コミュニケーションにまつわる課題 ❏ 周りが何やってるのかよくわからない ❏ 社会適合者の方々の精神が不安定に ピアボーナスとしてLIFULL
COINを送り合い、 状況の共有や、いいねができる仕組みを用意した
ピアボーナス
ピアボーナスの仕組み リアクション LIFULL COIN Bot リリース完了! (カチャカチャ..ターンッ イイネ
ブロックチェーンの送金の仕組み 秘密鍵 公開鍵 アカウント アドレス 0x123AbC… 0x123AbC… 署名 トランザクション (誰が/誰に/いくら)
0xZyx098…
スマートコントラクト
システム構成図
UI:アプリのホームタブ&メッセージタブ
UI:未登録者勧誘メッセージ&プロフィール登録モーダル
@slack/bolt 起動サンプル const options = { signingSecret: process.env.SLACK_SIGNING_SECRET, clientId: process.env.SLACK_CLIENT_ID,
clientSecret: process.env.SLACK_CLIENT_SECRET, stateSecret: process.env.SLACK_STATE_SECRET, scopes: require("../config/bot_scopes.json"), installationStore: new DynamoDBInstallationStore(), }; const app = new App(options); app.receiver.app.get("/", (_, res) => res.sendStatus(200)); app.event("reaction_added", reactionAddedListener); (async () => await app.start(3000))();
web3.js 送金サンプル const rawTx = { from: this.#account.address, to: this.#contract.options.address,
data: this.#contract.methods.proxyTransfer(to, val).encodeABI(), }; rawTx.gas = await this.#web3.eth.estimateGas(rawTx); const signedTx = await this.#account.signTransaction(rawTx); this.#web3.eth.sendSignedTransaction(signedTx.rawTransaction);
余談:開発用リバースプロキシ
ローカルでの開発にリバースプロキシは必須 ❏ ローカルのSlackアプリとSlack botの通信をどうするか? ❏ Slackアプリ → Slackサーバー → Slack
bot ❏ リバースプロキシ+リモートポートフォワーディング ❏ リバースプロキシサービス ❏ ngrok, serveo, localhost.runなどあるが社内の情報を流したくない ❏ serveo 止まってる・・・ ❏ 外部サービス利用申請だすのが面倒くさい&許可おりる気がしない AWS VPC上にリバースプロキシを立てることにした
気軽に立てて、気軽に死んで欲しい ❏ 機能 ❏ 自動DNS登録 ❏ 自動HTTPS ❏ 自動シャットダウン ❏
指定した上流ポートにプロキシ ❏ ホスト名/ドメイン名やシャットダウン待機時間は .env に設定 ❏ ワンライナーで起動できる $ yarn -s generate 2> /dev/null | aws ec2 run-instances --launch-template LaunchTemplateName=dev-reverse-proxy --user-data file:///dev/stdin
リモートポートフォワーディング ❏ EC2 Instance Connect ❏ 公開鍵を送信すると60秒間だけログインできる機能 ❏ Session Manager
❏ WebSocketをトンネルしてSSHできる機能 ❏ VPC Endpoint for Session Manager ❏ Basionサーバー不要でSSH接続できる ❏ ワンライナーで接続できるようにした $ saw ssm start-ssh-session --forward remote
None