HardhatConfig.networks.testnet - Expected a value of type HttpNetworkConfig

Invalid value {“url”:“https://data-seed-prebsc-1-s1.binance.org:8545/",“chainId”:97,“gasPrice”:20000000000,"accounts”:{}} for HardhatConfig.networks.testnet - Expected a value of type HttpNetworkConfig.

above is the error I’m facing while trying to deploy through hardhat … could you kindly answer me what’s error there to be fixed

Hi @Sid-1661,

Welcome to the community :wave:

You could try asking in the Hardhat Discord: https://hardhat.org/discord

Also have a look at the following config:

did you figure out a solution im having the same problem

@ross_elpharin & @Sid-1661
try replacing the accounts value like this:
testnet: {

  url: "https://data-seed-prebsc-1-s1.binance.org:8545",

  chainId: 97,

  gasPrice: 20000000000,

  accounts: [process.env.PRIVATE_KEY ]

},

obviously with your own private key between the brackets

2 Likes