You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, @DiwakarThapa . Sorry, but before I answer your question, it is better to make sure that we both understand what we are talking about.
I think you are talking about gas limit, not gas price. Usually the gas limit is equal to 21000, and it is the gas limit that needs to be "estimated".
Gas limit is the maximum amount of gas that the user is willing to pay to complete this action or confirm a transaction.
Gas price is the amount of Gwei that the user is willing to spend on each unit of gas.
In order to calculate the total cost of a transaction commission in Ether, it is necessary to multiply the gas limit by its price. For example, if the gas limit is 50.000 units, and the gas price is 20 Gwei, then this means that the sender is ready to spend 0.001 ether on the transaction. 50.000 * 20 Gwei = 0.001 Ether. You can’t convert gas limit into Wei, because it is not measured in Wei.
But if you really want to covert some gas price into Wei from 21000 BigUInt, then make this
No description provided.
The text was updated successfully, but these errors were encountered: