eth.sendTransaction() example

jonk88jonk88 Member Posts: 8
edited June 13 in web3-js
I am trying to to a transfer from my personal wallet into my coinbase wallet so I can convert to USD. I have been looking at many examples of how do a transfer with geth between two accounts, but no matter what I try I get one of two errors.

If I do not include gas/gasPrice I get...

Error: exceeds block gas limit

I looked up the current gasLimit eth.getBlock("latest").gasLimit and got 5000.
So I went to and saw 40 gwei is the fastest execution. So in Geth I try this...

web3.eth.sendTransaction({from: 'myWallet', to: 'coinbaseWallet', value: web3.toWei(0.1,'ether'),gas: 5000, gasPrice: web3.toWei(40,'gwei')});

And I get the error: insufficient funds for gas * price + value

I have .2 in my account right now, and no matter how low I set the ether value, I still get the insufficient funds error.

Anyone know what I'm doing wrong?



Sign In or Register to comment.