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
最近のweb3.js事情 / bc.tokyo-19
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
odanado
PRO
May 24, 2019
Programming
560
2
Share
最近のweb3.js事情 / bc.tokyo-19
odanado
PRO
May 24, 2019
More Decks by odanado
See All by odanado
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
3
5.5k
@nestjs/bull の活用について
odanado
PRO
0
1.6k
クラウド KMS の活用 / TOKYO BLOCKCHAIN TECH MEETUP 2022
odanado
PRO
0
1.3k
Vue.observable で状態管理 / vue-observable-state-management
odanado
PRO
4
2.1k
nuxtjs-axios-error-handling
odanado
PRO
0
410
ブロックチェーンアプリのトランザクションに対するデータ分析 / PyCon-JP-2019
odanado
PRO
0
460
スマートコントラクトに対する既知の攻撃とその対策 / bc.tokyo-21
odanado
PRO
0
280
YAPC::Tokyo 2019に スタッフ参加してみて / kichijojipm-18
odanado
PRO
1
2.4k
JavaScript + Dockerの知見 / knowledge-of-docker-in-javascript
odanado
PRO
9
55k
Other Decks in Programming
See All in Programming
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1k
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
190
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
130
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
140
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
12
3.2k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
270
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
AIエージェントの隔離技術の徹底比較
kawayu
0
450
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
510
CSC307 Lecture 17
javiergs
PRO
0
310
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
320
Marketing to machines
jonoalderson
1
5.3k
Writing Fast Ruby
sferik
630
63k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
260
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
160
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
WCS-LA-2024
lcolladotor
0
610
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Transcript
最近のweb3.js事情 1 blockchain.tokyo#19 @odan3240
自己紹介 • Twitter: @odan3240 • ソフトウェアエンジニア ◦ フロントエンド ◦ AWS
◦ ブロックチェーン • 会社: モバイルファクトリー ◦ チーム: ブロックチェーンチーム ◦ DApssを身近にするUniqys Projectをやっている 2
web3.jsとは • Ethereum JavaScript API • Ethereumのノードと通信する君 ◦ JSON-RPCで会話 ▪
https://github.com/ethereum/wiki/wiki/JSON-RPC 3 トランザクションを送信する例
web3.jsの仕組み • 大きく分けて2つ ◦ JSON RPCの呼び出し ▪ provider という ▪
dapp ブラウザはこの機能を提供 ◦ JSON RPCの機能をJSの関数として提供 4
web3.js v1.0.0-beta.x • 2017年の7月頃から開発されている(?) • 最新は v1.0.0-beta.55 • beta版でバグがあることも... ◦
blockchain.tokyo#15のecouffes_さんのスライド 5
callback -> promise • JSON RPCの実行結果を受け取るのに callback関数を渡していた ◦ JavaScriptの昔のやり方 ◦
0.20.xまで現役 • v1.0.0-beta.xでは結果を promiseとして返すようになった 6
EIP 1193 • EIP 1193: Ethereum Provider API • provider.sendの
新しいinterfaceの提案を含んでいる • 旧 • 新 7
TypeScript対応 • v1.0.0-beta.38辺りから 型定義ファイルが提供され始めた ◦ 嬉しい • 単にJavaScriptを書いている時でもVS Codeで 関数や引数がサジェストされる
• またに間違っている... 8
Module API • v1.0.0-beta.54から入った ◦ https://web3js.readthedocs.io/en/1.0/web3-module.html • 独自のWeb3 モジュールを実装するためのAPI •
web3.ethなどの内部モジュールは すべてこのModule APIを使って書き直された • 使ってみた ◦ odanado/js-eth-personal-sign-examples-clone 9