I'm trying to deploy my Smart Contract onto the Rinkeby test network. Everything is working fine, my rinkeby account is also having enough ethers. And also using HDWalletProvider, I am able to access my rinkeby account as it's getting logged out on the terminal too but still I am getting this error don't know why

My abi and bytecode are also working fine as previously I deployed the same contract on my ganache local network. Only when deploying it on rinkeby, I'm facing this issue.

Also if I don't use try and catch, some really really huge chunk of characters keep printing on my terminal. I have no clue what's the real problem here.

enter image description here

  • 1
    You're deploying from your second account (account[1]), not your first account (account[0]). Is that intentional? May 8, 2021 at 15:11
  • No so sorry.. that was just a typo The error still remains there when I'm using accounts[0] May 8, 2021 at 15:42

1 Answer 1


Make sure HDWalletProvider is updated to latest and then pass the chainId as an option to HDWalletProvider. For rinkeby its 4.

The next version of HDWalletProvider will auto fetch the chainId, but it doesn't do this yet. This feature will likely will be released next Thursday or Friday.

This only started happening now because geth recently began defaulting to requiring eip-155 style transactions, i.e., with replay protection.

  • Thanx a lot.. it finally worked !! But just out of curiosity I would like to know what was being printed on my terminal when I wasn't using try catch. It was some really huge chunk of characters through. May 9, 2021 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.