NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.17k stars 1.38k forks source link

This helper can only be used with Hardhat Network. You are connected to X #4690

Closed Sid-Turner-Ellis closed 8 months ago

Sid-Turner-Ellis commented 9 months ago

Version of Hardhat

2.19.2

What happened?

I'm following this blog post step by step:

https://blog.thirdweb.com/guides/how-to-deploy-contracts-to-local-blockchain-using-thirdweb/

and when I run npx hardhat run ./scripts/init.js I get the "This helper can only be used with Hardhat Network. You are connected to running" error

Minimal reproduction steps

Steps are here: https://blog.thirdweb.com/guides/how-to-deploy-contracts-to-local-blockchain-using-thirdweb/

Search terms

No response

schaable commented 8 months ago

Hi @Sid-Turner-Ellis. I've attempted to replicate the error using both thirdweb and hardhat but wasn't able to reproduce it on my end. It's possible that there might be a specific aspect of your setup or code causing this issue. I'm closing the issue, but I'm happy to reopen if you can provide a minimal reproductible example.