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
{{ message }}
Repository navigation
subgraph: gasUsed for winningTicketRedeemds is the gas limit on the tx and not the actual gas used #27
and I noticed that for tx 0xd05bf9676006101c15249494d5a1c83a16d3e8751ae589291d64cdd370b36314 the gasUsed field is 261183, but the gas used shown on the Etherscan page is 257657. 261183 is actually the gas limit of the tx and not the gas used by the tx.
Expected behavior (required)
A clear and concise description of what you expected to happen.
The gasUsed field should represent the gas used by a tx and not the gas limit of the tx.
Yeah so the update changed that field name to be gasLimit instead of gasUsed. And then there's the option to have a receipt field to get the gasUsed. We'd need to add a bit more code to get the gasUsed field to be actual gas used and not gas limit
@mehrdadmms this was implemented but not reviewed in #164. However it will increase subgraph side so the team that takes this on has to look whether adding this is worth the tradeoff.
Activity
yondonfu commentedon Mar 1, 2021
Related https://github.com/graphprotocol/graph-ts/issues/80
adamsoffer commentedon May 10, 2022
@0xcadams - According to this update by the graph team, updating graph-cli & graph-ts to their latest versions fixes this issue. Can you confirm?
0xcadams commentedon May 11, 2022
Yeah so the update changed that field name to be gasLimit instead of gasUsed. And then there's the option to have a receipt field to get the gasUsed. We'd need to add a bit more code to get the gasUsed field to be actual gas used and not gas limit
graphprotocol/graph-node#3218 (comment)
fix: correctly index actual gas used instead of gas limit
fix: correctly index actual gas used instead of gas limit
rickstaa commentedon Dec 24, 2025
@mehrdadmms this was implemented but not reviewed in #164. However it will increase subgraph side so the team that takes this on has to look whether adding this is worth the tradeoff.