Samm I
Samm I

Reputation: 21

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

Still trying to run a javascript with Hardhat to deploy a contract. 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!

Upvotes: 2

Views: 823

Answers (1)

Muhammad Hassan
Muhammad Hassan

Reputation: 479

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()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });

Upvotes: 1

Related Questions