[Solidity] Hardhat 공부 - 1 (설치 및 PlugIn)
4 comments
happyberrysboy
83
2 years ago이번에는 개인적으로 Hardhat에 대해서 공부를 해보려고 합니다.
기존에는 Truffle를 많이 사용해 왔으나.... 이보다는 Hardhat의 장점이 더 많다고 봐서 한번 공부해보려고 하네요..!!
스따뜨!!
1. Hardhat
- 이더리움 Dapp 개발도구
- 가상 이더리움 네트워크 제공
- web3.js 대신 ethers.js를 사용
2. 설치
yarn add hardhat --dev
npx hardhat
(npm 대신 npx를 사용한다.)
3. Plug In 추가
yarn add @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers --dev
yarn add @openzeppelin/hardhat-upgrades --dev
4. 주요 명령어
- compile :
npx hardhat compile
- test :
npx hardhat test --network networkname ./test/test.js
- run :
npx hardhat run--network networkname ./test/test.js
- console :
npx hardhat console --network networkname
Comments