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
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
650
国交省のデータをSolrで検索
ryo0301
3
1.3k
Other Decks in Technology
See All in Technology
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.3k
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
350
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
160
全PRの83%が AIレビューだけでマージできるようになった開発組織は その後どうなったか @2026/10
athug
0
130
Deep Data Security 機能解説
oracle4engineer
PRO
2
750
USB PDを使ってスマホを労わりたい
raspython3
0
120
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
680
SREでアラート疲れを 解決しよう!
kairim0
1
220
自律型 AI をセキュアに実装!Gemini と MIG で作る動的コード実行環境
recruitengineers
PRO
1
240
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
120
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
140
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
4 Signs Your Business is Dying
shpigford
187
23k
How STYLIGHT went responsive
nonsquared
100
6.3k
From π to Pie charts
rasagy
1
390
New Earth Scene 8
popppiees
4
2.7k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
980
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
470
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
260
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