Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to deploy to different networks than default #172

Open
bvdaniel opened this issue Aug 28, 2023 · 1 comment
Open

Failed to deploy to different networks than default #172

bvdaniel opened this issue Aug 28, 2023 · 1 comment

Comments

@bvdaniel
Copy link

bvdaniel commented Aug 28, 2023

Testing the repo and using env variables for mumbai and polygon RPCs, together with the polygonscan api key, I'm getting this when trying to deploy to another network:

[email protected] deploy
hardhat run scripts/deployment/main.js mumbai

Error HH308: Unrecognized positional argument mumbai

Happens the same with sepolia and polygon. Circled it around by changing the defaut network on hardhat.config to deploy on polygon or mumbai. Compiling and testing works ok.

image
@mscurtescu
Copy link

It looks like --network is a hardhat specific flag and yarn, npx or npm will not recognise it .

You can run the deploy script through hardhat and then it works:

hardhat run scripts/deployment/main.js --network localhost

I think that the README should be fixed to reflect this, I run into this issue with a few other commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants