简体   繁体   English

尝试通过 hardhat 功能编译我的合约时出错

[英]Error in trying to compile my contract through the hardhat feature

Kindly explain why I'm getting this error message when I tried to compile my contract through the hardhat feature and also how I can solve it.请解释为什么当我尝试通过 hardhat 功能编译我的合约时收到此错误消息以及我如何解决它。

Below is the hardhat.config.js script下面是 hardhat.config.js 脚本

    require("@nomiclabs/hardhat-waffle");
require('@nomiclabs/hardhat-ethers');

module.exports = {
  solidity: '0.8.0',
  network: {
    ropsten: {
      url: "https://eth-ropsten.alchemyapi.io/v2/Bn5tm9fX90ET1hKwb76lKJB0rzU3JBi2",
      accounts: ["63b598044c3cce8d656a3db5c.........c64beb17eb1687aebbefc5cac8a"]
    }
  }
}

below is the error I keep getting whenever I try to compile it using the run下面是每当我尝试使用运行编译它时我不断遇到的错误

PS C:\Users\Temitope\Desktop\kredar\smart_contract> npx hardhat run scripts/deploy.js --network ropsten
Error HH100: Network ropsten doesn't exist

For more info go to https://hardhat.org/HH100 or run Hardhat with --show-stack-traces
PS C:\Users\Temitope\Desktop\kredar\smart_contract> 

Thanks.谢谢。

By looking at your config i guess that network should be networks .通过查看您的配置,我猜network应该是networks

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过 Hardhat 将智能合约部署到孟买 tes.net 时出错 - Error while deploying a smart contract to Mumbai testnet through Hardhat 尝试使用安全帽编译合约但出现错误:- 错误:找不到指定的模块 - Tried to compile contract using hardhat but got error:- Error: The specified module could not be found 在安全帽上部署合同或创建 NFT 时出现错误:ProviderError: invalid sender - On hardhat when deploying a contract or minting an NFT getting error: ProviderError: invalid sender 使用安全帽和 heroku 部署智能合约 - 未安装 ERR 安全帽 - Smart contract deploy with hardhat and heroku - ERR hardhat not installed 使用安全帽编译智能合约时出错 - Errror compiling smart contract using hardhat 无法编译或运行安全帽 - cannot get hardhat to compile or run Solidity 编译错误。 (合同应标记为摘要。) - Solidity compile error. (Contract should be marked as abstract.) 尝试在节点中编译 Angular 应用程序时出错 - Error While trying to Compile Angular Application in node 使用 hardhat-upgrades 在单独的部署文件中获取先前部署的代理合同 - Get previously deployed proxy contract in a seperate deployment file using hardhat-upgrades 试图部署 hardhat 脚本,npm ERR! 代码 E404 - trying to deploy hardhat scripts, npm ERR! code E404
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM