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

Network sepolia doesn't exist #266

Open
sandeepV2 opened this issue Nov 12, 2023 · 2 comments
Open

Network sepolia doesn't exist #266

sandeepV2 opened this issue Nov 12, 2023 · 2 comments
Labels
bug Something isn't working needs triage New issue that needs to be triaged by core team

Comments

@sandeepV2
Copy link

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'ProjectNFT'
  2. Build the project as instructed.
  3. Error while deploying NFT.
  4. See error after running below command
    npx hardhat --network sepolia run scripts/deploy.js

Expected behavior Deploy the NFT on sepolia test net.

Screenshots/ERROR

npx hardhat --network sepolia run scripts/deploy.js --show-stack-traces
Error HH100: Network sepolia doesn't exist
HardhatError: HH100: Network sepolia doesn't exist

Desktop (please complete the following information):

  • OS [ MacOs Monterey (12.7)]
  • Browser [Brave]
  • Version [e.g. 14]
@sandeepV2 sandeepV2 added bug Something isn't working needs triage New issue that needs to be triaged by core team labels Nov 12, 2023
@sandeepV2
Copy link
Author

defaultNetwork: "sepolia",
networks: {
  sepolia: {
    url: RPC_API_KEY,
    // accounts: [WALLET_PRIVATE_KEY],
    accounts: [`0x${WALLET_PRIVATE_KEY}`],
    chainID: 5,
  },
},

Following steps helped me to unblock the issue:

  1. Adding defaultNetwork and defining sepolia under networks of hardhat.config.js.
  2. Executing without --network option. (npx hardhat run scripts/deploy.js)

I think this change has to be mentioned in the lesson, when users hit failure.

@elPiablo
Copy link
Collaborator

Hey @sandeepV2
Sorry for the very, very long wait.
Please be sure to enter your command like so:
npx hardhat run scripts/deploy.js --network sepolia
Your terminal needs to read the commands in the correct order. Here hardhat will recognise the following run as a command. If followed by --network, it will throw an error because Hardhat won't recognise it as a command.
Hope this helps 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New issue that needs to be triaged by core team
Projects
None yet
Development

No branches or pull requests

2 participants