Skip to content

TypeError: Invalid URL. Lesson 6 Hardhat Simple Storage #574

Answered by jacobhay2626
jacobhay2626 asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to solve the issue by doing the following:

const RINKEBY_RPC_URL =
    process.env.RINKEBY_RPC_URL ||
    "https://eth-rinkeby.alchemyapi.io/v2/D2p30M4TCJURlZSocd7dJLlrJLMrLM8a"
const PRIVATE_KEY =
    process.env.PRIVATE_KEY ||
    "pasted my private key into here"

module.exports = {
    solidity: "0.8.8",
    defaultNetwork: "hardhat",
    networks: {
        rinkeby: {
            url: "https://eth-rinkeby.alchemyapi.io/v2/D2p30M4TCJURlZSocd7dJLlrJLMrLM8a",
            accounts: [PRIVATE_KEY],
            chainId: 4,
        },
    },
}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@tuhindasv0
Comment options

@jacobhay2626
Comment options

@alymurtazamemon
Comment options

Answer selected by alymurtazamemon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants