Get gas fee estimation from any method #2599
Answered
by
StayFoolisj
StayFoolisj
asked this question in
Q&A
-
Does ethers.js have any function for estimating the gas fee of a transaction? With this example I'd not expect it to be a real transaction, but rather have an estimation of gas limit / fee denominated in Gwei:
Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
StayFoolisj
Jan 26, 2022
Replies: 1 comment
-
Found the answer, just use estimateGas. before the method name like this format
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
StayFoolisj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the answer, just use estimateGas. before the method name like this format
contractObject.estimateGas.method()
here's my code if anyone needs: