I have an ethereum wallet, I need to calculate the amount to completely empty the wallet.
So currently i calculate the needed gas like this,
needed_gas = w3.eth.gasprice * 210000
amount_to_send = balance - needed_gas
However, the are still few cents remaining in the account, this causes a loop as I try to transfer untill the amount_to_send value is 0.
210000
to21000
. – goodvibration Mar 14 '19 at 7:44