hardhat fundme : Error HH8: There's one or more errors in your config file: * Invalid account: #0 for network: sepolia - Expected string, received undefined #5448
Unanswered
Chrisronald
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hello @Chrisronald Semms like you have incorrectly defined PRIVATE_KEY = b7aacde78b12299907c6dd6c8d5b0ac6fea04f166di04709978e1cff0354f1da If it is set as above you can change below code: // Add `.config()` to below import
require("dotenv").config()
module.exports = {
defaultNetwork: "hardhat",
networks: {
sepolia: {
url: SEPOLIA_RPC_URL,
// Just remove [] array from here
accounts: process.env.PRIVATE_KEY,
chainId: 11155111,
blockConfirmations: 6,
}, Or just call it as you should like below: module.exports = {
defaultNetwork: "hardhat",
networks: {
sepolia: {
url: SEPOLIA_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 11155111,
blockConfirmations: 6,
}, |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Chrisronald You forgot require("dotenv").config(); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
please can someone help out?
Beta Was this translation helpful? Give feedback.
All reactions