Lesson 6 TypeError: Cannot read properties of undefined (reading 'url') #5415
-
I am unable to add network everytime , I run " yarn hardhat scripts/deploy.js " I get these error " TypeError: Cannot read properties of undefined (reading 'url') " . I tried finding a solution on StackExchange and StackOverflow but couldn't understand any of those,
Please Let me know If i have done something wrong while following tutorial Hardhat.config.json
Error
deploy.js
|
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
May 1, 2023
Replies: 1 comment 1 reply
-
@Bhavik-punmiya I think you forgot the network object here; networks:{
accounts: [PRIVATE_KEY],
url: process.env.SEPOLIA_RPC_URL,
chainId: 11155111,
} it should be like this; networks:{
sepolia: {
accounts: [PRIVATE_KEY],
url: process.env.SEPOLIA_RPC_URL,
chainId: 11155111,
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Bhavik-punmiya
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Bhavik-punmiya I think you forgot the network object here;
it should be like this;