smartcontractkit / full-blockchain-solidity-course-js

Learn Blockchain, Solidity, and Full Stack Web3 Development with Javascript
12.31k stars 2.96k forks source link

eth_estimateGas error when trying to send eth in metamask on localhost #1782

Open rgutierrezatx opened 2 years ago

rgutierrezatx commented 2 years ago

Lesson

Lesson 15

Operating System

Windows

Describe the bug

After cloning the backend from chapter 15 and running yarn hardhat node, i start receiving the following error in the terminal when trying to send eth between accounts in metamask. FWIW I am running WSL Ubuntu inside windows, node v16.16.0

eth_estimateGas

  If you think this is a bug in Hardhat, please report it here: https://hardhat.org/reportbug

Because of this, I am not able to send eth between accounts in metamask. The buttons are grayed out. If i rename the deploy folder so that the contracts are not deployed, then I am able to send eth once, but a second attempt results in grayed out buttons. I am resetting the account in MM everytime I relaunch hardhat

Any thoughts?

wildanvin commented 2 years ago

To send ETH between addresses you have to import 2 accounts to metamask using the private keys that hardhat provides in the terminal. Also don't forget to add the local hardhat network to metamask.

You shouldn't get any error if you do that.

krakxn commented 2 years ago

Create a discussion; this does not seem like a bug--logical error--and hence irrelevant here.

Close the issue, if discussions do not help, you can always re-open this.

RareSecond commented 1 year ago

I have this exact same issue, where it randomly works, but on other times, the buttons in Metamask are disabled just like @rgutierrezatx stated

0xYoyo commented 1 year ago

Has anyone found a solution for this yet? Or the reason for why this keeps happening?