Skip to content

Can't deploy contract to Rinkeby but only hardhat #339

Answered by alymurtazamemon
rileymross asked this question in Q&A
Discussion options

You must be logged in to vote

@rileymross you have commented out the default network that was hardhat. So if you comment on the default network it will still be hardhat by default.

The error is saying that it is a Type error in the URL, you should try this:

module.exports = {
    solidity: "0.8.8",
    defaultNetwork: "rinkeby",
    networks: {
        rinkeby: {
            url: process.env.RINKEBY_RPC_URL,
            accounts: [process.env.PRIVATE_KEY],
            chainId: 4,
        },
    },
    etherscan: {
        apiKey: process.env.ETHERSCAN_API_KEY,
    },
}

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@rileymross
Comment options

@mattjaf
Comment options

@rileymross
Comment options

@mattjaf
Comment options

@rileymross
Comment options

Comment options

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