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
Here is the description of the return value of estimateGas. It says that the return value is the gas estimate in wei. (Source code)
However, Viem's estimateGas returns the number of gas units, not wei.
Also, Wagmi's estimateGas actually returns the same value as Viem's estimateGas. I need to multiply it with maxFeePerGas to get the correct value in wei.
I would like to think that the documentation is wrong here, but I'm not sure if I misunderstand something.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Here is the description of the return value of
estimateGas
. It says that the return value is the gas estimate in wei. (Source code)However, Viem's
estimateGas
returns the number of gas units, not wei.Also, Wagmi's
estimateGas
actually returns the same value as Viem'sestimateGas
. I need to multiply it withmaxFeePerGas
to get the correct value in wei.I would like to think that the documentation is wrong here, but I'm not sure if I misunderstand something.
Beta Was this translation helpful? Give feedback.
All reactions