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
Today, when handling an event, the transaction object contains gas-related entries:
event.transaction.gasPrice
event.transaction.gasUsed
However, event.transaction.gasUsed does not contain the gas used but the gas limit (which is part of the transaction). Gas used (and cumulative gas used) are part of the transaction receipt.
Steps that should be taken:
Rename the current gasUsed into gasLimit
Add gasUsed and/or cumulativeGasUsed from the transaction receipt in the event.transaction object
The text was updated successfully, but these errors were encountered:
We could put a receipt field in the transaction, without all the logs if that's not necessary. But while we do currently pull in all receipts, that's a wasteful thing we do that I hope to refactor away as part of graphprotocol/graph-node#902. So a receipt field should be lazily loaded and fetch the receipt on-the-fly, though we can cache it.
Today, when handling an event, the
transaction
object contains gas-related entries:event.transaction.gasPrice
event.transaction.gasUsed
However,
event.transaction.gasUsed
does not contain the gas used but the gas limit (which is part of the transaction). Gas used (and cumulative gas used) are part of the transaction receipt.Steps that should be taken:
event.transaction
objectThe text was updated successfully, but these errors were encountered: