简体   繁体   English

为什么我在安全帽中运行 js 脚本后什么也没有发生?

[英]Why does nothing happen after I run js scripts in hardhat?

Still trying to run a javascript with Hardhat to deploy a contract.仍在尝试使用 Hardhat 运行 javascript 来部署合同。 npx hardhat run scripts/deploy.js --network rinkeby

It just has yet to run.它还没有运行。 It has been over twelve hours.已经十二个多小时了。

Could this be my computer or the testnet?这可能是我的电脑还是测试网? I do not get an error thrown after compiling and I have not seen anything similar.编译后我没有收到错误,我没有看到任何类似的东西。 Thank you!谢谢!

I was doing same mistake while copy pasting the code, and with a second pair of eye of my peer he pointed out that I am missing out main() at the end of the script file我在复制粘贴代码时犯了同样的错误,他用另一双眼睛指出我在脚本文件末尾错过了 main()

  main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM