Skip to content

Lesson 6: deploy.js not using default hardhat network #6353

Answered by promenox
Priyanshu-Desai asked this question in Q&A
Discussion options

You must be logged in to vote

The error Invalid account: #0 for network: sepolia - Expected string, received undefined suggest that your private key variable is undefined.

  1. Check your environment variables' names are spelled correctly.
  2. Check your variables' data is formatted correctly.
  3. Check your .env file is in the correct location.

Add console.log(process.env.SEPOLIA_RPC_URL) and console.log(process.env.SEPOLIA_PRIVATE_KEY) to your deploy script - to check your data is formatted as expected.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Priyanshu-Desai
Comment options

Answer selected by Priyanshu-Desai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants