This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Replies: 1 comment
-
|
You should generally use gasUsed for transaction-specific calculations, as it represents the gas consumed by the current transaction. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
see: https://docs.web3js.org/guides/transactions/transactions/#step-4-send-a-transaction-and-review-the-results:~:text=Note%20that%20the,by%20effectiveGasPrice).
effectiveGasPriceis the price per gas at the time of your transaction, so the total gas cost of your transaction iseffectiveGasPrice*gasUsed.gasUsedis the total amount of gas used by this specific transaction.So, why use
cumulativeGasUsedinstead ofgasUsedfor calculations? 😕Beta Was this translation helpful? Give feedback.
All reactions