3

Hi: When I Deploy or execute a function I get three categories of cost:

  • gas
  • transaction cost
  • execution cost

For example:

gas:    32296 gas
transaction cost:   28083 gas 
execution cost: 28083 gas 

I understand what transaction and execution costs are, but don't know what the first gas value means or how it is calculated.

Help?

I am attaching a screenshot that illustrates what I mean.

Thanks in advance!

enter image description here

1 Answer 1

2

gas : Total gas supplied for the transaction, the allowed "gas limit" which the transaction can use for its execution.

transaction cost: Total gas consumed for the transaction, can be anything upto the amount of the gas supplied for the transaction (until it hits blockGasLimit).

2
  • Wow! Thanks. Tell me please, is there anyway to figure out how the allowed "gas limit" has been calculated? In the example above, I did not provide the number 32296 anywhere. Thus, I am curious about how that gas number was determined.
    – reselbob
    Dec 15, 2022 at 16:03
  • 1
    The answer ignored the 3rd cost: execution cost
    – user610620
    Dec 16, 2022 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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