在编译硬帽子项目时,当它显示时,不需要编译。
{
"name": "HardhAtToken",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"chai": "^4.3.6",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.6.6",
"hardhat": "^2.9.6-dev.1"
},
"dependencies": {
"glob": "^7.2.0"
}
}发布于 2022-05-21 10:34:38
Hardhat在cache项目文件夹中保存已编译合同的缓存。
npx hardhat compile命令只编译自上次编译以来未更改的文件。因此,在您的情况下,“不需要编译”消息是预期的。
您可以使用npx hardhat clean清除缓存,也可以使用npx hardhat compile --force参数强制重新编译缓存的源。
发布于 2022-09-29 05:54:51
主要的问题是,您还没有在您的中创建一个目录,您可以在其中实现sol并运行npx compile..It。
https://stackoverflow.com/questions/72328178
复制相似问题