1

Here's a transaction:

0xf8900b8504a817c800830f424094394b88b676f289224bdc332f361be399ea064bd587060a24181e4000a4a358c2fa841a3c2efd182abc0a149b32a493044d84aa6c0d4ebe34e0f1b9e96403db65da2aa0a2b453bcade87566a292462a6e4de82615508de982936799642dba9e959b1ac3a0364eee7341bf901182e59c1b7492b03e55163703435fc8a1f199fcf30d50abca

Here's the result of parsing it with helpeth library using parseTx method:

Signed by: 0x4f33d4895b0584f31024132468bd85beb4249ac5
Nonce: 0x0b
To: 0x394b88b676f289224bdc332f361be399ea064bd5
Value: 1700000000000000 (0.0017 ETH)
Data: 0xa358c2fa841a3c2efd182abc0a149b32a493044d84aa6c0d4ebe34e0f1b9e96403db65da
Gas limit: 1000000
Gas price: 20000000000 (20 Gwei)
Potential total transaction cost: 0.02 ETH
Minimum required account balance: 0.0217 ETH

When I send this transaction to the network I pay 0.0027 ETH (almost ten times smaller than Minimum required account balance).

The transaction cost is calculated with this formula:

value + gasPrice * gas = txCost

In my case its: 0.0017 + 0,00000002 * 50 000 = 0.0027

How does Minimum required account balance calculated?

And why there's need for it at all? It's very confusing when want to send a tx and have enough balance, but get an error unsufficient funds when balance is lower than the Minimum required account balance

1

The "Potential total transaction cost" means "Maximum tx fee" which is:

gas limit * gas price = 0.02 ETH

So, "Minimum required account balance" is the above + value

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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