HardhatのTutorialをやっていく
created: 2022-08-21
/
updated: 2022-08-27
1. Overview
- 読んでおわり
2. Setting up the environment
3. Creating a new Hardhat project
- Hardhatの設定ファイルをつくっておすすめプラグインを導入しておわり
4. Writing and compiling smart contracts
- シンプルさを重視するため、ここでつくるトークンはあえてERC-20準拠にはしないとのこと
- 本筋とは関係ないけど、サンプルコードを写経しているとGitHub Copilotがばんばん正解を提示してくれてすごい
- https://github.com/june29/hardhat-tutorial/blob/main/contracts/Token.sol
5. Testing contracts
- ethers.jsを使う
- Mochaを使う
- https://mochajs.org/
- RSpecにインスパイアされた系かな
- Chapter 3でインストールした
@nomicfoundation/hardhat-toolboxってやつにethers.jsとMochaが含まれているのね - https://github.com/june29/hardhat-tutorial/blob/main/test/Token.js
6. Debugging with Hardhat Network
- Solidityでconsole.logを使えるようにするぞ、という話
- JavaScript文化圏だ
- https://github.com/june29/hardhat-tutorial/tree/main/artifacts のディレクトリはgitignoreした方がいいのかな
7. Deploying to a live network
8. Hardhat Boilerplate Project
9. Final thoughts
- 読んでおわり


