1

I finally got to test my smart contract for the first time on the Goerli network through alchemy. It worked twice as I check on Etherscan which is now gone, but when I run the command; 'npx hardhat run scripts/deploy.js --network goerli', nothing happens. I've looked through everything; the deploy.js file, hardhat.config.js, and Transactions.sol. I've also tried creating a new app on alchemy and that didn't work. Nothing happens; no compile, or anything. I'm pretty sure this means its getting, hung?enter image description here

1
  • Can you try adding console logs after every statement to be sure where it would have stuck? Dec 12, 2022 at 5:19

3 Answers 3

2

I would have just commented to the original question, but I do not have enough reputation to comment.

I have experienced the same issue. Lately the Goerli network is super busy in US day time and it takes a very long wait for contract deploy (especially, if your deploy script is waiting for the deploy to complete). I changed my deploy script to just print the hash of deploy request and return quicker but the deploy itself completes when it gets picked from mempool.

Hope it helps

0

Since you get HH601 error, you can't compile your contract successfully, it can be couple reasons, at first make sure your compiler version matches with your contract solidity version.

4
  • That HTTP error was because I had a typo with the command; I put "scripts./deploy.js" instead of "scripts/deploy.js".
    – Slatt
    Dec 12, 2022 at 7:23
  • when you fix this and write your command correctly, what you get?
    – Alireza
    Dec 12, 2022 at 7:27
  • The smart contract is compiling, but I think it's getting hung or something like that. I went on alchemy and looked at the mempool and saw a lot of pending transactions and have no idea how it was happening or how to fix them.
    – Slatt
    Dec 12, 2022 at 7:27
  • at first let's test your contract in Remix and make sure your contract works well, i think maybe your contract has problem
    – Alireza
    Dec 12, 2022 at 7:29
0

Delete your artifact and cache folder, and re-compile and deploy, it will work for you

and also instead of typing this, in the console log always.

yarn hardhat run scripts/deploy.js --network goerli

you can create a new script in your package.json and have something like this

  "scripts": {
    "goerli": "yarn hardhat run scripts/deploy.js"
  },

so you can run yarn run goerli in your console, without having to type that much next time

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.