新建hardhat项目

2021-12-10  本文已影响0人  jameschuh

新建项目目录

mkdir testp
cd testp

安装hardhat

npm install hardhat --save-dev

执行命令

npx hardhat
选择创建项目,一步步进行

安装依赖

npm install --save-dev "hardhat@^2.7.1" "@nomiclabs/hardhat-waffle@^2.0.0" "ethereum-waffle@^3.0.0" "chai@^4.2.0" "@nomiclabs/hardhat-ethers@^2.0.0" "ethers@^5.0.0"

编译合约

npx hardhat compile

测试合约

npx hardhat test

上一篇 下一篇

猜你喜欢

热点阅读