-
Notifications
You must be signed in to change notification settings - Fork 244
[SUBGRAPH] add gasUsed property #1103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@benjlevesque I tried this out following the steps listed in here and bumped the versions of graph-cli and graph-ts to the latest versions and even tried installing the alpha versions mentioned here. You can checkout the linked PR to see that the past two builds failed because of an indexing error. The error probably doesn't display there, but I've tested it locally and I get:
|
sorry @0xdavinchee I didn't manage to run the superfluid subgraph (on goerli), so I can't reproduce your issue :/ did you try testing for null before accessing the if (receipt) {
ev.gasUsed = receipt.gasUsed;
} else {
log.warning("receipt is null", []);
} |
Yeah, I think this actually throws when you try to access a property that's null |
Problem
The subgraph contains information about
gasPrice
, but not aboutgasUsed
, which makes it harder to compute the price of the transaction.Possible Solution
This wasn't possible until recently, but is now available on
event.receipt.gasUsed
docs.The text was updated successfully, but these errors were encountered: