I am using geth to transfer some ether to another account.
After geth attach
to my node, I just do is the following
personal.unlockAccount(eth.accounts[0])
eth.sendTransaction({from:eth.accounts[0], to:'0x....', value: web3.toWei(0.05, "ether")})
In a transaction I did a few days ago I paid 0.00168 Ether ($2.30) transaction fees. The transaction was confirmed in under a minute, so I want to to manually reduce the transaction fee if I am not in a rush to get my transaction confirmed.
In this post I see that you can set the gas price to any value you want by supplying a gasPrice
argument in eth.sendTransaction()
. I also now check in ethgasstation.info that a "standard" gas price is 114 Gwei. I also see in the documentation that the units of gasPrice
is wei.
My question is how would I put my desired gas price in my sending transaction? I don't want to make a big mistake with units and drain my whole account by paying huge fees! Would I put something like
eth.sendTransaction({from:eth.accounts[0], to:'0x....', value: web3.toWei(0.05, "ether"), gasPrice:114e9})
?