DEV Community

Discussion on: How to deploy a Smart Contract to the Testnet

Collapse
 
rebiacom profile image
Leonardo Mocaiber

Hi, When I try run the compile I'm receiver a error:
"Error HH8: There's one or more errors in your config file:

  • Invalid account: #0 for network: rinkeby - private key too short, expected 32 bytes To learn more about Hardhat's configuration, please go to hardhat.org/config/" Like the url rinkeby dont exist and when I'm try open the rinkeby url return 404. Any tips that can help me out? Thanks, congratulations great article.
Collapse
 
mattheweller profile image
Matthew Eller

NGL, I ran into this issue and it took me a few minutes to realize that I was calling the run scripts from the wrong directory...

Collapse
 
emanuelferreira profile image
Emanuel Ferreira

Hey, are you using the correct private key of your wallet? it's not your address, but your private key

Collapse
 
gitatron profile image
Gitatron Maximus

I had the error like this:

Error HH8: There's one or more errors in your config file:

  • Invalid account: #1 for network: sepolia - private key too long, expected 32 bytes To learn more about Hardhat's configuration, please go to hardhat.org/config/

//Turns out I put a space after the comma when I was listing the accounts. I took the space out and the error resolved.

Collapse
 
theantipioneer profile image
Atang

Save the private key in full with 0x prefix as an environment variable and then pass it in with the method .toString().

process.env.PRIVATE_KEY.toString()