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
Ethers.jsでDAppの開発入門
Search
Shunp
October 12, 2021
Programming
180
2
Share
Ethers.jsでDAppの開発入門
FukuokaJSというコミュニティでLT登壇させてもらった時の資料です。
ブロックチェーン初心者向けです!JSの話少なめ。。。
登壇楽しかったです、ありがとうございました!!
Shunp
October 12, 2021
Other Decks in Programming
See All in Programming
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
220
OSもどきOS
arkw
0
400
ふつうのFeature Flag実践入門
irof
7
3.5k
Lessons from Spec-Driven Development
simas
PRO
0
140
GitHub Copilot CLIのいいところ
htkym
2
1.3k
3Dシーンの圧縮
fadis
1
600
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
540
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1.1k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
3.7k
Inside Stream API
skrb
1
630
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
710
net-httpのHTTP/2対応について
naruse
0
440
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
830
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Deep Space Network (abreviated)
tonyrice
0
160
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Balancing Empowerment & Direction
lara
6
1.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
A designer walks into a library…
pauljervisheath
211
24k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Transcript
2021/10/12 Shunpei Ito Ethers.jsͰDAppͷ։ൃೖ ˌ14 FukuokaJS
ࠓͷྲྀΕ ࣗݾհ DAppͬͯԿʁ Ethers.jsʹ͍ͭͯ Metamaskͱܨ͙ NFTΛൃߦͯ͠ΈΑ͏ʂ
ࣗݾհ Introduction
ࣗݾհ Shumpei Ito 1996ੜ·Ε झຯόεέɺαʔϑΟϯ ւ֎ཱྀߦʹ݁ߏߦͬͯͨ ॳΊͯϓϩάϥϛϯάΛ৮ͬͯ͏͙͢1 @shunpg0305
ࣗݾհ Ӧۀ̍ IT෦̍ ݄̐ʙΤϯδχΞ
DAppͬͯԿʁ What is Dapp?
DApp (Decentralized Application) ࢄܕΞϓϦέʔγϣϯ (DApp) Blockchain ී௨ͷΞϓϦέʔγϣϯ (தԝूݖܕ App) αʔόʔ
௨ৗͷΞϓϦͱԿ͕ҧ͏ͷ͔ʁ ɾࢄཧʹΑͬͯৗʹՔಇ͠ଓ͚ΒΕΔ ɾใ͕վ͟Μ͞ΕΔϦεΫ͕େ͖ܰ͘ݮ͞ΕΔ ɾҰσϓϩΠ͞ΕΔͱίʔυΛมߋͰ͖ͣɺ ɹΞοϓσʔτʹϢʔβͷ߹ҙΛͱͬͨΓ͢Δ < ͜Μͳ՝͋Δ > ɾτϥϯβΫγϣϯ͕͔ͬͨΓ ɾར༻खྉ͕ߴಅ͍ͯͨ͠Γ
DAppͷ׆༻ࣄྫ ϒϩοΫνΣʔϯήʔϜ - Crypto Kitties ೣΛചങɺަ͚ͯࣗͩ͠ͷೣ(NFT) ΛूΊΔҭܥήʔϜ ଞͷήʔϜʹ͜ͷೣNFT͕͑ͨΓ
ࠓճͷDAppͷߏ ΫϥΠΞϯτଆ ϒϩοΫνΣʔϯଆ
Ethers.jsʹ͍ͭͯ About Ethers.js
Ethers.js EthereumϒϩοΫνΣʔϯͷσʔλΛૢ࡞͢ΔͨΊͷϥΠϒϥϦ Ethers.jsͰग़དྷΔ͜ͱ ɾൿີ伴ΛΫϥΠΞϯτʹ҆શʹอ ɾχʔϞχοΫ (จࣈྻ͔Βൿີ伴Λ࡞) ɾίϯτϥΫτABI͔ΒJSͷΦϒδΣΫτΛ࡞ ɾTypeScriptʹશରԠ ͳͲͳͲ ɹࣅͨΑ͏ͳϥΠϒϥϦͰweb3.js͕͋Δ
Ethers.js ࠓճEthersͰ࡞ͬͨWalletͰͳ͘ɺMetamaskΛ༻͠·͢ʂ Ethers.jsͰWalletΛ࡞ΕΔ
Metamaskͱܨ͙ Connecting with Metamask
Metamask • ϒϩοΫνΣʔϯήʔϜͱ͔NFTϚʔέοτͰ͑Δ • ෳͷΞΧϯτ͕Ͱ͖ͨΓ • τʔΫϯΛૹ৴ͨ͠Γ • खྉΛࣗ༝ʹઃఆͰ͖ͨΓ͢Δ Google
ExtensionͰΠϯετʔϧͰ͖Δ εϚϗΞϓϦ͋Δ
ܨ͍ͰΈΔ
NFTΛൃߦͯ͠ΈΑ͏ʂ Issue Non Fungible Token
NFTΛൃߦͯ͠ΈΑ͏ʂ ূ໌ॻͷNFTൃߦΞϓϦ ൃߦϘλϯΛԡ͢ͱ
Contract (Solidity) ͜ͷίϯτϥΫτΛ EthereumͷϒϩοΫνΣʔϯʹ σϓϩΠ͢Δʂ σϓϩΠ͢Δࡍʹ Ψε(ETH)ඞཁʂ
Contractͷ͍ํ ίϯτϥΫτͷػೳΛ͏ͨΊͷ४උ
Contractͷ͍ํ ίϯτϥΫτͷΠϯελϯεΛੜ͢Δ͜ͱʹΑΓ ίϯτϥΫτͷؔΛ͏͜ͱ͕Ͱ͖Δ
ൃߦͨ͠NFTΛ֬ೝ
JSͰϒϩοΫνΣʔϯΛ͓͏ʂ
ΤϯδχΞืूͯ͠·͢ʂ
None