Hardhat の Tutorial をやっていく
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
- 読んでおわり