1

Here's a Kovan transaction I'm trying to optimize:

I've noticed that the "Internal Txns" view displays internal steps for the function I called, along with a "Gas Limit" column that appears to present the evolution of gas usage within the transaction.

Is this column indeed a detailing of gas consumption for the transaction? How should I interpret these values?

Thanks in advance.

1

You are correct.

That "Gas Limit" column is the gas sent with each of those calls. You can imagine that an Ethereum transaction is made up of many smaller "transactions" (calls). In this sense, the page you linked is each of the smaller "transactions" and the "Gas Limit" can be thought of in the same light as the "Gas limit" of the overall transaction.

There are some slightly exotic rules around these smaller "transactions", such as the 1/64th rule. You can read more about it in EIP-150.

You can see even more detailed information by clicking the ellipsis on the top right of that page and choosing "Parity Trace"

4
  • 1
    Hi Shane, do you know why summing the "gasUsed" for each action from the "Parity Trace" results in much more gas than the actual amount used by the transaction? Apr 3 '21 at 23:20
  • I would not expect that to be the case. If you have verified that that is the case, then I'm not sure! Apr 3 '21 at 23:45
  • 1
    I dug up a bit on the parity trace json data and It seems that when an action has child actions its "gasUsed" is the sum of all inner actions plus the gas used within it, so that's why it adds up to much more. After some parsing it's possible to obtain the actual gas for each individual action, making it easier to spot possible optimization targets ;) Apr 4 '21 at 0:07
  • I see. That makes sense! Apr 4 '21 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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